Kaydet (Commit) f08a0605 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:unusedfields,can-be-const in xmlscript

Change-Id: Ibd733b822bb2eee9de6319b5ea9e4d8dd3641cdc
Reviewed-on: https://gerrit.libreoffice.org/57850
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst cec5271d
...@@ -91,7 +91,7 @@ protected: ...@@ -91,7 +91,7 @@ protected:
::std::vector< css::uno::Reference< ::std::vector< css::uno::Reference<
css::xml::sax::XAttributeList > > _subElems; css::xml::sax::XAttributeList > > _subElems;
private: private:
OUString _name; OUString const _name;
::std::vector< OUString > _attrNames; ::std::vector< OUString > _attrNames;
::std::vector< OUString > _attrValues; ::std::vector< OUString > _attrValues;
......
...@@ -105,8 +105,8 @@ class DocumentHandlerImpl : ...@@ -105,8 +105,8 @@ class DocumentHandlerImpl :
t_OUString2LongMap m_URI2Uid; t_OUString2LongMap m_URI2Uid;
sal_Int32 m_uid_count; sal_Int32 m_uid_count;
OUString m_sXMLNS_PREFIX_UNKNOWN; OUString const m_sXMLNS_PREFIX_UNKNOWN;
OUString m_sXMLNS; OUString const m_sXMLNS;
sal_Int32 m_nLastURI_lookup; sal_Int32 m_nLastURI_lookup;
OUString m_aLastURI_lookup; OUString m_aLastURI_lookup;
...@@ -301,7 +301,7 @@ inline void DocumentHandlerImpl::getElementName( ...@@ -301,7 +301,7 @@ inline void DocumentHandlerImpl::getElementName(
class ExtendedAttributes : class ExtendedAttributes :
public ::cppu::WeakImplHelper< xml::input::XAttributes > 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<sal_Int32[]> m_pUids;
std::unique_ptr<OUString[]> m_pLocalNames; std::unique_ptr<OUString[]> m_pLocalNames;
std::unique_ptr<OUString[]> m_pQNames; std::unique_ptr<OUString[]> m_pQNames;
......
...@@ -36,7 +36,7 @@ namespace xmlscript ...@@ -36,7 +36,7 @@ namespace xmlscript
class InputStreamProvider class InputStreamProvider
: public ::cppu::WeakImplHelper< io::XInputStreamProvider > : public ::cppu::WeakImplHelper< io::XInputStreamProvider >
{ {
std::vector<sal_Int8> _bytes; std::vector<sal_Int8> const _bytes;
public: public:
explicit InputStreamProvider( std::vector<sal_Int8> const & rBytes ) explicit InputStreamProvider( std::vector<sal_Int8> const & rBytes )
......
...@@ -45,7 +45,7 @@ namespace xmlscript ...@@ -45,7 +45,7 @@ namespace xmlscript
::osl::Mutex m_aMutex; ::osl::Mutex m_aMutex;
css::uno::Reference< css::xml::sax::XDocumentHandler > m_xHandler; css::uno::Reference< css::xml::sax::XDocumentHandler > m_xHandler;
css::uno::Reference< css::frame::XModel > m_xModel; css::uno::Reference< css::frame::XModel > m_xModel;
bool m_bOasis; bool const m_bOasis;
public: public:
explicit XMLBasicExporterBase(bool bOasis); explicit XMLBasicExporterBase(bool bOasis);
......
...@@ -47,7 +47,7 @@ namespace xmlscript ...@@ -47,7 +47,7 @@ namespace xmlscript
rtl::Reference<BasicImport> m_xImport; rtl::Reference<BasicImport> m_xImport;
private: private:
rtl::Reference<BasicElementBase> m_xParent; rtl::Reference<BasicElementBase> m_xParent;
OUString m_aLocalName; OUString const m_aLocalName;
css::uno::Reference< css::xml::input::XAttributes > m_xAttributes; css::uno::Reference< css::xml::input::XAttributes > m_xAttributes;
protected: protected:
...@@ -104,8 +104,8 @@ namespace xmlscript ...@@ -104,8 +104,8 @@ namespace xmlscript
private: private:
css::uno::Reference< css::script::XLibraryContainer2 > m_xLibContainer; css::uno::Reference< css::script::XLibraryContainer2 > m_xLibContainer;
css::uno::Reference< css::container::XNameContainer > m_xLib; css::uno::Reference< css::container::XNameContainer > m_xLib;
OUString m_aLibName; OUString const m_aLibName;
bool m_bReadOnly; bool const m_bReadOnly;
public: public:
BasicEmbeddedLibraryElement( const OUString& rLocalName, BasicEmbeddedLibraryElement( const OUString& rLocalName,
...@@ -127,7 +127,7 @@ namespace xmlscript ...@@ -127,7 +127,7 @@ namespace xmlscript
{ {
private: private:
css::uno::Reference< css::container::XNameContainer > m_xLib; css::uno::Reference< css::container::XNameContainer > m_xLib;
OUString m_aName; OUString const m_aName;
public: public:
BasicModuleElement( const OUString& rLocalName, BasicModuleElement( const OUString& rLocalName,
...@@ -149,7 +149,7 @@ namespace xmlscript ...@@ -149,7 +149,7 @@ namespace xmlscript
{ {
private: private:
css::uno::Reference< css::container::XNameContainer > m_xLib; css::uno::Reference< css::container::XNameContainer > m_xLib;
OUString m_aName; OUString const m_aName;
OUStringBuffer m_aBuffer; OUStringBuffer m_aBuffer;
public: public:
...@@ -180,7 +180,7 @@ namespace xmlscript ...@@ -180,7 +180,7 @@ namespace xmlscript
sal_Int32 XMLNS_UID; sal_Int32 XMLNS_UID;
sal_Int32 XMLNS_XLINK_UID; sal_Int32 XMLNS_XLINK_UID;
css::uno::Reference< css::frame::XModel > m_xModel; css::uno::Reference< css::frame::XModel > m_xModel;
bool m_bOasis; bool const m_bOasis;
public: public:
BasicImport( const css::uno::Reference< css::frame::XModel >& rxModel, bool bOasis ); BasicImport( const css::uno::Reference< css::frame::XModel >& rxModel, bool bOasis );
...@@ -212,7 +212,7 @@ namespace xmlscript ...@@ -212,7 +212,7 @@ namespace xmlscript
css::uno::Reference< css::uno::XComponentContext > m_xContext; css::uno::Reference< css::uno::XComponentContext > m_xContext;
css::uno::Reference< css::xml::sax::XDocumentHandler > m_xHandler; css::uno::Reference< css::xml::sax::XDocumentHandler > m_xHandler;
css::uno::Reference< css::frame::XModel > m_xModel; css::uno::Reference< css::frame::XModel > m_xModel;
bool m_bOasis; bool const m_bOasis;
public: public:
XMLBasicImporterBase( XMLBasicImporterBase(
......
...@@ -110,7 +110,7 @@ struct LibraryImport ...@@ -110,7 +110,7 @@ struct LibraryImport
friend class LibraryElement; friend class LibraryElement;
LibDescriptorArray* mpLibArray; LibDescriptorArray* mpLibArray;
LibDescriptor* mpLibDesc; // Single library mode LibDescriptor* const mpLibDesc; // Single library mode
sal_Int32 XMLNS_LIBRARY_UID; sal_Int32 XMLNS_LIBRARY_UID;
sal_Int32 XMLNS_XLINK_UID; sal_Int32 XMLNS_XLINK_UID;
...@@ -155,7 +155,7 @@ protected: ...@@ -155,7 +155,7 @@ protected:
rtl::Reference<LibraryImport> mxImport; rtl::Reference<LibraryImport> mxImport;
rtl::Reference<LibElementBase> mxParent; rtl::Reference<LibElementBase> mxParent;
private: private:
OUString _aLocalName; OUString const _aLocalName;
css::uno::Reference< css::xml::input::XAttributes > _xAttributes; css::uno::Reference< css::xml::input::XAttributes > _xAttributes;
public: public:
......
...@@ -78,7 +78,7 @@ class ModuleElement ...@@ -78,7 +78,7 @@ class ModuleElement
{ {
rtl::Reference<ModuleImport> mxImport; rtl::Reference<ModuleImport> mxImport;
OUString _aLocalName; OUString const _aLocalName;
css::uno::Reference< css::xml::input::XAttributes > _xAttributes; css::uno::Reference< css::xml::input::XAttributes > _xAttributes;
OUStringBuffer _strBuffer; OUStringBuffer _strBuffer;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment