]> source.dussan.org Git - poi.git/commitdiff
fixed bug #44692: HSSFPicture.resize() stretched image when there was a text next...
authorYegor Kozlov <yegor@apache.org>
Tue, 5 Aug 2008 08:06:50 +0000 (08:06 +0000)
committerYegor Kozlov <yegor@apache.org>
Tue, 5 Aug 2008 08:06:50 +0000 (08:06 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@682621 13f79535-47bb-0310-9956-ffa450edef68

src/documentation/content/xdocs/changes.xml
src/documentation/content/xdocs/hslf/how-to-shapes.xml
src/documentation/content/xdocs/status.xml
src/java/org/apache/poi/hssf/usermodel/HSSFRow.java

index 80b3d0406df56f5406e3f58a522b6d73037eebdf..76d4b0e6e87536e6ae3d79dff32bd7f3f95131f7 100644 (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>
index 40ef32aa75e9616432d43fe7a734500f33b2e9c1..37bf1837387d5e3bcde577935ad4dbbc58830209 100644 (file)
                   </source>
                   </section>
                   
-                </section>
             <anchor id="HeadersFooters"/>
             <section><title>How to extract Headers / Footers from an existing presentation</title>
               <source>
           hdd.setFootersText("Created by POI-HSLF");
                 </source>
               </section>
+                </section>
         </section>
     </body>
 </document>
index 71e0ea2b5978317d50cc48e3c69f0861c31f4d43..8edb88bd1b787c59c1686bced2630659db131e74 100644 (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>
index e7de1df5d647e317482c9e1d6edc95c7cfaf2c4b..2a2d3635c61dc7b9730ccccda3d2c3446a7c2764 100644 (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);
     }
 
     /**