fixed bug #44692: HSSFPicture.resize() stretched image when there was a text next to it

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@682621 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yegor Kozlov 2008-08-05 08:06:50 +00:00
parent 9a1077fd1d
commit 36dd48e1f1
4 changed files with 14 additions and 3 deletions

View File

@ -37,6 +37,8 @@
<!-- Don't forget to update status.xml too! -->
<release version="3.1.1-alpha1" date="2008-??-??">
<action dev="POI-DEVELOPERS" type="fix">45472 - Fixed incorrect default row height in OpenOffice 2.3</action>
<action dev="POI-DEVELOPERS" type="fix">44692 - HSSFPicture.resize() stretched image when there was a text next to it</action>
<action dev="POI-DEVELOPERS" type="add">45543 - Optionally extract comment text with PowerPointExtractor, and initial hslf model support for comments</action>
<action dev="POI-DEVELOPERS" type="fix">45538 - Include excel headers and footers in the output of ExcelExtractor</action>
<action dev="POI-DEVELOPERS" type="fix">44894 - refactor duplicate logic from EventRecordFactory to RecordFactory</action>

View File

@ -620,7 +620,6 @@
</source>
</section>
</section>
<anchor id="HeadersFooters"/>
<section><title>How to extract Headers / Footers from an existing presentation</title>
<source>
@ -663,6 +662,7 @@
hdd.setFootersText("Created by POI-HSLF");
</source>
</section>
</section>
</section>
</body>
</document>

View File

@ -34,6 +34,8 @@
<!-- Don't forget to update changes.xml too! -->
<changes>
<release version="3.1.1-alpha1" date="2008-??-??">
<action dev="POI-DEVELOPERS" type="fix">45472 - Fixed incorrect default row height in OpenOffice 2.3</action>
<action dev="POI-DEVELOPERS" type="fix">44692 - HSSFPicture.resize() stretched image when there was a text next to it</action>
<action dev="POI-DEVELOPERS" type="add">45543 - Optionally extract comment text with PowerPointExtractor, and initial hslf model support for comments</action>
<action dev="POI-DEVELOPERS" type="fix">45538 - Include excel headers and footers in the output of ExcelExtractor</action>
<action dev="POI-DEVELOPERS" type="fix">44894 - refactor duplicate logic from EventRecordFactory to RecordFactory</action>

View File

@ -465,7 +465,14 @@ public final class HSSFRow implements Comparable {
public short getHeight()
{
return row.getHeight();
short height = row.getHeight();
//The low-order 15 bits contain the row height.
//The 0x8000 bit indicates that the row is standard height (optional)
if ((height & 0x8000) != 0) height = sheet.getDefaultRowHeight();
else height &= 0x7FFF;
return height;
}
/**
@ -475,7 +482,7 @@ public final class HSSFRow implements Comparable {
public float getHeightInPoints()
{
return (row.getHeight() / 20);
return ((float)getHeight() / 20);
}
/**