diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-19 10:06:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-20 06:11:51 +0000 |
commit | e7324c5705eaa38a2c9aa0636f01a73f033ba4d6 (patch) | |
tree | e527e81c249467a7223b603a02bc6fe31ac0b111 /scripting | |
parent | 0d2797fdb06f504e7213b3859a53c363f4f56bc9 (diff) |
loplugin:expandablemethodds in scaddins..sdext
Change-Id: Ife021e368efaafe9097750b4ca1a5472e94352a9
Reviewed-on: https://gerrit.libreoffice.org/30054
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'scripting')
-rw-r--r-- | scripting/source/provider/MasterScriptProvider.cxx | 9 | ||||
-rw-r--r-- | scripting/source/provider/MasterScriptProvider.hxx | 3 |
2 files changed, 4 insertions, 8 deletions
diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx index 7c6157d4d7b4..83a559358932 100644 --- a/scripting/source/provider/MasterScriptProvider.cxx +++ b/scripting/source/provider/MasterScriptProvider.cxx @@ -235,7 +235,7 @@ MasterScriptProvider::getScript( const OUString& scriptURI ) throw ( provider::ScriptFrameworkErrorException, RuntimeException, std::exception ) { - if ( !isValid() ) + if ( !m_bIsValid ) { throw provider::ScriptFrameworkErrorException( "MasterScriptProvider not initialised", Reference< XInterface >(), @@ -389,7 +389,7 @@ OUString SAL_CALL MasterScriptProvider::getName() throw ( css::uno::RuntimeException, std::exception ) { - if ( !isPkgProvider() ) + if ( !m_bIsPkgMSP ) { OUString sCtx = getContextString(); if ( sCtx.startsWith( "vnd.sun.star.tdoc" ) ) @@ -421,9 +421,8 @@ MasterScriptProvider::getChildNodes() { Sequence< Reference< provider::XScriptProvider > > providers = getAllProviders(); - Reference< provider::XScriptProvider > pkgProv = getPkgProvider(); sal_Int32 size = providers.getLength(); - bool hasPkgs = pkgProv.is(); + bool hasPkgs = m_xMSPPkg.is(); if ( hasPkgs ) { size++; @@ -437,7 +436,7 @@ MasterScriptProvider::getChildNodes() if ( hasPkgs ) { - children[ provIndex ].set( pkgProv, UNO_QUERY ); + children[ provIndex ].set( m_xMSPPkg, UNO_QUERY ); } diff --git a/scripting/source/provider/MasterScriptProvider.hxx b/scripting/source/provider/MasterScriptProvider.hxx index 38f6c1fed02f..964a1a13d451 100644 --- a/scripting/source/provider/MasterScriptProvider.hxx +++ b/scripting/source/provider/MasterScriptProvider.hxx @@ -106,15 +106,12 @@ public: css::uno::Sequence< css::uno::Reference< css::script::provider::XScriptProvider > > SAL_CALL getAllProviders() throw ( css::uno::RuntimeException ); - bool isPkgProvider() { return m_bIsPkgMSP; } - const css::uno::Reference< css::script::provider::XScriptProvider >& getPkgProvider() { return m_xMSPPkg; } // returns context string for this provider, eg const OUString& getContextString() { return m_sCtxString; } private: static OUString parseLocationName( const OUString& location ); void createPkgProvider(); - bool isValid() { return m_bIsValid;} ProviderCache* providerCache(); /* to obtain other services if needed */ |