diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-12 15:51:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-13 12:56:39 +0200 |
commit | 0302c9b192c3b7ba10daabed61d6864c24c14070 (patch) | |
tree | 4c17a2ff761e0513620704bd3ecceff4107d17cc /include/xmloff | |
parent | ecf987682881258774f4ec1644474beae3366abe (diff) |
loplugin:constfields in xmloff
Change-Id: I9623e6b483b28f5b50a2c76016bcc319b375a35a
Reviewed-on: https://gerrit.libreoffice.org/60394
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/xmloff')
24 files changed, 36 insertions, 36 deletions
diff --git a/include/xmloff/ProgressBarHelper.hxx b/include/xmloff/ProgressBarHelper.hxx index 491231a0d6a9..75f2e6f60aaa 100644 --- a/include/xmloff/ProgressBarHelper.hxx +++ b/include/xmloff/ProgressBarHelper.hxx @@ -36,7 +36,7 @@ class XMLOFF_DLLPUBLIC ProgressBarHelper sal_Int32 nReference; sal_Int32 nValue; double fOldPercent; - bool bStrict; + bool const bStrict; // #96469#; if the value goes over the Range the progressbar starts again bool bRepeat; diff --git a/include/xmloff/SinglePropertySetInfoCache.hxx b/include/xmloff/SinglePropertySetInfoCache.hxx index 19e485a421d6..6a15d2c348c8 100644 --- a/include/xmloff/SinglePropertySetInfoCache.hxx +++ b/include/xmloff/SinglePropertySetInfoCache.hxx @@ -31,7 +31,7 @@ class SinglePropertySetInfoCache typedef std::map<css::uno::Reference<css::beans::XPropertySetInfo>, bool> Map; - OUString sName; + OUString const sName; Map map_; public: diff --git a/include/xmloff/WordWrapPropertyHdl.hxx b/include/xmloff/WordWrapPropertyHdl.hxx index b87faa1af5e4..81b681674084 100644 --- a/include/xmloff/WordWrapPropertyHdl.hxx +++ b/include/xmloff/WordWrapPropertyHdl.hxx @@ -31,7 +31,7 @@ class SvXMLImport; class XMLWordWrapPropertyHdl : public XMLPropertyHandler { private: - SvXMLImport* mpImport; + SvXMLImport* const mpImport; public: XMLWordWrapPropertyHdl( SvXMLImport* pImport ); diff --git a/include/xmloff/XMLCharContext.hxx b/include/xmloff/XMLCharContext.hxx index 873502597c71..584d993d6563 100644 --- a/include/xmloff/XMLCharContext.hxx +++ b/include/xmloff/XMLCharContext.hxx @@ -27,7 +27,7 @@ class XMLOFF_DLLPUBLIC XMLCharContext : public SvXMLImportContext { XMLCharContext(const XMLCharContext&) = delete; void operator =(const XMLCharContext&) = delete; - sal_Int16 m_nControl; + sal_Int16 const m_nControl; protected: sal_uInt16 m_nCount; sal_Unicode m_c; diff --git a/include/xmloff/XMLFontAutoStylePool.hxx b/include/xmloff/XMLFontAutoStylePool.hxx index 2354bcf8ce7d..59ca1414078b 100644 --- a/include/xmloff/XMLFontAutoStylePool.hxx +++ b/include/xmloff/XMLFontAutoStylePool.hxx @@ -40,7 +40,7 @@ private: std::unique_ptr<XMLFontAutoStylePool_Impl> m_pFontAutoStylePool; std::set<OUString> m_aNames; - bool m_bTryToEmbedFonts; + bool const m_bTryToEmbedFonts; std::unordered_map<OString, OUString> m_aEmbeddedFontFiles; OUString embedFontFile(OUString const & rFileUrl, OUString const & rFamilyName); diff --git a/include/xmloff/XMLFontStylesContext.hxx b/include/xmloff/XMLFontStylesContext.hxx index cc6a2a712bb8..8e33ed2a67db 100644 --- a/include/xmloff/XMLFontStylesContext.hxx +++ b/include/xmloff/XMLFontStylesContext.hxx @@ -43,7 +43,7 @@ class XMLOFF_DLLPUBLIC XMLFontStylesContext : public SvXMLStylesContext std::unique_ptr<SvXMLTokenMap> pFontStyleAttrTokenMap; - rtl_TextEncoding eDfltEncoding; + rtl_TextEncoding const eDfltEncoding; protected: diff --git a/include/xmloff/controlpropertyhdl.hxx b/include/xmloff/controlpropertyhdl.hxx index dd7010cc0f8f..8aec6d46178d 100644 --- a/include/xmloff/controlpropertyhdl.hxx +++ b/include/xmloff/controlpropertyhdl.hxx @@ -84,7 +84,7 @@ namespace xmloff virtual bool exportXML( OUString& _rStrExpValue, const css::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const override; private: - BorderFacet m_eFacet; + BorderFacet const m_eFacet; }; diff --git a/include/xmloff/i18nmap.hxx b/include/xmloff/i18nmap.hxx index c3921281f70f..20953d147f2e 100644 --- a/include/xmloff/i18nmap.hxx +++ b/include/xmloff/i18nmap.hxx @@ -27,8 +27,8 @@ class SvI18NMapEntry_Key { - sal_uInt16 nKind; - OUString aName; + sal_uInt16 const nKind; + OUString const aName; public: SvI18NMapEntry_Key( sal_uInt16 nKnd, const OUString& rName ) : nKind( nKnd ), diff --git a/include/xmloff/numehelp.hxx b/include/xmloff/numehelp.hxx index 9402eaec011c..b60da6822661 100644 --- a/include/xmloff/numehelp.hxx +++ b/include/xmloff/numehelp.hxx @@ -33,7 +33,7 @@ class SvXMLExport; struct XMLNumberFormat { OUString sCurrency; - sal_Int32 nNumberFormat; + sal_Int32 const nNumberFormat; sal_Int16 nType; bool bIsStandard : 1; diff --git a/include/xmloff/prstylei.hxx b/include/xmloff/prstylei.hxx index da79ed726ad7..bee1124e63ec 100644 --- a/include/xmloff/prstylei.hxx +++ b/include/xmloff/prstylei.hxx @@ -42,7 +42,7 @@ class XMLOFF_DLLPUBLIC XMLPropStyleContext : public SvXMLStyleContext private: ::std::vector< XMLPropertyState > maProperties; css::uno::Reference < css::style::XStyle > mxStyle; - SvXMLImportContextRef mxStyles; + SvXMLImportContextRef const mxStyles; XMLPropStyleContext(XMLPropStyleContext &) = delete; void operator =(XMLPropStyleContext &) = delete; diff --git a/include/xmloff/shapeimport.hxx b/include/xmloff/shapeimport.hxx index db7804be82b5..1bc00431d51d 100644 --- a/include/xmloff/shapeimport.hxx +++ b/include/xmloff/shapeimport.hxx @@ -199,7 +199,7 @@ class SvXMLShapeContext : public SvXMLImportContext { protected: css::uno::Reference< css::drawing::XShape > mxShape; - bool mbTemporaryShape; + bool const mbTemporaryShape; OUString msHyperlink; public: diff --git a/include/xmloff/xmlement.hxx b/include/xmloff/xmlement.hxx index 066a99c4edbc..4591cb945bbe 100644 --- a/include/xmloff/xmlement.hxx +++ b/include/xmloff/xmlement.hxx @@ -33,8 +33,8 @@ template<typename EnumT> struct SvXMLEnumMapEntry { private: - ::xmloff::token::XMLTokenEnum eToken; - sal_uInt16 nValue; + ::xmloff::token::XMLTokenEnum const eToken; + sal_uInt16 const nValue; public: SvXMLEnumMapEntry(::xmloff::token::XMLTokenEnum eToken_, EnumT nValue_) : eToken(eToken_), nValue(static_cast<sal_uInt16>(nValue_)) {} @@ -71,8 +71,8 @@ struct SvXMLEnumStringMapEntry { private: const char * pName; - sal_Int32 nNameLength; - sal_uInt16 nValue; + sal_Int32 const nNameLength; + sal_uInt16 const nValue; public: SvXMLEnumStringMapEntry(const char * pName_, sal_Int32 nNameLength_, EnumT nValue_) : pName(pName_), nNameLength(nNameLength_), nValue(nValue_) {} diff --git a/include/xmloff/xmlevent.hxx b/include/xmloff/xmlevent.hxx index 0a2220d8e03a..811cd719c789 100644 --- a/include/xmloff/xmlevent.hxx +++ b/include/xmloff/xmlevent.hxx @@ -73,7 +73,7 @@ struct XMLEventName struct XMLEventNameTranslation { const sal_Char* sAPIName; - sal_uInt16 nPrefix; // namespace prefix + sal_uInt16 const nPrefix; // namespace prefix const sal_Char* sXMLName; }; diff --git a/include/xmloff/xmlexp.hxx b/include/xmloff/xmlexp.hxx index f2319efcd702..a2759c86c9cc 100644 --- a/include/xmloff/xmlexp.hxx +++ b/include/xmloff/xmlexp.hxx @@ -122,7 +122,7 @@ class XMLOFF_DLLPUBLIC SvXMLExport : public cppu::WeakImplHelper< std::unique_ptr<SvXMLExport_Impl> mpImpl; // dummy css::uno::Reference< css::uno::XComponentContext > m_xContext; - OUString m_implementationName; + OUString const m_implementationName; css::uno::Reference< css::frame::XModel > mxModel; css::uno::Reference< css::xml::sax::XDocumentHandler > mxHandler; // the handlers @@ -232,8 +232,8 @@ protected: struct SettingsGroup { - ::xmloff::token::XMLTokenEnum eGroupName; - css::uno::Sequence< css::beans::PropertyValue > aSettings; + ::xmloff::token::XMLTokenEnum const eGroupName; + css::uno::Sequence< css::beans::PropertyValue > const aSettings; SettingsGroup( const ::xmloff::token::XMLTokenEnum _eGroupName, diff --git a/include/xmloff/xmlictxt.hxx b/include/xmloff/xmlictxt.hxx index 77f701795f32..6a15d4e7c589 100644 --- a/include/xmloff/xmlictxt.hxx +++ b/include/xmloff/xmlictxt.hxx @@ -44,8 +44,8 @@ class XMLOFF_DLLPUBLIC SvXMLImportContext : public cppu::WeakImplHelper< css::xm SvXMLImport& mrImport; - sal_uInt16 mnPrefix; - OUString maLocalName; + sal_uInt16 const mnPrefix; + OUString const maLocalName; std::unique_ptr<SvXMLNamespaceMap> m_pRewindMap; diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx index f213f21cd2fa..39415336591a 100644 --- a/include/xmloff/xmlimp.hxx +++ b/include/xmloff/xmlimp.hxx @@ -216,7 +216,7 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public cppu::WeakImplHelper< SAL_DLLPRIVATE void InitCtor_(); - SvXMLImportFlags mnImportFlags; + SvXMLImportFlags const mnImportFlags; SvXMLErrorFlags mnErrorFlags; std::set< OUString > embeddedFontUrlsKnown; bool isFastContext; diff --git a/include/xmloff/xmlimppr.hxx b/include/xmloff/xmlimppr.hxx index 8247345c5bc5..ec280ead6cf2 100644 --- a/include/xmloff/xmlimppr.hxx +++ b/include/xmloff/xmlimppr.hxx @@ -47,7 +47,7 @@ class SvXMLImport; */ struct ContextID_Index_Pair { - sal_Int16 nContextID; + sal_Int16 const nContextID; sal_Int32 nIndex; }; diff --git a/include/xmloff/xmlnumfe.hxx b/include/xmloff/xmlnumfe.hxx index 75c3b133c036..ec7d3878aa59 100644 --- a/include/xmloff/xmlnumfe.hxx +++ b/include/xmloff/xmlnumfe.hxx @@ -48,7 +48,7 @@ class XMLOFF_DLLPUBLIC SvXMLNumFmtExport final { private: SvXMLExport& rExport; - OUString sPrefix; + OUString const sPrefix; SvNumberFormatter* pFormatter; OUStringBuffer sTextContent; std::unique_ptr<SvXMLNumUsedList_Impl> pUsedList; diff --git a/include/xmloff/xmlnumfi.hxx b/include/xmloff/xmlnumfi.hxx index 39d058fbaeed..67fe154e9911 100644 --- a/include/xmloff/xmlnumfi.hxx +++ b/include/xmloff/xmlnumfi.hxx @@ -121,9 +121,9 @@ struct MyCondition class XMLOFF_DLLPUBLIC SvXMLNumFormatContext : public SvXMLStyleContext { SvXMLNumImpData* pData; - SvXMLStylesContext* pStyles; + SvXMLStylesContext* const pStyles; std::vector <MyCondition> aMyConditions; - sal_uInt16 nType; + sal_uInt16 const nType; sal_Int32 nKey; // OUString sFormatName; OUString sFormatTitle; diff --git a/include/xmloff/xmlnumi.hxx b/include/xmloff/xmlnumi.hxx index 877340d34df1..caecd76f3b4f 100644 --- a/include/xmloff/xmlnumi.hxx +++ b/include/xmloff/xmlnumi.hxx @@ -43,7 +43,7 @@ class XMLOFF_DLLPUBLIC SvxXMLListStyleContext std::unique_ptr<SvxXMLListStyle_Impl> pLevelStyles; bool bConsecutive : 1; - bool bOutline : 1; + bool const bOutline : 1; protected: diff --git a/include/xmloff/xmlprcon.hxx b/include/xmloff/xmlprcon.hxx index 012bf1b26a13..fb2cba45f6db 100644 --- a/include/xmloff/xmlprcon.hxx +++ b/include/xmloff/xmlprcon.hxx @@ -30,9 +30,9 @@ class SvXMLImportPropertyMapper; class XMLOFF_DLLPUBLIC SvXMLPropertySetContext : public SvXMLImportContext { protected: - sal_Int32 mnStartIdx; - sal_Int32 mnEndIdx; - sal_uInt32 mnFamily; + sal_Int32 const mnStartIdx; + sal_Int32 const mnEndIdx; + sal_uInt32 const mnFamily; ::std::vector< XMLPropertyState > &mrProperties; rtl::Reference < SvXMLImportPropertyMapper > mxMapper; diff --git a/include/xmloff/xmlstyle.hxx b/include/xmloff/xmlstyle.hxx index 292af5128e3e..dfeb41e7261d 100644 --- a/include/xmloff/xmlstyle.hxx +++ b/include/xmloff/xmlstyle.hxx @@ -73,7 +73,7 @@ class XMLOFF_DLLPUBLIC SvXMLStyleContext : public SvXMLImportContext // by Finish() or si somehow invalid. bool mbNew : 1; // Set this to false in CreateAnsInsert // if the style is already existing. - bool mbDefaultStyle : 1; + bool const mbDefaultStyle : 1; protected: diff --git a/include/xmloff/xmltkmap.hxx b/include/xmloff/xmltkmap.hxx index 89cfd6584d1a..1bed470c2535 100644 --- a/include/xmloff/xmltkmap.hxx +++ b/include/xmloff/xmltkmap.hxx @@ -34,9 +34,9 @@ class SvXMLTokenMap_Impl; struct SvXMLTokenMapEntry { - sal_uInt16 nPrefixKey; - enum xmloff::token::XMLTokenEnum eLocalName; - sal_uInt16 nToken; + sal_uInt16 const nPrefixKey; + enum xmloff::token::XMLTokenEnum const eLocalName; + sal_uInt16 const nToken; sal_Int32 nFastToken; SvXMLTokenMapEntry( sal_uInt16 nPrefix, xmloff::token::XMLTokenEnum eName, diff --git a/include/xmloff/xmluconv.hxx b/include/xmloff/xmluconv.hxx index 1dd231e55782..f5cc67f67654 100644 --- a/include/xmloff/xmluconv.hxx +++ b/include/xmloff/xmluconv.hxx @@ -57,7 +57,7 @@ class XMLOFF_DLLPUBLIC SvXMLTokenEnumerator private: const OUString& maTokenString; sal_Int32 mnNextTokenPos; - sal_Unicode mcSeparator; + sal_Unicode const mcSeparator; public: SvXMLTokenEnumerator( const OUString& rString, sal_Unicode cSeparator = u' ' ); |