diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-03-17 18:00:10 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-03-17 18:00:10 +0100 |
commit | 07b32bc2bf0cd329258b4924839e5b900b7e6196 (patch) | |
tree | 72158346b5677065a032010c44f878ae2f6696df /framework/source | |
parent | a98d7543ad599092081970c48c0c650c142cf762 (diff) |
Consolidate framework::{Resetable,}Guard
Change-Id: I97290c2504992f4a92e6aeb71e02a2542dd35faa
Diffstat (limited to 'framework/source')
60 files changed, 305 insertions, 329 deletions
diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx index f09fbe862567..c4e20fbb63ec 100644 --- a/framework/source/classes/menumanager.cxx +++ b/framework/source/classes/menumanager.cxx @@ -22,7 +22,7 @@ #include <framework/bmkmenu.hxx> #include <framework/addonmenu.hxx> #include <framework/imageproducer.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include "framework/addonsoptions.hxx" #include <classes/fwkresid.hxx> #include <services.h> @@ -293,7 +293,7 @@ MenuManager::~MenuManager() MenuManager::MenuItemHandler* MenuManager::GetMenuItemHandler( sal_uInt16 nItemId ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); std::vector< MenuItemHandler* >::iterator p; for ( p = m_aMenuItemHandlerVector.begin(); p != m_aMenuItemHandlerVector.end(); ++p ) @@ -314,7 +314,7 @@ throw ( RuntimeException, std::exception ) MenuItemHandler* pStatusChangedMenu = NULL; { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); std::vector< MenuItemHandler* >::iterator p; for ( p = m_aMenuItemHandlerVector.begin(); p != m_aMenuItemHandlerVector.end(); ++p ) @@ -332,7 +332,7 @@ throw ( RuntimeException, std::exception ) { SolarMutexGuard aSolarGuard; { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); sal_Bool bSetCheckmark = sal_False; sal_Bool bCheckmark = sal_False; @@ -372,7 +372,7 @@ throw ( RuntimeException, std::exception ) void MenuManager::RemoveListener() { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); ClearMenuDispatch(); } @@ -411,7 +411,7 @@ void SAL_CALL MenuManager::disposing( const EventObject& Source ) throw ( Runtim { if ( Source.Source == m_xFrame ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); ClearMenuDispatch(Source,false); } else @@ -420,7 +420,7 @@ void SAL_CALL MenuManager::disposing( const EventObject& Source ) throw ( Runtim MenuItemHandler* pMenuItemDisposing = NULL; { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); std::vector< MenuItemHandler* >::iterator p; for ( p = m_aMenuItemHandlerVector.begin(); p != m_aMenuItemHandlerVector.end(); ++p ) @@ -517,7 +517,7 @@ void MenuManager::UpdateSpecialFileMenu( Menu* pMenu ) } { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); int nRemoveItemCount = 0; int nItemCount = pMenu->GetItemCount(); @@ -648,7 +648,7 @@ void MenuManager::UpdateSpecialWindowMenu( Menu* pMenu,const Reference< XCompone } { - ResetableGuard aGuard( _rMutex ); + Guard aGuard( _rMutex ); int nItemCount = pMenu->GetItemCount(); @@ -771,7 +771,7 @@ IMPL_LINK( MenuManager, Activate, Menu *, pMenu ) { URL aTargetURL; - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY ); if ( xDispatchProvider.is() ) @@ -841,7 +841,7 @@ IMPL_LINK( MenuManager, Select, Menu *, pMenu ) Reference< XDispatch > xDispatch; { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); sal_uInt16 nCurItemId = pMenu->GetCurItemId(); if ( pMenu == m_pVCLMenu && diff --git a/framework/source/dispatch/menudispatcher.cxx b/framework/source/dispatch/menudispatcher.cxx index a71c621e5ed2..a775af308d1e 100644 --- a/framework/source/dispatch/menudispatcher.cxx +++ b/framework/source/dispatch/menudispatcher.cxx @@ -21,7 +21,7 @@ #include <general.h> #include <framework/menuconfiguration.hxx> #include <framework/addonmenu.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <services.h> #include <com/sun/star/frame/FrameSearchFlag.hpp> @@ -113,7 +113,7 @@ void SAL_CALL MenuDispatcher::addStatusListener( const uno::Reference< XStat const URL& aURL ) throw( RuntimeException, std::exception ) { // Ready for multithreading - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); // Safe impossible cases // Method not defined for all incoming parameter SAL_WARN_IF( !impldbg_checkParameter_addStatusListener( xControl, aURL ), "fwk", "MenuDispatcher::addStatusListener(): Invalid parameter detected." ); @@ -128,7 +128,7 @@ void SAL_CALL MenuDispatcher::removeStatusListener( const uno::Reference< X const URL& aURL ) throw( RuntimeException, std::exception ) { // Ready for multithreading - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); // Safe impossible cases // Method not defined for all incoming parameter SAL_WARN_IF( !impldbg_checkParameter_removeStatusListener( xControl, aURL ), "fwk", "MenuDispatcher::removeStatusListener(): Invalid parameter detected." ); @@ -142,7 +142,7 @@ void SAL_CALL MenuDispatcher::removeStatusListener( const uno::Reference< X void SAL_CALL MenuDispatcher::frameAction( const FrameActionEvent& aEvent ) throw ( RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_pMenuManager && aEvent.Action == FrameAction_FRAME_UI_ACTIVATED ) { @@ -180,7 +180,7 @@ void SAL_CALL MenuDispatcher::frameAction( const FrameActionEvent& aEvent ) thro void SAL_CALL MenuDispatcher::disposing( const EventObject& ) throw( RuntimeException, std::exception ) { // Ready for multithreading - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); // Safe impossible cases SAL_WARN_IF( m_bAlreadyDisposed, "fwk", "MenuDispatcher::disposing(): Object already disposed .. don't call it again!" ); @@ -255,7 +255,7 @@ sal_Bool MenuDispatcher::impl_setMenuBar( MenuBar* pMenuBar, sal_Bool bMenuFromR if ( pWindow ) { // Ready for multithreading - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); SystemWindow* pSysWindow = (SystemWindow *)pWindow; diff --git a/framework/source/dispatch/oxt_handler.cxx b/framework/source/dispatch/oxt_handler.cxx index de0fa0bdc3cb..b24eaecfa288 100644 --- a/framework/source/dispatch/oxt_handler.cxx +++ b/framework/source/dispatch/oxt_handler.cxx @@ -18,6 +18,7 @@ */ #include <dispatch/oxt_handler.hxx> +#include <threadhelp/guard.hxx> #include <threadhelp/transactionguard.hxx> #include <services.h> #include <unotools/mediadescriptor.hxx> @@ -117,7 +118,7 @@ void SAL_CALL Oxt_Handler::dispatchWithNotification( const css::util::URL& aURL, throw( css::uno::RuntimeException, std::exception ) { // SAFE { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); OUString sServiceName = "com.sun.star.deployment.ui.PackageManagerDialog"; css::uno::Sequence< css::uno::Any > lParams(1); diff --git a/framework/source/dispatch/popupmenudispatcher.cxx b/framework/source/dispatch/popupmenudispatcher.cxx index 1419cfe050aa..3a91779f6bd9 100644 --- a/framework/source/dispatch/popupmenudispatcher.cxx +++ b/framework/source/dispatch/popupmenudispatcher.cxx @@ -21,7 +21,6 @@ #include <general.h> #include <framework/menuconfiguration.hxx> #include <framework/addonmenu.hxx> -#include <threadhelp/resetableguard.hxx> #include <threadhelp/guard.hxx> #include <services.h> #include <properties.h> @@ -181,7 +180,7 @@ throw( css::uno::RuntimeException, std::exception ) if ( rURL.Complete.startsWith( "vnd.sun.star.popup:" ) ) { // --- SAFE --- - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); impl_RetrievePopupControllerQuery(); impl_CreateUriRefFactory(); @@ -260,7 +259,7 @@ void SAL_CALL PopupMenuDispatcher::addStatusListener( const uno::Reference< XSta throw( RuntimeException, std::exception ) { // Ready for multithreading - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); // Safe impossible cases // Add listener to container. m_aListenerContainer.addInterface( aURL.Complete, xControl ); @@ -271,7 +270,7 @@ void SAL_CALL PopupMenuDispatcher::removeStatusListener( const uno::Reference< X throw( RuntimeException, std::exception ) { // Ready for multithreading - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); // Safe impossible cases // Add listener to container. m_aListenerContainer.removeInterface( aURL.Complete, xControl ); @@ -280,7 +279,7 @@ throw( RuntimeException, std::exception ) void SAL_CALL PopupMenuDispatcher::frameAction( const FrameActionEvent& aEvent ) throw ( RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if (( aEvent.Action == css::frame::FrameAction_COMPONENT_DETACHING ) || ( aEvent.Action == css::frame::FrameAction_COMPONENT_ATTACHED )) @@ -293,7 +292,7 @@ throw ( RuntimeException, std::exception ) void SAL_CALL PopupMenuDispatcher::disposing( const EventObject& ) throw( RuntimeException, std::exception ) { // Ready for multithreading - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); // Safe impossible cases SAL_WARN_IF( m_bAlreadyDisposed, "fwk", "MenuDispatcher::disposing(): Object already disposed .. don't call it again!" ); diff --git a/framework/source/fwe/classes/rootactiontriggercontainer.cxx b/framework/source/fwe/classes/rootactiontriggercontainer.cxx index 1ef8b9883381..6670e76ce49a 100644 --- a/framework/source/fwe/classes/rootactiontriggercontainer.cxx +++ b/framework/source/fwe/classes/rootactiontriggercontainer.cxx @@ -26,7 +26,7 @@ #include <cppuhelper/typeprovider.hxx> #include <framework/actiontriggerhelper.hxx> #include <osl/mutex.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <vcl/svapp.hxx> using namespace cppu; @@ -126,7 +126,7 @@ throw ( RuntimeException, std::exception ) void SAL_CALL RootActionTriggerContainer::insertByIndex( sal_Int32 Index, const Any& Element ) throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( !m_bContainerCreated ) FillContainer(); @@ -139,7 +139,7 @@ throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetExcept void SAL_CALL RootActionTriggerContainer::removeByIndex( sal_Int32 Index ) throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( !m_bContainerCreated ) FillContainer(); @@ -153,7 +153,7 @@ throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std void SAL_CALL RootActionTriggerContainer::replaceByIndex( sal_Int32 Index, const Any& Element ) throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( !m_bContainerCreated ) FillContainer(); @@ -167,7 +167,7 @@ throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetExcept sal_Int32 SAL_CALL RootActionTriggerContainer::getCount() throw ( RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( !m_bContainerCreated ) { @@ -188,7 +188,7 @@ throw ( RuntimeException, std::exception ) Any SAL_CALL RootActionTriggerContainer::getByIndex( sal_Int32 Index ) throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( !m_bContainerCreated ) FillContainer(); diff --git a/framework/source/fwe/helper/propertysetcontainer.cxx b/framework/source/fwe/helper/propertysetcontainer.cxx index 670359af05fc..347f83cba808 100644 --- a/framework/source/fwe/helper/propertysetcontainer.cxx +++ b/framework/source/fwe/helper/propertysetcontainer.cxx @@ -18,7 +18,7 @@ */ #include <helper/propertysetcontainer.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <vcl/svapp.hxx> @@ -79,7 +79,7 @@ throw ( RuntimeException, std::exception ) void SAL_CALL PropertySetContainer::insertByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); sal_Int32 nSize = m_aPropertySetVector.size(); @@ -112,7 +112,7 @@ void SAL_CALL PropertySetContainer::insertByIndex( sal_Int32 Index, const ::com: void SAL_CALL PropertySetContainer::removeByIndex( sal_Int32 nIndex ) throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( (sal_Int32)m_aPropertySetVector.size() > nIndex ) { @@ -149,7 +149,7 @@ void SAL_CALL PropertySetContainer::replaceByIndex( sal_Int32 Index, const ::com sal_Int32 SAL_CALL PropertySetContainer::getCount() throw ( RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); return m_aPropertySetVector.size(); } @@ -157,7 +157,7 @@ sal_Int32 SAL_CALL PropertySetContainer::getCount() Any SAL_CALL PropertySetContainer::getByIndex( sal_Int32 Index ) throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( (sal_Int32)m_aPropertySetVector.size() > Index ) { @@ -174,7 +174,7 @@ Any SAL_CALL PropertySetContainer::getByIndex( sal_Int32 Index ) sal_Bool SAL_CALL PropertySetContainer::hasElements() throw (::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); return !( m_aPropertySetVector.empty() ); } diff --git a/framework/source/fwe/xml/statusbardocumenthandler.cxx b/framework/source/fwe/xml/statusbardocumenthandler.cxx index 93fdbb2f4658..a0f45f7850b7 100644 --- a/framework/source/fwe/xml/statusbardocumenthandler.cxx +++ b/framework/source/fwe/xml/statusbardocumenthandler.cxx @@ -20,7 +20,7 @@ #include <stdio.h> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <xml/statusbardocumenthandler.hxx> #include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp> @@ -191,7 +191,7 @@ throw ( SAXException, RuntimeException, std::exception ) void SAL_CALL OReadStatusBarDocumentHandler::endDocument(void) throw( SAXException, RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if (( m_bStatusBarStartFound && !m_bStatusBarEndFound ) || ( !m_bStatusBarStartFound && m_bStatusBarEndFound ) ) @@ -206,7 +206,7 @@ void SAL_CALL OReadStatusBarDocumentHandler::startElement( const OUString& aName, const Reference< XAttributeList > &xAttribs ) throw( SAXException, RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); StatusBarHashMap::const_iterator pStatusBarEntry = m_aStatusBarMap.find( aName ) ; if ( pStatusBarEntry != m_aStatusBarMap.end() ) @@ -405,7 +405,7 @@ throw( SAXException, RuntimeException, std::exception ) void SAL_CALL OReadStatusBarDocumentHandler::endElement(const OUString& aName) throw( SAXException, RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); StatusBarHashMap::const_iterator pStatusBarEntry = m_aStatusBarMap.find( aName ) ; if ( pStatusBarEntry != m_aStatusBarMap.end() ) @@ -464,14 +464,14 @@ void SAL_CALL OReadStatusBarDocumentHandler::setDocumentLocator( const Reference< XLocator > &xLocator) throw( SAXException, RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); m_xLocator = xLocator; } OUString OReadStatusBarDocumentHandler::getErrorLineString() { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); char buffer[32]; @@ -510,7 +510,7 @@ OWriteStatusBarDocumentHandler::~OWriteStatusBarDocumentHandler() void OWriteStatusBarDocumentHandler::WriteStatusBarDocument() throw ( SAXException, RuntimeException ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); m_xWriteDocumentHandler->startDocument(); diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx index 07367a49f784..fcef4080f13b 100644 --- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx +++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx @@ -20,7 +20,7 @@ #include <stdio.h> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <xml/toolboxdocumenthandler.hxx> #include <xml/toolboxconfigurationdefines.hxx> @@ -204,7 +204,7 @@ throw ( SAXException, RuntimeException, std::exception ) void SAL_CALL OReadToolBoxDocumentHandler::endDocument(void) throw( SAXException, RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if (( m_bToolBarStartFound && !m_bToolBarEndFound ) || ( !m_bToolBarStartFound && m_bToolBarEndFound ) ) @@ -219,7 +219,7 @@ void SAL_CALL OReadToolBoxDocumentHandler::startElement( const OUString& aName, const Reference< XAttributeList > &xAttribs ) throw( SAXException, RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); ToolBoxHashMap::const_iterator pToolBoxEntry = m_aToolBoxMap.find( aName ) ; if ( pToolBoxEntry != m_aToolBoxMap.end() ) @@ -537,7 +537,7 @@ throw( SAXException, RuntimeException, std::exception ) void SAL_CALL OReadToolBoxDocumentHandler::endElement(const OUString& aName) throw( SAXException, RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); ToolBoxHashMap::const_iterator pToolBoxEntry = m_aToolBoxMap.find( aName ) ; if ( pToolBoxEntry != m_aToolBoxMap.end() ) @@ -635,14 +635,14 @@ void SAL_CALL OReadToolBoxDocumentHandler::setDocumentLocator( const Reference< XLocator > &xLocator) throw( SAXException, RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); m_xLocator = xLocator; } OUString OReadToolBoxDocumentHandler::getErrorLineString() { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); char buffer[32]; @@ -681,7 +681,7 @@ OWriteToolBoxDocumentHandler::~OWriteToolBoxDocumentHandler() void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() throw ( SAXException, RuntimeException ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); m_xWriteDocumentHandler->startDocument(); diff --git a/framework/source/fwe/xml/toolboxlayoutdocumenthandler.cxx b/framework/source/fwe/xml/toolboxlayoutdocumenthandler.cxx index 399e5893b444..8aeceab429ac 100644 --- a/framework/source/fwe/xml/toolboxlayoutdocumenthandler.cxx +++ b/framework/source/fwe/xml/toolboxlayoutdocumenthandler.cxx @@ -20,7 +20,6 @@ #include <stdio.h> -#include <threadhelp/resetableguard.hxx> #include <xml/toolboxlayoutdocumenthandler.hxx> #include <xml/toolboxconfigurationdefines.hxx> diff --git a/framework/source/fwi/jobs/configaccess.cxx b/framework/source/fwi/jobs/configaccess.cxx index d9c63000fcd0..f83d42916fcc 100644 --- a/framework/source/fwi/jobs/configaccess.cxx +++ b/framework/source/fwi/jobs/configaccess.cxx @@ -19,7 +19,6 @@ #include <jobs/configaccess.hxx> #include <threadhelp/guard.hxx> -#include <threadhelp/resetableguard.hxx> #include <general.h> #include <services.h> diff --git a/framework/source/fwi/threadhelp/transactionmanager.cxx b/framework/source/fwi/threadhelp/transactionmanager.cxx index bd13359e4a5c..9f4cdd98dc36 100644 --- a/framework/source/fwi/threadhelp/transactionmanager.cxx +++ b/framework/source/fwi/threadhelp/transactionmanager.cxx @@ -18,7 +18,6 @@ */ #include <threadhelp/transactionmanager.hxx> -#include <threadhelp/resetableguard.hxx> #include <macros/generic.hxx> @@ -137,7 +136,7 @@ void TransactionManager::setWorkingMode( EWorkingMode eMode ) { // Object is uninitialized ... // Make member access threadsafe! - ResetableGuard aGuard( m_aMutex ); + Guard aGuard( m_aMutex ); // Check working mode again .. because another instance could be faster. // (It's possible to set this guard at first of this method too!) diff --git a/framework/source/fwi/uielement/constitemcontainer.cxx b/framework/source/fwi/uielement/constitemcontainer.cxx index 2c758ab172a7..633989a4768e 100644 --- a/framework/source/fwi/uielement/constitemcontainer.cxx +++ b/framework/source/fwi/uielement/constitemcontainer.cxx @@ -22,7 +22,6 @@ #include <uielement/constitemcontainer.hxx> #include <uielement/rootitemcontainer.hxx> #include <uielement/itemcontainer.hxx> -#include <threadhelp/resetableguard.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> diff --git a/framework/source/fwi/uielement/itemcontainer.cxx b/framework/source/fwi/uielement/itemcontainer.cxx index 6871a758ad1d..a7b243a0afb4 100644 --- a/framework/source/fwi/uielement/itemcontainer.cxx +++ b/framework/source/fwi/uielement/itemcontainer.cxx @@ -19,7 +19,6 @@ #include <uielement/itemcontainer.hxx> #include <uielement/constitemcontainer.hxx> -#include <threadhelp/resetableguard.hxx> #include <comphelper/servicehelper.hxx> using namespace cppu; diff --git a/framework/source/fwi/uielement/rootitemcontainer.cxx b/framework/source/fwi/uielement/rootitemcontainer.cxx index 275b68d4c287..712cb2cdf83b 100644 --- a/framework/source/fwi/uielement/rootitemcontainer.cxx +++ b/framework/source/fwi/uielement/rootitemcontainer.cxx @@ -24,7 +24,6 @@ #include <uielement/rootitemcontainer.hxx> #include <uielement/itemcontainer.hxx> #include <uielement/constitemcontainer.hxx> -#include <threadhelp/resetableguard.hxx> #include <general.h> #include <properties.h> diff --git a/framework/source/helper/dockingareadefaultacceptor.cxx b/framework/source/helper/dockingareadefaultacceptor.cxx index 4b4271fffdbe..f0746eec3b4e 100644 --- a/framework/source/helper/dockingareadefaultacceptor.cxx +++ b/framework/source/helper/dockingareadefaultacceptor.cxx @@ -18,7 +18,7 @@ */ #include <helper/dockingareadefaultacceptor.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <com/sun/star/awt/XDevice.hpp> #include <com/sun/star/awt/PosSize.hpp> @@ -58,7 +58,7 @@ DockingAreaDefaultAcceptor::~DockingAreaDefaultAcceptor() css::uno::Reference< css::awt::XWindow > SAL_CALL DockingAreaDefaultAcceptor::getContainerWindow() throw (css::uno::RuntimeException, std::exception) { // Ready for multithreading - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); // Try to "lock" the frame for access to taskscontainer. css::uno::Reference< XFrame > xFrame( m_xOwner.get(), UNO_QUERY ); @@ -70,7 +70,7 @@ css::uno::Reference< css::awt::XWindow > SAL_CALL DockingAreaDefaultAcceptor::ge sal_Bool SAL_CALL DockingAreaDefaultAcceptor::requestDockingAreaSpace( const css::awt::Rectangle& RequestedSpace ) throw (css::uno::RuntimeException, std::exception) { // Ready for multithreading - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); // Try to "lock" the frame for access to taskscontainer. css::uno::Reference< XFrame > xFrame( m_xOwner.get(), UNO_QUERY ); @@ -107,7 +107,7 @@ sal_Bool SAL_CALL DockingAreaDefaultAcceptor::requestDockingAreaSpace( const css void SAL_CALL DockingAreaDefaultAcceptor::setDockingAreaSpace( const css::awt::Rectangle& BorderSpace ) throw (css::uno::RuntimeException, std::exception) { // Ready for multithreading - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); // Try to "lock" the frame for access to taskscontainer. css::uno::Reference< XFrame > xFrame( m_xOwner.get(), UNO_QUERY ); diff --git a/framework/source/helper/ocomponentaccess.cxx b/framework/source/helper/ocomponentaccess.cxx index 142758d2e1e8..65a150f9648d 100644 --- a/framework/source/helper/ocomponentaccess.cxx +++ b/framework/source/helper/ocomponentaccess.cxx @@ -20,7 +20,7 @@ #include <helper/ocomponentaccess.hxx> #include <helper/ocomponentenumeration.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <com/sun/star/frame/FrameSearchFlag.hpp> @@ -61,7 +61,7 @@ OComponentAccess::~OComponentAccess() css::uno::Reference< XEnumeration > SAL_CALL OComponentAccess::createEnumeration() throw( RuntimeException, std::exception ) { // Ready for multithreading - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); // Set default return value, if method failed. // If no desktop exist and there is no task container - return an empty enumeration! @@ -99,7 +99,7 @@ Type SAL_CALL OComponentAccess::getElementType() throw( RuntimeException, std::e sal_Bool SAL_CALL OComponentAccess::hasElements() throw( RuntimeException, std::exception ) { // Ready for multithreading - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); // Set default return value, if method failed. sal_Bool bReturn = sal_False; diff --git a/framework/source/helper/ocomponentenumeration.cxx b/framework/source/helper/ocomponentenumeration.cxx index 9342deec2561..e7e1eaa86add 100644 --- a/framework/source/helper/ocomponentenumeration.cxx +++ b/framework/source/helper/ocomponentenumeration.cxx @@ -19,7 +19,7 @@ #include <helper/ocomponentenumeration.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <vcl/svapp.hxx> @@ -66,7 +66,7 @@ OComponentEnumeration::~OComponentEnumeration() void SAL_CALL OComponentEnumeration::disposing( const EventObject& aEvent ) throw( RuntimeException, std::exception ) { // Ready for multithreading - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); // Safe impossible cases // This method is not specified for all incoming parameters. @@ -82,7 +82,7 @@ void SAL_CALL OComponentEnumeration::disposing( const EventObject& aEvent ) thro sal_Bool SAL_CALL OComponentEnumeration::hasMoreElements() throw( RuntimeException, std::exception ) { // Ready for multithreading - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); // First position in a valid list is 0. // => The last one is getLength() - 1! @@ -99,7 +99,7 @@ Any SAL_CALL OComponentEnumeration::nextElement() throw( NoSuchElementExcepti RuntimeException, std::exception ) { // Ready for multithreading - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); // If we have no elements or end of enumeration is arrived ... if ( hasMoreElements() == sal_False ) diff --git a/framework/source/helper/oframes.cxx b/framework/source/helper/oframes.cxx index f0ce0c24611c..d20904a58c8d 100644 --- a/framework/source/helper/oframes.cxx +++ b/framework/source/helper/oframes.cxx @@ -19,7 +19,7 @@ #include <helper/oframes.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <com/sun/star/frame/XDesktop.hpp> #include <com/sun/star/frame/FrameSearchFlag.hpp> @@ -68,7 +68,7 @@ OFrames::~OFrames() void SAL_CALL OFrames::append( const css::uno::Reference< XFrame >& xFrame ) throw( RuntimeException, std::exception ) { // Ready for multithreading - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); // Safe impossible cases // Method is not defined for ALL incoming parameters! @@ -93,7 +93,7 @@ void SAL_CALL OFrames::append( const css::uno::Reference< XFrame >& xFrame ) thr void SAL_CALL OFrames::remove( const css::uno::Reference< XFrame >& xFrame ) throw( RuntimeException, std::exception ) { // Ready for multithreading - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); // Safe impossible cases // Method is not defined for ALL incoming parameters! @@ -119,7 +119,7 @@ void SAL_CALL OFrames::remove( const css::uno::Reference< XFrame >& xFrame ) thr Sequence< css::uno::Reference< XFrame > > SAL_CALL OFrames::queryFrames( sal_Int32 nSearchFlags ) throw( RuntimeException, std::exception ) { // Ready for multithreading - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); // Safe impossible cases // Method is not defined for ALL incoming parameters! @@ -225,7 +225,7 @@ Sequence< css::uno::Reference< XFrame > > SAL_CALL OFrames::queryFrames( sal_Int sal_Int32 SAL_CALL OFrames::getCount() throw( RuntimeException, std::exception ) { // Ready for multithreading - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); // Set default return value. sal_Int32 nCount = 0; @@ -251,7 +251,7 @@ Any SAL_CALL OFrames::getByIndex( sal_Int32 nIndex ) throw( IndexOutOfBoundsExce RuntimeException, std::exception ) { // Ready for multithreading - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); sal_uInt32 nCount = m_pFrameContainer->getCount(); if ( nIndex < 0 || ( sal::static_int_cast< sal_uInt32 >( nIndex ) >= nCount )) @@ -288,7 +288,7 @@ Type SAL_CALL OFrames::getElementType() throw( RuntimeException, std::exception sal_Bool SAL_CALL OFrames::hasElements() throw( RuntimeException, std::exception ) { // Ready for multithreading - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); // Set default return value. sal_Bool bHasElements = sal_False; diff --git a/framework/source/helper/uiconfigelementwrapperbase.cxx b/framework/source/helper/uiconfigelementwrapperbase.cxx index e9229ed2d369..446ab6ad86b3 100644 --- a/framework/source/helper/uiconfigelementwrapperbase.cxx +++ b/framework/source/helper/uiconfigelementwrapperbase.cxx @@ -20,7 +20,7 @@ #include <helper/uiconfigelementwrapperbase.hxx> #include <general.h> #include <properties.h> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <uielement/constitemcontainer.hxx> #include <uielement/rootitemcontainer.hxx> @@ -109,14 +109,14 @@ void SAL_CALL UIConfigElementWrapperBase::removeEventListener( const ::com::sun: void SAL_CALL UIConfigElementWrapperBase::disposing( const EventObject& ) throw( RuntimeException, std::exception ) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); m_xConfigSource.clear(); } void SAL_CALL UIConfigElementWrapperBase::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException, std::exception ) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( !m_bInitialized ) { @@ -452,7 +452,7 @@ const com::sun::star::uno::Sequence< com::sun::star::beans::Property > UIConfigE } void SAL_CALL UIConfigElementWrapperBase::setSettings( const Reference< XIndexAccess >& xSettings ) throw ( RuntimeException, std::exception ) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( xSettings.is() ) @@ -491,7 +491,7 @@ void UIConfigElementWrapperBase::impl_fillNewData() } Reference< XIndexAccess > SAL_CALL UIConfigElementWrapperBase::getSettings( sal_Bool bWriteable ) throw ( RuntimeException, std::exception ) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( bWriteable ) @@ -502,20 +502,20 @@ Reference< XIndexAccess > SAL_CALL UIConfigElementWrapperBase::getSettings( sal_ Reference< XFrame > SAL_CALL UIConfigElementWrapperBase::getFrame() throw (RuntimeException, std::exception) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); Reference< XFrame > xFrame( m_xWeakFrame ); return xFrame; } OUString SAL_CALL UIConfigElementWrapperBase::getResourceURL() throw (RuntimeException, std::exception) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); return m_aResourceURL; } ::sal_Int16 SAL_CALL UIConfigElementWrapperBase::getType() throw (RuntimeException, std::exception) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); return m_nType; } diff --git a/framework/source/helper/uielementwrapperbase.cxx b/framework/source/helper/uielementwrapperbase.cxx index 45f37902ef03..c59a1d8f42e9 100644 --- a/framework/source/helper/uielementwrapperbase.cxx +++ b/framework/source/helper/uielementwrapperbase.cxx @@ -20,7 +20,7 @@ #include <helper/uielementwrapperbase.hxx> #include <general.h> #include <properties.h> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/beans/PropertyValue.hpp> @@ -88,7 +88,7 @@ void SAL_CALL UIElementWrapperBase::removeEventListener( const ::com::sun::star: void SAL_CALL UIElementWrapperBase::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException, std::exception ) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( !m_bInitialized ) { diff --git a/framework/source/inc/loadenv/actionlockguard.hxx b/framework/source/inc/loadenv/actionlockguard.hxx index 0fb34d4d14a6..e3995504d8a5 100644 --- a/framework/source/inc/loadenv/actionlockguard.hxx +++ b/framework/source/inc/loadenv/actionlockguard.hxx @@ -22,7 +22,7 @@ #include <threadhelp/threadhelpbase.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <com/sun/star/document/XActionLockable.hpp> @@ -104,7 +104,7 @@ class ActionLockGuard : private ThreadHelpBase virtual sal_Bool setResource(const css::uno::Reference< css::document::XActionLockable >& xLock) { // SAFE -> .......................... - ResetableGuard aMutexLock(m_aLock); + Guard aMutexLock(m_aLock); if (m_bActionLocked || !xLock.is()) return sal_False; @@ -132,7 +132,7 @@ class ActionLockGuard : private ThreadHelpBase virtual void freeResource() { // SAFE -> .......................... - ResetableGuard aMutexLock(m_aLock); + Guard aMutexLock(m_aLock); css::uno::Reference< css::document::XActionLockable > xLock = m_xActionLock ; sal_Bool bLocked = m_bActionLocked; @@ -152,7 +152,7 @@ class ActionLockGuard : private ThreadHelpBase virtual void lock() { // SAFE -> .......................... - ResetableGuard aMutexLock(m_aLock); + Guard aMutexLock(m_aLock); if (!m_bActionLocked && m_xActionLock.is()) { @@ -167,7 +167,7 @@ class ActionLockGuard : private ThreadHelpBase virtual void unlock() { // SAFE -> .......................... - ResetableGuard aMutexLock(m_aLock); + Guard aMutexLock(m_aLock); if (m_bActionLocked && m_xActionLock.is()) { diff --git a/framework/source/jobs/helponstartup.cxx b/framework/source/jobs/helponstartup.cxx index 56d9acef8a3a..95f90c481af2 100644 --- a/framework/source/jobs/helponstartup.cxx +++ b/framework/source/jobs/helponstartup.cxx @@ -21,7 +21,7 @@ // include own header #include <jobs/helponstartup.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <loadenv/targethelper.hxx> #include <services.h> @@ -164,7 +164,7 @@ void SAL_CALL HelpOnStartup::disposing(const css::lang::EventObject& aEvent) throw(css::uno::RuntimeException, std::exception) { // SAFE -> - ResetableGuard aLock(m_aLock); + Guard aLock(m_aLock); if (aEvent.Source == m_xModuleManager) m_xModuleManager.clear(); @@ -211,7 +211,7 @@ OUString HelpOnStartup::its_getModuleIdFromEnv(const css::uno::Sequence< css::be // OK - now we are sure this document is a top level document. // Classify it. // SAFE -> - ResetableGuard aLock(m_aLock); + Guard aLock(m_aLock); css::uno::Reference< css::frame::XModuleManager2 > xModuleManager = m_xModuleManager; aLock.unlock(); // <- SAFE @@ -233,7 +233,7 @@ OUString HelpOnStartup::its_getModuleIdFromEnv(const css::uno::Sequence< css::be OUString HelpOnStartup::its_getCurrentHelpURL() { // SAFE -> - ResetableGuard aLock(m_aLock); + Guard aLock(m_aLock); css::uno::Reference< css::frame::XDesktop2 > xDesktop = m_xDesktop; aLock.unlock(); // <- SAFE @@ -278,7 +278,7 @@ OUString HelpOnStartup::its_getCurrentHelpURL() return sal_False; // SAFE -> - ResetableGuard aLock(m_aLock); + Guard aLock(m_aLock); css::uno::Reference< css::container::XNameAccess > xConfig = m_xConfig; OUString sLocale = m_sLocale; OUString sSystem = m_sSystem; @@ -322,7 +322,7 @@ OUString HelpOnStartup::its_getCurrentHelpURL() OUString HelpOnStartup::its_checkIfHelpEnabledAndGetURL(const OUString& sModule) { // SAFE -> - ResetableGuard aLock(m_aLock); + Guard aLock(m_aLock); css::uno::Reference< css::container::XNameAccess > xConfig = m_xConfig; OUString sLocale = m_sLocale; OUString sSystem = m_sSystem; diff --git a/framework/source/jobs/jobdispatch.cxx b/framework/source/jobs/jobdispatch.cxx index 57c63b915f8d..f39a26cb45f5 100644 --- a/framework/source/jobs/jobdispatch.cxx +++ b/framework/source/jobs/jobdispatch.cxx @@ -21,7 +21,6 @@ #include <jobs/joburl.hxx> #include <jobs/job.hxx> #include <threadhelp/guard.hxx> -#include <threadhelp/resetableguard.hxx> #include <threadhelp/threadhelpbase.hxx> #include <classes/converter.hxx> #include <general.h> diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx index 6531b129dc0c..0a9eb6b0a659 100644 --- a/framework/source/layoutmanager/helpers.cxx +++ b/framework/source/layoutmanager/helpers.cxx @@ -18,7 +18,6 @@ */ #include "helpers.hxx" -#include <threadhelp/resetableguard.hxx> #include <services.h> #include <com/sun/star/ui/DockingArea.hpp> diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index b464e8630693..2e9ce24b8472 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -20,7 +20,6 @@ #include <services/layoutmanager.hxx> #include <helpers.hxx> #include <threadhelp/guard.hxx> -#include <threadhelp/resetableguard.hxx> #include <framework/sfxhelperfunctions.hxx> #include <uielement/menubarwrapper.hxx> diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.hxx b/framework/source/layoutmanager/toolbarlayoutmanager.hxx index cc93864362e7..a507ea3d6f70 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.hxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.hxx @@ -26,7 +26,6 @@ #include <vector> #include <threadhelp/threadhelpbase.hxx> -#include <threadhelp/resetableguard.hxx> #include <macros/generic.hxx> #include <macros/xinterface.hxx> #include <macros/xtypeprovider.hxx> diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 948734e2a276..8079c4b5bf9d 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -24,7 +24,6 @@ #include <interaction/quietinteraction.hxx> #include <threadhelp/guard.hxx> -#include <threadhelp/resetableguard.hxx> #include <properties.h> #include <protocols.h> #include <services.h> diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index 042d3cbfc73e..4d571e31405f 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -32,7 +32,6 @@ #include <dispatch/dispatchinformationprovider.hxx> #include <classes/framecontainer.hxx> #include <classes/propertysethelper.hxx> -#include <threadhelp/resetableguard.hxx> #include <threadhelp/guard.hxx> #include <threadhelp/threadhelpbase.hxx> #include <threadhelp/transactionguard.hxx> diff --git a/framework/source/services/tabwindowservice.cxx b/framework/source/services/tabwindowservice.cxx index 6ef05ffea908..65d7110a8f64 100644 --- a/framework/source/services/tabwindowservice.cxx +++ b/framework/source/services/tabwindowservice.cxx @@ -18,7 +18,7 @@ */ #include <classes/fwktabwindow.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <services.h> #include <properties.h> @@ -241,7 +241,7 @@ void TabWindowService::initProperties() TabWindowService::~TabWindowService() { // SAFE-> - ResetableGuard aGuard(m_aLock); + Guard aGuard(m_aLock); if (m_pTabWin) m_pTabWin->RemoveEventListener( LINK( this, TabWindowService, EventListener ) ); @@ -254,7 +254,7 @@ TabWindowService::~TabWindowService() throw ( css::uno::RuntimeException, std::exception ) { // SAFE -> - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); ::sal_Int32 nID = m_nPageIndexCounter++; TTabPageInfo aInfo(nID); @@ -272,7 +272,7 @@ void SAL_CALL TabWindowService::removeTab(::sal_Int32 nID) css::uno::RuntimeException, std::exception ) { // SAFE -> - ResetableGuard aGuard(m_aLock); + Guard aGuard(m_aLock); // throws suitable IndexOutOfBoundsException .-) TTabPageInfoHash::iterator pIt = impl_getTabPageInfo (nID); @@ -292,7 +292,7 @@ void SAL_CALL TabWindowService::setTabProps( ::sal_Int32 css::uno::RuntimeException, std::exception ) { // SAFE -> - ResetableGuard aGuard(m_aLock); + Guard aGuard(m_aLock); // throws suitable IndexOutOfBoundsException .-) TTabPageInfoHash::iterator pIt = impl_getTabPageInfo (nID); @@ -318,7 +318,7 @@ css::uno::Sequence< css::beans::NamedValue > SAL_CALL TabWindowService::getTabPr css::uno::RuntimeException, std::exception ) { // SAFE -> - ResetableGuard aGuard(m_aLock); + Guard aGuard(m_aLock); // throws suitable IndexOutOfBoundsException .-) TTabPageInfoHash::const_iterator pIt = impl_getTabPageInfo (nID); @@ -335,7 +335,7 @@ void SAL_CALL TabWindowService::activateTab(::sal_Int32 nID) css::uno::RuntimeException, std::exception ) { // SAFE -> - ResetableGuard aGuard(m_aLock); + Guard aGuard(m_aLock); // throws suitable IndexOutOfBoundsException .-) impl_checkTabIndex (nID); @@ -353,7 +353,7 @@ void SAL_CALL TabWindowService::activateTab(::sal_Int32 nID) throw (css::uno::RuntimeException, std::exception) { // SAFE-> - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); return m_nCurrentPageIndex; } @@ -382,7 +382,7 @@ void SAL_CALL TabWindowService::dispose() throw (css::uno::RuntimeException, std::exception) { // SAFE-> - ResetableGuard aGuard(m_aLock); + Guard aGuard(m_aLock); css::uno::Reference< css::uno::XInterface > xThis(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY); css::lang::EventObject aEvent(xThis); diff --git a/framework/source/tabwin/tabwindow.cxx b/framework/source/tabwin/tabwindow.cxx index 2e223256526b..99664b87c5b1 100644 --- a/framework/source/tabwin/tabwindow.cxx +++ b/framework/source/tabwin/tabwindow.cxx @@ -20,7 +20,7 @@ #include <tabwin/tabwindow.hxx> #include <properties.h> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/awt/Toolkit.hpp> @@ -112,7 +112,7 @@ void TabWindow::implts_LayoutWindows() const const sal_Int32 nTabControlHeight = 30; /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); css::uno::Reference< css::awt::XDevice > xDevice( m_xTopWindow, css::uno::UNO_QUERY ); css::uno::Reference< css::awt::XWindow > xWindow( m_xTopWindow, css::uno::UNO_QUERY ); css::uno::Reference< css::awt::XWindow > xTabControlWindow( m_xTabControlWindow ); @@ -239,7 +239,7 @@ void TabWindow::implts_SendNotification( Notification eNotify, sal_Int32 ID, con IMPL_LINK( TabWindow, Activate, TabControl*, pTabControl ) { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); sal_Int32 nPageId = pTabControl->GetCurPageId(); @@ -256,7 +256,7 @@ IMPL_LINK( TabWindow, Activate, TabControl*, pTabControl ) IMPL_LINK( TabWindow, Deactivate, TabControl*, pTabControl ) { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); sal_Int32 nPageId = pTabControl->GetCurPageId(); aLock.unlock(); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ @@ -280,7 +280,7 @@ throw (css::uno::Exception, css::uno::RuntimeException, std::exception) css::awt::Size aSize( aDefaultSize ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); sal_Bool bInitalized( m_bInitialized ); css::uno::Reference< css::uno::XComponentContext > xContext( m_xContext ); aLock.unlock(); @@ -436,7 +436,7 @@ void SAL_CALL TabWindow::dispose() throw (css::uno::RuntimeException, std::excep m_aListenerContainer.disposeAndClear( aEvent ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); css::uno::Reference< css::awt::XWindow > xTabControlWindow( m_xTabControlWindow ); css::uno::Reference< css::awt::XWindow > xContainerWindow( m_xContainerWindow ); css::uno::Reference< css::awt::XTopWindow > xTopWindow( m_xTopWindow ); @@ -469,7 +469,7 @@ void SAL_CALL TabWindow::addEventListener( const css::uno::Reference< css::lang: throw (css::uno::RuntimeException, std::exception) { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) return; aLock.unlock(); @@ -482,7 +482,7 @@ void SAL_CALL TabWindow::removeEventListener( const css::uno::Reference< css::la throw (css::uno::RuntimeException, std::exception) { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) return; aLock.unlock(); @@ -517,7 +517,7 @@ void SAL_CALL TabWindow::windowShown( const css::lang::EventObject& ) throw( css::uno::RuntimeException, std::exception ) { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); TabControl* pTabControl = impl_GetTabControl( m_xTabControlWindow ); if ( pTabControl ) @@ -535,7 +535,7 @@ void SAL_CALL TabWindow::windowHidden( const css::lang::EventObject& ) throw( css::uno::RuntimeException, std::exception ) { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_xContainerWindow.is() ) { Window* pWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); @@ -597,7 +597,7 @@ throw (css::uno::RuntimeException, std::exception) throw (css::uno::RuntimeException, std::exception) { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) throw css::lang::DisposedException(); @@ -620,7 +620,7 @@ void SAL_CALL TabWindow::removeTab( ::sal_Int32 ID ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) throw css::lang::DisposedException(); @@ -653,7 +653,7 @@ void SAL_CALL TabWindow::setTabProps( ::sal_Int32 ID, const css::uno::Sequence< throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) throw css::lang::DisposedException(); @@ -699,7 +699,7 @@ css::uno::Sequence< css::beans::NamedValue > SAL_CALL TabWindow::getTabProps( :: throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) throw css::lang::DisposedException(); @@ -734,7 +734,7 @@ void SAL_CALL TabWindow::activateTab( ::sal_Int32 ID ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) throw css::lang::DisposedException(); @@ -767,7 +767,7 @@ throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::ex throw (css::uno::RuntimeException, std::exception) { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) throw css::lang::DisposedException(); @@ -791,7 +791,7 @@ void SAL_CALL TabWindow::addTabListener( throw (css::uno::RuntimeException, std::exception) { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) return; aLock.unlock(); @@ -805,7 +805,7 @@ void SAL_CALL TabWindow::removeTabListener( const css::uno::Reference< css::awt: throw (css::uno::RuntimeException, std::exception) { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) return; aLock.unlock(); diff --git a/framework/source/tabwin/tabwinfactory.cxx b/framework/source/tabwin/tabwinfactory.cxx index b5486723b5f9..373a48df59e8 100644 --- a/framework/source/tabwin/tabwinfactory.cxx +++ b/framework/source/tabwin/tabwinfactory.cxx @@ -20,7 +20,7 @@ #include <tabwin/tabwinfactory.hxx> #include <tabwin/tabwindow.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/lang/XInitialization.hpp> @@ -80,7 +80,7 @@ throw ( css::uno::Exception, css::uno::RuntimeException, std::exception ) const OUString aTopWindowArgName( "TopWindow"); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); css::uno::Reference< css::awt::XToolkit2 > xToolkit = m_xToolkit; css::uno::Reference< css::uno::XComponentContext > xContext( m_xContext ); aLock.unlock(); diff --git a/framework/source/uiconfiguration/globalsettings.cxx b/framework/source/uiconfiguration/globalsettings.cxx index 4b52cbba2fa6..437234c983f2 100644 --- a/framework/source/uiconfiguration/globalsettings.cxx +++ b/framework/source/uiconfiguration/globalsettings.cxx @@ -18,7 +18,7 @@ */ #include "uiconfiguration/globalsettings.hxx" -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include "services.h" #include <com/sun/star/beans/PropertyValue.hpp> @@ -119,7 +119,7 @@ void SAL_CALL GlobalSettings_Access::dispose() throw ( css::uno::RuntimeException, std::exception ) { // SAFE - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); m_xConfigAccess.clear(); m_bDisposed = sal_True; @@ -140,14 +140,14 @@ void SAL_CALL GlobalSettings_Access::disposing( const css::lang::EventObject& ) throw (css::uno::RuntimeException, std::exception) { // SAFE - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); m_xConfigAccess.clear(); } // settings access sal_Bool GlobalSettings_Access::HasStatesInfo( GlobalSettings::UIElementType eElementType ) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( eElementType == GlobalSettings::UIELEMENT_TYPE_DOCKWINDOW ) return sal_False; else if ( eElementType == GlobalSettings::UIELEMENT_TYPE_STATUSBAR ) @@ -185,7 +185,7 @@ sal_Bool GlobalSettings_Access::HasStatesInfo( GlobalSettings::UIElementType eEl sal_Bool GlobalSettings_Access::GetStateInfo( GlobalSettings::UIElementType eElementType, GlobalSettings::StateInfo eStateInfo, ::com::sun::star::uno::Any& aValue ) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( eElementType == GlobalSettings::UIELEMENT_TYPE_DOCKWINDOW ) return sal_False; else if ( eElementType == GlobalSettings::UIELEMENT_TYPE_STATUSBAR ) diff --git a/framework/source/uiconfiguration/imagemanager.cxx b/framework/source/uiconfiguration/imagemanager.cxx index b42a0b5319f1..5fc2d3020a29 100644 --- a/framework/source/uiconfiguration/imagemanager.cxx +++ b/framework/source/uiconfiguration/imagemanager.cxx @@ -19,7 +19,7 @@ #include <uiconfiguration/imagemanager.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <xml/imagesconfiguration.hxx> #include <uiconfiguration/graphicnameaccess.hxx> #include "imagemanagerimpl.hxx" @@ -91,7 +91,7 @@ void SAL_CALL ImageManager::removeEventListener( const uno::Reference< XEventLis void ImageManager::setStorage( const uno::Reference< XStorage >& Storage ) throw (::com::sun::star::uno::RuntimeException) { - ResetableGuard aLock( m_pImpl->m_aLock ); + Guard aLock( m_pImpl->m_aLock ); m_pImpl->m_xUserConfigStorage = Storage; m_pImpl->implts_initialize(); diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx index 076c6291c014..5c6d2a612c79 100644 --- a/framework/source/uiconfiguration/imagemanagerimpl.cxx +++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx @@ -19,7 +19,7 @@ #include <imagemanagerimpl.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <xml/imagesconfiguration.hxx> #include <uiconfiguration/graphicnameaccess.hxx> #include <services.h> @@ -421,7 +421,7 @@ static sal_Int16 implts_convertImageTypeToIndex( sal_Int16 nImageType ) ImageList* ImageManagerImpl::implts_getUserImageList( ImageType nImageType ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( !m_pUserImageList[nImageType] ) implts_loadUserImages( nImageType, m_xUserImageStorage, m_xUserBitmapsStorage ); @@ -468,7 +468,7 @@ sal_Bool ImageManagerImpl::implts_loadUserImages( const uno::Reference< XStorage >& xUserImageStorage, const uno::Reference< XStorage >& xUserBitmapsStorage ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( xUserImageStorage.is() && xUserBitmapsStorage.is() ) { @@ -548,7 +548,7 @@ sal_Bool ImageManagerImpl::implts_storeUserImages( const uno::Reference< XStorage >& xUserImageStorage, const uno::Reference< XStorage >& xUserBitmapsStorage ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bModified ) { @@ -650,7 +650,7 @@ sal_Bool ImageManagerImpl::implts_storeUserImages( const rtl::Reference< GlobalImageList >& ImageManagerImpl::implts_getGlobalImageList() { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( !m_pGlobalImageList.is() ) m_pGlobalImageList = getGlobalImageList( m_xContext ); @@ -659,7 +659,7 @@ const rtl::Reference< GlobalImageList >& ImageManagerImpl::implts_getGlobalImage CmdImageList* ImageManagerImpl::implts_getDefaultImageList() { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( !m_pDefaultImageList ) m_pDefaultImageList = new CmdImageList( m_xContext, m_aModuleIdentifier ); @@ -701,7 +701,7 @@ void ImageManagerImpl::dispose() m_aListenerContainer.disposeAndClear( aEvent ); { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); m_xUserConfigStorage.clear(); m_xUserImageStorage.clear(); m_xUserRootCommit.clear(); @@ -723,7 +723,7 @@ void ImageManagerImpl::dispose() void ImageManagerImpl::addEventListener( const uno::Reference< XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException) { { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( m_bDisposed ) @@ -742,7 +742,7 @@ void ImageManagerImpl::removeEventListener( const uno::Reference< XEventListener // XInitialization void ImageManagerImpl::initialize( const Sequence< Any >& aArguments ) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( !m_bInitialized ) { @@ -787,7 +787,7 @@ void ImageManagerImpl::initialize( const Sequence< Any >& aArguments ) void ImageManagerImpl::reset() throw (::com::sun::star::uno::RuntimeException) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( m_bDisposed ) @@ -817,7 +817,7 @@ throw (::com::sun::star::uno::RuntimeException) Sequence< OUString > ImageManagerImpl::getAllImageNames( ::sal_Int16 nImageType ) throw (::com::sun::star::uno::RuntimeException) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( m_bDisposed ) @@ -862,7 +862,7 @@ throw (::com::sun::star::uno::RuntimeException) ::sal_Bool ImageManagerImpl::hasImage( ::sal_Int16 nImageType, const OUString& aCommandURL ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( m_bDisposed ) @@ -895,7 +895,7 @@ Sequence< uno::Reference< XGraphic > > ImageManagerImpl::getImages( const Sequence< OUString >& aCommandURLSequence ) throw ( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( m_bDisposed ) @@ -950,7 +950,7 @@ throw ( ::com::sun::star::lang::IllegalArgumentException, CmdToXGraphicNameAccess* pReplacedImages( 0 ); { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( m_bDisposed ) @@ -1033,7 +1033,7 @@ throw ( ::com::sun::star::lang::IllegalArgumentException, CmdToXGraphicNameAccess* pReplacedImages( 0 ); { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( m_bDisposed ) @@ -1143,7 +1143,7 @@ void ImageManagerImpl::reload() throw ( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1295,7 +1295,7 @@ void ImageManagerImpl::store() ::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1330,7 +1330,7 @@ void ImageManagerImpl::storeToStorage( const uno::Reference< XStorage >& Storage ::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1361,13 +1361,13 @@ void ImageManagerImpl::storeToStorage( const uno::Reference< XStorage >& Storage sal_Bool ImageManagerImpl::isModified() throw (::com::sun::star::uno::RuntimeException) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); return m_bModified; } sal_Bool ImageManagerImpl::isReadOnly() throw (::com::sun::star::uno::RuntimeException) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); return m_bReadOnly; } // XUIConfiguration @@ -1375,7 +1375,7 @@ void ImageManagerImpl::addConfigurationListener( const uno::Reference< ::com::su throw (::com::sun::star::uno::RuntimeException) { { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( m_bDisposed ) @@ -1426,7 +1426,7 @@ void ImageManagerImpl::implts_notifyContainerListener( const ConfigurationEvent& } void ImageManagerImpl::clear() { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); for ( sal_Int32 n = 0; n < ImageType_COUNT; n++ ) { diff --git a/framework/source/uiconfiguration/moduleimagemanager.cxx b/framework/source/uiconfiguration/moduleimagemanager.cxx index 8405d23b5fc2..1387d06eee6b 100644 --- a/framework/source/uiconfiguration/moduleimagemanager.cxx +++ b/framework/source/uiconfiguration/moduleimagemanager.cxx @@ -19,7 +19,6 @@ #include <uiconfiguration/moduleimagemanager.hxx> -#include <threadhelp/resetableguard.hxx> #include <xml/imagesconfiguration.hxx> #include <uiconfiguration/graphicnameaccess.hxx> #include <services.h> diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index 02c15be672cb..a724e1d0f668 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -20,7 +20,7 @@ #include <accelerators/presethandler.hxx> #include <uiconfiguration/moduleimagemanager.hxx> #include <threadhelp/threadhelpbase.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <stdtypes.h> #include <uielement/constitemcontainer.hxx> #include <uielement/rootitemcontainer.hxx> @@ -869,7 +869,7 @@ ModuleUIConfigurationManager::ModuleUIConfigurationManager( m_aUIElements[LAYER_DEFAULT].resize( ::com::sun::star::ui::UIElementType::COUNT ); m_aUIElements[LAYER_USERDEFINED].resize( ::com::sun::star::ui::UIElementType::COUNT ); - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if( aArguments.getLength() == 2 && (aArguments[0] >>= m_aModuleShortName) && (aArguments[1] >>= m_aModuleIdentifier)) { @@ -939,7 +939,7 @@ void SAL_CALL ModuleUIConfigurationManager::dispose() throw (::com::sun::star::u m_aListenerContainer.disposeAndClear( aEvent ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); Reference< XComponent > xModuleImageManager( m_xModuleImageManager ); m_xModuleImageManager.clear(); Reference< XComponent > xCompMAM( m_xModuleAcceleratorManager, UNO_QUERY ); @@ -970,7 +970,7 @@ void SAL_CALL ModuleUIConfigurationManager::dispose() throw (::com::sun::star::u void SAL_CALL ModuleUIConfigurationManager::addEventListener( const Reference< XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) { { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( m_bDisposed ) @@ -990,7 +990,7 @@ void SAL_CALL ModuleUIConfigurationManager::removeEventListener( const Reference void SAL_CALL ModuleUIConfigurationManager::addConfigurationListener( const Reference< ::com::sun::star::ui::XUIConfigurationListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) { { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( m_bDisposed ) @@ -1010,7 +1010,7 @@ void SAL_CALL ModuleUIConfigurationManager::removeConfigurationListener( const R // XUIConfigurationManager void SAL_CALL ModuleUIConfigurationManager::reset() throw (::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( m_bDisposed ) @@ -1101,7 +1101,7 @@ throw ( IllegalArgumentException, RuntimeException, std::exception ) if (( ElementType < 0 ) || ( ElementType >= ::com::sun::star::ui::UIElementType::COUNT )) throw IllegalArgumentException(); - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1137,7 +1137,7 @@ throw ( IllegalArgumentException, RuntimeException, std::exception ) Reference< XIndexContainer > SAL_CALL ModuleUIConfigurationManager::createSettings() throw (::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1156,7 +1156,7 @@ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno:: throw IllegalArgumentException(); else { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1179,7 +1179,7 @@ throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::la throw IllegalArgumentException(); else { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1210,7 +1210,7 @@ throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::la throw IllegalAccessException(); else { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1317,7 +1317,7 @@ throw ( NoSuchElementException, IllegalArgumentException, IllegalAccessException throw IllegalAccessException(); else { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1395,7 +1395,7 @@ throw ( ElementExistException, IllegalArgumentException, IllegalAccessException, throw IllegalAccessException(); else { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1447,7 +1447,7 @@ throw ( ElementExistException, IllegalArgumentException, IllegalAccessException, Reference< XInterface > SAL_CALL ModuleUIConfigurationManager::getImageManager() throw (::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1478,7 +1478,7 @@ Reference< XInterface > SAL_CALL ModuleUIConfigurationManager::getImageManager() Reference< ui::XAcceleratorConfiguration > SAL_CALL ModuleUIConfigurationManager::getShortCutManager() throw (::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1513,7 +1513,7 @@ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno:: throw IllegalArgumentException(); else { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1536,7 +1536,7 @@ throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::la throw IllegalArgumentException(); else { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1562,7 +1562,7 @@ throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::la // XUIConfigurationPersistence void SAL_CALL ModuleUIConfigurationManager::reload() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1603,7 +1603,7 @@ void SAL_CALL ModuleUIConfigurationManager::reload() throw (::com::sun::star::un void SAL_CALL ModuleUIConfigurationManager::store() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1636,7 +1636,7 @@ void SAL_CALL ModuleUIConfigurationManager::store() throw (::com::sun::star::uno void SAL_CALL ModuleUIConfigurationManager::storeToStorage( const Reference< XStorage >& Storage ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1669,14 +1669,14 @@ void SAL_CALL ModuleUIConfigurationManager::storeToStorage( const Reference< XSt sal_Bool SAL_CALL ModuleUIConfigurationManager::isModified() throw (::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); return m_bModified; } sal_Bool SAL_CALL ModuleUIConfigurationManager::isReadOnly() throw (::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); return m_bReadOnly; } diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx index 33a0845e4a0a..f531615d711d 100644 --- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <threadhelp/threadhelpbase.hxx> #include <uiconfiguration/imagemanager.hxx> #include <uielement/rootitemcontainer.hxx> @@ -717,7 +717,7 @@ void SAL_CALL UIConfigurationManager::dispose() throw (::com::sun::star::uno::Ru m_aListenerContainer.disposeAndClear( aEvent ); { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); try { if ( m_xImageManager.is() ) @@ -739,7 +739,7 @@ void SAL_CALL UIConfigurationManager::dispose() throw (::com::sun::star::uno::Ru void SAL_CALL UIConfigurationManager::addEventListener( const Reference< XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) { { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( m_bDisposed ) @@ -759,7 +759,7 @@ void SAL_CALL UIConfigurationManager::removeEventListener( const Reference< XEve void SAL_CALL UIConfigurationManager::addConfigurationListener( const Reference< ::com::sun::star::ui::XUIConfigurationListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) { { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( m_bDisposed ) @@ -778,7 +778,7 @@ void SAL_CALL UIConfigurationManager::removeConfigurationListener( const Referen void SAL_CALL UIConfigurationManager::reset() throw (::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( m_bDisposed ) @@ -867,7 +867,7 @@ throw ( IllegalArgumentException, RuntimeException, std::exception ) if (( ElementType < 0 ) || ( ElementType >= ::com::sun::star::ui::UIElementType::COUNT )) throw IllegalArgumentException(); - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -903,7 +903,7 @@ throw ( IllegalArgumentException, RuntimeException, std::exception ) Reference< XIndexContainer > SAL_CALL UIConfigurationManager::createSettings() throw (::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -940,7 +940,7 @@ throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::la throw IllegalArgumentException(); else { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -971,7 +971,7 @@ throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::la throw IllegalAccessException(); else { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1029,7 +1029,7 @@ throw ( NoSuchElementException, IllegalArgumentException, IllegalAccessException throw IllegalAccessException(); else { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1086,7 +1086,7 @@ throw ( ElementExistException, IllegalArgumentException, IllegalAccessException, throw IllegalAccessException(); else { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1176,7 +1176,7 @@ Reference< XInterface > SAL_CALL UIConfigurationManager::getImageManager() throw Reference< XAcceleratorConfiguration > SAL_CALL UIConfigurationManager::getShortCutManager() throw (::com::sun::star::uno::RuntimeException, std::exception) { // SAFE -> - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if (!m_xAccConfig.is()) try { @@ -1200,7 +1200,7 @@ Reference< XInterface > SAL_CALL UIConfigurationManager::getEventsManager() thro // XUIConfigurationStorage void SAL_CALL UIConfigurationManager::setStorage( const Reference< XStorage >& Storage ) throw (::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1260,7 +1260,7 @@ void SAL_CALL UIConfigurationManager::setStorage( const Reference< XStorage >& S sal_Bool SAL_CALL UIConfigurationManager::hasStorage() throw (::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1271,7 +1271,7 @@ sal_Bool SAL_CALL UIConfigurationManager::hasStorage() throw (::com::sun::star:: // XUIConfigurationPersistence void SAL_CALL UIConfigurationManager::reload() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1310,7 +1310,7 @@ void SAL_CALL UIConfigurationManager::reload() throw (::com::sun::star::uno::Exc void SAL_CALL UIConfigurationManager::store() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1343,7 +1343,7 @@ void SAL_CALL UIConfigurationManager::store() throw (::com::sun::star::uno::Exce void SAL_CALL UIConfigurationManager::storeToStorage( const Reference< XStorage >& Storage ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -1376,14 +1376,14 @@ void SAL_CALL UIConfigurationManager::storeToStorage( const Reference< XStorage sal_Bool SAL_CALL UIConfigurationManager::isModified() throw (::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); return m_bModified; } sal_Bool SAL_CALL UIConfigurationManager::isReadOnly() throw (::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); return m_bReadOnly; } diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx index 1a95e500ae6b..42b22c6ed9e3 100644 --- a/framework/source/uielement/addonstoolbarmanager.cxx +++ b/framework/source/uielement/addonstoolbarmanager.cxx @@ -21,7 +21,7 @@ #include <uielement/toolbarmerger.hxx> #include <uielement/generictoolbarcontroller.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include "services.h" #include <framework/imageproducer.hxx> #include <framework/sfxhelperfunctions.hxx> @@ -145,7 +145,7 @@ void SAL_CALL AddonsToolBarManager::dispose() throw( RuntimeException, std::exce { // Remove addon specific data from toolbar items. - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); for ( sal_uInt16 n = 0; n < m_pToolBar->GetItemCount(); n++ ) { sal_uInt16 nId( m_pToolBar->GetItemId( n ) ); @@ -201,7 +201,7 @@ void AddonsToolBarManager::RefreshImages() void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue > >& rAddonToolbar ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return; @@ -422,7 +422,7 @@ IMPL_LINK_NOARG(AddonsToolBarManager, DoubleClick) IMPL_LINK_NOARG(AddonsToolBarManager, Command) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return 1; diff --git a/framework/source/uielement/addonstoolbarwrapper.cxx b/framework/source/uielement/addonstoolbarwrapper.cxx index e0aa84977032..75418fab3a0f 100644 --- a/framework/source/uielement/addonstoolbarwrapper.cxx +++ b/framework/source/uielement/addonstoolbarwrapper.cxx @@ -18,7 +18,7 @@ */ #include <uielement/addonstoolbarwrapper.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <framework/actiontriggerhelper.hxx> #include <uielement/constitemcontainer.hxx> #include <uielement/rootitemcontainer.hxx> @@ -71,7 +71,7 @@ void SAL_CALL AddonsToolBarWrapper::dispose() throw ( RuntimeException, std::exc com::sun::star::lang::EventObject aEvent( xThis ); m_aListenerContainer.disposeAndClear( aEvent ); - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_xToolBarManager.is() ) m_xToolBarManager->dispose(); @@ -83,7 +83,7 @@ void SAL_CALL AddonsToolBarWrapper::dispose() throw ( RuntimeException, std::exc // XInitialization void SAL_CALL AddonsToolBarWrapper::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException, std::exception ) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -145,7 +145,7 @@ void SAL_CALL AddonsToolBarWrapper::initialize( const Sequence< Any >& aArgument // XUIElement interface Reference< XInterface > SAL_CALL AddonsToolBarWrapper::getRealInterface() throw (::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_xToolBarManager.is() ) { @@ -163,7 +163,7 @@ Reference< XInterface > SAL_CALL AddonsToolBarWrapper::getRealInterface() throw // allow late population of images for add-on toolbars void AddonsToolBarWrapper::populateImages() { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if (m_bCreatedImages) return; diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx index 67b67d28715a..fb3180058166 100644 --- a/framework/source/uielement/controlmenucontroller.cxx +++ b/framework/source/uielement/controlmenucontroller.cxx @@ -19,7 +19,6 @@ #include <sal/config.h> -#include <threadhelp/resetableguard.hxx> #include <stdtypes.h> #include <com/sun/star/beans/PropertyValue.hpp> diff --git a/framework/source/uielement/fontmenucontroller.cxx b/framework/source/uielement/fontmenucontroller.cxx index be85882478f6..14b00fb689b0 100644 --- a/framework/source/uielement/fontmenucontroller.cxx +++ b/framework/source/uielement/fontmenucontroller.cxx @@ -19,7 +19,6 @@ #include <uielement/fontmenucontroller.hxx> -#include <threadhelp/resetableguard.hxx> #include "services.h" #include <com/sun/star/awt/XDevice.hpp> diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx index 124c29212aa7..615408800fad 100644 --- a/framework/source/uielement/fontsizemenucontroller.cxx +++ b/framework/source/uielement/fontsizemenucontroller.cxx @@ -19,7 +19,6 @@ #include <uielement/fontsizemenucontroller.hxx> -#include <threadhelp/resetableguard.hxx> #include "services.h" #include <com/sun/star/awt/XDevice.hpp> diff --git a/framework/source/uielement/footermenucontroller.cxx b/framework/source/uielement/footermenucontroller.cxx index 1b866b0a88b3..454a51ebfa0f 100644 --- a/framework/source/uielement/footermenucontroller.cxx +++ b/framework/source/uielement/footermenucontroller.cxx @@ -19,7 +19,6 @@ #include <uielement/footermenucontroller.hxx> -#include <threadhelp/resetableguard.hxx> #include "services.h" #include <classes/resource.hrc> #include <classes/fwlresid.hxx> diff --git a/framework/source/uielement/headermenucontroller.cxx b/framework/source/uielement/headermenucontroller.cxx index 273956e6c68a..3ba2c31a8d0a 100644 --- a/framework/source/uielement/headermenucontroller.cxx +++ b/framework/source/uielement/headermenucontroller.cxx @@ -19,7 +19,6 @@ #include <uielement/headermenucontroller.hxx> -#include <threadhelp/resetableguard.hxx> #include "services.h" #include <classes/resource.hrc> diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx index 952a03b18ff2..1dea200e3f9a 100644 --- a/framework/source/uielement/langselectionmenucontroller.cxx +++ b/framework/source/uielement/langselectionmenucontroller.cxx @@ -20,7 +20,6 @@ #include <uielement/langselectionmenucontroller.hxx> -#include <threadhelp/resetableguard.hxx> #include "services.h" #include <com/sun/star/awt/XDevice.hpp> diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx index 5c0979180ac9..ed33743c3236 100644 --- a/framework/source/uielement/macrosmenucontroller.cxx +++ b/framework/source/uielement/macrosmenucontroller.cxx @@ -20,7 +20,6 @@ #include <uielement/macrosmenucontroller.hxx> #include <uielement/menubarmanager.hxx> -#include <threadhelp/resetableguard.hxx> #include "services.h" #include <classes/resource.hrc> #include <classes/fwkresid.hxx> diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 228e7a3ff938..17736663423f 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -22,7 +22,7 @@ #include <framework/bmkmenu.hxx> #include <framework/addonmenu.hxx> #include <framework/imageproducer.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include "framework/addonsoptions.hxx" #include <classes/fwkresid.hxx> #include <classes/menumanager.hxx> @@ -258,7 +258,7 @@ void SAL_CALL MenuBarManager::release() throw() Any SAL_CALL MenuBarManager::getMenuHandle( const Sequence< sal_Int8 >& /*ProcessId*/, sal_Int16 SystemType ) throw (RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw com::sun::star::lang::DisposedException(); @@ -335,7 +335,7 @@ void SAL_CALL MenuBarManager::dispose() throw( RuntimeException, std::exception m_aListenerContainer.disposeAndClear( aEvent ); { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); Destroy(); m_bDisposed = sal_True; @@ -379,7 +379,7 @@ void SAL_CALL MenuBarManager::dispose() throw( RuntimeException, std::exception void SAL_CALL MenuBarManager::addEventListener( const Reference< XEventListener >& xListener ) throw( RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( m_bDisposed ) @@ -390,7 +390,7 @@ void SAL_CALL MenuBarManager::addEventListener( const Reference< XEventListener void SAL_CALL MenuBarManager::removeEventListener( const Reference< XEventListener >& xListener ) throw( RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ m_aListenerContainer.removeInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener ); } @@ -398,7 +398,7 @@ void SAL_CALL MenuBarManager::removeEventListener( const Reference< XEventListen void SAL_CALL MenuBarManager::elementInserted( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( m_bDisposed ) @@ -427,7 +427,7 @@ throw (RuntimeException, std::exception) void SAL_CALL MenuBarManager::frameAction( const FrameActionEvent& Action ) throw ( RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) throw com::sun::star::lang::DisposedException(); @@ -452,7 +452,7 @@ throw ( RuntimeException, std::exception ) SolarMutexGuard aSolarGuard; { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return; @@ -541,7 +541,7 @@ throw ( RuntimeException, std::exception ) // Helper to retrieve own structure from item ID MenuBarManager::MenuItemHandler* MenuBarManager::GetMenuItemHandler( sal_uInt16 nItemId ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); std::vector< MenuItemHandler* >::iterator p; for ( p = m_aMenuItemHandlerVector.begin(); p != m_aMenuItemHandlerVector.end(); ++p ) @@ -574,7 +574,7 @@ void MenuBarManager::RequestImages() // Helper to reset objects to prepare shutdown void MenuBarManager::RemoveListener() { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); // Check service manager reference. Remove listener can be called due // to a disposing call from the frame and therefore we already removed @@ -657,7 +657,7 @@ void SAL_CALL MenuBarManager::disposing( const EventObject& Source ) throw ( Run { MenuItemHandler* pMenuItemDisposing = NULL; - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); std::vector< MenuItemHandler* >::iterator p; for ( p = m_aMenuItemHandlerVector.begin(); p != m_aMenuItemHandlerVector.end(); ++p ) @@ -802,7 +802,7 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu ) sal_Bool bShowMenuImages = rSettings.GetUseImagesInMenus(); sal_Bool bHasDisabledEntries = SvtCommandOptions().HasEntries( SvtCommandOptions::CMDOPTION_DISABLED ); - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); sal_uInt16 nFlag = pMenu->GetMenuFlags(); if ( bDontHide ) @@ -1028,7 +1028,7 @@ IMPL_LINK( MenuBarManager, Select, Menu *, pMenu ) Reference< XDispatch > xDispatch; { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); sal_uInt16 nCurItemId = pMenu->GetCurItemId(); sal_uInt16 nCurPos = pMenu->GetItemPos( nCurItemId ); @@ -1823,7 +1823,7 @@ void MenuBarManager::MergeAddonMenus( void MenuBarManager::SetItemContainer( const Reference< XIndexAccess >& rItemContainer ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); Reference< XFrame > xFrame = m_xFrame; diff --git a/framework/source/uielement/menubarwrapper.cxx b/framework/source/uielement/menubarwrapper.cxx index 815382529c76..2da99756bdf3 100644 --- a/framework/source/uielement/menubarwrapper.cxx +++ b/framework/source/uielement/menubarwrapper.cxx @@ -18,7 +18,7 @@ */ #include <uielement/menubarwrapper.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <framework/actiontriggerhelper.hxx> #include <services.h> @@ -98,7 +98,7 @@ void SAL_CALL MenuBarWrapper::dispose() throw (::com::sun::star::uno::RuntimeExc com::sun::star::lang::EventObject aEvent( xThis ); m_aListenerContainer.disposeAndClear( aEvent ); - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); m_xMenuBarManager->dispose(); m_xMenuBarManager.clear(); @@ -113,7 +113,7 @@ void SAL_CALL MenuBarWrapper::dispose() throw (::com::sun::star::uno::RuntimeExc void SAL_CALL MenuBarWrapper::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException, std::exception ) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -202,7 +202,7 @@ void SAL_CALL MenuBarWrapper::initialize( const Sequence< Any >& aArguments ) th // XUIElementSettings void SAL_CALL MenuBarWrapper::updateSettings() throw ( RuntimeException, std::exception ) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -261,7 +261,7 @@ throw (::com::sun::star::uno::RuntimeException, std::exception) ::sal_Bool SAL_CALL MenuBarWrapper::hasElements() throw (::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -277,7 +277,7 @@ throw ( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -298,7 +298,7 @@ throw ( container::NoSuchElementException, Sequence< OUString > SAL_CALL MenuBarWrapper::getElementNames() throw (::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -322,7 +322,7 @@ throw (::com::sun::star::uno::RuntimeException, std::exception) const OUString& aName ) throw (::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) throw DisposedException(); diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx index 73e5a2ac1d5e..20f3260a3528 100644 --- a/framework/source/uielement/newmenucontroller.cxx +++ b/framework/source/uielement/newmenucontroller.cxx @@ -19,7 +19,6 @@ #include <uielement/newmenucontroller.hxx> -#include <threadhelp/resetableguard.hxx> #include "services.h" #include <classes/resource.hrc> #include <classes/fwkresid.hxx> diff --git a/framework/source/uielement/objectmenucontroller.cxx b/framework/source/uielement/objectmenucontroller.cxx index e270f3c287d0..d890e63c962b 100644 --- a/framework/source/uielement/objectmenucontroller.cxx +++ b/framework/source/uielement/objectmenucontroller.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <threadhelp/resetableguard.hxx> #include <stdtypes.h> #include <com/sun/star/awt/XDevice.hpp> diff --git a/framework/source/uielement/progressbarwrapper.cxx b/framework/source/uielement/progressbarwrapper.cxx index f00583735fb7..5cca6dd6291d 100644 --- a/framework/source/uielement/progressbarwrapper.cxx +++ b/framework/source/uielement/progressbarwrapper.cxx @@ -20,7 +20,7 @@ #include <uielement/progressbarwrapper.hxx> #include <helper/statusindicator.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <uielement/statusindicatorinterfacewrapper.hxx> #include <com/sun/star/ui/UIElementType.hpp> @@ -49,7 +49,7 @@ ProgressBarWrapper::~ProgressBarWrapper() // public interfaces void ProgressBarWrapper::setStatusBar( const uno::Reference< awt::XWindow >& rStatusBar, sal_Bool bOwnsInstance ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return; @@ -75,7 +75,7 @@ void ProgressBarWrapper::setStatusBar( const uno::Reference< awt::XWindow >& rSt uno::Reference< awt::XWindow > ProgressBarWrapper::getStatusBar() const { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return uno::Reference< awt::XWindow >(); @@ -91,7 +91,7 @@ throw (uno::RuntimeException) sal_Int32 nValue( 0 ); { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return; @@ -130,7 +130,7 @@ throw (uno::RuntimeException) uno::Reference< awt::XWindow > xWindow; { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return; @@ -160,7 +160,7 @@ throw (uno::RuntimeException) sal_Int32 nValue( 0 ); { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return; @@ -199,7 +199,7 @@ throw (uno::RuntimeException) sal_Bool bSetValue( sal_False ); { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return; @@ -267,7 +267,7 @@ throw (uno::RuntimeException, std::exception) uno::UNO_QUERY ); { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) return; @@ -277,7 +277,7 @@ throw (uno::RuntimeException, std::exception) lang::EventObject aEvent( xThis ); m_aListenerContainer.disposeAndClear( aEvent ); - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bOwnsInstance ) { try @@ -302,7 +302,7 @@ throw (uno::RuntimeException, std::exception) { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ // Ready for multithreading - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) return uno::Reference< uno::XInterface >(); diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx index 1decf935c86a..1de14e41ff5f 100644 --- a/framework/source/uielement/statusbarmanager.cxx +++ b/framework/source/uielement/statusbarmanager.cxx @@ -21,7 +21,7 @@ #include <uielement/genericstatusbarcontroller.hxx> #include <threadhelp/threadhelpbase.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <framework/sfxhelperfunctions.hxx> #include <framework/addonsoptions.hxx> #include <uielement/statusbarmerger.hxx> @@ -159,14 +159,14 @@ StatusBarManager::~StatusBarManager() StatusBar* StatusBarManager::GetStatusBar() const { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); return m_pStatusBar; } void StatusBarManager::frameAction( const frame::FrameActionEvent& Action ) throw ( uno::RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( Action.Action == frame::FrameAction_CONTEXT_CHANGED ) UpdateControllers(); } @@ -174,7 +174,7 @@ throw ( uno::RuntimeException, std::exception ) void SAL_CALL StatusBarManager::disposing( const lang::EventObject& Source ) throw ( uno::RuntimeException, std::exception ) { { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return; } @@ -182,7 +182,7 @@ void SAL_CALL StatusBarManager::disposing( const lang::EventObject& Source ) thr RemoveControllers(); { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( Source.Source == uno::Reference< uno::XInterface >( m_xFrame, uno::UNO_QUERY )) m_xFrame.clear(); @@ -200,7 +200,7 @@ void SAL_CALL StatusBarManager::dispose() throw( uno::RuntimeException, std::exc m_aListenerContainer.disposeAndClear( aEvent ); { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( !m_bDisposed ) { RemoveControllers(); @@ -240,7 +240,7 @@ void SAL_CALL StatusBarManager::dispose() throw( uno::RuntimeException, std::exc void SAL_CALL StatusBarManager::addEventListener( const uno::Reference< lang::XEventListener >& xListener ) throw( uno::RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( m_bDisposed ) @@ -259,7 +259,7 @@ void SAL_CALL StatusBarManager::removeEventListener( const uno::Reference< lang: // XUIConfigurationListener void SAL_CALL StatusBarManager::elementInserted( const css::ui::ConfigurationEvent& ) throw ( uno::RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return; @@ -267,7 +267,7 @@ void SAL_CALL StatusBarManager::elementInserted( const css::ui::ConfigurationEve void SAL_CALL StatusBarManager::elementRemoved( const css::ui::ConfigurationEvent& ) throw ( uno::RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return; @@ -275,7 +275,7 @@ void SAL_CALL StatusBarManager::elementRemoved( const css::ui::ConfigurationEven void SAL_CALL StatusBarManager::elementReplaced( const css::ui::ConfigurationEvent& ) throw ( uno::RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return; @@ -295,7 +295,7 @@ void StatusBarManager::UpdateControllers() void StatusBarManager::RemoveControllers() { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return; @@ -427,7 +427,7 @@ void StatusBarManager::AddFrameActionListener() void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAccess >& rItemContainer ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed || !m_pStatusBar ) return; @@ -554,7 +554,7 @@ void StatusBarManager::StateChanged( StateChangedType ) void StatusBarManager::DataChanged( const DataChangedEvent& rDCEvt ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ((( rDCEvt.GetType() == DATACHANGED_SETTINGS ) || ( rDCEvt.GetType() == DATACHANGED_FONTS ) || @@ -576,7 +576,7 @@ void StatusBarManager::DataChanged( const DataChangedEvent& rDCEvt ) void StatusBarManager::UserDraw( const UserDrawEvent& rUDEvt ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return; @@ -603,7 +603,7 @@ void StatusBarManager::UserDraw( const UserDrawEvent& rUDEvt ) void StatusBarManager::Command( const CommandEvent& rEvt ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return; @@ -633,7 +633,7 @@ void StatusBarManager::MouseMove( const MouseEvent& rMEvt ) void StatusBarManager::MouseButton( const MouseEvent& rMEvt ,sal_Bool ( SAL_CALL frame::XStatusbarController::*_pMethod )(const ::com::sun::star::awt::MouseEvent&)) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( !m_bDisposed ) { @@ -667,7 +667,7 @@ void StatusBarManager::MouseButtonUp( const MouseEvent& rMEvt ) IMPL_LINK_NOARG(StatusBarManager, Click) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return 1; @@ -690,7 +690,7 @@ IMPL_LINK_NOARG(StatusBarManager, Click) IMPL_LINK_NOARG(StatusBarManager, DoubleClick) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return 1; diff --git a/framework/source/uielement/statusbarwrapper.cxx b/framework/source/uielement/statusbarwrapper.cxx index 6cc31b78ff98..3c1c89f0eb2c 100644 --- a/framework/source/uielement/statusbarwrapper.cxx +++ b/framework/source/uielement/statusbarwrapper.cxx @@ -20,7 +20,7 @@ #include <uielement/statusbarwrapper.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <framework/actiontriggerhelper.hxx> #include <uielement/constitemcontainer.hxx> #include <uielement/rootitemcontainer.hxx> @@ -71,7 +71,7 @@ void SAL_CALL StatusBarWrapper::dispose() throw (::com::sun::star::uno::RuntimeE com::sun::star::lang::EventObject aEvent( xThis ); m_aListenerContainer.disposeAndClear( aEvent ); - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( !m_bDisposed ) { if ( m_xStatusBarManager.is() ) @@ -90,7 +90,7 @@ void SAL_CALL StatusBarWrapper::dispose() throw (::com::sun::star::uno::RuntimeE // XInitialization void SAL_CALL StatusBarWrapper::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException, std::exception ) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -139,7 +139,7 @@ void SAL_CALL StatusBarWrapper::initialize( const Sequence< Any >& aArguments ) // XUIElementSettings void SAL_CALL StatusBarWrapper::updateSettings() throw ( RuntimeException, std::exception ) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -164,7 +164,7 @@ void SAL_CALL StatusBarWrapper::updateSettings() throw ( RuntimeException, std:: Reference< XInterface > SAL_CALL StatusBarWrapper::getRealInterface() throw ( RuntimeException, std::exception ) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_xStatusBarManager.is() ) { diff --git a/framework/source/uielement/statusindicatorinterfacewrapper.cxx b/framework/source/uielement/statusindicatorinterfacewrapper.cxx index 5bd9e1ca806b..3bf2126e8c64 100644 --- a/framework/source/uielement/statusindicatorinterfacewrapper.cxx +++ b/framework/source/uielement/statusindicatorinterfacewrapper.cxx @@ -19,7 +19,6 @@ #include <uielement/statusindicatorinterfacewrapper.hxx> #include <uielement/progressbarwrapper.hxx> -#include <threadhelp/resetableguard.hxx> #include <vcl/svapp.hxx> #include <osl/mutex.hxx> diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 6f36d557f110..e70736f92eb0 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -20,7 +20,7 @@ #include <uielement/toolbarmanager.hxx> #include <uielement/generictoolbarcontroller.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include "services.h" #include "general.h" #include "properties.h" @@ -261,7 +261,7 @@ ToolBarManager::~ToolBarManager() void ToolBarManager::Destroy() { OSL_ASSERT( m_pToolBar != 0 ); - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bAddedToTaskPaneList ) { Window* pWindow = m_pToolBar; @@ -305,13 +305,13 @@ void ToolBarManager::Destroy() ToolBox* ToolBarManager::GetToolBar() const { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); return m_pToolBar; } void ToolBarManager::CheckAndUpdateImages() { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); sal_Bool bRefreshImages = sal_False; SvtMiscOptions aMiscOptions; @@ -336,7 +336,7 @@ void ToolBarManager::CheckAndUpdateImages() void ToolBarManager::RefreshImages() { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); sal_Bool bBigImages( SvtMiscOptions().AreCurrentSymbolsLarge() ); for ( sal_uInt16 nPos = 0; nPos < m_pToolBar->GetItemCount(); nPos++ ) @@ -362,7 +362,7 @@ void ToolBarManager::RefreshImages() void ToolBarManager::UpdateImageOrientation() { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_xUICommandLabels.is() ) { @@ -485,7 +485,7 @@ void ToolBarManager::UpdateController( ::com::sun::star::uno::Reference< ::com:: void ToolBarManager::frameAction( const FrameActionEvent& Action ) throw ( RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( Action.Action == FrameAction_CONTEXT_CHANGED ) m_aAsyncUpdateControllersTimer.Start(); } @@ -493,7 +493,7 @@ throw ( RuntimeException, std::exception ) void SAL_CALL ToolBarManager::statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return; @@ -511,7 +511,7 @@ throw ( ::com::sun::star::uno::RuntimeException, std::exception ) void SAL_CALL ToolBarManager::disposing( const EventObject& Source ) throw ( RuntimeException, std::exception ) { { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return; } @@ -519,7 +519,7 @@ void SAL_CALL ToolBarManager::disposing( const EventObject& Source ) throw ( Run RemoveControllers(); { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_xDocImageManager.is() ) { try @@ -573,7 +573,7 @@ void SAL_CALL ToolBarManager::dispose() throw( RuntimeException, std::exception m_aListenerContainer.disposeAndClear( aEvent ); { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); // stop timer to prevent timer events after dispose m_aAsyncUpdateControllersTimer.Stop(); @@ -647,7 +647,7 @@ void SAL_CALL ToolBarManager::dispose() throw( RuntimeException, std::exception void SAL_CALL ToolBarManager::addEventListener( const Reference< XEventListener >& xListener ) throw( RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( m_bDisposed ) @@ -673,7 +673,7 @@ void SAL_CALL ToolBarManager::elementRemoved( const ::com::sun::star::ui::Config } void ToolBarManager::impl_elementChanged(bool _bRemove,const ::com::sun::star::ui::ConfigurationEvent& Event ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ if ( m_bDisposed ) @@ -745,7 +745,7 @@ void SAL_CALL ToolBarManager::elementReplaced( const ::com::sun::star::ui::Confi void ToolBarManager::RemoveControllers() { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return; @@ -1151,7 +1151,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine OString aTbxName = OUStringToOString( m_aResourceName, RTL_TEXTENCODING_ASCII_US ); SAL_INFO( "fwk.uielement", "framework (cd100003) ::ToolBarManager::FillToolbar " << aTbxName.getStr() ); - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return; @@ -1503,7 +1503,7 @@ void ToolBarManager::RequestImages() void ToolBarManager::notifyRegisteredControllers( const OUString& aUIElementName, const OUString& aCommand ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( !m_aSubToolBarControllerMap.empty() ) { SubToolBarToSubToolBarControllerMap::const_iterator pIter = @@ -1540,7 +1540,7 @@ void ToolBarManager::notifyRegisteredControllers( const OUString& aUIElementName } long ToolBarManager::HandleClick(void ( SAL_CALL XToolbarController::*_pClick )()) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return 1; @@ -1564,7 +1564,7 @@ IMPL_LINK_NOARG(ToolBarManager, Click) IMPL_LINK_NOARG(ToolBarManager, DropdownClick) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return 1; @@ -1621,7 +1621,7 @@ void ToolBarManager::ImplClearPopupMenu( ToolBox *pToolBar ) IMPL_LINK( ToolBarManager, MenuDeactivate, Menu*, pMenu ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return 1; @@ -1786,7 +1786,7 @@ bool ToolBarManager::MenuItemAllowed( sal_uInt16 ) const IMPL_LINK( ToolBarManager, Command, CommandEvent*, pCmdEvt ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return 1; @@ -1807,7 +1807,7 @@ IMPL_LINK( ToolBarManager, Command, CommandEvent*, pCmdEvt ) IMPL_LINK( ToolBarManager, MenuButton, ToolBox*, pToolBar ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return 1; @@ -1828,7 +1828,7 @@ IMPL_LINK( ToolBarManager, MenuSelect, Menu*, pMenu ) { // The guard must be in its own context as the we can get destroyed when our // own xInterface reference get destroyed! - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return 1; @@ -2085,7 +2085,7 @@ IMPL_LINK_NOARG(ToolBarManager, AsyncUpdateControllersHdl) // own xInterface reference get destroyed! Reference< XComponent > xThis( static_cast< OWeakObject* >(this), UNO_QUERY ); - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_bDisposed ) return 1; diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 3ad9a12bfe12..e45e5c2c87a9 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -21,7 +21,6 @@ #include <algorithm> -#include <threadhelp/resetableguard.hxx> #include "services.h" #include <classes/resource.hrc> #include <classes/fwkresid.hxx> diff --git a/framework/source/uielement/toolbarwrapper.cxx b/framework/source/uielement/toolbarwrapper.cxx index 84f9706c9e0b..076cfca74e46 100644 --- a/framework/source/uielement/toolbarwrapper.cxx +++ b/framework/source/uielement/toolbarwrapper.cxx @@ -18,7 +18,7 @@ */ #include <uielement/toolbarwrapper.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <framework/actiontriggerhelper.hxx> #include <uielement/constitemcontainer.hxx> #include <uielement/rootitemcontainer.hxx> @@ -93,7 +93,7 @@ void SAL_CALL ToolBarWrapper::dispose() throw ( RuntimeException, std::exception Reference< XComponent > xThis( static_cast< OWeakObject* >(this), UNO_QUERY ); { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) return; } @@ -101,7 +101,7 @@ void SAL_CALL ToolBarWrapper::dispose() throw ( RuntimeException, std::exception com::sun::star::lang::EventObject aEvent( xThis ); m_aListenerContainer.disposeAndClear( aEvent ); - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_xToolBarManager.is() ) m_xToolBarManager->dispose(); @@ -115,7 +115,7 @@ void SAL_CALL ToolBarWrapper::dispose() throw ( RuntimeException, std::exception // XInitialization void SAL_CALL ToolBarWrapper::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException, std::exception ) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -201,7 +201,7 @@ void SAL_CALL ToolBarWrapper::disposing( const ::com::sun::star::lang::EventObje // XUpdatable void SAL_CALL ToolBarWrapper::update() throw (::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -214,7 +214,7 @@ void SAL_CALL ToolBarWrapper::update() throw (::com::sun::star::uno::RuntimeExce // XUIElementSettings void SAL_CALL ToolBarWrapper::updateSettings() throw (::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_bDisposed ) throw DisposedException(); @@ -253,7 +253,7 @@ void ToolBarWrapper::impl_fillNewData() // XUIElement interface Reference< XInterface > SAL_CALL ToolBarWrapper::getRealInterface( ) throw (::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_xToolBarManager.is() ) { @@ -274,7 +274,7 @@ void SAL_CALL ToolBarWrapper::functionExecute( const OUString& aCommand ) throw (::com::sun::star::uno::RuntimeException, std::exception) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_xToolBarManager.is() ) { @@ -286,7 +286,7 @@ throw (::com::sun::star::uno::RuntimeException, std::exception) void SAL_CALL ToolBarWrapper::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const com::sun::star::uno::Any& aValue ) throw( com::sun::star::uno::Exception, std::exception ) { - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); sal_Bool bNoClose( m_bNoClose ); aLock.unlock(); diff --git a/framework/source/uifactory/addonstoolbarfactory.cxx b/framework/source/uifactory/addonstoolbarfactory.cxx index 87cdebc8f88a..a5079773b804 100644 --- a/framework/source/uifactory/addonstoolbarfactory.cxx +++ b/framework/source/uifactory/addonstoolbarfactory.cxx @@ -18,7 +18,7 @@ */ #include <uielement/addonstoolbarwrapper.hxx> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/frame/ModuleManager.hpp> @@ -180,7 +180,7 @@ throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException, std::exception ) { // SAFE - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); Sequence< Sequence< PropertyValue > > aConfigData; Reference< XFrame > xFrame; diff --git a/framework/source/uifactory/factoryconfiguration.cxx b/framework/source/uifactory/factoryconfiguration.cxx index 3bd67f9dab05..5320caaf52da 100644 --- a/framework/source/uifactory/factoryconfiguration.cxx +++ b/framework/source/uifactory/factoryconfiguration.cxx @@ -18,7 +18,7 @@ */ #include "uifactory/factoryconfiguration.hxx" -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include "services.h" #include "helper/mischelper.hxx" @@ -75,7 +75,7 @@ ConfigurationAccess_ControllerFactory::ConfigurationAccess_ControllerFactory( co ConfigurationAccess_ControllerFactory::~ConfigurationAccess_ControllerFactory() { // SAFE - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); Reference< XContainer > xContainer( m_xConfigAccess, UNO_QUERY ); if ( xContainer.is() ) @@ -85,7 +85,7 @@ ConfigurationAccess_ControllerFactory::~ConfigurationAccess_ControllerFactory() OUString ConfigurationAccess_ControllerFactory::getServiceFromCommandModule( const OUString& rCommandURL, const OUString& rModule ) const { // SAFE - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); MenuControllerMap::const_iterator pIter = m_aMenuControllerMap.find( getHashKeyFromStrings( rCommandURL, rModule )); if ( pIter != m_aMenuControllerMap.end() ) @@ -104,7 +104,7 @@ OUString ConfigurationAccess_ControllerFactory::getServiceFromCommandModule( con OUString ConfigurationAccess_ControllerFactory::getValueFromCommandModule( const OUString& rCommandURL, const OUString& rModule ) const { // SAFE - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); MenuControllerMap::const_iterator pIter = m_aMenuControllerMap.find( getHashKeyFromStrings( rCommandURL, rModule )); @@ -129,7 +129,7 @@ void ConfigurationAccess_ControllerFactory::addServiceToCommandModule( const OUString& rServiceSpecifier ) { // SAFE - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); OUString aHashKey = getHashKeyFromStrings( rCommandURL, rModule ); m_aMenuControllerMap.insert( MenuControllerMap::value_type( aHashKey,ControllerInfo(rServiceSpecifier,OUString()) )); @@ -140,7 +140,7 @@ void ConfigurationAccess_ControllerFactory::removeServiceFromCommandModule( const OUString& rModule ) { // SAFE - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); OUString aHashKey = getHashKeyFromStrings( rCommandURL, rModule ); m_aMenuControllerMap.erase( aHashKey ); @@ -155,7 +155,7 @@ void SAL_CALL ConfigurationAccess_ControllerFactory::elementInserted( const Cont OUString aValue; // SAFE - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( impl_getElementProps( aEvent.Element, aCommand, aModule, aService, aValue )) { @@ -176,7 +176,7 @@ void SAL_CALL ConfigurationAccess_ControllerFactory::elementRemoved ( const Cont OUString aValue; // SAFE - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( impl_getElementProps( aEvent.Element, aCommand, aModule, aService, aValue )) { @@ -197,14 +197,14 @@ void SAL_CALL ConfigurationAccess_ControllerFactory::disposing( const EventObjec { // SAFE // remove our reference to the config access - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); m_xConfigAccess.clear(); } void ConfigurationAccess_ControllerFactory::readConfigurationData() { // SAFE - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( !m_bConfigAccessInitialized ) { @@ -246,7 +246,7 @@ void ConfigurationAccess_ControllerFactory::readConfigurationData() void ConfigurationAccess_ControllerFactory::updateConfigurationData() { // SAFE - ResetableGuard aLock( m_aLock ); + Guard aLock( m_aLock ); if ( m_xConfigAccess.is() ) { Sequence< OUString > aPopupMenuControllers = m_xConfigAccess->getElementNames(); diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/xml/imagesdocumenthandler.cxx index 84af2e1b0baf..610b580b67cf 100644 --- a/framework/source/xml/imagesdocumenthandler.cxx +++ b/framework/source/xml/imagesdocumenthandler.cxx @@ -20,7 +20,7 @@ #include <stdio.h> -#include <threadhelp/resetableguard.hxx> +#include <threadhelp/guard.hxx> #include <xml/imagesdocumenthandler.hxx> #include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp> @@ -152,7 +152,7 @@ throw ( SAXException, RuntimeException, std::exception ) void SAL_CALL OReadImagesDocumentHandler::endDocument(void) throw( SAXException, RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if (( m_bImageContainerStartFound && !m_bImageContainerEndFound ) || ( !m_bImageContainerStartFound && m_bImageContainerEndFound ) ) @@ -169,7 +169,7 @@ void SAL_CALL OReadImagesDocumentHandler::startElement( RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); ImageHashMap::const_iterator pImageEntry = m_aImageMap.find( aName ) ; if ( pImageEntry != m_aImageMap.end() ) @@ -503,7 +503,7 @@ void SAL_CALL OReadImagesDocumentHandler::endElement(const OUString& aName) RuntimeException, std::exception) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); ImageHashMap::const_iterator pImageEntry = m_aImageMap.find( aName ) ; if ( pImageEntry != m_aImageMap.end() ) @@ -579,14 +579,14 @@ void SAL_CALL OReadImagesDocumentHandler::setDocumentLocator( const Reference< XLocator > &xLocator) throw( SAXException, RuntimeException, std::exception ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); m_xLocator = xLocator; } OUString OReadImagesDocumentHandler::getErrorLineString() { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); if ( m_xLocator.is() ) @@ -628,7 +628,7 @@ OWriteImagesDocumentHandler::~OWriteImagesDocumentHandler() void OWriteImagesDocumentHandler::WriteImagesDocument() throw ( SAXException, RuntimeException ) { - ResetableGuard aGuard( m_aLock ); + Guard aGuard( m_aLock ); m_xWriteDocumentHandler->startDocument(); |