diff --git a/designer-realize/src/main/java/com/fr/design/report/PageSetupPane.java b/designer-realize/src/main/java/com/fr/design/report/PageSetupPane.java index 8dadbe7cc9..668700a95e 100644 --- a/designer-realize/src/main/java/com/fr/design/report/PageSetupPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/PageSetupPane.java @@ -777,11 +777,11 @@ public class PageSetupPane extends BasicPane { // 纵向的长度 String h_str = "" + paper_height; //使用科学计数法显示长度的时候,限制纵向显示长度为9位 - if (h_str.contains(E)){ - String str1=h_str.substring(h_str.indexOf(E)); - String str2=h_str.substring(0,9-str1.length()); - h_str = str2+str1; - }else if(h_str.indexOf(CoreConstants.DOT) > 0) { + if (h_str.contains(E)) { + String str1 = h_str.substring(h_str.indexOf(E)); + String str2 = h_str.substring(0, 9 - str1.length()); + h_str = str2 + str1; + } else if (h_str.indexOf(CoreConstants.DOT) > 0) { h_str = h_str.substring(0, h_str.indexOf(CoreConstants.DOT) + 2); } int h_length = fm.stringWidth(h_str); @@ -790,7 +790,7 @@ public class PageSetupPane extends BasicPane { double startX = (pane_width - paint_width) / 2; double startY = (pane_height - paint_height) / 2; g2d.translate(startX, startY); - g2d = getG2d(paint_width, paint_height,g2d,w_str,h_str,w_length,h_length); + g2d = getG2d(paint_width, paint_height, g2d, w_str, h_str, w_length, h_length); if (paper_orientation == ReportConstants.PORTRAIT) { g2d.drawImage(img, (int) ((paint_width - img.getWidth(null)) / 2), (int) ((paint_height - img.getHeight(null)) / 2), null);