Skip to content

Commit

Permalink
fixed issue with underline formatting (wrong column indexes were used).
Browse files Browse the repository at this point in the history
close #2379
  • Loading branch information
j-dimension committed Mar 25, 2024
1 parent 632d44f commit 79b215c
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2149,27 +2149,33 @@ private void formatFooterRow(StyledCalculationTable ct, int footerRowIndex) {
} else {
ct.setRowBold(footerRowIndex, false);
}
ct.getCellAt(footerRowIndex, 2).setUnderline(ServerSettings.getInstance().getSettingAsBoolean("plugins.global.tableproperties.footerRow.Underline", true));
ct.getCellAt(footerRowIndex, 5).setUnderline(ServerSettings.getInstance().getSettingAsBoolean("plugins.global.tableproperties.footerRow.Underline", true));

if (ServerSettings.getInstance().getSettingAsBoolean("plugins.global.tableproperties.vorSumme.Underline", true)) {
if (ServerSettings.getInstance().getSettingAsBoolean("plugins.global.tableproperties.table.emptyRows", true)) {
ct.getCellAt(ct.getRowCount() - 3, 2).setUnderline(true);
ct.getCellAt(ct.getRowCount() - 3, 5).setUnderline(true);
} else {
ct.getCellAt(ct.getRowCount() - 2, 2).setUnderline(true);
ct.getCellAt(ct.getRowCount() - 2, 5).setUnderline(true);
}
} else {
if (ServerSettings.getInstance().getSettingAsBoolean("plugins.global.tableproperties.table.emptyRows", true)) {
ct.getCellAt(ct.getRowCount() - 3, 2).setUnderline(false);
ct.getCellAt(ct.getRowCount() - 3, 5).setUnderline(false);
} else {
ct.getCellAt(ct.getRowCount() - 2, 2).setUnderline(false);
ct.getCellAt(ct.getRowCount() - 2, 5).setUnderline(false);
}
}
if (ServerSettings.getInstance().getSettingAsBoolean("plugins.global.tableproperties.footerRow.Italic", true)) {
ct.getCellAt(footerRowIndex, 1).setItalic(true);
ct.getCellAt(footerRowIndex, 2).setItalic(true);
ct.getCellAt(footerRowIndex, 3).setItalic(true);
ct.getCellAt(footerRowIndex,4).setItalic(true);
ct.getCellAt(footerRowIndex, 5).setItalic(true);
} else {
ct.getCellAt(footerRowIndex, 1).setItalic(false);
ct.getCellAt(footerRowIndex, 2).setItalic(false);
ct.getCellAt(footerRowIndex, 3).setItalic(false);
ct.getCellAt(footerRowIndex, 4).setItalic(false);
ct.getCellAt(footerRowIndex, 5).setItalic(false);
}
ct.setRowForeGround(footerRowIndex, new Color(ServerSettings.getInstance().getSettingAsInt("plugins.global.tableproperties.footerrow.fore.color", Color.BLACK.getRGB())));
ct.setRowBackGround(footerRowIndex, new Color(ServerSettings.getInstance().getSettingAsInt("plugins.global.tableproperties.footerrow.back.color", Color.LIGHT_GRAY.getRGB())));
Expand Down

0 comments on commit 79b215c

Please sign in to comment.