From 3c3657cbabe711d057c09e8869b2751a78c34e3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 24 Sep 2024 08:49:48 +0100 Subject: [PATCH] cid#1607041 PA: Public Attribute MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I991d0213a2f429a89e6b1431d9dc900400b60a96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173844 Reviewed-by: Caolán McNamara Tested-by: Jenkins --- wizards/com/sun/star/wizards/report/DBColumn.java | 7 ++++++- .../com/sun/star/wizards/report/ReportTextDocument.java | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/wizards/com/sun/star/wizards/report/DBColumn.java b/wizards/com/sun/star/wizards/report/DBColumn.java index e53b0649d271..0c6e36e2219f 100644 --- a/wizards/com/sun/star/wizards/report/DBColumn.java +++ b/wizards/com/sun/star/wizards/report/DBColumn.java @@ -51,7 +51,7 @@ public class DBColumn private boolean bAlignLeft; private String CharFontName; private PropertyState PropertyState; - public int ValColumn = 1; + private int ValColumn = 1; private int ValRow = 0; public FieldColumn CurDBField; private XTextTable xTextTable; @@ -445,4 +445,9 @@ public class DBColumn return true; //most probably this is really the Namecell!!!! } } + + public int getValColumn() + { + return ValColumn; + } } diff --git a/wizards/com/sun/star/wizards/report/ReportTextDocument.java b/wizards/com/sun/star/wizards/report/ReportTextDocument.java index b7f7c2a04de9..62f7391eec8b 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextDocument.java +++ b/wizards/com/sun/star/wizards/report/ReportTextDocument.java @@ -491,11 +491,11 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen { DBColumn oDBColumn1 = getDBColumnByName(oFieldColumn1.getFieldName()); DBColumn oDBColumn2 = getDBColumnByName(oFieldColumn2.getFieldName()); - if (oDBColumn1.ValColumn < oDBColumn2.ValColumn) + if (oDBColumn1.getValColumn() < oDBColumn2.getValColumn()) { return -1; } - else if (oDBColumn1.ValColumn == oDBColumn2.ValColumn) + else if (oDBColumn1.getValColumn() == oDBColumn2.getValColumn()) { return 0; }