diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-17 08:39:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-17 08:40:27 +0200 |
commit | 2f7ccd102a6280750ce920e4c4eab66f9a01b9d3 (patch) | |
tree | f1e384c6b76b8fd9846db630ee58cdf6c9085482 /xmlscript | |
parent | 234325b9fc0d54e594de8e5d2e7c717684db1745 (diff) |
extend unusedfields loplugin to find fields that can be private
and apply the results in xmlscript
Change-Id: Ib126f6e1576639abfd171e99d9561be9715ece2f
Diffstat (limited to 'xmlscript')
-rw-r--r-- | xmlscript/source/xml_helper/xml_impctx.cxx | 3 | ||||
-rw-r--r-- | xmlscript/source/xmldlg_imexp/imp_share.hxx | 14 | ||||
-rw-r--r-- | xmlscript/source/xmlflat_imexp/xmlbas_import.hxx | 2 | ||||
-rw-r--r-- | xmlscript/source/xmllib_imexp/imp_share.hxx | 2 | ||||
-rw-r--r-- | xmlscript/source/xmlmod_imexp/imp_share.hxx | 2 |
5 files changed, 14 insertions, 9 deletions
diff --git a/xmlscript/source/xml_helper/xml_impctx.cxx b/xmlscript/source/xml_helper/xml_impctx.cxx index c79e8d50a3e7..52999fa83d9c 100644 --- a/xmlscript/source/xml_helper/xml_impctx.cxx +++ b/xmlscript/source/xml_helper/xml_impctx.cxx @@ -79,9 +79,10 @@ struct ElementEntry class ExtendedAttributes; -struct MGuard +class MGuard { Mutex * m_pMutex; +public: explicit MGuard( Mutex * pMutex ) : m_pMutex( pMutex ) { if (m_pMutex) m_pMutex->acquire(); } diff --git a/xmlscript/source/xmldlg_imexp/imp_share.hxx b/xmlscript/source/xmldlg_imexp/imp_share.hxx index f185fcd0276e..30c3f9440883 100644 --- a/xmlscript/source/xmldlg_imexp/imp_share.hxx +++ b/xmlscript/source/xmldlg_imexp/imp_share.hxx @@ -114,20 +114,20 @@ struct DialogImport : public ::cppu::WeakImplHelper< css::xml::input::XRoot > { friend class ImportContext; - +private: css::uno::Reference< css::uno::XComponentContext > _xContext; css::uno::Reference< css::util::XNumberFormatsSupplier > _xSupplier; std::shared_ptr< std::vector< OUString > > _pStyleNames; std::shared_ptr< std::vector< css::uno::Reference< css::xml::input::XElement > > > _pStyles; + css::uno::Reference< css::frame::XModel > _xDoc; +public: css::uno::Reference< css::container::XNameContainer > _xDialogModel; css::uno::Reference< css::lang::XMultiServiceFactory > _xDialogModelFactory; - css::uno::Reference< css::frame::XModel > _xDoc; sal_Int32 XMLNS_DIALOGS_UID, XMLNS_SCRIPT_UID; -public: inline bool isEventElement( sal_Int32 nUid, OUString const & rLocalName ) { @@ -156,8 +156,9 @@ public: : _xContext( xContext ) , _pStyleNames( pStyleNames ) , _pStyles( pStyles ) + , _xDoc( xDoc ) , _xDialogModel( xDialogModel ) - , _xDialogModelFactory( xDialogModel, css::uno::UNO_QUERY_THROW ), _xDoc( xDoc ) + , _xDialogModelFactory( xDialogModel, css::uno::UNO_QUERY_THROW ) , XMLNS_DIALOGS_UID( 0 ) , XMLNS_SCRIPT_UID( 0 ) { OSL_ASSERT( _xDialogModel.is() && _xDialogModelFactory.is() && @@ -168,9 +169,9 @@ public: , _xSupplier( rOther._xSupplier ) , _pStyleNames( rOther._pStyleNames ) , _pStyles( rOther._pStyles ) + , _xDoc( rOther._xDoc ) , _xDialogModel( rOther._xDialogModel ) , _xDialogModelFactory( rOther._xDialogModelFactory ) - , _xDoc( rOther._xDoc ) , XMLNS_DIALOGS_UID( rOther.XMLNS_DIALOGS_UID ) , XMLNS_SCRIPT_UID( rOther.XMLNS_SCRIPT_UID ) {} @@ -204,9 +205,10 @@ class ElementBase protected: DialogImport * const _pImport; ElementBase * const _pParent; - +private: const sal_Int32 _nUid; const OUString _aLocalName; +protected: const css::uno::Reference< css::xml::input::XAttributes > _xAttributes; public: diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_import.hxx b/xmlscript/source/xmlflat_imexp/xmlbas_import.hxx index 5a913c665533..194283c87d87 100644 --- a/xmlscript/source/xmlflat_imexp/xmlbas_import.hxx +++ b/xmlscript/source/xmlflat_imexp/xmlbas_import.hxx @@ -45,10 +45,12 @@ namespace xmlscript { protected: rtl::Reference<BasicImport> m_xImport; + private: rtl::Reference<BasicElementBase> m_xParent; OUString m_aLocalName; css::uno::Reference< css::xml::input::XAttributes > m_xAttributes; + protected: static bool getBoolAttr( bool* pRet, const OUString& rAttrName, const css::uno::Reference< css::xml::input::XAttributes >& xAttributes, sal_Int32 nUid ); diff --git a/xmlscript/source/xmllib_imexp/imp_share.hxx b/xmlscript/source/xmllib_imexp/imp_share.hxx index 74560ece78a6..71d7d9435be4 100644 --- a/xmlscript/source/xmllib_imexp/imp_share.hxx +++ b/xmlscript/source/xmllib_imexp/imp_share.hxx @@ -158,7 +158,7 @@ class LibElementBase protected: rtl::Reference<LibraryImport> mxImport; rtl::Reference<LibElementBase> mxParent; - +private: OUString _aLocalName; css::uno::Reference< css::xml::input::XAttributes > _xAttributes; diff --git a/xmlscript/source/xmlmod_imexp/imp_share.hxx b/xmlscript/source/xmlmod_imexp/imp_share.hxx index b7ae02ceac02..1f170a0dc8ca 100644 --- a/xmlscript/source/xmlmod_imexp/imp_share.hxx +++ b/xmlscript/source/xmlmod_imexp/imp_share.hxx @@ -50,6 +50,7 @@ struct ModuleImport ModuleDescriptor& mrModuleDesc; sal_Int32 XMLNS_SCRIPT_UID; +private: sal_Int32 XMLNS_LIBRARY_UID; sal_Int32 XMLNS_XLINK_UID; @@ -85,7 +86,6 @@ public: class ModuleElement : public ::cppu::WeakImplHelper< css::xml::input::XElement > { -protected: rtl::Reference<ModuleImport> mxImport; OUString _aLocalName; |