提交 582f437b 编写于 作者: S Serge Rider

#5165 Plaintext render improvement


Former-commit-id: b38c67d4
上级 90cbe7f6
...@@ -334,19 +334,20 @@ public class PlainTextPresentation extends AbstractPresentation implements IAdap ...@@ -334,19 +334,20 @@ public class PlainTextPresentation extends AbstractPresentation implements IAdap
} }
int stringWidth = getStringWidth(displayString); int stringWidth = getStringWidth(displayString);
if (extraSpaces) stringWidth++;
DBPDataKind dataKind = attr.getDataKind(); DBPDataKind dataKind = attr.getDataKind();
if ((dataKind == DBPDataKind.NUMERIC && rightJustifyNumbers) || if ((dataKind == DBPDataKind.NUMERIC && rightJustifyNumbers) ||
(dataKind == DBPDataKind.DATETIME && rightJustifyDateTime)) (dataKind == DBPDataKind.DATETIME && rightJustifyDateTime))
{ {
// Right justify value // Right justify value
if (extraSpaces) stringWidth++;
for (int j = colWidths[k] - stringWidth; j > 0; j--) { for (int j = colWidths[k] - stringWidth; j > 0; j--) {
grid.append(" "); grid.append(" ");
} }
grid.append(displayString); grid.append(displayString);
if (extraSpaces) grid.append(" "); if (extraSpaces) grid.append(" ");
} else { } else {
if (extraSpaces) grid.append(" ");
grid.append(displayString); grid.append(displayString);
for (int j = colWidths[k] - stringWidth; j > 0; j--) { for (int j = colWidths[k] - stringWidth; j > 0; j--) {
grid.append(" "); grid.append(" ");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册