Author: yegor
Date: Wed May 18 10:07:15 2011
New Revision: 1124163

URL: http://svn.apache.org/viewvc?rev=1124163&view=rev
Log:
fixed resizing pictures in XSSF, see Bugzilla 51160

Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java

Modified: 
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java?rev=1124163&r1=1124162&r2=1124163&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java 
(original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java Wed 
May 18 10:07:15 2011
@@ -239,7 +239,7 @@ public final class XSSFPicture extends X
         int dy2 = 0;
 
         if(anchor.getDy1() > 0){
-            h += getRowHeightInPixels(row2) - anchor.getDy1();
+            h += getRowHeightInPixels(row2) - anchor.getDy1()/EMU_PER_PIXEL;
             row2++;
         }
 
@@ -250,7 +250,7 @@ public final class XSSFPicture extends X
         }
 
         if(h > scaledHeight) {
-            double ch = getRowHeightInPixels(row2 + 1);
+            double ch = getRowHeightInPixels(row2);
             double delta = h - scaledHeight;
             dy2 = (int)(EMU_PER_PIXEL*(ch-delta));
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to