You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ye...@apache.org on 2011/05/27 20:46:04 UTC
svn commit: r1128422 -
/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java
Author: yegor
Date: Fri May 27 18:46:04 2011
New Revision: 1128422
URL: http://svn.apache.org/viewvc?rev=1128422&view=rev
Log:
Bug 51098 - Error in calculating image width/height, if image fits into one cell
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=1128422&r1=1128421&r2=1128422&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 Fri May 27 18:46:04 2011
@@ -215,10 +215,6 @@ public final class XSSFPicture extends X
float w = 0;
int col2 = anchor.getCol1();
int dx2 = 0;
- if(anchor.getDx1() > 0){
- w += getColumnWidthInPixels(col2) - anchor.getDx1();
- col2++;
- }
for (;;) {
w += getColumnWidthInPixels(col2);
@@ -227,7 +223,7 @@ public final class XSSFPicture extends X
}
if(w > scaledWidth) {
- double cw = getColumnWidthInPixels(col2 + 1);
+ double cw = getColumnWidthInPixels(col2 );
double delta = w - scaledWidth;
dx2 = (int)(EMU_PER_PIXEL*(cw-delta));
}
@@ -238,11 +234,6 @@ public final class XSSFPicture extends X
int row2 = anchor.getRow1();
int dy2 = 0;
- if(anchor.getDy1() > 0){
- h += getRowHeightInPixels(row2) - anchor.getDy1()/EMU_PER_PIXEL;
- row2++;
- }
-
for (;;) {
h += getRowHeightInPixels(row2);
if(h > scaledHeight) break;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org