Kaydet (Commit) f6abc3f9 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:casttovoid: scripting

Change-Id: I9f77eca5a80ad4e9d3cee8f7400a245f5fa78bbb
üst 619c9b49
...@@ -182,13 +182,9 @@ namespace basprov ...@@ -182,13 +182,9 @@ namespace basprov
} }
Any BasicMethodNodeImpl::invoke( const OUString& aFunctionName, const Sequence< Any >& aParams, Any BasicMethodNodeImpl::invoke( const OUString& aFunctionName, const Sequence< Any >&,
Sequence< sal_Int16 >& aOutParamIndex, Sequence< Any >& aOutParam ) Sequence< sal_Int16 >&, Sequence< Any >& )
{ {
(void)aParams;
(void)aOutParamIndex;
(void)aOutParam;
if ( aFunctionName == BASPROV_PROPERTY_EDITABLE ) if ( aFunctionName == BASPROV_PROPERTY_EDITABLE )
{ {
OUString sDocURL, sLibName, sModName; OUString sDocURL, sLibName, sModName;
...@@ -268,20 +264,15 @@ namespace basprov ...@@ -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( throw UnknownPropertyException(
"BasicMethodNodeImpl::setValue: property name is unknown!" ); "BasicMethodNodeImpl::setValue: property name is unknown!" );
} }
Any BasicMethodNodeImpl::getValue( const OUString& aPropertyName ) Any BasicMethodNodeImpl::getValue( const OUString& )
{ {
(void)aPropertyName;
throw UnknownPropertyException( throw UnknownPropertyException(
"BasicMethodNodeImpl::getValue: property name is unknown!" ); "BasicMethodNodeImpl::getValue: property name is unknown!" );
} }
...@@ -297,10 +288,8 @@ namespace basprov ...@@ -297,10 +288,8 @@ namespace basprov
} }
sal_Bool BasicMethodNodeImpl::hasProperty( const OUString& aName ) sal_Bool BasicMethodNodeImpl::hasProperty( const OUString& )
{ {
(void)aName;
return false; return false;
} }
......
...@@ -723,10 +723,9 @@ namespace dlgprov ...@@ -723,10 +723,9 @@ namespace dlgprov
} }
Reference< XWindow > DialogProviderImpl::createContainerWindow( Reference< XWindow > DialogProviderImpl::createContainerWindow(
const OUString& URL, const OUString& WindowType, const OUString& URL, const OUString&,
const Reference< XWindowPeer >& xParent, const Reference< XInterface >& xHandler ) const Reference< XWindowPeer >& xParent, const Reference< XInterface >& xHandler )
{ {
(void)WindowType; // for future use
if( !xParent.is() ) if( !xParent.is() )
{ {
throw IllegalArgumentException( throw IllegalArgumentException(
......
...@@ -85,11 +85,8 @@ void SAL_CALL ScriptProtocolHandler::initialize( ...@@ -85,11 +85,8 @@ void SAL_CALL ScriptProtocolHandler::initialize(
} }
Reference< XDispatch > SAL_CALL ScriptProtocolHandler::queryDispatch( 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; Reference< XDispatch > xDispatcher;
// get scheme of url // get scheme of url
...@@ -307,20 +304,14 @@ const URL& aURL, const Sequence< PropertyValue >& lArgs ) ...@@ -307,20 +304,14 @@ const URL& aURL, const Sequence< PropertyValue >& lArgs )
} }
void SAL_CALL ScriptProtocolHandler::addStatusListener( 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 // implement if status is supported
} }
void SAL_CALL ScriptProtocolHandler::removeStatusListener( void SAL_CALL ScriptProtocolHandler::removeStatusListener(
const Reference< XStatusListener >& xControl, const URL& aURL ) const Reference< XStatusListener >&, const URL& )
{ {}
(void)xControl;
(void)aURL;
}
bool bool
ScriptProtocolHandler::getScriptInvocation() ScriptProtocolHandler::getScriptInvocation()
......
...@@ -293,7 +293,6 @@ std::vector< Reference< browse::XBrowseNode > > getAllBrowseNodes( const Referen ...@@ -293,7 +293,6 @@ std::vector< Reference< browse::XBrowseNode > > getAllBrowseNodes( const Referen
// TODO proper exception handling, should throw // TODO proper exception handling, should throw
catch( const Exception& e ) catch( const Exception& e )
{ {
(void)e;
SAL_WARN("scripting", "Caught Exception " << e.Message ); SAL_WARN("scripting", "Caught Exception " << e.Message );
locnBNs.resize( mspIndex ); locnBNs.resize( mspIndex );
return locnBNs; return locnBNs;
......
...@@ -209,7 +209,6 @@ void MasterScriptProvider::createPkgProvider() ...@@ -209,7 +209,6 @@ void MasterScriptProvider::createPkgProvider()
} }
catch ( const Exception& e ) catch ( const Exception& e )
{ {
(void)e;
SAL_WARN("scripting.provider", "Exception creating MasterScriptProvider for uno_packages in context " SAL_WARN("scripting.provider", "Exception creating MasterScriptProvider for uno_packages in context "
<< m_sCtxString << ": " << e.Message ); << m_sCtxString << ": " << e.Message );
} }
......
...@@ -685,10 +685,9 @@ void StringResourceImpl::implNotifyListeners() ...@@ -685,10 +685,9 @@ void StringResourceImpl::implNotifyListeners()
// Loading // Loading
bool StringResourceImpl::loadLocale( LocaleItem* pLocaleItem ) bool StringResourceImpl::loadLocale( LocaleItem* )
{ {
// Base implementation has nothing to load // Base implementation has nothing to load
(void)pLocaleItem;
return true; return true;
} }
...@@ -1239,7 +1238,6 @@ Sequence< ::sal_Int8 > BinaryOutput::closeAndGetData() ...@@ -1239,7 +1238,6 @@ Sequence< ::sal_Int8 > BinaryOutput::closeAndGetData()
xSeekable->seek( 0 ); xSeekable->seek( 0 );
sal_Int32 nRead = xInputStream->readBytes( aRetSeq, nSize ); sal_Int32 nRead = xInputStream->readBytes( aRetSeq, nSize );
(void)nRead;
OSL_ENSURE( nRead == nSize, "BinaryOutput::closeAndGetData: nRead != nSize" ); OSL_ENSURE( nRead == nSize, "BinaryOutput::closeAndGetData: nRead != nSize" );
return aRetSeq; return aRetSeq;
...@@ -1497,11 +1495,9 @@ void StringResourcePersistenceImpl::importBinary( const Sequence< ::sal_Int8 >& ...@@ -1497,11 +1495,9 @@ void StringResourcePersistenceImpl::importBinary( const Sequence< ::sal_Int8 >&
// Import data // Import data
BinaryInput aIn( Data, m_xContext ); BinaryInput aIn( Data, m_xContext );
sal_Int32 nVersion = aIn.readInt16(); aIn.readInt16(); // version
(void)nVersion;
sal_Int32 nLocaleCount = aIn.readInt16(); sal_Int32 nLocaleCount = aIn.readInt16();
sal_Int32 iDefault = aIn.readInt16(); sal_Int32 iDefault = aIn.readInt16();
(void)iDefault;
std::unique_ptr<sal_Int32[]> pPositions( new sal_Int32[nLocaleCount + 1] ); std::unique_ptr<sal_Int32[]> pPositions( new sal_Int32[nLocaleCount + 1] );
for( sal_Int32 i = 0; i < nLocaleCount + 1; i++ ) for( sal_Int32 i = 0; i < nLocaleCount + 1; i++ )
...@@ -2038,9 +2034,6 @@ void implWriteStringWithEncoding( const OUString& aStr, ...@@ -2038,9 +2034,6 @@ void implWriteStringWithEncoding( const OUString& aStr,
{ {
static sal_Unicode cLineFeed = 0xa; static sal_Unicode cLineFeed = 0xa;
(void)aStr;
(void)xTextOutputStream;
OUStringBuffer aBuf; OUStringBuffer aBuf;
sal_Int32 nLen = aStr.getLength(); sal_Int32 nLen = aStr.getLength();
const sal_Unicode* pSrc = aStr.getStr(); const sal_Unicode* pSrc = aStr.getStr();
......
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