From d8d4efbe1faf6e3a4a048ab4bb8f23516ce13268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sat, 28 Sep 2024 11:22:38 +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: I8ec74e943232f98c861e035c0da11e8d75f8fa29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174106 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- wizards/com/sun/star/wizards/report/DBColumn.java | 7 ++++++- .../com/sun/star/wizards/report/ReportTextDocument.java | 2 +- .../sun/star/wizards/report/ReportTextImplementation.java | 2 +- 3 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 35bd99429a9a..d993ded1b1b0 100644 --- a/wizards/com/sun/star/wizards/report/DBColumn.java +++ b/wizards/com/sun/star/wizards/report/DBColumn.java @@ -46,7 +46,7 @@ public class DBColumn private XCell xValCell; private XTextRange xValTextCell; private XTextCursor xValCellCursor; - public XCell xNameCell; + private XCell xNameCell; private XTextRange xNameTextCell; private boolean bAlignLeft; private String CharFontName; @@ -183,6 +183,11 @@ public class DBColumn } } + public XCell getNameCell() + { + return xNameCell; + } + private void getTableColumns(String TableName) { try diff --git a/wizards/com/sun/star/wizards/report/ReportTextDocument.java b/wizards/com/sun/star/wizards/report/ReportTextDocument.java index 52d8e6d2ae96..8e1e325b874d 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextDocument.java +++ b/wizards/com/sun/star/wizards/report/ReportTextDocument.java @@ -448,7 +448,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen } CurDBColumn = new DBColumn(CurRecordTable, oTextTableHandler, CurDBMetaData, i - CurDBMetaData.getGroupFieldNames().length); } - if (CurDBColumn.xNameCell != null) + if (CurDBColumn.getNameCell() != null) { DBColumnsVector.add(CurDBColumn); } diff --git a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java index 9f8e77cd05ce..ead591e5e352 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java +++ b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java @@ -436,7 +436,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme for (int i = 0; i < iCount; i++) { CurDBColumn = getDoc().DBColumnsVector.get(i); - xNameCellCursor = ReportTextDocument.createTextCursor(CurDBColumn.xNameCell); + xNameCellCursor = ReportTextDocument.createTextCursor(CurDBColumn.getNameCell()); xNameCellCursor.gotoStart(false); FieldContent = getDoc().oTextFieldHandler.getUserFieldContent(xNameCellCursor); if (!FieldContent.equals(PropertyNames.EMPTY_STRING))