From 6bbda13286c8f736f35ceb7a377ca15b3fd544b2 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 22 Jun 2017 12:03:24 +0200 Subject: loplugin:unusedfields in forms..idlc Change-Id: If250ff47c1f375fe24c61b5bf271da9a9c330822 Reviewed-on: https://gerrit.libreoffice.org/39133 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- framework/inc/classes/rootactiontriggercontainer.hxx | 1 - framework/inc/services/layoutmanager.hxx | 4 ---- framework/inc/uielement/statusbaritem.hxx | 2 -- framework/inc/uielement/statusbarmerger.hxx | 1 - framework/inc/xml/imagesdocumenthandler.hxx | 1 - framework/inc/xml/toolboxdocumenthandler.hxx | 1 - .../source/fwe/classes/rootactiontriggercontainer.cxx | 7 ------- framework/source/fwe/helper/undomanagerhelper.cxx | 4 ---- framework/source/fwe/xml/toolboxdocumenthandler.cxx | 1 - framework/source/layoutmanager/layoutmanager.cxx | 19 ------------------- .../source/layoutmanager/toolbarlayoutmanager.cxx | 3 --- .../source/layoutmanager/toolbarlayoutmanager.hxx | 1 - framework/source/services/pathsettings.cxx | 7 ------- framework/source/uielement/statusbaritem.cxx | 3 --- framework/source/uielement/statusbarmanager.cxx | 2 +- framework/source/uielement/statusbarmerger.cxx | 1 - framework/source/xml/imagesdocumenthandler.cxx | 12 +----------- 17 files changed, 2 insertions(+), 68 deletions(-) (limited to 'framework') diff --git a/framework/inc/classes/rootactiontriggercontainer.hxx b/framework/inc/classes/rootactiontriggercontainer.hxx index 0f32f39f04e7..f67557f16923 100644 --- a/framework/inc/classes/rootactiontriggercontainer.hxx +++ b/framework/inc/classes/rootactiontriggercontainer.hxx @@ -93,7 +93,6 @@ class FWE_DLLPUBLIC RootActionTriggerContainer : public PropertySetContainer, void FillContainer(); bool m_bContainerCreated; - bool m_bContainerChanged; bool m_bInContainerCreation; VclPtr m_pMenu; const OUString* m_pMenuIdentifier; diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx index e5abb700de58..d5fb6425adfa 100644 --- a/framework/inc/services/layoutmanager.hxx +++ b/framework/inc/services/layoutmanager.hxx @@ -252,16 +252,12 @@ namespace framework css::uno::Reference< css::awt::XWindow > m_xContainerWindow; css::uno::Reference< css::awt::XTopWindow2 > m_xContainerTopWindow; sal_Int32 m_nLockCount; - bool m_bActive; bool m_bInplaceMenuSet; bool m_bMenuVisible; - bool m_bComponentAttached; - bool m_bDoLayout; bool m_bVisible; bool m_bParentWindowVisible; bool m_bMustDoLayout; bool m_bAutomaticToolbars; - bool m_bStoreWindowState; bool m_bHideCurrentUI; bool m_bGlobalSettings; bool m_bPreserveContentSize; diff --git a/framework/inc/uielement/statusbaritem.hxx b/framework/inc/uielement/statusbaritem.hxx index 8f5ba552bd93..759bf5ef6cac 100644 --- a/framework/inc/uielement/statusbaritem.hxx +++ b/framework/inc/uielement/statusbaritem.hxx @@ -39,7 +39,6 @@ class StatusbarItem : protected cppu::BaseMutex, public: explicit StatusbarItem( StatusBar *pStatusBar, - AddonStatusbarItemData *pItemData, sal_uInt16 nId, const rtl::OUString& aCommand ); virtual ~StatusbarItem() override; @@ -69,7 +68,6 @@ public: private: VclPtr m_pStatusBar; - AddonStatusbarItemData *m_pItemData; sal_uInt16 m_nId; sal_uInt16 m_nStyle; rtl::OUString m_aCommand; diff --git a/framework/inc/uielement/statusbarmerger.hxx b/framework/inc/uielement/statusbarmerger.hxx index ab5f532193f8..7e593734cbcd 100644 --- a/framework/inc/uielement/statusbarmerger.hxx +++ b/framework/inc/uielement/statusbarmerger.hxx @@ -29,7 +29,6 @@ namespace framework struct AddonStatusbarItemData { rtl::OUString aLabel; - StatusBarItemBits nItemBits; }; struct AddonStatusbarItem diff --git a/framework/inc/xml/imagesdocumenthandler.hxx b/framework/inc/xml/imagesdocumenthandler.hxx index 2058a215e2d1..fe134597bc90 100644 --- a/framework/inc/xml/imagesdocumenthandler.hxx +++ b/framework/inc/xml/imagesdocumenthandler.hxx @@ -98,7 +98,6 @@ class OReadImagesDocumentHandler : public ::cppu::WeakImplHelper< css::xml::sax: bool m_bImageContainerStartFound; bool m_bImageContainerEndFound; bool m_bImagesStartFound; - bool m_bImageStartFound; bool m_bExternalImagesStartFound; bool m_bExternalImageStartFound; sal_Int32 m_nHashMaskModeBitmap; diff --git a/framework/inc/xml/toolboxdocumenthandler.hxx b/framework/inc/xml/toolboxdocumenthandler.hxx index a6e64294c97c..36da36b9294c 100644 --- a/framework/inc/xml/toolboxdocumenthandler.hxx +++ b/framework/inc/xml/toolboxdocumenthandler.hxx @@ -102,7 +102,6 @@ class FWE_DLLPUBLIC OReadToolBoxDocumentHandler : css::uno::Reference< css::xml::sax::XLocator > m_xLocator; sal_Int32 m_nHashCode_Style_Radio; - sal_Int32 m_nHashCode_Style_Auto; sal_Int32 m_nHashCode_Style_Left; sal_Int32 m_nHashCode_Style_AutoSize; sal_Int32 m_nHashCode_Style_DropDown; diff --git a/framework/source/fwe/classes/rootactiontriggercontainer.cxx b/framework/source/fwe/classes/rootactiontriggercontainer.cxx index ef495b486cef..7ca7f72933f6 100644 --- a/framework/source/fwe/classes/rootactiontriggercontainer.cxx +++ b/framework/source/fwe/classes/rootactiontriggercontainer.cxx @@ -46,7 +46,6 @@ static Sequence< sal_Int8 > const & impl_getStaticIdentifier() RootActionTriggerContainer::RootActionTriggerContainer( const Menu* pMenu, const OUString* pMenuIdentifier ) : PropertySetContainer() , m_bContainerCreated( false ) - , m_bContainerChanged( false ) , m_bInContainerCreation( false ) , m_pMenu( pMenu ) , m_pMenuIdentifier( pMenuIdentifier ) @@ -123,8 +122,6 @@ void SAL_CALL RootActionTriggerContainer::insertByIndex( sal_Int32 Index, const if ( !m_bContainerCreated ) FillContainer(); - if ( !m_bInContainerCreation ) - m_bContainerChanged = true; PropertySetContainer::insertByIndex( Index, Element ); } @@ -135,8 +132,6 @@ void SAL_CALL RootActionTriggerContainer::removeByIndex( sal_Int32 Index ) if ( !m_bContainerCreated ) FillContainer(); - if ( !m_bInContainerCreation ) - m_bContainerChanged = true; PropertySetContainer::removeByIndex( Index ); } @@ -148,8 +143,6 @@ void SAL_CALL RootActionTriggerContainer::replaceByIndex( sal_Int32 Index, const if ( !m_bContainerCreated ) FillContainer(); - if ( !m_bInContainerCreation ) - m_bContainerChanged = true; PropertySetContainer::replaceByIndex( Index, Element ); } diff --git a/framework/source/fwe/helper/undomanagerhelper.cxx b/framework/source/fwe/helper/undomanagerhelper.cxx index 86c707e3deb1..6ed845d579df 100644 --- a/framework/source/fwe/helper/undomanagerhelper.cxx +++ b/framework/source/fwe/helper/undomanagerhelper.cxx @@ -192,7 +192,6 @@ namespace framework private: ::osl::Mutex m_aMutex; ::osl::Mutex m_aQueueMutex; - bool m_disposed; bool m_bAPIActionRunning; bool m_bProcessingEvents; sal_Int32 m_nLockCount; @@ -213,7 +212,6 @@ namespace framework explicit UndoManagerHelper_Impl( IUndoManagerImplementation& i_undoManagerImpl ) :m_aMutex() ,m_aQueueMutex() - ,m_disposed( false ) ,m_bAPIActionRunning( false ) ,m_bProcessingEvents( false ) ,m_nLockCount( 0 ) @@ -318,8 +316,6 @@ namespace framework ::osl::MutexGuard aGuard( m_aMutex ); getUndoManager().RemoveUndoListener( *this ); - - m_disposed = true; } UndoManagerEvent UndoManagerHelper_Impl::buildEvent( OUString const& i_title ) const diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx index d73445dd847f..4076a489d0a0 100644 --- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx +++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx @@ -152,7 +152,6 @@ OReadToolBoxDocumentHandler::OReadToolBoxDocumentHandler( const Reference< XInde // pre-calculate a hash code for all style strings to speed up xml read process m_nHashCode_Style_Radio = OUString( ATTRIBUTE_ITEMSTYLE_RADIO ).hashCode(); - m_nHashCode_Style_Auto = OUString( ATTRIBUTE_ITEMSTYLE_AUTO ).hashCode(); m_nHashCode_Style_Left = OUString( ATTRIBUTE_ITEMSTYLE_LEFT ).hashCode(); m_nHashCode_Style_AutoSize = OUString( ATTRIBUTE_ITEMSTYLE_AUTOSIZE ).hashCode(); m_nHashCode_Style_DropDown = OUString( ATTRIBUTE_ITEMSTYLE_DROPDOWN ).hashCode(); diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 14364f7c6c2b..10704e784b79 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -106,11 +106,8 @@ LayoutManager::LayoutManager( const Reference< XComponentContext >& xContext ) : , m_xContext( xContext ) , m_xURLTransformer( URLTransformer::create(xContext) ) , m_nLockCount( 0 ) - , m_bActive( false ) , m_bInplaceMenuSet( false ) , m_bMenuVisible( true ) - , m_bComponentAttached( false ) - , m_bDoLayout( false ) , m_bVisible( true ) , m_bParentWindowVisible( false ) , m_bMustDoLayout( true ) @@ -119,7 +116,6 @@ LayoutManager::LayoutManager( const Reference< XComponentContext >& xContext ) : #else , m_bAutomaticToolbars( false ) #endif - , m_bStoreWindowState( false ) , m_bHideCurrentUI( false ) , m_bGlobalSettings( false ) , m_bPreserveContentSize( false ) @@ -380,7 +376,6 @@ void LayoutManager::implts_reset( bool bAttached ) SolarMutexClearableGuard aWriteLock; m_xModel = xModel; m_aDockingArea = awt::Rectangle(); - m_bComponentAttached = bAttached; m_aModuleIdentifier = aModuleIdentifier; m_xModuleCfgMgr = xModCfgMgr; m_xDocCfgMgr = xDokCfgMgr; @@ -623,8 +618,6 @@ void LayoutManager::implts_writeWindowStateData( const OUString& aName, const UI SolarMutexResettableGuard aWriteLock; Reference< XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); - // set flag to determine that we triggered the notification - m_bStoreWindowState = true; aWriteLock.clear(); bool bPersistent( false ); @@ -691,7 +684,6 @@ void LayoutManager::implts_writeWindowStateData( const OUString& aName, const UI // Reset flag aWriteLock.reset(); - m_bStoreWindowState = false; aWriteLock.clear(); } @@ -2295,7 +2287,6 @@ bool LayoutManager::implts_doLayout( bool bForceRequestBorderSpace, bool bOuterR bLayouted = true; SolarMutexResettableGuard aWriteGuard; - m_bDoLayout = true; aWriteGuard.clear(); awt::Rectangle aDockSpace( implts_calcDockingAreaSizes() ); @@ -2378,7 +2369,6 @@ bool LayoutManager::implts_doLayout( bool bForceRequestBorderSpace, bool bOuterR xDockingAreaAcceptor->setDockingAreaSpace( aBorderSpace ); aWriteGuard.reset(); - m_bDoLayout = false; aWriteGuard.clear(); } } @@ -2723,7 +2713,6 @@ void SAL_CALL LayoutManager::frameAction( const FrameActionEvent& aEvent ) SAL_INFO( "fwk", "framework (cd100003) ::LayoutManager::frameAction (COMPONENT_ATTACHED|REATTACHED)" ); SolarMutexClearableGuard aWriteLock; - m_bComponentAttached = true; m_bMustDoLayout = true; aWriteLock.clear(); @@ -2735,20 +2724,12 @@ void SAL_CALL LayoutManager::frameAction( const FrameActionEvent& aEvent ) { SAL_INFO( "fwk", "framework (cd100003) ::LayoutManager::frameAction (FRAME_UI_ACTIVATED|DEACTIVATING)" ); - SolarMutexClearableGuard aWriteLock; - m_bActive = ( aEvent.Action == FrameAction_FRAME_UI_ACTIVATED ); - aWriteLock.clear(); - implts_toggleFloatingUIElementsVisibility( aEvent.Action == FrameAction_FRAME_UI_ACTIVATED ); } else if ( aEvent.Action == FrameAction_COMPONENT_DETACHING ) { SAL_INFO( "fwk", "framework (cd100003) ::LayoutManager::frameAction (COMPONENT_DETACHING)" ); - SolarMutexClearableGuard aWriteLock; - m_bComponentAttached = false; - aWriteLock.clear(); - implts_reset( false ); } } diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 1018583495ea..37c86960a9b5 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -63,7 +63,6 @@ ToolbarLayoutManager::ToolbarLayoutManager( m_pGlobalSettings( nullptr ), m_bComponentAttached( false ), m_bLayoutDirty( false ), - m_bStoreWindowState( false ), m_bGlobalSettings( false ), m_bDockingInProgress( false ), m_bLayoutInProgress( false ), @@ -1563,7 +1562,6 @@ void ToolbarLayoutManager::implts_writeWindowStateData( const UIElement& rElemen { SolarMutexResettableGuard aWriteLock; uno::Reference< container::XNameAccess > xPersistentWindowState( m_xPersistentWindowState ); - m_bStoreWindowState = true; // set flag to determine that we triggered the notification aWriteLock.clear(); bool bPersistent( false ); @@ -1633,7 +1631,6 @@ void ToolbarLayoutManager::implts_writeWindowStateData( const UIElement& rElemen // Reset flag aWriteLock.reset(); - m_bStoreWindowState = false; aWriteLock.clear(); } diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.hxx b/framework/source/layoutmanager/toolbarlayoutmanager.hxx index 4e646c2701fc..4f92f6be5029 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.hxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.hxx @@ -282,7 +282,6 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper< css::awt::XDockableW bool m_bComponentAttached; bool m_bLayoutDirty; - bool m_bStoreWindowState; bool m_bGlobalSettings; bool m_bDockingInProgress; bool m_bLayoutInProgress; diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx index 33204d94e994..0067e8cd9c3e 100644 --- a/framework/source/services/pathsettings.cxx +++ b/framework/source/services/pathsettings.cxx @@ -172,8 +172,6 @@ private: ::cppu::OPropertyArrayHelper* m_pPropHelp; - bool m_bIgnoreEvents; - public: /** initialize a new instance of this class. @@ -448,7 +446,6 @@ PathSettings::PathSettings( const css::uno::Reference< css::uno::XComponentConte , ::cppu::OPropertySetHelper(cppu::WeakComponentImplHelperBase::rBHelper) , m_xContext (xContext) , m_pPropHelp(nullptr ) - , m_bIgnoreEvents(false) { } @@ -644,8 +641,6 @@ PathSettings::PathInfo PathSettings::impl_readNewFormat(const OUString& sPath) void PathSettings::impl_storePath(const PathSettings::PathInfo& aPath) { - m_bIgnoreEvents = true; - css::uno::Reference< css::container::XNameAccess > xCfgNew = fa_getCfgNew(); css::uno::Reference< css::container::XNameAccess > xCfgOld = fa_getCfgOld(); @@ -683,8 +678,6 @@ void PathSettings::impl_storePath(const PathSettings::PathInfo& aPath) xProps->setPropertyValue(aResubstPath.sPathName, css::uno::Any()); ::comphelper::ConfigurationHelper::flush(xCfgOld); } - - m_bIgnoreEvents = false; } void PathSettings::impl_mergeOldUserPaths( PathSettings::PathInfo& rPath, diff --git a/framework/source/uielement/statusbaritem.cxx b/framework/source/uielement/statusbaritem.cxx index 2c47706d0a6e..a4b02738fe9a 100644 --- a/framework/source/uielement/statusbaritem.cxx +++ b/framework/source/uielement/statusbaritem.cxx @@ -63,12 +63,10 @@ sal_uInt16 impl_convertItemBitsToItemStyle( StatusBarItemBits nItemBits ) StatusbarItem::StatusbarItem( StatusBar *pStatusBar, - AddonStatusbarItemData *pItemData, sal_uInt16 nId, const rtl::OUString& aCommand ) : StatusbarItem_Base( m_aMutex ) , m_pStatusBar( pStatusBar ) - , m_pItemData( pItemData ) , m_nId( nId ) , m_nStyle( 0 ) , m_aCommand( aCommand ) @@ -85,7 +83,6 @@ StatusbarItem::~StatusbarItem() void SAL_CALL StatusbarItem::disposing() { osl::MutexGuard aGuard( m_aMutex ); - m_pItemData = nullptr; m_pStatusBar = nullptr; } diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx index ffc08e97bb89..4b7c4319d573 100644 --- a/framework/source/uielement/statusbarmanager.cxx +++ b/framework/source/uielement/statusbarmanager.cxx @@ -297,7 +297,7 @@ void StatusBarManager::CreateControllers() uno::Reference< frame::XStatusbarController > xController; AddonStatusbarItemData *pItemData = static_cast< AddonStatusbarItemData *>( m_pStatusBar->GetItemData( nId ) ); uno::Reference< ui::XStatusbarItem > xStatusbarItem( - static_cast< cppu::OWeakObject *>( new StatusbarItem( m_pStatusBar, pItemData, nId, aCommandURL ) ), + static_cast< cppu::OWeakObject *>( new StatusbarItem( m_pStatusBar, nId, aCommandURL ) ), uno::UNO_QUERY ); beans::PropertyValue aPropValue; diff --git a/framework/source/uielement/statusbarmerger.cxx b/framework/source/uielement/statusbarmerger.cxx index e4b6a9faca3d..d48c843961ea 100644 --- a/framework/source/uielement/statusbarmerger.cxx +++ b/framework/source/uielement/statusbarmerger.cxx @@ -95,7 +95,6 @@ void lcl_CreateStatusbarItem( StatusBar* pStatusbar, // add-on specific data AddonStatusbarItemData *pUserData = new AddonStatusbarItemData; pUserData->aLabel = rAddonItem.aLabel; - pUserData->nItemBits = rAddonItem.nItemBits; pStatusbar->SetItemData( nItemId, pUserData ); } diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/xml/imagesdocumenthandler.cxx index 45315b773952..2aac402fc2f4 100644 --- a/framework/source/xml/imagesdocumenthandler.cxx +++ b/framework/source/xml/imagesdocumenthandler.cxx @@ -130,7 +130,6 @@ OReadImagesDocumentHandler::OReadImagesDocumentHandler( ImageListsDescriptor& aI m_bImageContainerStartFound = false; m_bImageContainerEndFound = false; m_bImagesStartFound = false; - m_bImageStartFound = false; m_bExternalImagesStartFound = false; m_bExternalImageStartFound = false; } @@ -301,8 +300,6 @@ void SAL_CALL OReadImagesDocumentHandler::startElement( if ( !m_pImages->pImageItemList ) m_pImages->pImageItemList.reset( new ImageItemListDescriptor ); - m_bImageStartFound = true; - // Create new image item descriptor std::unique_ptr pItem(new ImageItemDescriptor); pItem->nIndex = -1; @@ -509,12 +506,6 @@ void SAL_CALL OReadImagesDocumentHandler::endElement(const OUString& aName) } break; - case IMG_ELEMENT_ENTRY: - { - m_bImageStartFound = false; - } - break; - case IMG_ELEMENT_EXTERNALIMAGES: { if ( m_pExternalImages && !m_aImageList.pExternalImageList ) @@ -534,8 +525,7 @@ void SAL_CALL OReadImagesDocumentHandler::endElement(const OUString& aName) } break; - default: - break; + default: break; } } } -- cgit v1.2.3