mirror of https://github.com/apache/poi.git
sonar fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1735345 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
280cdd4611
commit
217ae0ea8f
|
@ -185,7 +185,7 @@ public final class ApacheconEU08 {
|
|||
|
||||
Dimension dim = ppt.getPageSize();
|
||||
Rectangle2D oldAnchor = table1.getAnchor();
|
||||
table1.setAnchor(new Rectangle2D.Double((dim.width-450)/2, 100, oldAnchor.getWidth(), oldAnchor.getHeight()));
|
||||
table1.setAnchor(new Rectangle2D.Double((dim.width-450)/2d, 100, oldAnchor.getWidth(), oldAnchor.getHeight()));
|
||||
|
||||
TextBox<?,?> box1 = slide.createTextBox();
|
||||
box1.setHorizontalCentered(true);
|
||||
|
|
|
@ -189,7 +189,7 @@ public class ImageUtils {
|
|||
if (isHSSF) {
|
||||
h *= 1 - anchor.getDy1()/256d;
|
||||
} else {
|
||||
h -= anchor.getDy1()/EMU_PER_PIXEL;
|
||||
h -= anchor.getDy1()/(double)EMU_PER_PIXEL;
|
||||
}
|
||||
|
||||
while(h < scaledHeight){
|
||||
|
|
|
@ -341,11 +341,11 @@ public class WordToHtmlConverter extends AbstractWordConverter
|
|||
|
||||
if ( aspectRatioX > 0 )
|
||||
{
|
||||
imageWidth = picture.getDxaGoal() * aspectRatioX / 1000
|
||||
imageWidth = picture.getDxaGoal() * aspectRatioX / 1000.f
|
||||
/ TWIPS_PER_INCH;
|
||||
cropRight = picture.getDxaCropRight() * aspectRatioX / 1000
|
||||
cropRight = picture.getDxaCropRight() * aspectRatioX / 1000.f
|
||||
/ TWIPS_PER_INCH;
|
||||
cropLeft = picture.getDxaCropLeft() * aspectRatioX / 1000
|
||||
cropLeft = picture.getDxaCropLeft() * aspectRatioX / 1000.f
|
||||
/ TWIPS_PER_INCH;
|
||||
}
|
||||
else
|
||||
|
@ -357,11 +357,11 @@ public class WordToHtmlConverter extends AbstractWordConverter
|
|||
|
||||
if ( aspectRatioY > 0 )
|
||||
{
|
||||
imageHeight = picture.getDyaGoal() * aspectRatioY / 1000
|
||||
imageHeight = picture.getDyaGoal() * aspectRatioY / 1000.f
|
||||
/ TWIPS_PER_INCH;
|
||||
cropTop = picture.getDyaCropTop() * aspectRatioY / 1000
|
||||
cropTop = picture.getDyaCropTop() * aspectRatioY / 1000.f
|
||||
/ TWIPS_PER_INCH;
|
||||
cropBottom = picture.getDyaCropBottom() * aspectRatioY / 1000
|
||||
cropBottom = picture.getDyaCropBottom() * aspectRatioY / 1000.f
|
||||
/ TWIPS_PER_INCH;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -252,11 +252,11 @@ public class TestWordToHtmlConverter
|
|||
// picture
|
||||
assertContains(result, "src=\"0.emf\"");
|
||||
// visible size
|
||||
assertContains(result, "width:3.1305554in;height:1.7250001in;");
|
||||
assertContains(result, "width:3.1293333in;height:1.7247736in;");
|
||||
// shift due to crop
|
||||
assertContains(result, "left:-0.09375;top:-0.25694445;");
|
||||
assertContains(result, "left:-0.09433333;top:-0.2573611;");
|
||||
// size without crop
|
||||
assertContains(result, "width:3.4125in;height:2.325in;");
|
||||
assertContains(result, "width:3.4125in;height:2.3253334in;");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue