wizards/com/sun/star/wizards/db/DBMetaData.java | 7 ++++++- wizards/com/sun/star/wizards/db/SQLQueryComposer.java | 2 +- wizards/com/sun/star/wizards/document/Shape.java | 7 ++++++- wizards/com/sun/star/wizards/form/FormControlArranger.java | 2 +- wizards/com/sun/star/wizards/form/StyleApplier.java | 4 ++-- wizards/com/sun/star/wizards/report/DBColumn.java | 12 +++++++++++- wizards/com/sun/star/wizards/report/ReportTextDocument.java | 6 +++--- wizards/com/sun/star/wizards/table/TableWizard.java | 4 ++-- wizards/com/sun/star/wizards/ui/AggregateComponent.java | 2 +- wizards/com/sun/star/wizards/ui/CommandFieldSelection.java | 2 +- wizards/com/sun/star/wizards/ui/FilterComponent.java | 2 +- 11 files changed, 35 insertions(+), 15 deletions(-)
New commits: commit 0724127c6dd8f72b597ce1bdd3ba3aa4cd658e7f Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Thu Sep 26 09:17:27 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Thu Sep 26 14:53:29 2024 +0200 cid#1607041 PA: Public Attribute Change-Id: Iedea5a5e42fa311441a77ee4e18a1b3cbfdf0c44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173973 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/wizards/com/sun/star/wizards/report/DBColumn.java b/wizards/com/sun/star/wizards/report/DBColumn.java index 0c6e36e2219f..35bd99429a9a 100644 --- a/wizards/com/sun/star/wizards/report/DBColumn.java +++ b/wizards/com/sun/star/wizards/report/DBColumn.java @@ -53,7 +53,7 @@ public class DBColumn private PropertyState PropertyState; private int ValColumn = 1; private int ValRow = 0; - public FieldColumn CurDBField; + private FieldColumn CurDBField; private XTextTable xTextTable; private XTableColumns xTableColumns; private XCellRange xCellRange; @@ -450,4 +450,14 @@ public class DBColumn { return ValColumn; } + + public FieldColumn getCurDBField() + { + return CurDBField; + } + + public void setCurDBField(FieldColumn _curDBField) + { + CurDBField = _curDBField;; + } } diff --git a/wizards/com/sun/star/wizards/report/ReportTextDocument.java b/wizards/com/sun/star/wizards/report/ReportTextDocument.java index ac8d07000ad5..52d8e6d2ae96 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextDocument.java +++ b/wizards/com/sun/star/wizards/report/ReportTextDocument.java @@ -284,10 +284,10 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen for (int i = 0; i < nSize; i++) { DBColumn CurDBColumn = DBColumnsVector.get(i); - String sFieldName = CurDBColumn.CurDBField.getFieldName(); + String sFieldName = CurDBColumn.getCurDBField().getFieldName(); if (!sFieldName.equals(_sNewNames[i])) { - CurDBColumn.CurDBField = CurDBMetaData.getFieldColumnByDisplayName(_sNewNames[i]); + CurDBColumn.setCurDBField(CurDBMetaData.getFieldColumnByDisplayName(_sNewNames[i])); CurDBColumn.insertColumnData(oTextFieldHandler, bIsCurLandscape); } } @@ -510,7 +510,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen for (int i = 0; i < DBColumnsVector.size(); i++) { DBColumn oDBColumn = DBColumnsVector.get(i); - if (oDBColumn.CurDBField.getFieldName().equals(_FieldName)) + if (oDBColumn.getCurDBField().getFieldName().equals(_FieldName)) { return oDBColumn; } commit 72423868bd74afe143cad7245f0cc6c3c4d179de Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Thu Sep 26 09:11:39 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Thu Sep 26 14:53:22 2024 +0200 cid#1607381 PA: Public Attribute Change-Id: I44377535cabfd0c34a7f2b0815d779b17fbf8f53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173972 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins diff --git a/wizards/com/sun/star/wizards/document/Shape.java b/wizards/com/sun/star/wizards/document/Shape.java index 45389fe89c53..a586efedf109 100644 --- a/wizards/com/sun/star/wizards/document/Shape.java +++ b/wizards/com/sun/star/wizards/document/Shape.java @@ -38,7 +38,7 @@ public class Shape { protected XShape xShape; protected FormHandler oFormHandler; - public XServiceInfo xServiceInfo; + private XServiceInfo xServiceInfo; protected Point aPoint; private Size aSize; protected XControlShape xControlShape; @@ -132,4 +132,9 @@ public class Shape { return xShape; } + + public XServiceInfo getServiceInfo() + { + return xServiceInfo; + } } diff --git a/wizards/com/sun/star/wizards/form/StyleApplier.java b/wizards/com/sun/star/wizards/form/StyleApplier.java index 4596450b0e75..0932246e8a9a 100644 --- a/wizards/com/sun/star/wizards/form/StyleApplier.java +++ b/wizards/com/sun/star/wizards/form/StyleApplier.java @@ -266,7 +266,7 @@ public class StyleApplier DatabaseControl[] DBControls = curControlForm.getDatabaseControls(); for (int n = 0; n < DBControls.length; n++) { - if (DBControls[n].xServiceInfo.supportsService("com.sun.star.drawing.ShapeCollection")) + if (DBControls[n].getServiceInfo().supportsService("com.sun.star.drawing.ShapeCollection")) { TimeStampControl oTimeStampControl = (TimeStampControl) DBControls[n]; for (int i = 0; i < 2; i++) @@ -405,7 +405,7 @@ public class StyleApplier DatabaseControl aDBControl = DBControls[n]; if (aDBControl != null) { - if (aDBControl.xServiceInfo.supportsService("com.sun.star.drawing.ShapeCollection")) + if (aDBControl.getServiceInfo().supportsService("com.sun.star.drawing.ShapeCollection")) { TimeStampControl oTimeStampControl = (TimeStampControl) aDBControl; for (int i = 0; i < 2; i++) commit b9e15ba06f25c5d16c25e11b244892b5aee6e4fc Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Thu Sep 26 09:09:07 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Thu Sep 26 14:53:15 2024 +0200 cid#1608290 PA: Public Attribute Change-Id: I710d0d90122f4b2a82084a32a98a3877b3fae5bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173971 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java index b5fb5d369b01..d6ac6d56267f 100644 --- a/wizards/com/sun/star/wizards/db/DBMetaData.java +++ b/wizards/com/sun/star/wizards/db/DBMetaData.java @@ -90,7 +90,7 @@ public class DBMetaData private String DataSourceName; private com.sun.star.sdbc.XConnection DBConnection; private com.sun.star.sdb.tools.XConnectionTools m_connectionTools; - public com.sun.star.lang.XMultiServiceFactory xMSF; + protected com.sun.star.lang.XMultiServiceFactory xMSF; private XComponent xConnectionComponent; private XNameAccess xNameAccess; @@ -137,6 +137,11 @@ public class DBMetaData private long lDateCorrection = INVALID; private boolean bdisposeConnection = false; + public com.sun.star.lang.XMultiServiceFactory getMSF() + { + return xMSF; + } + public XDatabaseMetaData getDBMetaData() { return xDBMetaData; diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java index c0d60e9b362c..ca8b968baeec 100644 --- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java +++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java @@ -417,7 +417,7 @@ public class SQLQueryComposer { try { - Object oErrorDialog = CurDBMetaData.xMSF.createInstance("com.sun.star.sdb.ErrorMessageDialog"); + Object oErrorDialog = CurDBMetaData.getMSF().createInstance("com.sun.star.sdb.ErrorMessageDialog"); XInitialization xInitialize = UnoRuntime.queryInterface(XInitialization.class, oErrorDialog); XExecutableDialog xExecute = UnoRuntime.queryInterface(XExecutableDialog.class, oErrorDialog); PropertyValue[] rDispatchArguments = new PropertyValue[3]; diff --git a/wizards/com/sun/star/wizards/form/FormControlArranger.java b/wizards/com/sun/star/wizards/form/FormControlArranger.java index cec1207f831e..7bcad743a6f1 100644 --- a/wizards/com/sun/star/wizards/form/FormControlArranger.java +++ b/wizards/com/sun/star/wizards/form/FormControlArranger.java @@ -81,7 +81,7 @@ public class FormControlArranger public FormControlArranger(FormHandler _oFormHandler, XNameContainer _xFormName, CommandMetaData oDBMetaData, XStatusIndicator _xProgressBar, Point _StartPoint, Size _FormSize) { FieldColumns = oDBMetaData.getFieldColumns(); - xMSF = oDBMetaData.xMSF; + xMSF = oDBMetaData.getMSF(); xFormName = _xFormName; xProgressBar = _xProgressBar; LabelControlList = new Control[FieldColumns.length]; diff --git a/wizards/com/sun/star/wizards/table/TableWizard.java b/wizards/com/sun/star/wizards/table/TableWizard.java index 608bc24c6b61..64e89d3d3c9e 100644 --- a/wizards/com/sun/star/wizards/table/TableWizard.java +++ b/wizards/com/sun/star/wizards/table/TableWizard.java @@ -265,7 +265,7 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener scomposedtablename = curFinalizer.getComposedTableName(tablename); if (this.curTableDescriptor.isSQL92CheckEnabled()) { - Desktop.removeSpecialCharacters(curTableDescriptor.xMSF, Configuration.getLocale(this.curTableDescriptor.xMSF), tablename); + Desktop.removeSpecialCharacters(curTableDescriptor.getMSF(), Configuration.getLocale(this.curTableDescriptor.getMSF()), tablename); } if ( tablename.length() > 0 ) { @@ -405,7 +405,7 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener { Object otextcomponent = UnoDialog.getModel(aTextEvent.Source); String sName = (String) Helper.getUnoPropertyValue(otextcomponent, "Text"); - sName = Desktop.removeSpecialCharacters(curTableDescriptor.xMSF, Configuration.getLocale(curTableDescriptor.xMSF), sName); + sName = Desktop.removeSpecialCharacters(curTableDescriptor.getMSF(), Configuration.getLocale(curTableDescriptor.getMSF()), sName); Helper.setUnoPropertyValue(otextcomponent, "Text", sName); } } diff --git a/wizards/com/sun/star/wizards/ui/AggregateComponent.java b/wizards/com/sun/star/wizards/ui/AggregateComponent.java index 480ee0312bbe..78690ebc9ff4 100644 --- a/wizards/com/sun/star/wizards/ui/AggregateComponent.java +++ b/wizards/com/sun/star/wizards/ui/AggregateComponent.java @@ -125,7 +125,7 @@ public class AggregateComponent extends ControlScroller } catch (com.sun.star.uno.Exception exception) { - Resource.showCommonResourceError(CurDBMetaData.xMSF); + Resource.showCommonResourceError(CurDBMetaData.getMSF()); } } diff --git a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java index 580ea02b3d2a..83f9f931e418 100644 --- a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java @@ -290,7 +290,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator< { if (this.aCollator == null) { - com.sun.star.lang.Locale aOfficeLocale = Configuration.getLocale(this.CurDBMetaData.xMSF); + com.sun.star.lang.Locale aOfficeLocale = Configuration.getLocale(this.CurDBMetaData.getMSF()); java.util.Locale aJavaLocale = new java.util.Locale(aOfficeLocale.Language, aOfficeLocale.Country, aOfficeLocale.Variant); //Get the Collator for US English and set its strength to PRIMARY this.aCollator = Collator.getInstance(aJavaLocale); diff --git a/wizards/com/sun/star/wizards/ui/FilterComponent.java b/wizards/com/sun/star/wizards/ui/FilterComponent.java index 59b701ccf880..4d75570341d4 100644 --- a/wizards/com/sun/star/wizards/ui/FilterComponent.java +++ b/wizards/com/sun/star/wizards/ui/FilterComponent.java @@ -220,7 +220,7 @@ public class FilterComponent try { final String serviceName = "com.sun.star.beans.PropertyBag"; - final XPropertyContainer column = UnoRuntime.queryInterface(XPropertyContainer.class, oQueryMetaData.xMSF.createInstance(serviceName)); + final XPropertyContainer column = UnoRuntime.queryInterface(XPropertyContainer.class, oQueryMetaData.getMSF().createInstance(serviceName)); column.addProperty("Type", PropertyAttribute.BOUND, DataType.VARCHAR); column.addProperty(PropertyNames.PROPERTY_NAME, PropertyAttribute.BOUND, PropertyNames.EMPTY_STRING);