diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-07-02 22:30:49 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-07-02 22:30:49 +0200 |
commit | f6abc3f97e74df0c4ae05abf4075085a9b9c1cc4 (patch) | |
tree | 996a26c5406ec43bb51039d4790080b16cefba7a /scripting | |
parent | 619c9b494a76b0fb8b0cf6c9b7622f17cf1d5b6c (diff) |
loplugin:casttovoid: scripting
Change-Id: I9f77eca5a80ad4e9d3cee8f7400a245f5fa78bbb
Diffstat (limited to 'scripting')
-rw-r--r-- | scripting/source/basprov/basmethnode.cxx | 21 | ||||
-rw-r--r-- | scripting/source/dlgprov/dlgprov.cxx | 3 | ||||
-rw-r--r-- | scripting/source/protocolhandler/scripthandler.cxx | 17 | ||||
-rw-r--r-- | scripting/source/provider/BrowseNodeFactoryImpl.cxx | 1 | ||||
-rw-r--r-- | scripting/source/provider/MasterScriptProvider.cxx | 1 | ||||
-rw-r--r-- | scripting/source/stringresource/stringresource.cxx | 11 |
6 files changed, 12 insertions, 42 deletions
diff --git a/scripting/source/basprov/basmethnode.cxx b/scripting/source/basprov/basmethnode.cxx index 2b1de0bff3fe..e13f149aefcc 100644 --- a/scripting/source/basprov/basmethnode.cxx +++ b/scripting/source/basprov/basmethnode.cxx @@ -182,13 +182,9 @@ namespace basprov } - Any BasicMethodNodeImpl::invoke( const OUString& aFunctionName, const Sequence< Any >& aParams, - Sequence< sal_Int16 >& aOutParamIndex, Sequence< Any >& aOutParam ) + Any BasicMethodNodeImpl::invoke( const OUString& aFunctionName, const Sequence< Any >&, + Sequence< sal_Int16 >&, Sequence< Any >& ) { - (void)aParams; - (void)aOutParamIndex; - (void)aOutParam; - if ( aFunctionName == BASPROV_PROPERTY_EDITABLE ) { OUString sDocURL, sLibName, sModName; @@ -268,20 +264,15 @@ namespace basprov } - void BasicMethodNodeImpl::setValue( const OUString& aPropertyName, const Any& aValue ) + void BasicMethodNodeImpl::setValue( const OUString&, const Any& ) { - (void)aPropertyName; - (void)aValue; - throw UnknownPropertyException( "BasicMethodNodeImpl::setValue: property name is unknown!" ); } - Any BasicMethodNodeImpl::getValue( const OUString& aPropertyName ) + Any BasicMethodNodeImpl::getValue( const OUString& ) { - (void)aPropertyName; - throw UnknownPropertyException( "BasicMethodNodeImpl::getValue: property name is unknown!" ); } @@ -297,10 +288,8 @@ namespace basprov } - sal_Bool BasicMethodNodeImpl::hasProperty( const OUString& aName ) + sal_Bool BasicMethodNodeImpl::hasProperty( const OUString& ) { - (void)aName; - return false; } diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx index 78330cab7785..4ff9d68d219f 100644 --- a/scripting/source/dlgprov/dlgprov.cxx +++ b/scripting/source/dlgprov/dlgprov.cxx @@ -723,10 +723,9 @@ namespace dlgprov } Reference< XWindow > DialogProviderImpl::createContainerWindow( - const OUString& URL, const OUString& WindowType, + const OUString& URL, const OUString&, const Reference< XWindowPeer >& xParent, const Reference< XInterface >& xHandler ) { - (void)WindowType; // for future use if( !xParent.is() ) { throw IllegalArgumentException( diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx index f6a0366b1494..0dadac6520fb 100644 --- a/scripting/source/protocolhandler/scripthandler.cxx +++ b/scripting/source/protocolhandler/scripthandler.cxx @@ -85,11 +85,8 @@ void SAL_CALL ScriptProtocolHandler::initialize( } Reference< XDispatch > SAL_CALL ScriptProtocolHandler::queryDispatch( - const URL& aURL, const OUString& sTargetFrameName, sal_Int32 nSearchFlags ) + const URL& aURL, const OUString&, sal_Int32 ) { - (void)sTargetFrameName; - (void)nSearchFlags; - Reference< XDispatch > xDispatcher; // get scheme of url @@ -307,20 +304,14 @@ const URL& aURL, const Sequence< PropertyValue >& lArgs ) } void SAL_CALL ScriptProtocolHandler::addStatusListener( -const Reference< XStatusListener >& xControl, const URL& aURL ) +const Reference< XStatusListener >&, const URL& ) { - (void)xControl; - (void)aURL; - // implement if status is supported } void SAL_CALL ScriptProtocolHandler::removeStatusListener( -const Reference< XStatusListener >& xControl, const URL& aURL ) -{ - (void)xControl; - (void)aURL; -} +const Reference< XStatusListener >&, const URL& ) +{} bool ScriptProtocolHandler::getScriptInvocation() diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx index daaab0238454..e064556d61e9 100644 --- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx +++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx @@ -293,7 +293,6 @@ std::vector< Reference< browse::XBrowseNode > > getAllBrowseNodes( const Referen // TODO proper exception handling, should throw catch( const Exception& e ) { - (void)e; SAL_WARN("scripting", "Caught Exception " << e.Message ); locnBNs.resize( mspIndex ); return locnBNs; diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx index 1e26f272d2fc..63a2685c48ee 100644 --- a/scripting/source/provider/MasterScriptProvider.cxx +++ b/scripting/source/provider/MasterScriptProvider.cxx @@ -209,7 +209,6 @@ void MasterScriptProvider::createPkgProvider() } catch ( const Exception& e ) { - (void)e; SAL_WARN("scripting.provider", "Exception creating MasterScriptProvider for uno_packages in context " << m_sCtxString << ": " << e.Message ); } diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx index 41579a1cded1..e5eea6885cd7 100644 --- a/scripting/source/stringresource/stringresource.cxx +++ b/scripting/source/stringresource/stringresource.cxx @@ -685,10 +685,9 @@ void StringResourceImpl::implNotifyListeners() // Loading -bool StringResourceImpl::loadLocale( LocaleItem* pLocaleItem ) +bool StringResourceImpl::loadLocale( LocaleItem* ) { // Base implementation has nothing to load - (void)pLocaleItem; return true; } @@ -1239,7 +1238,6 @@ Sequence< ::sal_Int8 > BinaryOutput::closeAndGetData() xSeekable->seek( 0 ); sal_Int32 nRead = xInputStream->readBytes( aRetSeq, nSize ); - (void)nRead; OSL_ENSURE( nRead == nSize, "BinaryOutput::closeAndGetData: nRead != nSize" ); return aRetSeq; @@ -1497,11 +1495,9 @@ void StringResourcePersistenceImpl::importBinary( const Sequence< ::sal_Int8 >& // Import data BinaryInput aIn( Data, m_xContext ); - sal_Int32 nVersion = aIn.readInt16(); - (void)nVersion; + aIn.readInt16(); // version sal_Int32 nLocaleCount = aIn.readInt16(); sal_Int32 iDefault = aIn.readInt16(); - (void)iDefault; std::unique_ptr<sal_Int32[]> pPositions( new sal_Int32[nLocaleCount + 1] ); for( sal_Int32 i = 0; i < nLocaleCount + 1; i++ ) @@ -2038,9 +2034,6 @@ void implWriteStringWithEncoding( const OUString& aStr, { static sal_Unicode cLineFeed = 0xa; - (void)aStr; - (void)xTextOutputStream; - OUStringBuffer aBuf; sal_Int32 nLen = aStr.getLength(); const sal_Unicode* pSrc = aStr.getStr(); |