summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-09-25 13:30:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-09-26 03:04:34 +0200
commit3b13f813da6ad3bd3e4f9dc24b7deb84ea557063 (patch)
treea5893679db0c89053ce78a2a108670027837e240
parentd6d04400095c2663ff5e1f58018d76df78121704 (diff)
loplugin:constmethod in forms..fpicker
Change-Id: I1673e00be0a6c9d34ce02437bf68d929c56952f7 Reviewed-on: https://gerrit.libreoffice.org/79540 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--forms/source/component/FormComponent.cxx4
-rw-r--r--forms/source/component/GroupManager.cxx4
-rw-r--r--forms/source/component/GroupManager.hxx4
-rw-r--r--forms/source/inc/FormComponent.hxx4
-rw-r--r--forms/source/xforms/binding.cxx8
-rw-r--r--forms/source/xforms/binding.hxx8
-rw-r--r--forms/source/xforms/convert.cxx2
-rw-r--r--forms/source/xforms/convert.hxx2
-rw-r--r--forms/source/xforms/xpathlib/extension.hxx4
-rw-r--r--fpicker/source/office/OfficeControlAccess.cxx2
-rw-r--r--fpicker/source/office/OfficeControlAccess.hxx2
-rw-r--r--fpicker/source/office/OfficeFilePicker.cxx2
-rw-r--r--fpicker/source/office/OfficeFilePicker.hxx2
-rw-r--r--fpicker/source/office/PlacesListBox.hxx4
-rw-r--r--fpicker/source/office/iodlg.cxx2
-rw-r--r--fpicker/source/office/iodlg.hxx2
16 files changed, 28 insertions, 28 deletions
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index e8c8efca5c6c..7ab3e7732f7d 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -209,7 +209,7 @@ sal_Bool SAL_CALL OControl::supportsService(const OUString& _rsServiceName)
return cppu::supportsService(this, _rsServiceName);
}
-Sequence< OUString > OControl::getAggregateServiceNames()
+Sequence< OUString > OControl::getAggregateServiceNames() const
{
Sequence< OUString > aAggServices;
Reference< XServiceInfo > xInfo;
@@ -663,7 +663,7 @@ sal_Bool SAL_CALL OControlModel::supportsService(const OUString& _rServiceName)
return cppu::supportsService(this, _rServiceName);
}
-Sequence< OUString > OControlModel::getAggregateServiceNames()
+Sequence< OUString > OControlModel::getAggregateServiceNames() const
{
Sequence< OUString > aAggServices;
Reference< XServiceInfo > xInfo;
diff --git a/forms/source/component/GroupManager.cxx b/forms/source/component/GroupManager.cxx
index 6b8ee7a8c04e..6b6069161877 100644
--- a/forms/source/component/GroupManager.cxx
+++ b/forms/source/component/GroupManager.cxx
@@ -314,12 +314,12 @@ void SAL_CALL OGroupManager::elementReplaced(const ContainerEvent& Event)
}
// Other functions
-Sequence<Reference<XControlModel> > OGroupManager::getControlModels()
+Sequence<Reference<XControlModel> > OGroupManager::getControlModels() const
{
return m_pCompGroup->GetControlModels();
}
-sal_Int32 OGroupManager::getGroupCount()
+sal_Int32 OGroupManager::getGroupCount() const
{
return m_aActiveGroupMap.size();
}
diff --git a/forms/source/component/GroupManager.hxx b/forms/source/component/GroupManager.hxx
index b2966e9ec3cd..0bbd915a6f51 100644
--- a/forms/source/component/GroupManager.hxx
+++ b/forms/source/component/GroupManager.hxx
@@ -185,10 +185,10 @@ public:
virtual void SAL_CALL elementReplaced(const css::container::ContainerEvent& _rEvent) override;
// Other functions
- sal_Int32 getGroupCount();
+ sal_Int32 getGroupCount() const;
void getGroup(sal_Int32 nGroup, css::uno::Sequence< css::uno::Reference< css::awt::XControlModel> >& _rGroup, OUString& Name);
void getGroupByName(const OUString& Name, css::uno::Sequence< css::uno::Reference< css::awt::XControlModel> >& _rGroup);
- css::uno::Sequence< css::uno::Reference< css::awt::XControlModel> > getControlModels();
+ css::uno::Sequence< css::uno::Reference< css::awt::XControlModel> > getControlModels() const;
static OUString GetGroupName( const css::uno::Reference< css::beans::XPropertySet>& xComponent );
};
diff --git a/forms/source/inc/FormComponent.hxx b/forms/source/inc/FormComponent.hxx
index 29f4a132b2c7..66ec3aed8aff 100644
--- a/forms/source/inc/FormComponent.hxx
+++ b/forms/source/inc/FormComponent.hxx
@@ -248,7 +248,7 @@ protected:
virtual css::uno::Sequence< css::uno::Type> _getTypes();
// overwrite this and call the base class if you have additional types
- css::uno::Sequence< OUString > getAggregateServiceNames();
+ css::uno::Sequence< OUString > getAggregateServiceNames() const;
private:
void impl_resetStateGuard_nothrow();
@@ -375,7 +375,7 @@ protected:
void doSetDelegator();
void doResetDelegator();
- css::uno::Sequence< OUString > getAggregateServiceNames();
+ css::uno::Sequence< OUString > getAggregateServiceNames() const;
public:
DECLARE_UNO3_AGG_DEFAULTS(OControl, OComponentHelper)
diff --git a/forms/source/xforms/binding.cxx b/forms/source/xforms/binding.cxx
index d2c1be56aa7b..a87c6b47596f 100644
--- a/forms/source/xforms/binding.cxx
+++ b/forms/source/xforms/binding.cxx
@@ -214,7 +214,7 @@ void Binding::deferNotifications( bool bDefer )
"deferred modifications not delivered?" );
}
-bool Binding::isValid()
+bool Binding::isValid() const
{
// TODO: determine whether node is suitable, not just whether it exists
return maBindingExpression.getNode().is() &&
@@ -225,7 +225,7 @@ bool Binding::isValid()
!maBindingExpression.getString().isEmpty() ) );
}
-bool Binding::isUseful()
+bool Binding::isUseful() const
{
// we are useful, if
// 0) we don't have a model
@@ -744,7 +744,7 @@ MIP Binding::getLocalMIP() const
return aMIP;
}
-css::uno::Reference<css::xsd::XDataType> Binding::getDataType()
+css::uno::Reference<css::xsd::XDataType> Binding::getDataType() const
{
OSL_ENSURE( getModel().is(), "need model" );
OSL_ENSURE( getModel()->getDataTypeRepository().is(), "need types" );
@@ -758,7 +758,7 @@ css::uno::Reference<css::xsd::XDataType> Binding::getDataType()
: Reference<XDataType>( nullptr );
}
-bool Binding::isValid_DataType()
+bool Binding::isValid_DataType() const
{
Reference<XDataType> xDataType = getDataType();
return !xDataType.is()
diff --git a/forms/source/xforms/binding.hxx b/forms/source/xforms/binding.hxx
index a49d0e4567a6..5a3abe669a6f 100644
--- a/forms/source/xforms/binding.hxx
+++ b/forms/source/xforms/binding.hxx
@@ -246,11 +246,11 @@ public:
void deferNotifications( bool );
/// is this binding valid? (are constraint, type and required MIPs ok?)
- bool isValid();
+ bool isValid() const;
/// determine whether this binding currently performs a useful
/// function, r whether is may be discarded
- bool isUseful();
+ bool isUseful() const;
/// explain why binding is invalid
OUString explainInvalid();
@@ -294,10 +294,10 @@ private:
MIP getLocalMIP() const;
/// get the data type that applies to this binding
- css::uno::Reference<css::xsd::XDataType> getDataType();
+ css::uno::Reference<css::xsd::XDataType> getDataType() const;
/// determine whether binding is valid according to the given data type
- bool isValid_DataType();
+ bool isValid_DataType() const;
/// explain validity of binding with respect to the given data type
OUString explainInvalid_DataType();
diff --git a/forms/source/xforms/convert.cxx b/forms/source/xforms/convert.cxx
index f00dd5e166db..c6b2f92871e1 100644
--- a/forms/source/xforms/convert.cxx
+++ b/forms/source/xforms/convert.cxx
@@ -297,7 +297,7 @@ bool Convert::hasType( const css::uno::Type& rType )
return maMap.find( rType ) != maMap.end();
}
-css::uno::Sequence<css::uno::Type> Convert::getTypes()
+css::uno::Sequence<css::uno::Type> Convert::getTypes() const
{
return comphelper::mapKeysToSequence( maMap );
}
diff --git a/forms/source/xforms/convert.hxx b/forms/source/xforms/convert.hxx
index c80bb9f62a9b..cba7611a9216 100644
--- a/forms/source/xforms/convert.hxx
+++ b/forms/source/xforms/convert.hxx
@@ -60,7 +60,7 @@ public:
bool hasType( const css::uno::Type& );
/// get list of convertible types
- css::uno::Sequence<css::uno::Type> getTypes();
+ css::uno::Sequence<css::uno::Type> getTypes() const;
/// convert any to XML representation
OUString toXSD( const css::uno::Any& rAny );
diff --git a/forms/source/xforms/xpathlib/extension.hxx b/forms/source/xforms/xpathlib/extension.hxx
index 906b4b70de28..5e83cbf64c9c 100644
--- a/forms/source/xforms/xpathlib/extension.hxx
+++ b/forms/source/xforms/xpathlib/extension.hxx
@@ -46,8 +46,8 @@ private:
public:
CLibxml2XFormsExtension() {}
- const css::uno::Reference< css::xforms::XModel >& getModel() { return m_aModel;}
- const css::uno::Reference< css::xml::dom::XNode >& getContextNode() { return m_aContextNode;}
+ const css::uno::Reference< css::xforms::XModel >& getModel() const { return m_aModel;}
+ const css::uno::Reference< css::xml::dom::XNode >& getContextNode() const { return m_aContextNode;}
virtual css::xml::xpath::Libxml2ExtensionHandle SAL_CALL getLibxml2ExtensionHandle() override;
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any >& aSequence) override;
diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx
index 29336e09b75e..d0dfd83131ca 100644
--- a/fpicker/source/office/OfficeControlAccess.cxx
+++ b/fpicker/source/office/OfficeControlAccess.cxx
@@ -277,7 +277,7 @@ namespace svt
}
- Sequence< OUString > OControlAccess::getSupportedControls( )
+ Sequence< OUString > OControlAccess::getSupportedControls( ) const
{
Sequence< OUString > aControls( s_nControlCount );
OUString* pControls = aControls.getArray();
diff --git a/fpicker/source/office/OfficeControlAccess.hxx b/fpicker/source/office/OfficeControlAccess.hxx
index 279e78b2ae29..7f1600bd587c 100644
--- a/fpicker/source/office/OfficeControlAccess.hxx
+++ b/fpicker/source/office/OfficeControlAccess.hxx
@@ -73,7 +73,7 @@ namespace svt
css::uno::Any getControlProperty( const OUString& _rControlName, const OUString& _rControlProperty );
// XControlInformation implementation
- css::uno::Sequence< OUString > getSupportedControls( );
+ css::uno::Sequence< OUString > getSupportedControls( ) const;
css::uno::Sequence< OUString > getSupportedControlProperties( const OUString& _rControlName );
static bool isControlSupported( const OUString& _rControlName );
bool isControlPropertySupported( const OUString& _rControlName, const OUString& _rControlProperty );
diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx
index 32c137d97a4c..0d453066ed6b 100644
--- a/fpicker/source/office/OfficeFilePicker.cxx
+++ b/fpicker/source/office/OfficeFilePicker.cxx
@@ -224,7 +224,7 @@ void SvtFilePicker::DialogClosedHdl(sal_Int32 nResult)
}
// SvtFilePicker
-PickerFlags SvtFilePicker::getPickerFlags()
+PickerFlags SvtFilePicker::getPickerFlags() const
{
// set the winbits for creating the filedialog
PickerFlags nBits = PickerFlags::NONE;
diff --git a/fpicker/source/office/OfficeFilePicker.hxx b/fpicker/source/office/OfficeFilePicker.hxx
index e42ef384f06a..d8b2ac09cb85 100644
--- a/fpicker/source/office/OfficeFilePicker.hxx
+++ b/fpicker/source/office/OfficeFilePicker.hxx
@@ -212,7 +212,7 @@ protected:
) override;
protected:
- PickerFlags getPickerFlags();
+ PickerFlags getPickerFlags() const;
virtual void notify( sal_Int16 _nEventId, sal_Int16 _nControlId ) override;
bool FilterNameExists( const OUString& rTitle );
diff --git a/fpicker/source/office/PlacesListBox.hxx b/fpicker/source/office/PlacesListBox.hxx
index ced1c86bcbdc..81a11f0e8123 100644
--- a/fpicker/source/office/PlacesListBox.hxx
+++ b/fpicker/source/office/PlacesListBox.hxx
@@ -56,9 +56,9 @@ class PlacesListBox : public Control
void AppendPlace( const PlacePtr& pPlace );
void RemovePlace( sal_uInt16 nPos );
void RemoveSelectedPlace();
- sal_Int32 GetNbEditablePlaces() { return mnNbEditables;}
+ sal_Int32 GetNbEditablePlaces() const { return mnNbEditables;}
bool IsUpdated();
- const std::vector<PlacePtr>& GetPlaces() { return maPlaces;}
+ const std::vector<PlacePtr>& GetPlaces() const { return maPlaces;}
void SetAddHdl( const Link<Button*,void>& rHdl );
void SetDelHdl( const Link<Button*,void>& rHdl );
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index d22bbcf0c45f..abd187f13a24 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -2628,7 +2628,7 @@ void SvtFileDialog::setCurrentFileText( const OUString& _rText, bool _bSelectAll
}
-bool SvtFileDialog::isAutoExtensionEnabled()
+bool SvtFileDialog::isAutoExtensionEnabled() const
{
return pImpl->_pCbAutoExtension && pImpl->_pCbAutoExtension->IsChecked();
}
diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx
index 165e8426086a..83a639bfa279 100644
--- a/fpicker/source/office/iodlg.hxx
+++ b/fpicker/source/office/iodlg.hxx
@@ -215,7 +215,7 @@ public:
sal_Int32 getAvailableHeight() override;
void setImage( sal_Int16 aImageFormat, const css::uno::Any& rImage ) override;
bool getShowState() override;
- bool isAutoExtensionEnabled();
+ bool isAutoExtensionEnabled() const;
OUString getCurrentFileText( ) const override;
void setCurrentFileText( const OUString& _rText, bool _bSelectAll = false ) override;