Browse Source

sonar问题修复,无jira任务

research/11.0
pengda 5 years ago
parent
commit
7a8281c1a9
  1. 4
      designer-realize/src/main/java/com/fr/grid/GridRowUI.java
  2. 9
      designer-realize/src/main/java/com/fr/grid/GridUI.java

4
designer-realize/src/main/java/com/fr/grid/GridRowUI.java

@ -7,7 +7,7 @@ import java.awt.geom.Rectangle2D;
import javax.swing.JComponent;
import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import com.fr.stable.AssistUtils;
import com.fr.base.BaseUtils;
import com.fr.base.DynamicUnitList;
import com.fr.base.GraphHelper;
@ -106,7 +106,7 @@ public class GridRowUI extends ComponentUI {
tmpHeight1 += tmpIncreaseHeight;
tmpIncreaseHeight = rowHeightList.get(i).toPixD(resolution);
// check these row wich height is zero.
tmpHeight2 = tmpIncreaseHeight == 0 ? tmpHeight1 + 1 : tmpHeight1 + tmpIncreaseHeight;
tmpHeight2 = AssistUtils.equals(tmpIncreaseHeight,0d) ? tmpHeight1 + 1 : tmpHeight1 + tmpIncreaseHeight;
// check selection bound.
Selection sel = reportPane.getSelection();
int[] selectedRows = sel.getSelectedRows();

9
designer-realize/src/main/java/com/fr/grid/GridUI.java

@ -47,6 +47,7 @@ import com.fr.stable.ColumnRow;
import com.fr.stable.Constants;
import com.fr.stable.script.CalculatorUtils;
import com.fr.stable.unit.FU;
import com.fr.stable.AssistUtils;
import com.fr.third.antlr.ANTLRException;
import javax.swing.JComponent;
@ -617,10 +618,10 @@ public class GridUI extends ComponentUI {
tmpLine2D = (Line2D) paginateLineList.get(j);// 直接强制转换,因为List中肯定都是Line2D型的
for (int k = j + 1; k < paginateLineList.size(); k++) {
tmpLine2D2 = (Line2D) paginateLineList.get(k);
if (tmpLine2D2.getX1() == tmpLine2D.getX1()
&& tmpLine2D2.getX2() == tmpLine2D.getX2()
&& tmpLine2D2.getY1() == tmpLine2D.getY1()
&& tmpLine2D2.getY2() == tmpLine2D.getY2()) {
if (AssistUtils.equals(tmpLine2D2.getX1() ,tmpLine2D.getX1())
&& AssistUtils.equals(tmpLine2D2.getX2() , tmpLine2D.getX2())
&& AssistUtils.equals(tmpLine2D2.getY1() , tmpLine2D.getY1())
&& AssistUtils.equals(tmpLine2D2.getY2() , tmpLine2D.getY2())) {
paginateLineList.remove(k);
}
}

Loading…
Cancel
Save