diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-03 11:45:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-03 13:13:06 +0200 |
commit | d2848c44ec0f9b04a0f9b24653ef0273ae7ace97 (patch) | |
tree | d3bcb226d2733362312e6b6fe804b7a2d1f166a7 /xmloff | |
parent | 815afb06b78b8fbf83f6a48b89500fb34dc4b40b (diff) |
loplugin:constmethod in xmloff
Change-Id: I79ff1001a3ac8fde10de1ab391772e2bfeb6a314
Reviewed-on: https://gerrit.libreoffice.org/78546
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/inc/txtfldi.hxx | 2 | ||||
-rw-r--r-- | xmloff/inc/txtvfldi.hxx | 8 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLAxisContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLAxisContext.hxx | 2 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLExport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLSeries2Context.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLSeries2Context.hxx | 4 | ||||
-rw-r--r-- | xmloff/source/core/xmlexp.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/core/xmlimp.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/draw/shapeimport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumfe.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumfi.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLAutoTextEventExport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLAutoTextEventExport.hxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexBodyContext.hxx | 4 | ||||
-rw-r--r-- | xmloff/source/text/txtimp.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/text/txtparai.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/text/txtparaimphint.hxx | 2 | ||||
-rw-r--r-- | xmloff/source/transform/TransformerBase.hxx | 4 | ||||
-rw-r--r-- | xmloff/source/xforms/XFormsModelContext.hxx | 2 |
20 files changed, 35 insertions, 35 deletions
diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx index c2537521b37e..1bff41f8c29c 100644 --- a/xmloff/inc/txtfldi.hxx +++ b/xmloff/inc/txtfldi.hxx @@ -153,7 +153,7 @@ protected: /// get helper XMLTextImportHelper& GetImportHelper() { return rTextImportHelper; } - const OUString& GetServiceName() { return sServiceName; } + const OUString& GetServiceName() const { return sServiceName; } void SetServiceName(const OUString& sStr) { sServiceName = sStr; } OUString const & GetContent(); diff --git a/xmloff/inc/txtvfldi.hxx b/xmloff/inc/txtvfldi.hxx index 2ca6b213a23a..b572cc1fec2d 100644 --- a/xmloff/inc/txtvfldi.hxx +++ b/xmloff/inc/txtvfldi.hxx @@ -71,10 +71,10 @@ public: const css::uno::Reference<css::beans::XPropertySet> & xPropertySet); /// is value a string (rather than double)? - bool IsStringValue() { return bStringType; } + bool IsStringValue() const { return bStringType; } /// has format been read? - bool IsFormatOK() { return bFormatOK; } + bool IsFormatOK() const { return bFormatOK; } void SetDefault(const OUString& sStr) { sDefault = sStr; } }; @@ -165,8 +165,8 @@ protected: css::beans::XPropertySet> & xPropertySet) override; // various accessor methods: - const OUString& GetName() { return sName; } - bool IsStringValue() { return aValueHelper.IsStringValue();} + const OUString& GetName() const { return sName; } + bool IsStringValue() const { return aValueHelper.IsStringValue();} }; diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx index 881fa4d274fb..2af9b89b3ffb 100644 --- a/xmloff/source/chart/SchXMLAxisContext.cxx +++ b/xmloff/source/chart/SchXMLAxisContext.cxx @@ -137,7 +137,7 @@ static Reference< chart::XAxis > lcl_getChartAxis(const SchXMLAxis& rCurrentAxis /* returns a shape for the current axis's title. The property "Has...AxisTitle" is set to "True" to get the shape */ -Reference< drawing::XShape > SchXMLAxisContext::getTitleShape() +Reference< drawing::XShape > SchXMLAxisContext::getTitleShape() const { Reference< drawing::XShape > xResult; Reference< beans::XPropertySet > xDiaProp( m_rImportHelper.GetChartDocument()->getDiagram(), uno::UNO_QUERY ); diff --git a/xmloff/source/chart/SchXMLAxisContext.hxx b/xmloff/source/chart/SchXMLAxisContext.hxx index a629c91b3a5d..e553f6e0a95b 100644 --- a/xmloff/source/chart/SchXMLAxisContext.hxx +++ b/xmloff/source/chart/SchXMLAxisContext.hxx @@ -66,7 +66,7 @@ private: bool const m_bAdaptXAxisOrientationForOld2DBarCharts; //to correct different behaviour from older versions bool& m_rbAxisPositionAttributeImported; - css::uno::Reference< css::drawing::XShape > getTitleShape(); + css::uno::Reference< css::drawing::XShape > getTitleShape() const; void CreateGrid( const OUString& sAutoStyleName, bool bIsMajor ); void CreateAxis(); void SetAxisTitle(); diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 2157955521ce..599d51a69d4f 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -951,7 +951,7 @@ SchXMLExportHelper::~SchXMLExportHelper() { } -const OUString& SchXMLExportHelper::getChartCLSID() +const OUString& SchXMLExportHelper::getChartCLSID() const { return m_pImpl->msCLSID; } diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index b7ca64652410..0640bc98881f 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.cxx @@ -784,7 +784,7 @@ void SchXMLSeries2Context::setStylesToSeries( SeriesDefaultsAndStyles& rSeriesDe , const SvXMLStylesContext* pStylesCtxt , const SvXMLStyleContext*& rpStyle , OUString& rCurrStyleName - , SchXMLImportHelper& rImportHelper + , const SchXMLImportHelper& rImportHelper , const SvXMLImport& rImport , bool bIsStockChart , tSchXMLLSequencesPerIndex & rInOutLSequencesPerIndex ) @@ -1008,7 +1008,7 @@ void SchXMLSeries2Context::setStylesToDataPoints( SeriesDefaultsAndStyles& rSeri , const SvXMLStylesContext* pStylesCtxt , const SvXMLStyleContext*& rpStyle , OUString& rCurrStyleName - , SchXMLImportHelper& rImportHelper + , const SchXMLImportHelper& rImportHelper , const SvXMLImport& rImport , bool bIsStockChart, bool bIsDonutChart, bool bSwitchOffLinesForScatter ) { diff --git a/xmloff/source/chart/SchXMLSeries2Context.hxx b/xmloff/source/chart/SchXMLSeries2Context.hxx index d7ce56f4ec38..effb996a1217 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.hxx +++ b/xmloff/source/chart/SchXMLSeries2Context.hxx @@ -101,7 +101,7 @@ public: , const SvXMLStylesContext* pStylesCtxt , const SvXMLStyleContext*& rpStyle , OUString& rCurrStyleName - , SchXMLImportHelper& rImportHelper + , const SchXMLImportHelper& rImportHelper , const SvXMLImport& rImport , bool bIsStockChart , tSchXMLLSequencesPerIndex & rInOutLSequencesPerIndex ); @@ -121,7 +121,7 @@ public: , const SvXMLStylesContext* pStylesCtxt , const SvXMLStyleContext*& rpStyle , OUString& rCurrStyleName - , SchXMLImportHelper& rImportHelper + , const SchXMLImportHelper& rImportHelper , const SvXMLImport& rImport , bool bIsStockChart, bool bIsDonutChart, bool bSwitchOffLinesForScatter ); diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index d620c45d8053..74ee4336ed5e 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -2262,7 +2262,7 @@ bool SvXMLExport::writeOutlineStyleAsNormalListStyle() const return mpImpl->mbOutlineStyleAsNormalListStyle; } -uno::Reference< embed::XStorage > const & SvXMLExport::GetTargetStorage() +uno::Reference< embed::XStorage > const & SvXMLExport::GetTargetStorage() const { return mpImpl->mxTargetStorage; } diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 1d22fd34449b..6c832c7bc8d5 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -1386,7 +1386,7 @@ uno::Reference<graphic::XGraphic> SvXMLImport::loadGraphicFromBase64(uno::Refere return xGraphic; } -Reference< XOutputStream > SvXMLImport::GetStreamForGraphicObjectURLFromBase64() +Reference< XOutputStream > SvXMLImport::GetStreamForGraphicObjectURLFromBase64() const { Reference< XOutputStream > xOStm; Reference< document::XBinaryStreamResolver > xStmResolver(mxGraphicStorageHandler, UNO_QUERY); @@ -1421,13 +1421,13 @@ OUString SvXMLImport::ResolveEmbeddedObjectURL( return sRet; } -Reference< embed::XStorage > const & SvXMLImport::GetSourceStorage() +Reference< embed::XStorage > const & SvXMLImport::GetSourceStorage() const { return mpImpl->mxSourceStorage; } Reference < XOutputStream > - SvXMLImport::GetStreamForEmbeddedObjectURLFromBase64() + SvXMLImport::GetStreamForEmbeddedObjectURLFromBase64() const { Reference < XOutputStream > xOLEStream; diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index 423327c8b0b9..359c4398b14a 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -1041,7 +1041,7 @@ bool XMLShapeImportHelper::IsHandleProgressBarEnabled() const } /** queries the capability of the current model to create presentation shapes */ -bool XMLShapeImportHelper::IsPresentationShapesSupported() +bool XMLShapeImportHelper::IsPresentationShapesSupported() const { return mpImpl->mbIsPresentationShapesSupported; } diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index e4c382a10a38..620a79a7aa98 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -110,7 +110,7 @@ public: bool GetFirstUsed(sal_uInt32& nKey); bool GetNextUsed(sal_uInt32& nKey); - uno::Sequence<sal_Int32> GetWasUsed(); + uno::Sequence<sal_Int32> GetWasUsed() const; void SetWasUsed(const uno::Sequence<sal_Int32>& rWasUsed); }; @@ -186,7 +186,7 @@ bool SvXMLNumUsedList_Impl::GetNextUsed(sal_uInt32& nKey) return bRet; } -uno::Sequence<sal_Int32> SvXMLNumUsedList_Impl::GetWasUsed() +uno::Sequence<sal_Int32> SvXMLNumUsedList_Impl::GetWasUsed() const { return comphelper::containerToSequence<sal_Int32>(aWasUsed); } @@ -1904,7 +1904,7 @@ void SvXMLNumFmtExport::SetUsed( sal_uInt32 nKey ) } } -uno::Sequence<sal_Int32> SvXMLNumFmtExport::GetWasUsed() +uno::Sequence<sal_Int32> SvXMLNumFmtExport::GetWasUsed() const { if (pUsedList) return pUsedList->GetWasUsed(); diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 5663983f35e7..59e40a39d681 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -2240,7 +2240,7 @@ void SvXMLNumFormatContext::UpdateCalendar( const OUString& rNewCalendar, bool b } } -bool SvXMLNumFormatContext::IsSystemLanguage() +bool SvXMLNumFormatContext::IsSystemLanguage() const { return nFormatLang == LANGUAGE_SYSTEM; } diff --git a/xmloff/source/text/XMLAutoTextEventExport.cxx b/xmloff/source/text/XMLAutoTextEventExport.cxx index fbda4e38039f..54b2c6062d41 100644 --- a/xmloff/source/text/XMLAutoTextEventExport.cxx +++ b/xmloff/source/text/XMLAutoTextEventExport.cxx @@ -153,7 +153,7 @@ ErrCode XMLAutoTextEventExport::exportDoc( enum XMLTokenEnum ) return ERRCODE_NONE; } -bool XMLAutoTextEventExport::hasEvents() +bool XMLAutoTextEventExport::hasEvents() const { // TODO: provide full implementation that check for presence of events return xEvents.is(); diff --git a/xmloff/source/text/XMLAutoTextEventExport.hxx b/xmloff/source/text/XMLAutoTextEventExport.hxx index ec2987fd96f1..99386c8239bb 100644 --- a/xmloff/source/text/XMLAutoTextEventExport.hxx +++ b/xmloff/source/text/XMLAutoTextEventExport.hxx @@ -67,7 +67,7 @@ private: enum ::xmloff::token::XMLTokenEnum eClass = xmloff::token::XML_TOKEN_INVALID ) override; /// does the document have any events ? - bool hasEvents(); + bool hasEvents() const; /// export the events element void exportEvents(); diff --git a/xmloff/source/text/XMLIndexBodyContext.hxx b/xmloff/source/text/XMLIndexBodyContext.hxx index d7b00c59ae41..0c4aeffdf989 100644 --- a/xmloff/source/text/XMLIndexBodyContext.hxx +++ b/xmloff/source/text/XMLIndexBodyContext.hxx @@ -50,7 +50,7 @@ public: virtual ~XMLIndexBodyContext() override; /// return whether any content elements were encountered - inline bool HasContent(); + inline bool HasContent() const; protected: @@ -60,7 +60,7 @@ protected: const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; }; -inline bool XMLIndexBodyContext::HasContent() +inline bool XMLIndexBodyContext::HasContent() const { return bHasContent; } diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index ac9a144953f7..a5f3fe0b3b86 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -2663,7 +2663,7 @@ OUString XMLTextImportHelper::getCurrentFieldType() } } -bool XMLTextImportHelper::hasCurrentFieldCtx() +bool XMLTextImportHelper::hasCurrentFieldCtx() const { return !m_xImpl->m_FieldStack.empty(); } @@ -2862,7 +2862,7 @@ void XMLTextImportHelper::SetChangesProtectionKey(const Sequence<sal_Int8> &) } -OUString const & XMLTextImportHelper::GetOpenRedlineId() +OUString const & XMLTextImportHelper::GetOpenRedlineId() const { return m_xImpl->m_sOpenRedlineIdentifier; } @@ -2883,7 +2883,7 @@ XMLTextImportHelper::SetCellParaStyleDefault(OUString const& rNewValue) m_xImpl->m_sCellParaStyleDefault = rNewValue; } -OUString const& XMLTextImportHelper::GetCellParaStyleDefault() +OUString const& XMLTextImportHelper::GetCellParaStyleDefault() const { return m_xImpl->m_sCellParaStyleDefault; } diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index 287b26722781..e4f25cfa86cb 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.cxx @@ -88,7 +88,7 @@ public: m_Hints.push_back(std::move(pHint)); } - std::vector<std::unique_ptr<XMLHint_Impl>> const& GetHints() + std::vector<std::unique_ptr<XMLHint_Impl>> const& GetHints() const { return m_Hints; } @@ -268,7 +268,7 @@ public: SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName, - XMLHints_Impl& rHints, + const XMLHints_Impl& rHints, const Reference<xml::sax::XAttributeList> & xAttrList); }; @@ -277,7 +277,7 @@ XMLEndReferenceContext_Impl::XMLEndReferenceContext_Impl( SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName, - XMLHints_Impl& rHints, + const XMLHints_Impl& rHints, const Reference<xml::sax::XAttributeList> & xAttrList) : SvXMLImportContext(rImport, nPrefix, rLocalName) { diff --git a/xmloff/source/text/txtparaimphint.hxx b/xmloff/source/text/txtparaimphint.hxx index 56e8823152e9..ca9e887e8eed 100644 --- a/xmloff/source/text/txtparaimphint.hxx +++ b/xmloff/source/text/txtparaimphint.hxx @@ -60,7 +60,7 @@ public: // We don't use virtual methods to differ between the sub classes, // because this seems to be too expensive if compared to inline methods. sal_uInt8 GetType() const { return nType; } - bool IsReference() { return XML_HINT_REFERENCE==nType; } + bool IsReference() const { return XML_HINT_REFERENCE==nType; } }; class XMLStyleHint_Impl : public XMLHint_Impl diff --git a/xmloff/source/transform/TransformerBase.hxx b/xmloff/source/transform/TransformerBase.hxx index 34486e6d9275..fd3bebde167e 100644 --- a/xmloff/source/transform/TransformerBase.hxx +++ b/xmloff/source/transform/TransformerBase.hxx @@ -106,9 +106,9 @@ public: virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override; // C++ - const css::uno::Reference< css::xml::sax::XDocumentHandler > & GetDocHandler() { return m_xHandler; } + const css::uno::Reference< css::xml::sax::XDocumentHandler > & GetDocHandler() const { return m_xHandler; } - const css::uno::Reference< css::beans::XPropertySet > & GetPropertySet() { return m_xPropSet; } + const css::uno::Reference< css::beans::XPropertySet > & GetPropertySet() const { return m_xPropSet; } SvXMLNamespaceMap& GetNamespaceMap() { return *m_pNamespaceMap; } diff --git a/xmloff/source/xforms/XFormsModelContext.hxx b/xmloff/source/xforms/XFormsModelContext.hxx index 8546c5d74105..2129ed53b0d4 100644 --- a/xmloff/source/xforms/XFormsModelContext.hxx +++ b/xmloff/source/xforms/XFormsModelContext.hxx @@ -42,7 +42,7 @@ public: sal_uInt16 nPrfx, const OUString& rLName ); - const css::uno::Reference<css::xforms::XModel2>& getModel() { return mxModel;} + const css::uno::Reference<css::xforms::XModel2>& getModel() const { return mxModel;} // implement SvXMLImportContext & TokenContext methods: |