From 36880d76299e913761f03bbde1b6ca6bea393b5a Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sun, 28 Oct 2018 03:09:02 +0300 Subject: tdf#120703 PVS: V547 Expression is always true/false Change-Id: I1e5098e11f1e5e2f7c5518ea05c57512f58b585b Reviewed-on: https://gerrit.libreoffice.org/62464 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- scripting/source/provider/MasterScriptProvider.cxx | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'scripting/source/provider') diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx index fa4b53100fa8..6854d6283dc0 100644 --- a/scripting/source/provider/MasterScriptProvider.cxx +++ b/scripting/source/provider/MasterScriptProvider.cxx @@ -398,8 +398,6 @@ MasterScriptProvider::getName() Sequence< Reference< browse::XBrowseNode > > SAL_CALL MasterScriptProvider::getChildNodes() { - if ( !providerCache() ) - throw RuntimeException( "MasterScriptProvider::getAllProviders, cache not initialised" ); Sequence< Reference< provider::XScriptProvider > > providers = providerCache()->getAllProviders(); sal_Int32 size = providers.getLength(); @@ -525,12 +523,6 @@ MasterScriptProvider::insertByName( const OUString& aName, const Any& aElement ) // TODO for library package parse the language, for the moment will try // to get each provider to process the new Package, the first one the succeeds // will terminate processing - if ( !providerCache() ) - { - throw RuntimeException( - "insertByName cannot instantiate " - "child script providers." ); - } const bool bSuccess = FindProviderAndApply( *providerCache(), [&aName, &aElement](Reference& xCont) { xCont->insertByName(aName, aElement); @@ -570,13 +562,6 @@ MasterScriptProvider::removeByName( const OUString& Name ) // TODO for Script library package url parse the language, // for the moment will just try to get each provider to process remove/revoke // request, the first one the succeeds will terminate processing - - if ( !providerCache() ) - { - throw RuntimeException( - "removeByName() cannot instantiate " - "child script providers." ); - } const bool bSuccess = FindProviderAndApply( *providerCache(), [&Name](Reference& xCont) { xCont->removeByName(Name); @@ -637,13 +622,6 @@ MasterScriptProvider::hasByName( const OUString& aName ) // for the moment will just try to get each provider to see if the // package exists in any provider, first one that succeed will // terminate the loop - - if ( !providerCache() ) - { - throw RuntimeException( - "removeByName() cannot instantiate " - "child script providers." ); - } result = FindProviderAndApply( *providerCache(), [&aName](Reference& xCont) { return xCont->hasByName(aName); -- cgit v1.2.3