diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-12 11:32:53 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-09-12 11:09:43 +0000 |
commit | 774d2a94d31c14fb24c07a5c85220e5ef528ad20 (patch) | |
tree | 36c8b4ddc4572f55d208bc022802cbf3d18b71bc /forms | |
parent | 69ce52fbf26fab9239562d2bfd407db67cfb6ec8 (diff) |
loplugin:constantparam in extensions..lotuswordpro
Change-Id: Ifb30d5d53536045638d872761626a1b60fa52dad
Reviewed-on: https://gerrit.libreoffice.org/28831
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/inc/InterfaceContainer.hxx | 8 | ||||
-rw-r--r-- | forms/source/misc/InterfaceContainer.cxx | 25 | ||||
-rw-r--r-- | forms/source/solar/control/navtoolbar.cxx | 18 | ||||
-rw-r--r-- | forms/source/solar/inc/navtoolbar.hxx | 10 |
4 files changed, 18 insertions, 43 deletions
diff --git a/forms/source/inc/InterfaceContainer.hxx b/forms/source/inc/InterfaceContainer.hxx index 63f3b3a84ab3..1bb167620e84 100644 --- a/forms/source/inc/InterfaceContainer.hxx +++ b/forms/source/inc/InterfaceContainer.hxx @@ -267,13 +267,7 @@ private: // hack for Vba Events void impl_addVbEvents_nolck_nothrow( const sal_Int32 i_nIndex ); - // the runtime event format has changed from version SO5.2 to OOo - enum EventFormat - { - efVersionSO5x, - efVersionSO6x - }; - void transformEvents( const EventFormat _eTargetFormat ); + void transformEvents(); void impl_createEventAttacher_nothrow(); }; diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx index 9dde69cdaa90..e8973e7d6000 100644 --- a/forms/source/misc/InterfaceContainer.cxx +++ b/forms/source/misc/InterfaceContainer.cxx @@ -319,7 +319,7 @@ void SAL_CALL OInterfaceContainer::writeEvents(const Reference<XObjectOutputStre if ( m_xEventAttacher.is() ) lcl_saveEvents( aSave, m_xEventAttacher, m_aItems.size() ); - transformEvents( efVersionSO5x ); + transformEvents(); try { @@ -377,23 +377,7 @@ struct TransformEventTo52Format : public ::std::unary_function< ScriptEventDescr }; -struct TransformEventTo60Format : public ::std::unary_function< ScriptEventDescriptor, void > -{ - void operator()( ScriptEventDescriptor& _rDescriptor ) - { - if ( _rDescriptor.ScriptType == "StarBasic" ) - { // it's a starbasic macro - if ( _rDescriptor.ScriptCode.indexOf( ':' ) < 0 ) - { // the macro name does not already contain a : - // -> default the type to "document" - _rDescriptor.ScriptCode = "document:" + _rDescriptor.ScriptCode; - } - } - } -}; - - -void OInterfaceContainer::transformEvents( const EventFormat _eTargetFormat ) +void OInterfaceContainer::transformEvents() { OSL_ENSURE( m_xEventAttacher.is(), "OInterfaceContainer::transformEvents: no event attacher manager!" ); if ( !m_xEventAttacher.is() ) @@ -417,10 +401,7 @@ void OInterfaceContainer::transformEvents( const EventFormat _eTargetFormat ) ScriptEventDescriptor* pChildEventsEnd = pChildEvents + aChildEvents.getLength(); // do the transformation - if ( efVersionSO6x == _eTargetFormat ) - ::std::for_each( pChildEvents, pChildEventsEnd, TransformEventTo60Format() ); - else - ::std::for_each( pChildEvents, pChildEventsEnd, TransformEventTo52Format() ); + ::std::for_each( pChildEvents, pChildEventsEnd, TransformEventTo52Format() ); // revoke the script events m_xEventAttacher->revokeScriptEvents( i ); diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx index 5a72b20059f1..f0f6f0a80829 100644 --- a/forms/source/solar/control/navtoolbar.cxx +++ b/forms/source/solar/control/navtoolbar.cxx @@ -337,7 +337,7 @@ namespace frm } } - forEachItemWindow( &NavigationToolBar::adjustItemWindowWidth, nullptr ); + forEachItemWindow( &NavigationToolBar::adjustItemWindowWidth ); implUpdateImages(); } @@ -486,12 +486,12 @@ namespace frm break; case StateChangedType::ControlFont: - forEachItemWindow( &NavigationToolBar::setItemControlFont, nullptr ); - forEachItemWindow( &NavigationToolBar::adjustItemWindowWidth, nullptr ); + forEachItemWindow( &NavigationToolBar::setItemControlFont ); + forEachItemWindow( &NavigationToolBar::adjustItemWindowWidth ); break; case StateChangedType::ControlForeground: - forEachItemWindow( &NavigationToolBar::setItemControlForeground, nullptr ); + forEachItemWindow( &NavigationToolBar::setItemControlForeground ); break; case StateChangedType::Mirroring: @@ -556,14 +556,14 @@ namespace frm } - void NavigationToolBar::forEachItemWindow( ItemWindowHandler _handler, const void* _pParam ) + void NavigationToolBar::forEachItemWindow( ItemWindowHandler _handler ) { for ( sal_uInt16 item = 0; item < m_pToolbar->GetItemCount(); ++item ) { sal_uInt16 nItemId = m_pToolbar->GetItemId( item ); vcl::Window* pItemWindow = m_pToolbar->GetItemWindow( nItemId ); if ( pItemWindow ) - (this->*_handler)( nItemId, pItemWindow, _pParam ); + (this->*_handler)( nItemId, pItemWindow ); } } @@ -603,7 +603,7 @@ namespace frm } #endif - void NavigationToolBar::setItemControlFont( sal_uInt16 /* _nItemId */, vcl::Window* _pItemWindow, const void* /* _pParam */ ) const + void NavigationToolBar::setItemControlFont( sal_uInt16 /* _nItemId */, vcl::Window* _pItemWindow ) const { if ( IsControlFont() ) _pItemWindow->SetControlFont( GetControlFont() ); @@ -612,7 +612,7 @@ namespace frm } - void NavigationToolBar::setItemControlForeground( sal_uInt16 /* _nItemId */, vcl::Window* _pItemWindow, const void* /* _pParam */ ) const + void NavigationToolBar::setItemControlForeground( sal_uInt16 /* _nItemId */, vcl::Window* _pItemWindow ) const { if ( IsControlForeground() ) _pItemWindow->SetControlForeground( GetControlForeground() ); @@ -622,7 +622,7 @@ namespace frm } - void NavigationToolBar::adjustItemWindowWidth( sal_uInt16 _nItemId, vcl::Window* _pItemWindow, const void* /* _pParam */ ) const + void NavigationToolBar::adjustItemWindowWidth( sal_uInt16 _nItemId, vcl::Window* _pItemWindow ) const { OUString sItemText; switch ( _nItemId ) diff --git a/forms/source/solar/inc/navtoolbar.hxx b/forms/source/solar/inc/navtoolbar.hxx index 74f1505e1e1d..a9b92b68932c 100644 --- a/forms/source/solar/inc/navtoolbar.hxx +++ b/forms/source/solar/inc/navtoolbar.hxx @@ -137,8 +137,8 @@ namespace frm void updateFeatureStates( ); // iterating through item windows - typedef void (NavigationToolBar::*ItemWindowHandler) (sal_uInt16, vcl::Window*, const void*) const; - void forEachItemWindow( ItemWindowHandler _handler, const void* _pParam ); + typedef void (NavigationToolBar::*ItemWindowHandler) (sal_uInt16, vcl::Window*) const; + void forEachItemWindow( ItemWindowHandler _handler ); typedef void (*ItemWindowHandler2) (sal_uInt16, vcl::Window*, const void*); void forEachItemWindow( ItemWindowHandler2 _handler, const void* _pParam ); @@ -147,9 +147,9 @@ namespace frm #if 0 void setItemWindowZoom( sal_uInt16 /* _nItemId */, vcl::Window* _pItemWindow, const void* /* _pParam */ ) const; #endif - void setItemControlFont( sal_uInt16 /* _nItemId */, vcl::Window* _pItemWindow, const void* /* _pParam */ ) const; - void setItemControlForeground( sal_uInt16 /* _nItemId */, vcl::Window* _pItemWindow, const void* /* _pParam */ ) const; - void adjustItemWindowWidth( sal_uInt16 _nItemId, vcl::Window* _pItemWindow, const void* /* _pParam */ ) const; + void setItemControlFont( sal_uInt16 /* _nItemId */, vcl::Window* _pItemWindow ) const; + void setItemControlForeground( sal_uInt16 /* _nItemId */, vcl::Window* _pItemWindow ) const; + void adjustItemWindowWidth( sal_uInt16 _nItemId, vcl::Window* _pItemWindow ) const; static void enableItemRTL( sal_uInt16 /*_nItemId*/, vcl::Window* _pItemWindow, const void* _pIsRTLEnabled ); }; |