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
08fc07d5c6
commit
56ceb000f1
@ -185,7 +185,7 @@ public final class ApacheconEU08 {
|
|||||||
|
|
||||||
Dimension dim = ppt.getPageSize();
|
Dimension dim = ppt.getPageSize();
|
||||||
Rectangle2D oldAnchor = table1.getAnchor();
|
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();
|
TextBox<?,?> box1 = slide.createTextBox();
|
||||||
box1.setHorizontalCentered(true);
|
box1.setHorizontalCentered(true);
|
||||||
|
@ -189,7 +189,7 @@ public class ImageUtils {
|
|||||||
if (isHSSF) {
|
if (isHSSF) {
|
||||||
h *= 1 - anchor.getDy1()/256d;
|
h *= 1 - anchor.getDy1()/256d;
|
||||||
} else {
|
} else {
|
||||||
h -= anchor.getDy1()/EMU_PER_PIXEL;
|
h -= anchor.getDy1()/(double)EMU_PER_PIXEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
while(h < scaledHeight){
|
while(h < scaledHeight){
|
||||||
|
@ -341,11 +341,11 @@ public class WordToHtmlConverter extends AbstractWordConverter
|
|||||||
|
|
||||||
if ( aspectRatioX > 0 )
|
if ( aspectRatioX > 0 )
|
||||||
{
|
{
|
||||||
imageWidth = picture.getDxaGoal() * aspectRatioX / 1000
|
imageWidth = picture.getDxaGoal() * aspectRatioX / 1000.f
|
||||||
/ TWIPS_PER_INCH;
|
/ TWIPS_PER_INCH;
|
||||||
cropRight = picture.getDxaCropRight() * aspectRatioX / 1000
|
cropRight = picture.getDxaCropRight() * aspectRatioX / 1000.f
|
||||||
/ TWIPS_PER_INCH;
|
/ TWIPS_PER_INCH;
|
||||||
cropLeft = picture.getDxaCropLeft() * aspectRatioX / 1000
|
cropLeft = picture.getDxaCropLeft() * aspectRatioX / 1000.f
|
||||||
/ TWIPS_PER_INCH;
|
/ TWIPS_PER_INCH;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -357,11 +357,11 @@ public class WordToHtmlConverter extends AbstractWordConverter
|
|||||||
|
|
||||||
if ( aspectRatioY > 0 )
|
if ( aspectRatioY > 0 )
|
||||||
{
|
{
|
||||||
imageHeight = picture.getDyaGoal() * aspectRatioY / 1000
|
imageHeight = picture.getDyaGoal() * aspectRatioY / 1000.f
|
||||||
/ TWIPS_PER_INCH;
|
/ TWIPS_PER_INCH;
|
||||||
cropTop = picture.getDyaCropTop() * aspectRatioY / 1000
|
cropTop = picture.getDyaCropTop() * aspectRatioY / 1000.f
|
||||||
/ TWIPS_PER_INCH;
|
/ TWIPS_PER_INCH;
|
||||||
cropBottom = picture.getDyaCropBottom() * aspectRatioY / 1000
|
cropBottom = picture.getDyaCropBottom() * aspectRatioY / 1000.f
|
||||||
/ TWIPS_PER_INCH;
|
/ TWIPS_PER_INCH;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -252,11 +252,11 @@ public class TestWordToHtmlConverter
|
|||||||
// picture
|
// picture
|
||||||
assertContains(result, "src=\"0.emf\"");
|
assertContains(result, "src=\"0.emf\"");
|
||||||
// visible size
|
// visible size
|
||||||
assertContains(result, "width:3.1305554in;height:1.7250001in;");
|
assertContains(result, "width:3.1293333in;height:1.7247736in;");
|
||||||
// shift due to crop
|
// shift due to crop
|
||||||
assertContains(result, "left:-0.09375;top:-0.25694445;");
|
assertContains(result, "left:-0.09433333;top:-0.2573611;");
|
||||||
// size without crop
|
// size without crop
|
||||||
assertContains(result, "width:3.4125in;height:2.325in;");
|
assertContains(result, "width:3.4125in;height:2.3253334in;");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
Reference in New Issue
Block a user