include/xmlreader/xmlreader.hxx | 12 ++++++------ include/xmlscript/xml_helper.hxx | 2 +- xmlreader/source/xmlreader.cxx | 4 ++-- xmlscript/source/xml_helper/xml_impctx.cxx | 6 +++--- xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx | 2 +- xmlscript/source/xmlflat_imexp/xmlbas_export.hxx | 2 +- xmlscript/source/xmlflat_imexp/xmlbas_import.hxx | 14 +++++++------- xmlscript/source/xmllib_imexp/imp_share.hxx | 4 ++-- xmlscript/source/xmlmod_imexp/imp_share.hxx | 2 +- 9 files changed, 24 insertions(+), 24 deletions(-)
New commits: commit 0b7fe7b2ceff8056b619b994fc765eb827f29bf3 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Jul 23 16:28:13 2018 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Jul 24 08:32:46 2018 +0200 loplugin:unusedfields,can-be-const in xmlreader Change-Id: I762a749b858063a1c063ee918bb6d33e06328876 Reviewed-on: https://gerrit.libreoffice.org/57852 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/xmlreader/xmlreader.hxx b/include/xmlreader/xmlreader.hxx index b2b97bd05afd..fb44d01ef067 100644 --- a/include/xmlreader/xmlreader.hxx +++ b/include/xmlreader/xmlreader.hxx @@ -78,8 +78,8 @@ private: // elements_ and attributes_): struct NamespaceData { - Span prefix; - int nsId; + Span const prefix; + int const nsId; NamespaceData(): nsId(-1) {} @@ -91,9 +91,9 @@ private: typedef std::vector< NamespaceData > NamespaceList; struct ElementData { - Span name; - NamespaceList::size_type inheritedNamespaces; - int defaultNamespaceId; + Span const name; + NamespaceList::size_type const inheritedNamespaces; + int const defaultNamespaceId; ElementData( Span const & theName, @@ -168,7 +168,7 @@ private: SAL_DLLPRIVATE static int toNamespaceId(NamespaceIris::size_type pos); - OUString fileUrl_; + OUString const fileUrl_; oslFileHandle fileHandle_; sal_uInt64 fileSize_; void * fileAddress_; diff --git a/xmlreader/source/xmlreader.cxx b/xmlreader/source/xmlreader.cxx index 8e544b6a07d0..699567a53a32 100644 --- a/xmlreader/source/xmlreader.cxx +++ b/xmlreader/source/xmlreader.cxx @@ -458,9 +458,9 @@ char const * XmlReader::handleReference(char const * position, char const * end) } else { struct EntityRef { char const * inBegin; - sal_Int32 inLength; + sal_Int32 const inLength; char const * outBegin; - sal_Int32 outLength; + sal_Int32 const outLength; }; static EntityRef const refs[] = { { RTL_CONSTASCII_STRINGPARAM("amp;"), commit f08a06052bfe38c2bc0a23bd2c56ff9c1cb5536c Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Jul 23 16:14:49 2018 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Jul 24 08:32:37 2018 +0200 loplugin:unusedfields,can-be-const in xmlscript Change-Id: Ibd733b822bb2eee9de6319b5ea9e4d8dd3641cdc Reviewed-on: https://gerrit.libreoffice.org/57850 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/xmlscript/xml_helper.hxx b/include/xmlscript/xml_helper.hxx index 508c5789fe1b..6ee6c3f5872f 100644 --- a/include/xmlscript/xml_helper.hxx +++ b/include/xmlscript/xml_helper.hxx @@ -91,7 +91,7 @@ protected: ::std::vector< css::uno::Reference< css::xml::sax::XAttributeList > > _subElems; private: - OUString _name; + OUString const _name; ::std::vector< OUString > _attrNames; ::std::vector< OUString > _attrValues; diff --git a/xmlscript/source/xml_helper/xml_impctx.cxx b/xmlscript/source/xml_helper/xml_impctx.cxx index 48b3153228c6..3ebc809d1cfe 100644 --- a/xmlscript/source/xml_helper/xml_impctx.cxx +++ b/xmlscript/source/xml_helper/xml_impctx.cxx @@ -105,8 +105,8 @@ class DocumentHandlerImpl : t_OUString2LongMap m_URI2Uid; sal_Int32 m_uid_count; - OUString m_sXMLNS_PREFIX_UNKNOWN; - OUString m_sXMLNS; + OUString const m_sXMLNS_PREFIX_UNKNOWN; + OUString const m_sXMLNS; sal_Int32 m_nLastURI_lookup; OUString m_aLastURI_lookup; @@ -301,7 +301,7 @@ inline void DocumentHandlerImpl::getElementName( class ExtendedAttributes : public ::cppu::WeakImplHelper< xml::input::XAttributes > { - sal_Int32 m_nAttributes; + sal_Int32 const m_nAttributes; std::unique_ptr<sal_Int32[]> m_pUids; std::unique_ptr<OUString[]> m_pLocalNames; std::unique_ptr<OUString[]> m_pQNames; diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx index d0daa3746c65..9daedf961b63 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx @@ -36,7 +36,7 @@ namespace xmlscript class InputStreamProvider : public ::cppu::WeakImplHelper< io::XInputStreamProvider > { - std::vector<sal_Int8> _bytes; + std::vector<sal_Int8> const _bytes; public: explicit InputStreamProvider( std::vector<sal_Int8> const & rBytes ) diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_export.hxx b/xmlscript/source/xmlflat_imexp/xmlbas_export.hxx index 6d44d6255451..e710236413a7 100644 --- a/xmlscript/source/xmlflat_imexp/xmlbas_export.hxx +++ b/xmlscript/source/xmlflat_imexp/xmlbas_export.hxx @@ -45,7 +45,7 @@ namespace xmlscript ::osl::Mutex m_aMutex; css::uno::Reference< css::xml::sax::XDocumentHandler > m_xHandler; css::uno::Reference< css::frame::XModel > m_xModel; - bool m_bOasis; + bool const m_bOasis; public: explicit XMLBasicExporterBase(bool bOasis); diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_import.hxx b/xmlscript/source/xmlflat_imexp/xmlbas_import.hxx index 247cf835eb3c..bb8737f5cff9 100644 --- a/xmlscript/source/xmlflat_imexp/xmlbas_import.hxx +++ b/xmlscript/source/xmlflat_imexp/xmlbas_import.hxx @@ -47,7 +47,7 @@ namespace xmlscript rtl::Reference<BasicImport> m_xImport; private: rtl::Reference<BasicElementBase> m_xParent; - OUString m_aLocalName; + OUString const m_aLocalName; css::uno::Reference< css::xml::input::XAttributes > m_xAttributes; protected: @@ -104,8 +104,8 @@ namespace xmlscript private: css::uno::Reference< css::script::XLibraryContainer2 > m_xLibContainer; css::uno::Reference< css::container::XNameContainer > m_xLib; - OUString m_aLibName; - bool m_bReadOnly; + OUString const m_aLibName; + bool const m_bReadOnly; public: BasicEmbeddedLibraryElement( const OUString& rLocalName, @@ -127,7 +127,7 @@ namespace xmlscript { private: css::uno::Reference< css::container::XNameContainer > m_xLib; - OUString m_aName; + OUString const m_aName; public: BasicModuleElement( const OUString& rLocalName, @@ -149,7 +149,7 @@ namespace xmlscript { private: css::uno::Reference< css::container::XNameContainer > m_xLib; - OUString m_aName; + OUString const m_aName; OUStringBuffer m_aBuffer; public: @@ -180,7 +180,7 @@ namespace xmlscript sal_Int32 XMLNS_UID; sal_Int32 XMLNS_XLINK_UID; css::uno::Reference< css::frame::XModel > m_xModel; - bool m_bOasis; + bool const m_bOasis; public: BasicImport( const css::uno::Reference< css::frame::XModel >& rxModel, bool bOasis ); @@ -212,7 +212,7 @@ namespace xmlscript css::uno::Reference< css::uno::XComponentContext > m_xContext; css::uno::Reference< css::xml::sax::XDocumentHandler > m_xHandler; css::uno::Reference< css::frame::XModel > m_xModel; - bool m_bOasis; + bool const m_bOasis; public: XMLBasicImporterBase( diff --git a/xmlscript/source/xmllib_imexp/imp_share.hxx b/xmlscript/source/xmllib_imexp/imp_share.hxx index 636c10c3a370..ab7570cd34c7 100644 --- a/xmlscript/source/xmllib_imexp/imp_share.hxx +++ b/xmlscript/source/xmllib_imexp/imp_share.hxx @@ -110,7 +110,7 @@ struct LibraryImport friend class LibraryElement; LibDescriptorArray* mpLibArray; - LibDescriptor* mpLibDesc; // Single library mode + LibDescriptor* const mpLibDesc; // Single library mode sal_Int32 XMLNS_LIBRARY_UID; sal_Int32 XMLNS_XLINK_UID; @@ -155,7 +155,7 @@ protected: rtl::Reference<LibraryImport> mxImport; rtl::Reference<LibElementBase> mxParent; private: - OUString _aLocalName; + OUString const _aLocalName; css::uno::Reference< css::xml::input::XAttributes > _xAttributes; public: diff --git a/xmlscript/source/xmlmod_imexp/imp_share.hxx b/xmlscript/source/xmlmod_imexp/imp_share.hxx index 99260ed4c238..d5f1c973ab59 100644 --- a/xmlscript/source/xmlmod_imexp/imp_share.hxx +++ b/xmlscript/source/xmlmod_imexp/imp_share.hxx @@ -78,7 +78,7 @@ class ModuleElement { rtl::Reference<ModuleImport> mxImport; - OUString _aLocalName; + OUString const _aLocalName; css::uno::Reference< css::xml::input::XAttributes > _xAttributes; OUStringBuffer _strBuffer; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits