wizards/com/sun/star/wizards/db/CommandMetaData.java | 7 ++++++- wizards/com/sun/star/wizards/document/Control.java | 7 ++++++- wizards/com/sun/star/wizards/form/FormControlArranger.java | 10 +++++----- wizards/com/sun/star/wizards/form/StyleApplier.java | 8 ++++---- wizards/com/sun/star/wizards/form/UIControlArranger.java | 2 +- wizards/com/sun/star/wizards/query/QueryWizard.java | 8 ++++---- 6 files changed, 26 insertions(+), 16 deletions(-)
New commits: commit 81d920a9655c29a723b1257996555dc221c0eae3 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Tue Sep 24 08:55:53 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue Sep 24 18:09:23 2024 +0200 cid#1606722 PA: Public Attribute Change-Id: Icf37c5cc813ef80252f557d8896e163fe90e97b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173846 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins diff --git a/wizards/com/sun/star/wizards/db/CommandMetaData.java b/wizards/com/sun/star/wizards/db/CommandMetaData.java index 32a7a4f4be95..cec77c795634 100644 --- a/wizards/com/sun/star/wizards/db/CommandMetaData.java +++ b/wizards/com/sun/star/wizards/db/CommandMetaData.java @@ -56,7 +56,7 @@ public class CommandMetaData extends DBMetaData public String[] NumericFieldNames = new String[] { }; - public String[] NonAggregateFieldNames; + protected String[] NonAggregateFieldNames; private int CommandType; private String Command; private String sIdentifierQuote = PropertyNames.EMPTY_STRING; @@ -115,6 +115,11 @@ public class CommandMetaData extends DBMetaData return m_aAllFieldNames; } + public String[] getNonAggregateFieldNames() + { + return NonAggregateFieldNames; + } + public XPropertySet getColumnObjectByFieldName(String _FieldName, boolean _bgetByDisplayName) { try diff --git a/wizards/com/sun/star/wizards/query/QueryWizard.java b/wizards/com/sun/star/wizards/query/QueryWizard.java index 471aa4a8594a..442d9e9474df 100644 --- a/wizards/com/sun/star/wizards/query/QueryWizard.java +++ b/wizards/com/sun/star/wizards/query/QueryWizard.java @@ -280,7 +280,7 @@ public class QueryWizard extends DatabaseObjectWizard if (m_DBMetaData.xDBMetaData.supportsGroupBy()) { m_DBMetaData.setGroupFieldNames(m_groupFieldSelection.getSelectedFieldNames()); - m_DBMetaData.setGroupFieldNames(JavaTools.removeOutdatedFields(m_DBMetaData.getGroupFieldNames(), m_DBMetaData.NonAggregateFieldNames)); + m_DBMetaData.setGroupFieldNames(JavaTools.removeOutdatedFields(m_DBMetaData.getGroupFieldNames(), m_DBMetaData.getNonAggregateFieldNames())); m_DBMetaData.GroupByFilterConditions = JavaTools.removeOutdatedFields(m_DBMetaData.GroupByFilterConditions, m_DBMetaData.getGroupFieldNames()); } } @@ -361,9 +361,9 @@ public class QueryWizard extends DatabaseObjectWizard { m_DBMetaData.setNonAggregateFieldNames(); m_groupFieldSelection.initialize(m_DBMetaData.getUniqueAggregateFieldNames(), false, m_DBMetaData.xDBMetaData.getMaxColumnsInGroupBy()); - m_groupFieldSelection.initializeSelectedFields(m_DBMetaData.NonAggregateFieldNames); + m_groupFieldSelection.initializeSelectedFields(m_DBMetaData.getNonAggregateFieldNames()); m_groupFieldSelection.setMultipleMode(false); - setStepEnabled(SOGROUPFILTER_PAGE, m_aggregateComponent.isGroupingpossible() && m_DBMetaData.NonAggregateFieldNames.length > 0); + setStepEnabled(SOGROUPFILTER_PAGE, m_aggregateComponent.isGroupingpossible() && m_DBMetaData.getNonAggregateFieldNames().length > 0); } } } @@ -441,7 +441,7 @@ public class QueryWizard extends DatabaseObjectWizard { boolean bEnabled = (m_groupFieldSelection.getSelectedFieldNames().length > 0); String CurDisplayFieldName = SelItems[0]; - if (JavaTools.FieldInList(m_DBMetaData.NonAggregateFieldNames, CurDisplayFieldName) > -1) + if (JavaTools.FieldInList(m_DBMetaData.getNonAggregateFieldNames(), CurDisplayFieldName) > -1) { showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, resmsgNonNumericAsGroupBy); m_groupFieldSelection.getSelectedFieldsListBox().addItems(SelItems, m_groupFieldSelection.getSelectedFieldsListBox().getItemCount()); commit f3f581b462d45233a37de6636687f2b2c06b388c Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Tue Sep 24 08:53:33 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue Sep 24 18:09:13 2024 +0200 cid#1607022 PA: Public Attribute Change-Id: I0c0a107643b67395a2f4835aab70c58ca6edec9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173845 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/wizards/com/sun/star/wizards/document/Control.java b/wizards/com/sun/star/wizards/document/Control.java index 73f91b75e872..634f268873af 100644 --- a/wizards/com/sun/star/wizards/document/Control.java +++ b/wizards/com/sun/star/wizards/document/Control.java @@ -41,7 +41,7 @@ public class Control extends Shape XControlModel xControlModel; private XControl xControl; - public XPropertySet xPropertySet; + protected XPropertySet xPropertySet; XWindowPeer xWindowPeer; private static final int SOMAXTEXTSIZE = 50; private int icontroltype; @@ -343,4 +343,9 @@ public class Control extends Shape { return icontroltype; } + + public XPropertySet getPropertySet() + { + return xPropertySet; + } } diff --git a/wizards/com/sun/star/wizards/form/FormControlArranger.java b/wizards/com/sun/star/wizards/form/FormControlArranger.java index fdbdcc3369f2..cec1207f831e 100644 --- a/wizards/com/sun/star/wizards/form/FormControlArranger.java +++ b/wizards/com/sun/star/wizards/form/FormControlArranger.java @@ -143,7 +143,7 @@ public class FormControlArranger short nTextLen; try { - nTextLen = AnyConverter.toShort(DBControlList[_index].xPropertySet.getPropertyValue("MaxTextLen")); + nTextLen = AnyConverter.toShort(DBControlList[_index].getPropertySet().getPropertyValue("MaxTextLen")); if ((nTextLen == 0) || (nTextLen > 20)) { bisreducable = true; @@ -352,7 +352,7 @@ public class FormControlArranger insertLabel(i, _iAlign); insertDBControl(i); bIsVeryFirstRun = false; - DBControlList[i].setPropertyValue(LABELCONTROL, LabelControlList[i].xPropertySet); + DBControlList[i].setPropertyValue(LABELCONTROL, LabelControlList[i].getPropertySet()); resetPosSizes(i); xProgressBar.setValue(i + 1); } @@ -566,11 +566,11 @@ public class FormControlArranger { m_currentControlPosX = m_currentLabelPosX; m_currentControlPosY = m_currentLabelPosY + m_LabelHeight; - curLabelControl.xPropertySet.setPropertyValue(PropertyNames.PROPERTY_ALIGN, Short.valueOf((short) com.sun.star.awt.TextAlign.LEFT)); + curLabelControl.getPropertySet().setPropertyValue(PropertyNames.PROPERTY_ALIGN, Short.valueOf((short) com.sun.star.awt.TextAlign.LEFT)); } else { - curLabelControl.xPropertySet.setPropertyValue(PropertyNames.PROPERTY_ALIGN, Short.valueOf((short) _iAlign)); + curLabelControl.getPropertySet().setPropertyValue(PropertyNames.PROPERTY_ALIGN, Short.valueOf((short) _iAlign)); } if (!bControlsareCreated) { @@ -628,7 +628,7 @@ public class FormControlArranger } if (nFieldType == DataType.LONGVARCHAR) /* memo */ { - Helper.setUnoPropertyValue(aDBControl.xPropertySet, PropertyNames.PROPERTY_MULTILINE, Boolean.TRUE); + Helper.setUnoPropertyValue(aDBControl.getPropertySet(), PropertyNames.PROPERTY_MULTILINE, Boolean.TRUE); } checkOuterPoints(m_currentControlPosX, m_dbControlWidth, m_currentControlPosY, m_dbControlHeight, true); aDBControl.setPropertyValue(PropertyNames.PROPERTY_BORDER, NBorderType); diff --git a/wizards/com/sun/star/wizards/form/StyleApplier.java b/wizards/com/sun/star/wizards/form/StyleApplier.java index bfd0328db4af..4596450b0e75 100644 --- a/wizards/com/sun/star/wizards/form/StyleApplier.java +++ b/wizards/com/sun/star/wizards/form/StyleApplier.java @@ -283,9 +283,9 @@ public class StyleApplier } else { - if (DBControls[n].xPropertySet.getPropertySetInfo().hasPropertyByName(PropertyNames.PROPERTY_BORDER)) + if (DBControls[n].getPropertySet().getPropertySetInfo().hasPropertyByName(PropertyNames.PROPERTY_BORDER)) { - DBControls[n].xPropertySet.setPropertyValue(PropertyNames.PROPERTY_BORDER, IBorderValue); + DBControls[n].getPropertySet().setPropertyValue(PropertyNames.PROPERTY_BORDER, IBorderValue); } } } @@ -419,7 +419,7 @@ public class StyleApplier } else { - setDBControlColors(aDBControl.xPropertySet, _iStyleColors); + setDBControlColors(aDBControl.getPropertySet(), _iStyleColors); } } } @@ -429,7 +429,7 @@ public class StyleApplier { if (_iStyleColors[SOLABELTEXTCOLOR] > -1) { - LabelControls[n].xPropertySet.setPropertyValue("TextColor", Integer.valueOf(_iStyleColors[SOLABELTEXTCOLOR])); + LabelControls[n].getPropertySet().setPropertyValue("TextColor", Integer.valueOf(_iStyleColors[SOLABELTEXTCOLOR])); } } } diff --git a/wizards/com/sun/star/wizards/form/UIControlArranger.java b/wizards/com/sun/star/wizards/form/UIControlArranger.java index 7bb53dd49085..24ac597c074b 100644 --- a/wizards/com/sun/star/wizards/form/UIControlArranger.java +++ b/wizards/com/sun/star/wizards/form/UIControlArranger.java @@ -180,7 +180,7 @@ public class UIControlArranger } for (int n = 0; n < LabelControls.length; n++) { - LabelControls[n].xPropertySet.setPropertyValue(PropertyNames.PROPERTY_ALIGN, Short.valueOf(iAlignValue)); + LabelControls[n].getPropertySet().setPropertyValue(PropertyNames.PROPERTY_ALIGN, Short.valueOf(iAlignValue)); } } }