diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-07-02 22:32:12 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-07-02 22:32:12 +0200 |
commit | ef7d2da6aaa2efe6dff221803a1f83b626e68529 (patch) | |
tree | a087a368f16235ffdb51f1d5963fb1551b9136de /forms/source | |
parent | 385ab75a63023bd46ad2d2f5c548e14eb029215c (diff) |
loplugin:casttovoid: forms
Change-Id: Ib3f4eaa68566665b9d6eec324cef593411b1aa7b
Diffstat (limited to 'forms/source')
-rw-r--r-- | forms/source/component/Columns.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/FormComponent.cxx | 4 | ||||
-rw-r--r-- | forms/source/component/FormattedField.cxx | 3 | ||||
-rw-r--r-- | forms/source/component/ListBox.cxx | 3 | ||||
-rw-r--r-- | forms/source/helper/windowstateguard.cxx | 1 | ||||
-rw-r--r-- | forms/source/misc/InterfaceContainer.cxx | 2 | ||||
-rw-r--r-- | forms/source/richtext/attributedispatcher.cxx | 4 | ||||
-rw-r--r-- | forms/source/richtext/parametrizedattributedispatcher.cxx | 1 | ||||
-rw-r--r-- | forms/source/richtext/rtattributehandler.cxx | 3 | ||||
-rw-r--r-- | forms/source/richtext/specialdispatchers.cxx | 2 | ||||
-rw-r--r-- | forms/source/runtime/formoperations.cxx | 3 |
11 files changed, 6 insertions, 22 deletions
diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index a3ea165dd123..3c8690321704 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -533,7 +533,7 @@ void SAL_CALL OGridColumn::read(const Reference<XObjectInputStream>& _rxInStream } // 2. Write a version number - sal_uInt16 nVersion = _rxInStream->readShort(); (void)nVersion; + _rxInStream->readShort(); // version; sal_uInt16 nAnyMask = _rxInStream->readShort(); if (nAnyMask & WIDTH) diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index 212e02bbc3c8..367238fd119b 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -1599,7 +1599,7 @@ void SAL_CALL OBoundControlModel::read( const Reference< css::io::XObjectInputSt { OControlModel::read(_rxInStream); osl::MutexGuard aGuard(m_aMutex); - sal_uInt16 nVersion = _rxInStream->readShort(); (void)nVersion; + _rxInStream->readShort(); // version; ::comphelper::operator>>( _rxInStream, m_aControlSource); } @@ -2073,7 +2073,6 @@ void SAL_CALL OBoundControlModel::loaded( const EventObject& _rEvent ) ControlModelLock aLock( *this ); FieldChangeNotifier aBoundFieldNotifier( aLock ); OSL_ENSURE( _rEvent.Source == m_xAmbientForm, "OBoundControlModel::loaded: where does this come from?" ); - (void)_rEvent; OSL_PRECOND( !hasExternalValueBinding(), "OBoundControlModel::loaded: we should never reach this with an external value binding!" ); if ( hasExternalValueBinding() ) return; @@ -2109,7 +2108,6 @@ void SAL_CALL OBoundControlModel::reloaded( const EventObject& _rEvent ) ControlModelLock aLock( *this ); FieldChangeNotifier aBoundFieldNotifier( aLock ); OSL_ENSURE( _rEvent.Source == m_xAmbientForm, "OBoundControlModel::reloaded: where does this come from?" ); - (void)_rEvent; OSL_PRECOND( !hasExternalValueBinding(), "OBoundControlModel::reloaded: we should never reach this with an external value binding!" ); if ( hasExternalValueBinding() ) return; diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index 2a9ed5a896b4..096b2bcf9351 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -748,8 +748,7 @@ void OFormattedModel::read(const Reference<XObjectInputStream>& _rxInStream) if (nVersion == 0x0003) { // since version 3 there is a "skippable" block at this position OStreamSection aDownCompat(_rxInStream); - sal_Int16 nSubVersion = _rxInStream->readShort(); - (void)nSubVersion; + _rxInStream->readShort(); // sub-version // version 0 and higher : the "effective value" property Any aEffectiveValue; { diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index fbd2ce67a7bd..958258327049 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -874,9 +874,8 @@ namespace frm onError(eSQL, FRM_RES_STRING(RID_BASELISTBOX_ERROR_FILLLIST)); return; } - catch(const Exception& eUnknown) + catch(const Exception&) { - (void)eUnknown; return; } diff --git a/forms/source/helper/windowstateguard.cxx b/forms/source/helper/windowstateguard.cxx index b7c07f05484b..952476709206 100644 --- a/forms/source/helper/windowstateguard.cxx +++ b/forms/source/helper/windowstateguard.cxx @@ -179,7 +179,6 @@ namespace frm void SAL_CALL WindowStateGuard_Impl::disposing( const EventObject& Source ) { OSL_ENSURE( Source.Source == m_xWindow, "WindowStateGuard_Impl::disposing: where does this come from?" ); - (void)Source; dispose(); } diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx index efeda375b814..7b796e3d10fe 100644 --- a/forms/source/misc/InterfaceContainer.cxx +++ b/forms/source/misc/InterfaceContainer.cxx @@ -525,7 +525,7 @@ void SAL_CALL OInterfaceContainer::read( const Reference< XObjectInputStream >& if (nLen) { // 1. Version - sal_uInt16 nVersion = _rxInStream->readShort(); (void)nVersion; + _rxInStream->readShort(); // 2. Objects for (sal_Int32 i = 0; i < nLen; i++) diff --git a/forms/source/richtext/attributedispatcher.cxx b/forms/source/richtext/attributedispatcher.cxx index e5f38169cd93..7a01b3de6407 100644 --- a/forms/source/richtext/attributedispatcher.cxx +++ b/forms/source/richtext/attributedispatcher.cxx @@ -86,9 +86,6 @@ namespace frm checkDisposed(); - (void)_rURL; - (void)_rArguments; - OSL_ENSURE( _rURL.Complete == getFeatureURL().Complete, "OAttributeDispatcher::dispatch: invalid URL!" ); SAL_WARN_IF( _rArguments.getLength(), "forms.richtext", "OAttributeDispatcher::dispatch: found arguments, but can't handle arguments at all" @@ -102,7 +99,6 @@ namespace frm void OAttributeDispatcher::onAttributeStateChanged( AttributeId _nAttributeId, const AttributeState& /*_rState*/ ) { OSL_ENSURE( _nAttributeId == m_nAttributeId, "OAttributeDispatcher::onAttributeStateChanged: wrong attribute!" ); - (void)_nAttributeId; FeatureStateEvent aEvent( buildStatusEvent() ); ::comphelper::OInterfaceIteratorHelper2 aIter( getStatusListeners() ); diff --git a/forms/source/richtext/parametrizedattributedispatcher.cxx b/forms/source/richtext/parametrizedattributedispatcher.cxx index c52f3cc93763..cd3169cf67f1 100644 --- a/forms/source/richtext/parametrizedattributedispatcher.cxx +++ b/forms/source/richtext/parametrizedattributedispatcher.cxx @@ -114,7 +114,6 @@ namespace frm { ::osl::MutexGuard aGuard( m_aMutex ); OSL_ENSURE( _rURL.Complete == getFeatureURL().Complete, "OParametrizedAttributeDispatcher::dispatch: invalid URL!" ); - (void)_rURL; if ( m_pMasterDispatcher ) { const SfxPoolItem* pConvertedArgument = convertDispatchArgsToItem( _rArguments ); diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx index c36f408da238..84d3464e571c 100644 --- a/forms/source/richtext/rtattributehandler.cxx +++ b/forms/source/richtext/rtattributehandler.cxx @@ -192,7 +192,6 @@ namespace frm void ParaAlignmentHandler::executeAttribute( const SfxItemSet& /*_rCurrentAttribs*/, SfxItemSet& _rNewAttribs, const SfxPoolItem* _pAdditionalArg, SvtScriptType /*_nForScriptType*/ ) const { OSL_ENSURE( !_pAdditionalArg, "ParaAlignmentHandler::executeAttribute: this is a simple toggle attribute - no args possible!" ); - (void)_pAdditionalArg; _rNewAttribs.Put( SvxAdjustItem( m_eAdjust, getWhich() ) ); } @@ -223,7 +222,6 @@ namespace frm void LineSpacingHandler::executeAttribute( const SfxItemSet& /*_rCurrentAttribs*/, SfxItemSet& _rNewAttribs, const SfxPoolItem* _pAdditionalArg, SvtScriptType /*_nForScriptType*/ ) const { OSL_ENSURE( !_pAdditionalArg, "LineSpacingHandler::executeAttribute: this is a simple toggle attribute - no args possible!" ); - (void)_pAdditionalArg; SvxLineSpacingItem aLineSpacing( m_nLineSpace, getWhich() ); aLineSpacing.SetLineSpaceRule( SvxLineSpaceRule::Auto ); @@ -261,7 +259,6 @@ namespace frm void EscapementHandler::executeAttribute( const SfxItemSet& _rCurrentAttribs, SfxItemSet& _rNewAttribs, const SfxPoolItem* _pAdditionalArg, SvtScriptType /*_nForScriptType*/ ) const { OSL_ENSURE( !_pAdditionalArg, "EscapementHandler::executeAttribute: this is a simple toggle attribute - no args possible!" ); // well, in theory we could allow an SvxEscapementItem here, but this is not needed - (void)_pAdditionalArg; bool bIsChecked = getCheckState( _rCurrentAttribs ) == eChecked; _rNewAttribs.Put( SvxEscapementItem( bIsChecked ? SvxEscapement::Off : m_eEscapement, getWhich() ) ); diff --git a/forms/source/richtext/specialdispatchers.cxx b/forms/source/richtext/specialdispatchers.cxx index e40711e26f14..89f3a6e6437c 100644 --- a/forms/source/richtext/specialdispatchers.cxx +++ b/forms/source/richtext/specialdispatchers.cxx @@ -54,7 +54,6 @@ namespace frm { ::osl::MutexGuard aGuard( m_aMutex ); OSL_ENSURE( _rURL.Complete == getFeatureURL().Complete, "OSelectAllDispatcher::dispatch: invalid URL!" ); - (void)_rURL; checkDisposed(); @@ -109,7 +108,6 @@ namespace frm { ::osl::MutexGuard aGuard( m_aMutex ); OSL_ENSURE( _rURL.Complete == getFeatureURL().Complete, "OTextDirectionDispatcher::dispatch: invalid URL!" ); - (void)_rURL; checkDisposed(); diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx index 011f6ce135b1..d291bfb4649d 100644 --- a/forms/source/runtime/formoperations.cxx +++ b/forms/source/runtime/formoperations.cxx @@ -1702,9 +1702,8 @@ namespace frm f(); } #if HAVE_FEATURE_DBCONNECTIVITY - catch( const SQLException& e ) + catch( const SQLException& ) { - (void)e; if ( !_nErrorResourceId ) // no information to prepend throw; |