[Libreoffice-commits] core.git: 8 commits - framework/inc framework/source
Stephan Bergmann
sbergman at redhat.com
Mon Mar 17 08:53:05 PDT 2014
framework/inc/jobs/job.hxx | 1
framework/inc/services/layoutmanager.hxx | 2
framework/inc/threadhelp/fairrwlock.hxx | 242 ----------
framework/inc/threadhelp/gate.hxx | 5
framework/inc/threadhelp/guard.hxx | 71 ++
framework/inc/threadhelp/inoncopyable.h | 47 -
framework/inc/threadhelp/irwlock.h | 71 --
framework/inc/threadhelp/lockhelper.hxx | 27 -
framework/inc/threadhelp/readguard.hxx | 172 -------
framework/inc/threadhelp/resetableguard.hxx | 6
framework/inc/threadhelp/transactionguard.hxx | 5
framework/inc/threadhelp/transactionmanager.hxx | 7
framework/inc/threadhelp/writeguard.hxx | 231 ---------
framework/source/accelerators/acceleratorcache.cxx | 21
framework/source/accelerators/acceleratorconfiguration.cxx | 63 +-
framework/source/accelerators/documentacceleratorconfiguration.cxx | 11
framework/source/accelerators/globalacceleratorconfiguration.cxx | 2
framework/source/accelerators/moduleacceleratorconfiguration.cxx | 7
framework/source/accelerators/presethandler.cxx | 31 -
framework/source/accelerators/storageholder.cxx | 31 -
framework/source/classes/framecontainer.cxx | 29 -
framework/source/classes/taskcreator.cxx | 4
framework/source/dispatch/closedispatcher.cxx | 19
framework/source/dispatch/dispatchinformationprovider.cxx | 5
framework/source/dispatch/dispatchprovider.cxx | 11
framework/source/dispatch/interceptionhelper.cxx | 11
framework/source/dispatch/loaddispatcher.cxx | 5
framework/source/dispatch/mailtodispatcher.cxx | 4
framework/source/dispatch/oxt_handler.cxx | 2
framework/source/dispatch/popupmenudispatcher.cxx | 5
framework/source/dispatch/servicehandler.cxx | 4
framework/source/dispatch/startmoduledispatcher.cxx | 7
framework/source/dispatch/systemexec.cxx | 4
framework/source/dispatch/windowcommanddispatch.cxx | 9
framework/source/fwe/classes/framelistanalyzer.cxx | 2
framework/source/fwi/classes/propertysethelper.cxx | 30 -
framework/source/fwi/classes/protocolhandlercache.cxx | 11
framework/source/fwi/jobs/configaccess.cxx | 11
framework/source/fwi/threadhelp/lockhelper.cxx | 118 ----
framework/source/helper/persistentwindowstate.cxx | 9
framework/source/helper/statusindicator.cxx | 14
framework/source/helper/statusindicatorfactory.cxx | 39 -
framework/source/helper/tagwindowasmodified.cxx | 13
framework/source/helper/titlebarupdate.cxx | 11
framework/source/helper/vclstatusindicator.cxx | 13
framework/source/helper/wakeupthread.cxx | 8
framework/source/interaction/quietinteraction.cxx | 9
framework/source/jobs/job.cxx | 27 -
framework/source/jobs/jobdata.cxx | 37 -
framework/source/jobs/jobdispatch.cxx | 11
framework/source/jobs/jobresult.cxx | 11
framework/source/jobs/joburl.cxx | 19
framework/source/jobs/shelljob.cxx | 4
framework/source/layoutmanager/layoutmanager.cxx | 185 +++----
framework/source/layoutmanager/toolbarlayoutmanager.cxx | 133 ++---
framework/source/layoutmanager/toolbarlayoutmanager.hxx | 2
framework/source/loadenv/loadenv.cxx | 51 +-
framework/source/recording/dispatchrecorder.cxx | 7
framework/source/recording/dispatchrecordersupplier.cxx | 9
framework/source/services/desktop.cxx | 23
framework/source/services/dispatchhelper.cxx | 11
framework/source/services/frame.cxx | 119 ++--
framework/source/xml/acceleratorconfigurationwriter.cxx | 4
63 files changed, 617 insertions(+), 1496 deletions(-)
New commits:
commit ab3acb7ef79fcae8776b8d1ce0e81da5698ef516
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Mar 17 16:14:27 2014 +0100
Consolidate framework::{Read,Write}Guard
...now that it is obvious that they both do the same
Change-Id: I6878acca4750ef4204fe32a695b6d9e1c5140115
diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx
index 6f5bef6..c1b8465 100644
--- a/framework/inc/services/layoutmanager.hxx
+++ b/framework/inc/services/layoutmanager.hxx
@@ -22,8 +22,6 @@
#include <threadhelp/threadhelpbase.hxx>
#include <threadhelp/resetableguard.hxx>
-#include <threadhelp/writeguard.hxx>
-#include <threadhelp/readguard.hxx>
#include <macros/xinterface.hxx>
#include <macros/xtypeprovider.hxx>
#include <properties.h>
diff --git a/framework/inc/threadhelp/guard.hxx b/framework/inc/threadhelp/guard.hxx
new file mode 100644
index 0000000..9ba1f4a
--- /dev/null
+++ b/framework/inc/threadhelp/guard.hxx
@@ -0,0 +1,71 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_FRAMEWORK_INC_THREADHELP_GUARD_HXX
+#define INCLUDED_FRAMEWORK_INC_THREADHELP_GUARD_HXX
+
+#include <sal/config.h>
+
+#include <boost/noncopyable.hpp>
+
+#include <threadhelp/lockhelper.hxx>
+
+namespace framework{
+
+class Guard : private boost::noncopyable
+{
+public:
+ Guard( LockHelper& rLock )
+ : m_pLock ( &rLock )
+ , m_locked(false)
+ {
+ lock();
+ }
+
+ ~Guard()
+ {
+ unlock();
+ }
+
+ void lock()
+ {
+ if (!m_locked) {
+ m_pLock->acquire();
+ m_locked = true;
+ }
+ }
+
+ void unlock()
+ {
+ if (m_locked) {
+ m_pLock->release();
+ m_locked = false;
+ }
+ }
+
+private:
+ LockHelper* m_pLock;
+ bool m_locked;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/inc/threadhelp/readguard.hxx b/framework/inc/threadhelp/readguard.hxx
deleted file mode 100644
index 4f9f07e..0000000
--- a/framework/inc/threadhelp/readguard.hxx
+++ /dev/null
@@ -1,169 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_FRAMEWORK_INC_THREADHELP_READGUARD_HXX
-#define INCLUDED_FRAMEWORK_INC_THREADHELP_READGUARD_HXX
-
-#include <boost/noncopyable.hpp>
-#include <threadhelp/lockhelper.hxx>
-
-#include <sal/types.h>
-
-
-namespace framework{
-
-/*-************************************************************************************************************
- @short implement a guard to set read locks
- @descr This guard should be used to set a lock for reading object internal member.
- Nobody can control it but don't use member after successfully locking for writing!
- We never need a own mutex to safe our internal member access - because
- a guard is used as function-local member only. There exist no multithreaded access to it really ...
-
- @attention To prevent us against wrong using, the default ctor, copy ctor and the =operator are maked private!
-
- @implements -
-
- @devstatus ready to use
-*//*-*************************************************************************************************************/
-class ReadGuard : private boost::noncopyable
-{
-
- // public methods
-
- public:
-
- /*-****************************************************************************************************
- @short ctor
- @descr These ctors initialize the guard with a reference to used lock member of object to protect.
- Null isn't allowed as value!
-
- @seealso -
-
- @param "pLock" ,reference to used lock member of object to protect
- @param "rLock" ,reference to used lock member of object to protect
- @return -
-
- @onerror -
- *//*-*****************************************************************************************************/
- inline ReadGuard( LockHelper* pLock )
- : m_pLock ( pLock )
- , m_bLocked ( sal_False )
- {
- lock();
- }
-
-
- inline ReadGuard( LockHelper& rLock )
- : m_pLock ( &rLock )
- , m_bLocked ( sal_False )
- {
- lock();
- }
-
- /*-****************************************************************************************************
- @short dtor
- @descr We unlock the used lock member automaticly if user forget it.
-
- @seealso -
-
- @param -
- @return -
-
- @onerror -
- *//*-*****************************************************************************************************/
- inline ~ReadGuard()
- {
- unlock();
- }
-
- /*-****************************************************************************************************
- @short set read lock
- @descr Call this method to set the read lock. The call will block till all current threads are synchronized!
-
- @seealso method unlock()
-
- @param -
- @return -
-
- @onerror -
- *//*-*****************************************************************************************************/
- inline void lock()
- {
- if( m_bLocked == sal_False )
- {
- m_pLock->acquire();
- m_bLocked = sal_True;
- }
- }
-
- /*-****************************************************************************************************
- @short unset read lock
- @descr Call this method to unlock the rw-lock temp.!
- Normaly we do it at dtor automaticly for you ...
-
- @seealso method lock()
-
- @param -
- @return -
-
- @onerror -
- *//*-*****************************************************************************************************/
- inline void unlock()
- {
- if( m_bLocked == sal_True )
- {
- m_pLock->release();
- m_bLocked = sal_False;
- }
- }
-
-
- // private methods
-
- private:
-
- /*-****************************************************************************************************
- @short disable using of these functions!
- @descr It's not allowed to use this methods. Different problem can occur otherwise.
- Thats why we disable it by make it private.
-
- @seealso other ctor
-
- @param -
- @return -
-
- @onerror -
- *//*-*****************************************************************************************************/
- ReadGuard();
-
-
- // private member
-
- private:
-
- LockHelper* m_pLock ; /// reference to lock-member of protected object
- sal_Bool m_bLocked ; /// protection against multiple lock calls without unlock!
-
-}; // class ReadGuard
-
-} // namespace framework
-
-#endif // INCLUDED_FRAMEWORK_INC_THREADHELP_READGUARD_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/inc/threadhelp/writeguard.hxx b/framework/inc/threadhelp/writeguard.hxx
deleted file mode 100644
index 516ea92..0000000
--- a/framework/inc/threadhelp/writeguard.hxx
+++ /dev/null
@@ -1,165 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_FRAMEWORK_INC_THREADHELP_WRITEGUARD_HXX
-#define INCLUDED_FRAMEWORK_INC_THREADHELP_WRITEGUARD_HXX
-
-#include <boost/noncopyable.hpp>
-#include <threadhelp/lockhelper.hxx>
-
-
-namespace framework{
-
-/*-************************************************************************************************************
- @short implement a guard to set write locks
- @descr This guard should be used to set a lock for reading AND writing object internal member.
- We never need a own mutex to safe our internal member access - because
- a guard is used as function-local member only. There exist no multithreaded access to it really ...
-
- @attention To prevent us against wrong using, the default ctor, copy ctor and the =operator are maked private!
-
- @implements -
-
- @devstatus ready to use
-*//*-*************************************************************************************************************/
-class WriteGuard : private boost::noncopyable
-{
-
- // public methods
-
- public:
-
- /*-****************************************************************************************************
- @short ctor
- @descr These ctors initialize the guard with a reference to used lock member of object to protect.
- Null isn't allowed as value!
-
- @seealso -
-
- @param "pLock" ,reference to used lock member of object to protect
- @param "rLock" ,reference to used lock member of object to protect
- @return -
-
- @onerror -
- *//*-*****************************************************************************************************/
- inline WriteGuard( LockHelper* pLock )
- : m_pLock ( pLock )
- , m_locked(false)
- {
- lock();
- }
-
-
- inline WriteGuard( LockHelper& rLock )
- : m_pLock ( &rLock )
- , m_locked(false)
- {
- lock();
- }
-
- /*-****************************************************************************************************
- @short dtor
- @descr We unlock the used lock member automaticly if user forget it.
-
- @seealso -
-
- @param -
- @return -
-
- @onerror -
- *//*-*****************************************************************************************************/
- inline ~WriteGuard()
- {
- unlock();
- }
-
- /*-****************************************************************************************************
- @short set write lock
- @descr Call this method to set the write lock. The call will block till all current threads are synchronized!
-
- @seealso method unlock()
-
- @param -
- @return -
-
- @onerror -
- *//*-*****************************************************************************************************/
- inline void lock()
- {
- if (!m_locked) {
- // Acquire write access and set return state.
- // Mode is set later if it was successful!
- m_pLock->acquire();
- m_locked = true;
- }
- }
-
- /*-****************************************************************************************************
- @short unset write lock
- @descr Call this method to unlock the rw-lock temp.!
- Normaly we do it at dtor automaticly for you ...
-
- @seealso method lock()
-
- @param -
- @return -
-
- @onerror -
- *//*-*****************************************************************************************************/
- inline void unlock()
- {
- if (m_locked) {
- m_pLock->release();
- m_locked = false;
- }
- }
-
- // private methods
-
- private:
-
- /*-****************************************************************************************************
- @short disable using of these functions!
- @descr It's not allowed to use this methods. Different problem can occur otherwise.
- Thats why we disable it by make it private.
-
- @seealso other ctor
-
- @param -
- @return -
-
- @onerror -
- *//*-*****************************************************************************************************/
- WriteGuard();
-
-
- // private member
-
- private:
-
- LockHelper* m_pLock ; /// reference to lock-member of protected object
- bool m_locked;
-
-}; // class WriteGuard
-
-} // namespace framework
-
-#endif // INCLUDED_FRAMEWORK_INC_THREADHELP_WRITEGUARD_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/accelerators/acceleratorcache.cxx b/framework/source/accelerators/acceleratorcache.cxx
index b5cdfc9..d54cbf9 100644
--- a/framework/source/accelerators/acceleratorcache.cxx
+++ b/framework/source/accelerators/acceleratorcache.cxx
@@ -20,8 +20,7 @@
#include <accelerators/acceleratorcache.hxx>
#include <xml/acceleratorconfigurationreader.hxx>
-#include <threadhelp/readguard.hxx>
-#include <threadhelp/writeguard.hxx>
+#include <threadhelp/guard.hxx>
#include <com/sun/star/container/ElementExistException.hpp>
@@ -57,7 +56,7 @@ AcceleratorCache::~AcceleratorCache()
void AcceleratorCache::takeOver(const AcceleratorCache& rCopy)
{
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
m_lCommand2Keys = rCopy.m_lCommand2Keys;
m_lKey2Commands = rCopy.m_lKey2Commands;
@@ -77,7 +76,7 @@ AcceleratorCache& AcceleratorCache::operator=(const AcceleratorCache& rCopy)
sal_Bool AcceleratorCache::hasKey(const css::awt::KeyEvent& aKey) const
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
return (m_lKey2Commands.find(aKey) != m_lKey2Commands.end());
// <- SAFE ----------------------------------
@@ -87,7 +86,7 @@ sal_Bool AcceleratorCache::hasKey(const css::awt::KeyEvent& aKey) const
sal_Bool AcceleratorCache::hasCommand(const OUString& sCommand) const
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
return (m_lCommand2Keys.find(sCommand) != m_lCommand2Keys.end());
// <- SAFE ----------------------------------
@@ -99,7 +98,7 @@ AcceleratorCache::TKeyList AcceleratorCache::getAllKeys() const
TKeyList lKeys;
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
lKeys.reserve(m_lKey2Commands.size());
TKey2Commands::const_iterator pIt;
@@ -122,7 +121,7 @@ void AcceleratorCache::setKeyCommandPair(const css::awt::KeyEvent& aKey ,
const OUString& sCommand)
{
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
// register command for the specified key
m_lKey2Commands[aKey] = sCommand;
@@ -141,7 +140,7 @@ AcceleratorCache::TKeyList AcceleratorCache::getKeysByCommand(const OUString& sC
TKeyList lKeys;
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
TCommand2Keys::const_iterator pCommand = m_lCommand2Keys.find(sCommand);
if (pCommand == m_lCommand2Keys.end())
@@ -161,7 +160,7 @@ OUString AcceleratorCache::getCommandByKey(const css::awt::KeyEvent& aKey) const
OUString sCommand;
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
TKey2Commands::const_iterator pKey = m_lKey2Commands.find(aKey);
if (pKey == m_lKey2Commands.end())
@@ -179,7 +178,7 @@ OUString AcceleratorCache::getCommandByKey(const css::awt::KeyEvent& aKey) const
void AcceleratorCache::removeKey(const css::awt::KeyEvent& aKey)
{
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
// check if key exists
TKey2Commands::const_iterator pKey = m_lKey2Commands.find(aKey);
@@ -206,7 +205,7 @@ void AcceleratorCache::removeKey(const css::awt::KeyEvent& aKey)
void AcceleratorCache::removeCommand(const OUString& sCommand)
{
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
const TKeyList& lKeys = getKeysByCommand(sCommand);
AcceleratorCache::TKeyList::const_iterator pKey ;
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx
index 51078b5..5628578 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -25,8 +25,7 @@
#include <xml/acceleratorconfigurationreader.hxx>
#include <xml/acceleratorconfigurationwriter.hxx>
-#include <threadhelp/readguard.hxx>
-#include <threadhelp/writeguard.hxx>
+#include <threadhelp/guard.hxx>
#include <acceleratorconst.h>
#include <services.h>
@@ -93,7 +92,7 @@ css::uno::Sequence< css::awt::KeyEvent > SAL_CALL XMLBasedAcceleratorConfigurati
throw(css::uno::RuntimeException, std::exception)
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
AcceleratorCache& rCache = impl_getCFG();
AcceleratorCache::TKeyList lKeys = rCache.getAllKeys();
@@ -108,7 +107,7 @@ OUString SAL_CALL XMLBasedAcceleratorConfiguration::getCommandByKeyEvent(const c
css::uno::RuntimeException, std::exception )
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
AcceleratorCache& rCache = impl_getCFG();
if (!rCache.hasKey(aKeyEvent))
@@ -144,7 +143,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::setKeyEvent(const css::awt::KeyE
1);
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
AcceleratorCache& rCache = impl_getCFG(sal_True); // sal_True => force getting of a writeable cache!
rCache.setKeyCommandPair(aKeyEvent, sCommand);
@@ -159,7 +158,7 @@ throw(css::container::NoSuchElementException,
css::uno::RuntimeException, std::exception )
{
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
AcceleratorCache& rCache = impl_getCFG(sal_True); // true => force using of a writeable cache
if (!rCache.hasKey(aKeyEvent))
@@ -184,7 +183,7 @@ css::uno::Sequence< css::awt::KeyEvent > SAL_CALL XMLBasedAcceleratorConfigurati
1);
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
AcceleratorCache& rCache = impl_getCFG();
if (!rCache.hasCommand(sCommand))
@@ -204,7 +203,7 @@ css::uno::Sequence< css::uno::Any > SAL_CALL XMLBasedAcceleratorConfiguration::g
css::uno::RuntimeException, std::exception )
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
sal_Int32 i = 0;
sal_Int32 c = lCommandList.getLength();
@@ -250,7 +249,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::removeCommandFromAllKeyEvents(co
0);
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
AcceleratorCache& rCache = impl_getCFG(sal_True); // sal_True => force getting of a writeable cache!
if (!rCache.hasCommand(sCommand))
@@ -271,7 +270,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::reload()
css::uno::Reference< css::io::XStream > xStreamNoLang;
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::io::XStream > xStream = m_aPresetHandler.openTarget(PresetHandler::TARGET_CURRENT(), sal_True); // sal_True => open or create!
try
{
@@ -291,7 +290,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::reload()
// impl_ts_load() does not clear the cache
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
m_aReadCache = AcceleratorCache();
aWriteLock.unlock();
// <- SAFE ----------------------------------
@@ -314,7 +313,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::store()
css::uno::RuntimeException, std::exception)
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::io::XStream > xStream = m_aPresetHandler.openTarget(PresetHandler::TARGET_CURRENT(), sal_True); // sal_True => open or create!
aReadLock.unlock();
// <- SAFE ----------------------------------
@@ -365,7 +364,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::storeToStorage(const css::uno::R
throw(css::uno::RuntimeException, std::exception)
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
return (m_pWriteCache != 0);
// <- SAFE ----------------------------------
}
@@ -375,7 +374,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::storeToStorage(const css::uno::R
throw(css::uno::RuntimeException, std::exception)
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::io::XStream > xStream = m_aPresetHandler.openTarget(PresetHandler::TARGET_CURRENT(), sal_True); // sal_True => open or create!
aReadLock.unlock();
// <- SAFE ----------------------------------
@@ -420,7 +419,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::reset()
throw(css::uno::RuntimeException, std::exception)
{
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
m_aPresetHandler.copyPresetToTarget(PresetHandler::PRESET_DEFAULT(), PresetHandler::TARGET_CURRENT());
aWriteLock.unlock();
// <- SAFE ----------------------------------
@@ -453,7 +452,7 @@ void XMLBasedAcceleratorConfiguration::changesOccurred(const OUString& /*sPath*/
void XMLBasedAcceleratorConfiguration::impl_ts_load(const css::uno::Reference< css::io::XInputStream >& xStream)
{
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
if (m_pWriteCache)
@@ -502,7 +501,7 @@ void XMLBasedAcceleratorConfiguration::impl_ts_load(const css::uno::Reference< c
void XMLBasedAcceleratorConfiguration::impl_ts_save(const css::uno::Reference< css::io::XOutputStream >& xStream)
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
AcceleratorCache aCache;
sal_Bool bChanged = (m_pWriteCache != 0);
@@ -534,7 +533,7 @@ void XMLBasedAcceleratorConfiguration::impl_ts_save(const css::uno::Reference< c
// take over all changes into the original container
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
// take over all changes into the readonly cache ...
// and forget the copy-on-write copied cache
@@ -555,7 +554,7 @@ void XMLBasedAcceleratorConfiguration::impl_ts_save(const css::uno::Reference< c
AcceleratorCache& XMLBasedAcceleratorConfiguration::impl_getCFG(sal_Bool bWriteAccessRequested)
{
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
//create copy of our readonly-cache, if write access is forced ... but
//not still possible!
@@ -615,7 +614,7 @@ css::uno::Sequence< css::awt::KeyEvent > SAL_CALL XCUBasedAcceleratorConfigurati
throw(css::uno::RuntimeException, std::exception)
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
AcceleratorCache::TKeyList lKeys = impl_getCFG(sal_True).getAllKeys(); //get keys from PrimaryKeys set
@@ -637,7 +636,7 @@ OUString SAL_CALL XCUBasedAcceleratorConfiguration::getCommandByKeyEvent(const c
css::uno::RuntimeException, std::exception )
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
AcceleratorCache& rPrimaryCache = impl_getCFG(sal_True );
AcceleratorCache& rSecondaryCache = impl_getCFG(sal_False);
@@ -681,7 +680,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::setKeyEvent(const css::awt::KeyE
1);
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
AcceleratorCache& rPrimaryCache = impl_getCFG(sal_True, sal_True ); // sal_True => force getting of a writeable cache!
AcceleratorCache& rSecondaryCache = impl_getCFG(sal_False, sal_True); // sal_True => force getting of a writeable cache!
@@ -748,7 +747,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::removeKeyEvent(const css::awt::K
css::uno::RuntimeException, std::exception )
{
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
AcceleratorCache& rPrimaryCache = impl_getCFG(sal_True, sal_True );
AcceleratorCache& rSecondaryCache = impl_getCFG(sal_False, sal_True);
@@ -798,7 +797,7 @@ css::uno::Sequence< css::awt::KeyEvent > SAL_CALL XCUBasedAcceleratorConfigurati
1);
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
AcceleratorCache& rPrimaryCache = impl_getCFG(sal_True );
AcceleratorCache& rSecondaryCache = impl_getCFG(sal_False);
@@ -845,7 +844,7 @@ css::uno::Sequence< css::uno::Any > SAL_CALL XCUBasedAcceleratorConfiguration::g
css::uno::RuntimeException, std::exception )
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
sal_Int32 i = 0;
sal_Int32 c = lCommandList.getLength();
@@ -895,7 +894,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::removeCommandFromAllKeyEvents(co
0);
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
AcceleratorCache& rPrimaryCache = impl_getCFG(sal_True, sal_True );
AcceleratorCache& rSecondaryCache = impl_getCFG(sal_False, sal_True);
@@ -922,7 +921,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::reload()
SAL_INFO( "fwk.accelerators", "XCUBasedAcceleratorConfiguration::reload()" );
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
sal_Bool bPreferred;
css::uno::Reference< css::container::XNameAccess > xAccess;
@@ -963,7 +962,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::store()
SAL_INFO( "fwk.accelerators", "XCUBasedAcceleratorConfiguration::store()" );
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
sal_Bool bPreferred;
css::uno::Reference< css::container::XNameAccess > xAccess;
@@ -1010,7 +1009,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::storeToStorage(const css::uno::R
// the original m_aCache has been split into primay cache and secondary cache...
// we should merge them before storing to storage
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
AcceleratorCache aCache;
if (m_pPrimaryWriteCache != 0)
@@ -1350,7 +1349,7 @@ void XCUBasedAcceleratorConfiguration::impl_ts_save(sal_Bool bPreferred, const c
// take over all changes into the original container
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
if (m_pPrimaryWriteCache)
{
@@ -1394,7 +1393,7 @@ void XCUBasedAcceleratorConfiguration::impl_ts_save(sal_Bool bPreferred, const c
// take over all changes into the original container
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
if (m_pSecondaryWriteCache)
{
@@ -1559,7 +1558,7 @@ void XCUBasedAcceleratorConfiguration::reloadChanged( const OUString& sPrimarySe
AcceleratorCache& XCUBasedAcceleratorConfiguration::impl_getCFG(sal_Bool bPreferred, sal_Bool bWriteAccessRequested)
{
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
if (bPreferred)
{
diff --git a/framework/source/accelerators/documentacceleratorconfiguration.cxx b/framework/source/accelerators/documentacceleratorconfiguration.cxx
index e3881f82..1824c40 100644
--- a/framework/source/accelerators/documentacceleratorconfiguration.cxx
+++ b/framework/source/accelerators/documentacceleratorconfiguration.cxx
@@ -25,8 +25,7 @@
#include <xml/acceleratorconfigurationwriter.hxx>
#include <xml/saxnamespacefilter.hxx>
-#include <threadhelp/readguard.hxx>
-#include <threadhelp/writeguard.hxx>
+#include <threadhelp/guard.hxx>
#include <acceleratorconst.h>
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -116,7 +115,7 @@ DocumentAcceleratorConfiguration::DocumentAcceleratorConfiguration(
const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& lArguments)
: DocumentAcceleratorConfiguration_BASE(xContext)
{
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
css::uno::Reference<css::embed::XStorage> xRoot;
if (lArguments.getLength() == 1 && (lArguments[0] >>= xRoot))
@@ -149,7 +148,7 @@ void SAL_CALL DocumentAcceleratorConfiguration::setStorage(const css::uno::Refer
// Attention! xStorage must be accepted too, if it's NULL !
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
sal_Bool bForgetOldStorages = m_xDocumentRoot.is();
m_xDocumentRoot = xStorage;
aWriteLock.unlock();
@@ -167,7 +166,7 @@ sal_Bool SAL_CALL DocumentAcceleratorConfiguration::hasStorage()
throw(css::uno::RuntimeException, std::exception)
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
return m_xDocumentRoot.is();
// <- SAFE ----------------------------------
}
@@ -176,7 +175,7 @@ sal_Bool SAL_CALL DocumentAcceleratorConfiguration::hasStorage()
void DocumentAcceleratorConfiguration::impl_ts_fillCache()
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::embed::XStorage > xDocumentRoot = m_xDocumentRoot;
aReadLock.unlock();
// <- SAFE ----------------------------------
diff --git a/framework/source/accelerators/globalacceleratorconfiguration.cxx b/framework/source/accelerators/globalacceleratorconfiguration.cxx
index 6233d40..2824e97 100644
--- a/framework/source/accelerators/globalacceleratorconfiguration.cxx
+++ b/framework/source/accelerators/globalacceleratorconfiguration.cxx
@@ -19,8 +19,6 @@
#include <accelerators/acceleratorconfiguration.hxx>
#include <accelerators/presethandler.hxx>
-#include <threadhelp/readguard.hxx>
-#include <threadhelp/writeguard.hxx>
#include <helper/mischelper.hxx>
#include <acceleratorconst.h>
diff --git a/framework/source/accelerators/moduleacceleratorconfiguration.cxx b/framework/source/accelerators/moduleacceleratorconfiguration.cxx
index 5b832e2..7614f49 100644
--- a/framework/source/accelerators/moduleacceleratorconfiguration.cxx
+++ b/framework/source/accelerators/moduleacceleratorconfiguration.cxx
@@ -19,8 +19,7 @@
#include <accelerators/acceleratorconfiguration.hxx>
#include <accelerators/presethandler.hxx>
-#include <threadhelp/readguard.hxx>
-#include <threadhelp/writeguard.hxx>
+#include <threadhelp/guard.hxx>
#include "helper/mischelper.hxx"
#include <acceleratorconst.h>
@@ -110,7 +109,7 @@ ModuleAcceleratorConfiguration::ModuleAcceleratorConfiguration(
const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& lArguments)
: ModuleAcceleratorConfiguration_BASE(xContext)
{
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
OUString sModule;
if (lArguments.getLength() == 1 && (lArguments[0] >>= sModule))
@@ -138,7 +137,7 @@ ModuleAcceleratorConfiguration::~ModuleAcceleratorConfiguration()
void ModuleAcceleratorConfiguration::fillCache()
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
m_sModuleCFG = m_sModule;
aReadLock.unlock();
// <- SAFE ----------------------------------
diff --git a/framework/source/accelerators/presethandler.cxx b/framework/source/accelerators/presethandler.cxx
index bc12a8e..8071fae 100644
--- a/framework/source/accelerators/presethandler.cxx
+++ b/framework/source/accelerators/presethandler.cxx
@@ -22,8 +22,7 @@
#include <classes/fwkresid.hxx>
#include "classes/resource.hrc"
-#include <threadhelp/readguard.hxx>
-#include <threadhelp/writeguard.hxx>
+#include <threadhelp/guard.hxx>
#include <services.h>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -147,7 +146,7 @@ PresetHandler::~PresetHandler()
void PresetHandler::forgetCachedStorages()
{
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
if (m_eConfigType == E_DOCUMENT)
{
@@ -210,7 +209,7 @@ css::uno::Reference< css::embed::XStorage > PresetHandler::getOrCreateRootStorag
return xRoot;
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
aReadLock.unlock();
// <- SAFE ----------------------------------
@@ -268,7 +267,7 @@ css::uno::Reference< css::embed::XStorage > PresetHandler::getOrCreateRootStorag
return xRoot;
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
aReadLock.unlock();
// <- SAFE ----------------------------------
@@ -312,7 +311,7 @@ css::uno::Reference< css::embed::XStorage > PresetHandler::getOrCreateRootStorag
css::uno::Reference< css::embed::XStorage > PresetHandler::getWorkingStorageShare()
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
return m_xWorkingStorageShare;
// <- SAFE ----------------------------------
}
@@ -321,7 +320,7 @@ css::uno::Reference< css::embed::XStorage > PresetHandler::getWorkingStorageShar
css::uno::Reference< css::embed::XStorage > PresetHandler::getWorkingStorageUser()
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
return m_xWorkingStorageUser;
// <- SAFE ----------------------------------
}
@@ -330,7 +329,7 @@ css::uno::Reference< css::embed::XStorage > PresetHandler::getWorkingStorageUser
css::uno::Reference< css::embed::XStorage > PresetHandler::getParentStorageShare(const css::uno::Reference< css::embed::XStorage >& /*xChild*/)
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::embed::XStorage > xWorking = m_xWorkingStorageShare;
aReadLock.unlock();
// <- SAFE ----------------------------------
@@ -342,7 +341,7 @@ css::uno::Reference< css::embed::XStorage > PresetHandler::getParentStorageShare
css::uno::Reference< css::embed::XStorage > PresetHandler::getParentStorageUser(const css::uno::Reference< css::embed::XStorage >& /*xChild*/)
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::embed::XStorage > xWorking = m_xWorkingStorageUser;
aReadLock.unlock();
// <- SAFE ----------------------------------
@@ -360,7 +359,7 @@ void PresetHandler::connectToResource( PresetHandler::EConfigType
// TODO free all current open storages!
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
m_eConfigType = eConfigType ;
m_sResourceType = sResource ;
@@ -565,7 +564,7 @@ void PresetHandler::copyPresetToTarget(const OUString& sPreset,
// We try to open it and forward all errors to the user!
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::embed::XStorage > xWorkingShare = m_xWorkingStorageShare;
css::uno::Reference< css::embed::XStorage > xWorkingNoLang= m_xWorkingStorageNoLang;
css::uno::Reference< css::embed::XStorage > xWorkingUser = m_xWorkingStorageUser ;
@@ -605,7 +604,7 @@ css::uno::Reference< css::io::XStream > PresetHandler::openPreset(const OUString
sal_Bool bUseNoLangGlobal)
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::embed::XStorage > xFolder = bUseNoLangGlobal? m_xWorkingStorageNoLang: m_xWorkingStorageShare;
aReadLock.unlock();
// <- SAFE ----------------------------------
@@ -627,7 +626,7 @@ css::uno::Reference< css::io::XStream > PresetHandler::openTarget(const OUString
sal_Bool bCreateIfMissing)
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::embed::XStorage > xFolder = m_xWorkingStorageUser;
aReadLock.unlock();
// <- SAFE ----------------------------------
@@ -667,7 +666,7 @@ css::uno::Reference< css::io::XStream > PresetHandler::openTarget(const OUString
void PresetHandler::commitUserChanges()
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::embed::XStorage > xWorking = m_xWorkingStorageUser;
EConfigType eCfgType = m_eConfigType;
aReadLock.unlock();
@@ -704,7 +703,7 @@ void PresetHandler::commitUserChanges()
void PresetHandler::addStorageListener(IStorageListener* pListener)
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
OUString sRelPath = m_sRelPathUser; // use user path ... because we dont work directly on the share layer!
EConfigType eCfgType = m_eConfigType;
aReadLock.unlock();
@@ -734,7 +733,7 @@ void PresetHandler::addStorageListener(IStorageListener* pListener)
void PresetHandler::removeStorageListener(IStorageListener* pListener)
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
OUString sRelPath = m_sRelPathUser; // use user path ... because we dont work directly on the share layer!
EConfigType eCfgType = m_eConfigType;
aReadLock.unlock();
diff --git a/framework/source/accelerators/storageholder.cxx b/framework/source/accelerators/storageholder.cxx
index e3bdfb1..0522770 100644
--- a/framework/source/accelerators/storageholder.cxx
+++ b/framework/source/accelerators/storageholder.cxx
@@ -19,8 +19,7 @@
#include <accelerators/storageholder.hxx>
-#include <threadhelp/readguard.hxx>
-#include <threadhelp/writeguard.hxx>
+#include <threadhelp/guard.hxx>
#include <services.h>
#include <com/sun/star/container/NoSuchElementException.hpp>
@@ -65,7 +64,7 @@ StorageHolder::~StorageHolder()
void StorageHolder::forgetCachedStorages()
{
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
TPath2StorageInfo::iterator pIt;
for ( pIt = m_lStorages.begin();
@@ -86,7 +85,7 @@ void StorageHolder::forgetCachedStorages()
void StorageHolder::setRootStorage(const css::uno::Reference< css::embed::XStorage >& xRoot)
{
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
m_xRoot = xRoot;
aWriteLock.unlock();
// <- SAFE ----------------------------------
@@ -96,7 +95,7 @@ void StorageHolder::setRootStorage(const css::uno::Reference< css::embed::XStora
css::uno::Reference< css::embed::XStorage > StorageHolder::getRootStorage() const
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
return m_xRoot;
// <- SAFE ----------------------------------
}
@@ -109,7 +108,7 @@ css::uno::Reference< css::embed::XStorage > StorageHolder::openPath(const OUStri
OUStringList lFolders = StorageHolder::impl_st_parsePath(sNormedPath);
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::embed::XStorage > xParent = m_xRoot;
aReadLock.unlock();
// <- SAFE ----------------------------------
@@ -167,7 +166,7 @@ css::uno::Reference< css::embed::XStorage > StorageHolder::openPath(const OUStri
}
// SAFE -> ------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
pInfo = &(m_lStorages[sCheckPath]);
pInfo->Storage = xChild;
pInfo->UseCount = 1;
@@ -197,7 +196,7 @@ StorageHolder::TStorageList StorageHolder::getAllPathStorages(const OUString& sP
OUStringList::const_iterator pIt ;
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
for ( pIt = lFolders.begin();
pIt != lFolders.end() ;
@@ -248,7 +247,7 @@ void StorageHolder::commitPath(const OUString& sPath)
}
// SAFE -> ------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
xCommit = css::uno::Reference< css::embed::XTransactedObject >(m_xRoot, css::uno::UNO_QUERY);
aReadLock.unlock();
// <- SAFE ------------------------------
@@ -282,7 +281,7 @@ void StorageHolder::closePath(const OUString& rPath)
}
// SAFE -> ------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
OUStringList::reverse_iterator pIt2;
for ( pIt2 = lFolders.rbegin();
@@ -313,7 +312,7 @@ void StorageHolder::notifyPath(const OUString& sPath)
OUString sNormedPath = StorageHolder::impl_st_normPath(sPath);
// SAFE -> ------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
TPath2StorageInfo::iterator pIt1 = m_lStorages.find(sNormedPath);
if (pIt1 == m_lStorages.end())
@@ -341,7 +340,7 @@ void StorageHolder::addStorageListener( IStorageListener* pListener,
OUString sNormedPath = StorageHolder::impl_st_normPath(sPath);
// SAFE -> ------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
TPath2StorageInfo::iterator pIt1 = m_lStorages.find(sNormedPath);
if (pIt1 == m_lStorages.end())
@@ -363,7 +362,7 @@ void StorageHolder::removeStorageListener( IStorageListener* pListener,
OUString sNormedPath = StorageHolder::impl_st_normPath(sPath);
// SAFE -> ------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
TPath2StorageInfo::iterator pIt1 = m_lStorages.find(sNormedPath);
if (pIt1 == m_lStorages.end())
@@ -382,7 +381,7 @@ void StorageHolder::removeStorageListener( IStorageListener* pListener,
OUString StorageHolder::getPathOfStorage(const css::uno::Reference< css::embed::XStorage >& xStorage)
{
// SAFE -> ------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
TPath2StorageInfo::const_iterator pIt;
for ( pIt = m_lStorages.begin();
@@ -426,7 +425,7 @@ css::uno::Reference< css::embed::XStorage > StorageHolder::getParentStorage(cons
return css::uno::Reference< css::embed::XStorage >();
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
// b)
if (c < 2)
@@ -457,7 +456,7 @@ css::uno::Reference< css::embed::XStorage > StorageHolder::getParentStorage(cons
void StorageHolder::operator=(const StorageHolder& rCopy)
{
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
m_xRoot = rCopy.m_xRoot;
m_lStorages = rCopy.m_lStorages;
diff --git a/framework/source/classes/framecontainer.cxx b/framework/source/classes/framecontainer.cxx
index 34f6b5b..63fa123 100644
--- a/framework/source/classes/framecontainer.cxx
+++ b/framework/source/classes/framecontainer.cxx
@@ -18,8 +18,7 @@
*/
#include <classes/framecontainer.hxx>
-#include <threadhelp/writeguard.hxx>
-#include <threadhelp/readguard.hxx>
+#include <threadhelp/guard.hxx>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
@@ -72,7 +71,7 @@ void FrameContainer::append( const css::uno::Reference< css::frame::XFrame >& xF
if (xFrame.is() && ! exist(xFrame))
{
/* SAFE { */
- WriteGuard aWriteLock( m_aLock );
+ Guard aWriteLock( m_aLock );
m_aContainer.push_back( xFrame );
aWriteLock.unlock();
/* } SAFE */
@@ -94,7 +93,7 @@ void FrameContainer::remove( const css::uno::Reference< css::frame::XFrame >& xF
{
/* SAFE { */
// write lock necessary for follwing erase()!
- WriteGuard aWriteLock( m_aLock );
+ Guard aWriteLock( m_aLock );
TFrameIterator aSearchedItem = ::std::find( m_aContainer.begin(), m_aContainer.end(), xFrame );
if (aSearchedItem!=m_aContainer.end())
@@ -125,7 +124,7 @@ void FrameContainer::remove( const css::uno::Reference< css::frame::XFrame >& xF
sal_Bool FrameContainer::exist( const css::uno::Reference< css::frame::XFrame >& xFrame ) const
{
/* SAFE { */
- ReadGuard aReadLock( m_aLock );
+ Guard aReadLock( m_aLock );
return( ::std::find( m_aContainer.begin(), m_aContainer.end(), xFrame ) != m_aContainer.end() );
/* } SAFE */
}
@@ -139,7 +138,7 @@ sal_Bool FrameContainer::exist( const css::uno::Reference< css::frame::XFrame >&
void FrameContainer::clear()
{
// SAFE {
- WriteGuard aWriteLock( m_aLock );
+ Guard aWriteLock( m_aLock );
// Clear the container ...
m_aContainer.clear();
@@ -166,7 +165,7 @@ void FrameContainer::clear()
sal_uInt32 FrameContainer::getCount() const
{
/* SAFE { */
- ReadGuard aReadLock( m_aLock );
+ Guard aReadLock( m_aLock );
return( (sal_uInt32)m_aContainer.size() );
/* } SAFE */
}
@@ -194,7 +193,7 @@ css::uno::Reference< css::frame::XFrame > FrameContainer::operator[]( sal_uInt32
// Get element form container WITH automatic test of ranges!
// If index not valid, a out_of_range exception is thrown.
/* SAFE { */
- ReadGuard aReadLock( m_aLock );
+ Guard aReadLock( m_aLock );
xFrame = m_aContainer.at( nIndex );
aReadLock.unlock();
/* } SAFE */
@@ -219,7 +218,7 @@ css::uno::Reference< css::frame::XFrame > FrameContainer::operator[]( sal_uInt32
css::uno::Sequence< css::uno::Reference< css::frame::XFrame > > FrameContainer::getAllElements() const
{
/* SAFE { */
- ReadGuard aReadLock( m_aLock );
+ Guard aReadLock( m_aLock );
sal_Int32 nPosition = 0;
css::uno::Sequence< css::uno::Reference< css::frame::XFrame > > lElements ( (sal_uInt32)m_aContainer.size() );
@@ -247,7 +246,7 @@ void FrameContainer::setActive( const css::uno::Reference< css::frame::XFrame >&
if ( !xFrame.is() || exist(xFrame) )
{
/* SAFE { */
- WriteGuard aWriteLock( m_aLock );
+ Guard aWriteLock( m_aLock );
m_xActiveFrame = xFrame;
aWriteLock.unlock();
/* } SAFE */
@@ -267,7 +266,7 @@ void FrameContainer::setActive( const css::uno::Reference< css::frame::XFrame >&
css::uno::Reference< css::frame::XFrame > FrameContainer::getActive() const
{
/* SAFE { */
- ReadGuard aReadLock( m_aLock );
+ Guard aReadLock( m_aLock );
return m_xActiveFrame;
/* } SAFE */
}
@@ -286,7 +285,7 @@ css::uno::Reference< css::frame::XFrame > FrameContainer::getActive() const
css::uno::Reference< css::frame::XFrame > FrameContainer::searchOnAllChildrens( const OUString& sName ) const
{
/* SAFE { */
- ReadGuard aReadLock( m_aLock );
+ Guard aReadLock( m_aLock );
// Step over all child frames. But if direct child isn't the right one search on his children first - before
// you go to next direct child of this container!
@@ -324,7 +323,7 @@ css::uno::Reference< css::frame::XFrame > FrameContainer::searchOnAllChildrens(
css::uno::Reference< css::frame::XFrame > FrameContainer::searchOnDirectChildrens( const OUString& sName ) const
{
/* SAFE { */
- ReadGuard aReadLock( m_aLock );
+ Guard aReadLock( m_aLock );
css::uno::Reference< css::frame::XFrame > xSearchedFrame;
for( TConstFrameIterator pIterator=m_aContainer.begin(); pIterator!=m_aContainer.end(); ++pIterator )
diff --git a/framework/source/classes/taskcreator.cxx b/framework/source/classes/taskcreator.cxx
index 0f50870..b63c926 100644
--- a/framework/source/classes/taskcreator.cxx
+++ b/framework/source/classes/taskcreator.cxx
@@ -18,7 +18,7 @@
*/
#include <classes/taskcreator.hxx>
-#include <threadhelp/readguard.hxx>
+#include <threadhelp/guard.hxx>
#include <loadenv/targethelper.hxx>
#include <services.h>
#include <taskcreatordefs.hxx>
@@ -64,7 +64,7 @@ css::uno::Reference< css::frame::XFrame > TaskCreator::createTask( const OUStrin
sal_Bool bVisible )
{
/* SAFE { */
- ReadGuard aReadLock( m_aLock );
+ Guard aReadLock( m_aLock );
css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
aReadLock.unlock();
/* } SAFE */
diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx
index 0422509..f21ec96 100644
--- a/framework/source/dispatch/closedispatcher.cxx
+++ b/framework/source/dispatch/closedispatcher.cxx
@@ -19,8 +19,7 @@
#include <dispatch/closedispatcher.hxx>
#include <pattern/frame.hxx>
-#include <threadhelp/readguard.hxx>
-#include <threadhelp/writeguard.hxx>
+#include <threadhelp/guard.hxx>
#include <framework/framelistanalyzer.hxx>
#include <services.h>
#include <general.h>
@@ -150,7 +149,7 @@ void SAL_CALL CloseDispatcher::dispatchWithNotification(const css::util::URL&
throw(css::uno::RuntimeException, std::exception)
{
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
// This reference indicates, that we was already called before and
// our asynchronous process was not finished yet.
@@ -260,7 +259,7 @@ IMPL_LINK_NOARG(CloseDispatcher, impl_asyncCallback)
sal_Bool bControllerSuspended = sal_False;
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
// Closing of all views, related to the same document, is allowed
// only if the dispatched URL was ".uno:CloseDoc"!
@@ -411,7 +410,7 @@ IMPL_LINK_NOARG(CloseDispatcher, impl_asyncCallback)
implts_notifyResultListener(xListener, nState, css::uno::Any());
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
// This method was called asynchronous from our main thread by using a pointer.
// We reached this method only, by using a reference to ourself :-)
@@ -450,7 +449,7 @@ sal_Bool CloseDispatcher::implts_prepareFrameForClosing(const css::uno::Referenc
if (bCloseAllOtherViewsToo)
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
aReadLock.unlock();
// <- SAFE ----------------------------------
@@ -490,7 +489,7 @@ sal_Bool CloseDispatcher::implts_prepareFrameForClosing(const css::uno::Referenc
sal_Bool CloseDispatcher::implts_closeFrame()
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::frame::XFrame > xFrame (m_xCloseFrame.get(), css::uno::UNO_QUERY);
aReadLock.unlock();
// <- SAFE ----------------------------------
@@ -506,7 +505,7 @@ sal_Bool CloseDispatcher::implts_closeFrame()
return sal_False;
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
m_xCloseFrame = css::uno::WeakReference< css::frame::XFrame >();
aWriteLock.unlock();
// <- SAFE ----------------------------------
@@ -518,7 +517,7 @@ sal_Bool CloseDispatcher::implts_closeFrame()
sal_Bool CloseDispatcher::implts_establishBackingMode()
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
css::uno::Reference< css::frame::XFrame > xFrame (m_xCloseFrame.get(), css::uno::UNO_QUERY);
aReadLock.unlock();
@@ -549,7 +548,7 @@ sal_Bool CloseDispatcher::implts_establishBackingMode()
sal_Bool CloseDispatcher::implts_terminateApplication()
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
aReadLock.unlock();
// <- SAFE ----------------------------------
diff --git a/framework/source/dispatch/dispatchinformationprovider.cxx b/framework/source/dispatch/dispatchinformationprovider.cxx
index 84eb431..0c7a749 100644
--- a/framework/source/dispatch/dispatchinformationprovider.cxx
+++ b/framework/source/dispatch/dispatchinformationprovider.cxx
@@ -19,8 +19,7 @@
#include <dispatch/dispatchinformationprovider.hxx>
#include <dispatch/closedispatcher.hxx>
-#include <threadhelp/readguard.hxx>
-#include <threadhelp/writeguard.hxx>
+#include <threadhelp/guard.hxx>
#include <stdtypes.h>
#include <services.h>
@@ -132,7 +131,7 @@ css::uno::Sequence< css::frame::DispatchInformation > SAL_CALL DispatchInformati
css::uno::Sequence< css::uno::Reference< css::frame::XDispatchInformationProvider > > DispatchInformationProvider::implts_getAllSubProvider()
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
css::uno::Reference< css::frame::XFrame > xFrame(m_xFrame.get(), css::uno::UNO_QUERY);
aReadLock.unlock();
diff --git a/framework/source/dispatch/dispatchprovider.cxx b/framework/source/dispatch/dispatchprovider.cxx
index 2f855df..7fc0208 100644
--- a/framework/source/dispatch/dispatchprovider.cxx
+++ b/framework/source/dispatch/dispatchprovider.cxx
@@ -27,8 +27,7 @@
#include <pattern/window.hxx>
#include <threadhelp/transactionguard.hxx>
-#include <threadhelp/readguard.hxx>
-#include <threadhelp/writeguard.hxx>
+#include <threadhelp/guard.hxx>
#include <dispatchcommands.h>
#include <protocols.h>
#include <services.h>
@@ -107,7 +106,7 @@ css::uno::Reference< css::frame::XDispatch > SAL_CALL DispatchProvider::queryDis
css::uno::Reference< css::frame::XDispatch > xDispatcher;
/* SAFE { */
- ReadGuard aReadLock( m_aLock );
+ Guard aReadLock( m_aLock );
css::uno::Reference< css::frame::XFrame > xOwner( m_xFrame.get(), css::uno::UNO_QUERY );
aReadLock.unlock();
/* } SAFE */
@@ -492,7 +491,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_searchProt
if (m_aProtocolHandlerCache.search(aURL,&aHandler))
{
/* SAFE { */
- ReadGuard aReadLock( m_aLock );
+ Guard aReadLock( m_aLock );
// create it
css::uno::Reference< css::frame::XDispatchProvider > xHandler;
@@ -568,7 +567,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_getOrCreat
css::uno::Reference< css::frame::XDispatch > xDispatchHelper;
/* SAFE { */
- ReadGuard aReadLock( m_aLock );
+ Guard aReadLock( m_aLock );
css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
aReadLock.unlock();
/* } SAFE */
@@ -580,7 +579,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_getOrCreat
// Attention: Such menue dispatcher must be a singleton for this frame - means our owner frame.
// Otherwhise he can make some trouble.
/* SAFE { */
- WriteGuard aWriteLock( m_aLock );
+ Guard aWriteLock( m_aLock );
if ( ! m_xMenuDispatcher.is() )
{
MenuDispatcher* pDispatcher = new MenuDispatcher( xContext, xOwner );
diff --git a/framework/source/dispatch/interceptionhelper.cxx b/framework/source/dispatch/interceptionhelper.cxx
index 370d076..6bed175 100644
--- a/framework/source/dispatch/interceptionhelper.cxx
+++ b/framework/source/dispatch/interceptionhelper.cxx
@@ -18,8 +18,7 @@
*/
#include <dispatch/interceptionhelper.hxx>
-#include <threadhelp/readguard.hxx>
-#include <threadhelp/writeguard.hxx>
+#include <threadhelp/guard.hxx>
#include <com/sun/star/frame/XInterceptorInfo.hpp>
@@ -53,7 +52,7 @@ css::uno::Reference< css::frame::XDispatch > SAL_CALL InterceptionHelper::queryD
throw(css::uno::RuntimeException, std::exception)
{
// SAFE {
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
// a) first search an interceptor, which match to this URL by it's URL pattern registration
// Note: if it return NULL - it does not mean an empty interceptor list automaticly!
@@ -126,7 +125,7 @@ void SAL_CALL InterceptionHelper::registerDispatchProviderInterceptor(const css:
}
// SAFE {
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
// a) no interceptor at all - set this instance as master for given interceptor
// and set our slave as it's slave - and put this interceptor to the list.
@@ -191,7 +190,7 @@ void SAL_CALL InterceptionHelper::releaseDispatchProviderInterceptor(const css::
throw css::uno::RuntimeException("NULL references not allowed as in parameter", xThis);
// SAFE {
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
// search this interceptor ...
// If it could be located inside cache -
@@ -235,7 +234,7 @@ void SAL_CALL InterceptionHelper::disposing(const css::lang::EventObject& aEvent
{
#ifdef FORCE_DESTRUCTION_OF_INTERCEPTION_CHAIN
// SAFE ->
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
// check calli ... we accept such disposing call's only from our onwer frame.
css::uno::Reference< css::frame::XFrame > xOwner(m_xOwnerWeak.get(), css::uno::UNO_QUERY);
diff --git a/framework/source/dispatch/loaddispatcher.cxx b/framework/source/dispatch/loaddispatcher.cxx
index b028e5f..3d90d03 100644
--- a/framework/source/dispatch/loaddispatcher.cxx
+++ b/framework/source/dispatch/loaddispatcher.cxx
@@ -18,8 +18,7 @@
*/
#include <dispatch/loaddispatcher.hxx>
-#include <threadhelp/readguard.hxx>
-#include <threadhelp/writeguard.hxx>
+#include <threadhelp/guard.hxx>
#include <com/sun/star/frame/DispatchResultState.hpp>
@@ -87,7 +86,7 @@ css::uno::Any LoadDispatcher::impl_dispatch( const css::util::URL& rURL,
css::uno::Reference< css::uno::XInterface > xThis(static_cast< css::frame::XNotifyingDispatch* >(this), css::uno::UNO_QUERY);
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
// We are the only client of this load env object ... but
// may a dispatch request before is still in progress (?!).
diff --git a/framework/source/dispatch/mailtodispatcher.cxx b/framework/source/dispatch/mailtodispatcher.cxx
index 72df6a7..0be69d9 100644
--- a/framework/source/dispatch/mailtodispatcher.cxx
+++ b/framework/source/dispatch/mailtodispatcher.cxx
@@ -18,7 +18,7 @@
*/
#include <dispatch/mailtodispatcher.hxx>
-#include <threadhelp/readguard.hxx>
+#include <threadhelp/guard.hxx>
#include <general.h>
#include <services.h>
@@ -202,7 +202,7 @@ sal_Bool MailToDispatcher::implts_dispatch( const css::util::URL&
css::uno::Reference< css::uno::XComponentContext > xContext;
/* SAFE */{
- ReadGuard aReadLock( m_aLock );
+ Guard aReadLock( m_aLock );
xContext = m_xContext;
/* SAFE */}
diff --git a/framework/source/dispatch/oxt_handler.cxx b/framework/source/dispatch/oxt_handler.cxx
index dfaea21..de0fa0b 100644
--- a/framework/source/dispatch/oxt_handler.cxx
+++ b/framework/source/dispatch/oxt_handler.cxx
@@ -19,8 +19,6 @@
#include <dispatch/oxt_handler.hxx>
#include <threadhelp/transactionguard.hxx>
-#include <threadhelp/writeguard.hxx>
-#include <threadhelp/readguard.hxx>
#include <services.h>
#include <unotools/mediadescriptor.hxx>
diff --git a/framework/source/dispatch/popupmenudispatcher.cxx b/framework/source/dispatch/popupmenudispatcher.cxx
index bc12aa3..1419cfe 100644
--- a/framework/source/dispatch/popupmenudispatcher.cxx
+++ b/framework/source/dispatch/popupmenudispatcher.cxx
@@ -21,9 +21,8 @@
#include <general.h>
#include <framework/menuconfiguration.hxx>
#include <framework/addonmenu.hxx>
-#include <threadhelp/readguard.hxx>
#include <threadhelp/resetableguard.hxx>
-#include <threadhelp/writeguard.hxx>
+#include <threadhelp/guard.hxx>
#include <services.h>
#include <properties.h>
@@ -150,7 +149,7 @@ throw( css::uno::Exception, css::uno::RuntimeException, std::exception)
css::uno::Reference< css::frame::XFrame > xFrame;
/* SAFE { */
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
for (int a=0; a<lArguments.getLength(); ++a)
{
diff --git a/framework/source/dispatch/servicehandler.cxx b/framework/source/dispatch/servicehandler.cxx
index 766009f..66a7c99 100644
--- a/framework/source/dispatch/servicehandler.cxx
+++ b/framework/source/dispatch/servicehandler.cxx
@@ -18,7 +18,7 @@
*/
#include <dispatch/servicehandler.hxx>
-#include <threadhelp/readguard.hxx>
+#include <threadhelp/guard.hxx>
#include <general.h>
#include <services.h>
@@ -200,7 +200,7 @@ css::uno::Reference< css::uno::XInterface > ServiceHandler::implts_dispatch( con
const css::uno::Sequence< css::beans::PropertyValue >& /*lArguments*/ ) throw( css::uno::RuntimeException )
{
/* SAFE */
- ReadGuard aReadLock( m_aLock );
+ Guard aReadLock( m_aLock );
css::uno::Reference< css::lang::XMultiServiceFactory > xFactory = m_xFactory;
aReadLock.unlock();
/* SAFE */
diff --git a/framework/source/dispatch/startmoduledispatcher.cxx b/framework/source/dispatch/startmoduledispatcher.cxx
index 90c5b6e..ce08b00 100644
--- a/framework/source/dispatch/startmoduledispatcher.cxx
+++ b/framework/source/dispatch/startmoduledispatcher.cxx
@@ -21,8 +21,7 @@
#include <dispatch/startmoduledispatcher.hxx>
#include <pattern/frame.hxx>
-#include <threadhelp/readguard.hxx>
-#include <threadhelp/writeguard.hxx>
+#include <threadhelp/guard.hxx>
#include <framework/framelistanalyzer.hxx>
#include <dispatchcommands.h>
#include <targets.h>
@@ -133,7 +132,7 @@ void SAL_CALL StartModuleDispatcher::removeStatusListener(const css::uno::Refere
return sal_False;
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
aReadLock.unlock();
// <- SAFE ----------------------------------
@@ -164,7 +163,7 @@ void SAL_CALL StartModuleDispatcher::removeStatusListener(const css::uno::Refere
::sal_Bool StartModuleDispatcher::implts_establishBackingMode()
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
aReadLock.unlock();
// <- SAFE ----------------------------------
diff --git a/framework/source/dispatch/systemexec.cxx b/framework/source/dispatch/systemexec.cxx
index 1833045..97a30ec 100644
--- a/framework/source/dispatch/systemexec.cxx
+++ b/framework/source/dispatch/systemexec.cxx
@@ -18,7 +18,7 @@
*/
#include <dispatch/systemexec.hxx>
-#include <threadhelp/readguard.hxx>
+#include <threadhelp/guard.hxx>
#include <general.h>
#include <services.h>
@@ -123,7 +123,7 @@ void SAL_CALL SystemExec::dispatchWithNotification( const css::util::URL&
OUString sSystemURLWithVariables = aURL.Complete.copy(PROTOCOL_LENGTH, c);
// SAFE ->
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
aReadLock.unlock();
// <- SAFE
diff --git a/framework/source/dispatch/windowcommanddispatch.cxx b/framework/source/dispatch/windowcommanddispatch.cxx
index d19695d..51b88ff 100644
--- a/framework/source/dispatch/windowcommanddispatch.cxx
+++ b/framework/source/dispatch/windowcommanddispatch.cxx
@@ -18,8 +18,7 @@
*/
#include <dispatch/windowcommanddispatch.hxx>
-#include <threadhelp/readguard.hxx>
-#include <threadhelp/writeguard.hxx>
+#include <threadhelp/guard.hxx>
#include <targets.h>
#include <services.h>
@@ -59,7 +58,7 @@ WindowCommandDispatch::~WindowCommandDispatch()
void WindowCommandDispatch::impl_startListening()
{
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::awt::XWindow > xWindow( m_xWindow.get(), css::uno::UNO_QUERY );
aReadLock.unlock();
@@ -79,7 +78,7 @@ void WindowCommandDispatch::impl_startListening()
void WindowCommandDispatch::impl_stopListening()
{
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::awt::XWindow > xWindow( m_xWindow.get(), css::uno::UNO_QUERY );
aReadLock.unlock();
@@ -153,7 +152,7 @@ void WindowCommandDispatch::impl_dispatchCommand(const OUString& sCommand)
try
{
// SYNCHRONIZED ->
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::frame::XDispatchProvider > xProvider(m_xFrame.get(), css::uno::UNO_QUERY_THROW);
css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
aReadLock.unlock();
diff --git a/framework/source/fwe/classes/framelistanalyzer.cxx b/framework/source/fwe/classes/framelistanalyzer.cxx
index 2aad958..a3fdea3 100644
--- a/framework/source/fwe/classes/framelistanalyzer.cxx
+++ b/framework/source/fwe/classes/framelistanalyzer.cxx
@@ -19,8 +19,6 @@
#include "framework/framelistanalyzer.hxx"
-#include <threadhelp/writeguard.hxx>
-#include <threadhelp/readguard.hxx>
#include <targets.h>
#include <properties.h>
#include <services.h>
diff --git a/framework/source/fwi/classes/propertysethelper.cxx b/framework/source/fwi/classes/propertysethelper.cxx
index dc11383..6e8cb07 100644
--- a/framework/source/fwi/classes/propertysethelper.cxx
+++ b/framework/source/fwi/classes/propertysethelper.cxx
@@ -19,9 +19,7 @@
#include <classes/propertysethelper.hxx>
#include <threadhelp/transactionguard.hxx>
-#include <threadhelp/readguard.hxx>
-#include <threadhelp/writeguard.hxx>
-
+#include <threadhelp/guard.hxx>
namespace framework{
@@ -49,7 +47,7 @@ void PropertySetHelper::impl_setPropertyChangeBroadcaster(const css::uno::Refere
TransactionGuard aTransaction(m_rTransactionManager, E_SOFTEXCEPTIONS);
// SAFE ->
- WriteGuard aWriteLock(m_rLock);
+ Guard aWriteLock(m_rLock);
m_xBroadcaster = xBroadcaster;
aWriteLock.unlock();
// <- SAFE
@@ -63,7 +61,7 @@ void SAL_CALL PropertySetHelper::impl_addPropertyInfo(const css::beans::Property
TransactionGuard aTransaction(m_rTransactionManager, E_SOFTEXCEPTIONS);
// SAFE ->
- WriteGuard aWriteLock(m_rLock);
+ Guard aWriteLock(m_rLock);
PropertySetHelper::TPropInfoHash::const_iterator pIt = m_lProps.find(aProperty.Name);
if (pIt != m_lProps.end())
@@ -81,7 +79,7 @@ void SAL_CALL PropertySetHelper::impl_removePropertyInfo(const OUString& sProper
TransactionGuard aTransaction(m_rTransactionManager, E_SOFTEXCEPTIONS);
// SAFE ->
- WriteGuard aWriteLock(m_rLock);
+ Guard aWriteLock(m_rLock);
PropertySetHelper::TPropInfoHash::iterator pIt = m_lProps.find(sProperty);
if (pIt == m_lProps.end())
@@ -102,7 +100,7 @@ void SAL_CALL PropertySetHelper::impl_disablePropertySet()
TransactionGuard aTransaction(m_rTransactionManager, E_SOFTEXCEPTIONS);
// SAFE ->
- WriteGuard aWriteLock(m_rLock);
+ Guard aWriteLock(m_rLock);
css::uno::Reference< css::uno::XInterface > xThis(static_cast< css::beans::XPropertySet* >(this), css::uno::UNO_QUERY);
css::lang::EventObject aEvent(xThis);
@@ -195,7 +193,7 @@ void SAL_CALL PropertySetHelper::setPropertyValue(const OUString& sProperty,
TransactionGuard aTransaction(m_rTransactionManager, E_HARDEXCEPTIONS);
// SAFE ->
- WriteGuard aWriteLock(m_rLock);
+ Guard aWriteLock(m_rLock);
PropertySetHelper::TPropInfoHash::const_iterator pIt = m_lProps.find(sProperty);
if (pIt == m_lProps.end())
@@ -256,7 +254,7 @@ css::uno::Any SAL_CALL PropertySetHelper::getPropertyValue(const OUString& sProp
TransactionGuard aTransaction(m_rTransactionManager, E_HARDEXCEPTIONS);
// SAFE ->
- ReadGuard aReadLock(m_rLock);
+ Guard aReadLock(m_rLock);
PropertySetHelper::TPropInfoHash::const_iterator pIt = m_lProps.find(sProperty);
if (pIt == m_lProps.end())
@@ -280,7 +278,7 @@ void SAL_CALL PropertySetHelper::addPropertyChangeListener(const OUString&
TransactionGuard aTransaction(m_rTransactionManager, E_HARDEXCEPTIONS);
// SAFE ->
- ReadGuard aReadLock(m_rLock);
+ Guard aReadLock(m_rLock);
PropertySetHelper::TPropInfoHash::const_iterator pIt = m_lProps.find(sProperty);
if (pIt == m_lProps.end())
@@ -302,7 +300,7 @@ void SAL_CALL PropertySetHelper::removePropertyChangeListener(const OUString&
TransactionGuard aTransaction(m_rTransactionManager, E_SOFTEXCEPTIONS);
// SAFE ->
- ReadGuard aReadLock(m_rLock);
+ Guard aReadLock(m_rLock);
PropertySetHelper::TPropInfoHash::const_iterator pIt = m_lProps.find(sProperty);
if (pIt == m_lProps.end())
@@ -324,7 +322,7 @@ void SAL_CALL PropertySetHelper::addVetoableChangeListener(const OUString&
TransactionGuard aTransaction(m_rTransactionManager, E_HARDEXCEPTIONS);
// SAFE ->
- ReadGuard aReadLock(m_rLock);
+ Guard aReadLock(m_rLock);
PropertySetHelper::TPropInfoHash::const_iterator pIt = m_lProps.find(sProperty);
if (pIt == m_lProps.end())
@@ -346,7 +344,7 @@ void SAL_CALL PropertySetHelper::removeVetoableChangeListener(const OUString&
TransactionGuard aTransaction(m_rTransactionManager, E_SOFTEXCEPTIONS);
// SAFE ->
- ReadGuard aReadLock(m_rLock);
+ Guard aReadLock(m_rLock);
PropertySetHelper::TPropInfoHash::const_iterator pIt = m_lProps.find(sProperty);
if (pIt == m_lProps.end())
@@ -365,7 +363,7 @@ css::uno::Sequence< css::beans::Property > SAL_CALL PropertySetHelper::getProper
TransactionGuard aTransaction(m_rTransactionManager, E_HARDEXCEPTIONS);
// SAFE ->
- ReadGuard aReadLock(m_rLock);
+ Guard aReadLock(m_rLock);
sal_Int32 c = (sal_Int32)m_lProps.size();
css::uno::Sequence< css::beans::Property > lProps(c);
@@ -390,7 +388,7 @@ css::beans::Property SAL_CALL PropertySetHelper::getPropertyByName(const OUStrin
TransactionGuard aTransaction(m_rTransactionManager, E_HARDEXCEPTIONS);
// SAFE ->
- ReadGuard aReadLock(m_rLock);
+ Guard aReadLock(m_rLock);
PropertySetHelper::TPropInfoHash::const_iterator pIt = m_lProps.find(sName);
if (pIt == m_lProps.end())
@@ -407,7 +405,7 @@ sal_Bool SAL_CALL PropertySetHelper::hasPropertyByName(const OUString& sName)
TransactionGuard aTransaction(m_rTransactionManager, E_HARDEXCEPTIONS);
// SAFE ->
- ReadGuard aReadLock(m_rLock);
+ Guard aReadLock(m_rLock);
PropertySetHelper::TPropInfoHash::iterator pIt = m_lProps.find(sName);
sal_Bool bExist = (pIt != m_lProps.end());
diff --git a/framework/source/fwi/classes/protocolhandlercache.cxx b/framework/source/fwi/classes/protocolhandlercache.cxx
index e558cd64..eaad82c 100644
--- a/framework/source/fwi/classes/protocolhandlercache.cxx
+++ b/framework/source/fwi/classes/protocolhandlercache.cxx
@@ -25,8 +25,7 @@
#include <classes/protocolhandlercache.hxx>
#include <classes/converter.hxx>
-#include <threadhelp/readguard.hxx>
-#include <threadhelp/writeguard.hxx>
+#include <threadhelp/guard.hxx>
#include <threadhelp/lockhelper.hxx>
#include <tools/wldcrd.hxx>
@@ -83,7 +82,7 @@ HandlerCFGAccess* HandlerCache::m_pConfig = NULL;
HandlerCache::HandlerCache()
{
/* SAFE */{
- WriteGuard aGlobalLock( LockHelper::getGlobalLock() );
+ Guard aGlobalLock( LockHelper::getGlobalLock() );
if (m_nRefCount==0)
{
@@ -106,7 +105,7 @@ HandlerCache::HandlerCache()
HandlerCache::~HandlerCache()
{
/* SAFE */{
- WriteGuard aGlobalLock( LockHelper::getGlobalLock() );
+ Guard aGlobalLock( LockHelper::getGlobalLock() );
if( m_nRefCount==1)
{
@@ -135,7 +134,7 @@ sal_Bool HandlerCache::search( const OUString& sURL, ProtocolHandler* pReturn )
{
sal_Bool bFound = sal_False;
/* SAFE */{
- ReadGuard aReadLock( LockHelper::getGlobalLock() );
+ Guard aReadLock( LockHelper::getGlobalLock() );
PatternHash::const_iterator pItem = m_pPattern->findPatternKey(sURL);
if (pItem!=m_pPattern->end())
{
@@ -160,7 +159,7 @@ sal_Bool HandlerCache::search( const css::util::URL& aURL, ProtocolHandler* pRet
void HandlerCache::takeOver(HandlerHash* pHandler, PatternHash* pPattern)
{
// SAFE ->
- WriteGuard aWriteLock( LockHelper::getGlobalLock() );
+ Guard aWriteLock( LockHelper::getGlobalLock() );
HandlerHash* pOldHandler = m_pHandler;
PatternHash* pOldPattern = m_pPattern;
diff --git a/framework/source/fwi/jobs/configaccess.cxx b/framework/source/fwi/jobs/configaccess.cxx
index ffb18b0..d9c6300 100644
--- a/framework/source/fwi/jobs/configaccess.cxx
+++ b/framework/source/fwi/jobs/configaccess.cxx
@@ -18,8 +18,7 @@
*/
#include <jobs/configaccess.hxx>
-#include <threadhelp/readguard.hxx>
-#include <threadhelp/writeguard.hxx>
+#include <threadhelp/guard.hxx>
#include <threadhelp/resetableguard.hxx>
#include <general.h>
#include <services.h>
@@ -79,7 +78,7 @@ ConfigAccess::~ConfigAccess()
ConfigAccess::EOpenMode ConfigAccess::getMode() const
{
/* SAFE { */
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
return m_eMode;
/* } SAFE */
}
@@ -104,7 +103,7 @@ void ConfigAccess::open( /*IN*/ EOpenMode eMode )
/* SAFE { */
// We must lock the whole method to be shure, that nobody
// outside uses our internal member m_xAccess!
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
// check if configuration is already open in the right mode.
// By the way: Don't allow closing by using this method!
@@ -164,7 +163,7 @@ void ConfigAccess::close()
/* SAFE { */
// Lock the whole method, to be shure that nobody else uses our internal members
// during this time.
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
// check already closed configuration
if (m_xConfig.is())
@@ -189,7 +188,7 @@ void ConfigAccess::close()
methods. Acquire it before you call cfg() and release it afterwards immediately.
E.g.: ConfigAccess aAccess(...);
- ReadGuard aReadLock(aAccess.m_aLock);
+ Guard aReadLock(aAccess.m_aLock);
Reference< XPropertySet > xSet(aAccess.cfg(), UNO_QUERY);
Any aProp = xSet->getPropertyValue("...");
aReadLock.unlock();
diff --git a/framework/source/fwi/threadhelp/lockhelper.cxx b/framework/source/fwi/threadhelp/lockhelper.cxx
index 839d9c2..1486f46 100644
--- a/framework/source/fwi/threadhelp/lockhelper.cxx
+++ b/framework/source/fwi/threadhelp/lockhelper.cxx
@@ -30,8 +30,7 @@ namespace framework{
/*-************************************************************************************************************
@short use ctor to initialize instance
- @seealso class ReadGuard
- @seealso class WriteGuard
+ @seealso class Guard
@param "rSolarMutex", for some components we must be "vcl-free"! So we can't work with our solar mutex
directly. User must set his reference at this instance - so we can work with it!
diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx
index 7d18614..0b37823 100644
--- a/framework/source/helper/persistentwindowstate.cxx
+++ b/framework/source/helper/persistentwindowstate.cxx
@@ -19,8 +19,7 @@
#include <pattern/window.hxx>
#include <helper/persistentwindowstate.hxx>
-#include <threadhelp/writeguard.hxx>
-#include <threadhelp/readguard.hxx>
+#include <threadhelp/guard.hxx>
#include <macros/generic.hxx>
#include <services.h>
@@ -78,7 +77,7 @@ void SAL_CALL PersistentWindowState::initialize(const css::uno::Sequence< css::u
1);
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
// hold the frame as weak reference(!) so it can die everytimes :-)
m_xFrame = xFrame;
aWriteLock.unlock();
@@ -93,7 +92,7 @@ void SAL_CALL PersistentWindowState::frameAction(const css::frame::FrameActionEv
throw(css::uno::RuntimeException, std::exception)
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
css::uno::Reference< css::frame::XFrame > xFrame(m_xFrame.get(), css::uno::UNO_QUERY);
sal_Bool bRestoreWindowState = !m_bWindowStateAlreadySet;
@@ -123,7 +122,7 @@ void SAL_CALL PersistentWindowState::frameAction(const css::frame::FrameActionEv
OUString sWindowState = PersistentWindowState::implst_getWindowStateFromConfig(xContext, sModuleName);
PersistentWindowState::implst_setWindowStateOnWindow(xWindow,sWindowState);
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
m_bWindowStateAlreadySet = sal_True;
aWriteLock.unlock();
// <- SAFE ----------------------------------
diff --git a/framework/source/helper/statusindicator.cxx b/framework/source/helper/statusindicator.cxx
index eb11ce6..61d2521 100644
--- a/framework/source/helper/statusindicator.cxx
+++ b/framework/source/helper/statusindicator.cxx
@@ -21,9 +21,7 @@
#include <helper/statusindicator.hxx>
-#include <threadhelp/readguard.hxx>
-#include <threadhelp/writeguard.hxx>
-
+#include <threadhelp/guard.hxx>
namespace framework{
@@ -50,7 +48,7 @@ void SAL_CALL StatusIndicator::start(const OUString& sText ,
(void) nRange;
#else
// SAFE ->
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory.get(), css::uno::UNO_QUERY);
aReadLock.unlock();
// <- SAFE
@@ -68,7 +66,7 @@ void SAL_CALL StatusIndicator::end()
{
#if HAVE_FEATURE_DESKTOP
// SAFE ->
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory.get(), css::uno::UNO_QUERY);
aReadLock.unlock();
// <- SAFE
@@ -86,7 +84,7 @@ void SAL_CALL StatusIndicator::reset()
{
#if HAVE_FEATURE_DESKTOP
// SAFE ->
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory.get(), css::uno::UNO_QUERY);
aReadLock.unlock();
// <- SAFE
@@ -106,7 +104,7 @@ void SAL_CALL StatusIndicator::setText(const OUString& sText)
(void) sText;
#else
// SAFE ->
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory.get(), css::uno::UNO_QUERY);
aReadLock.unlock();
// <- SAFE
@@ -126,7 +124,7 @@ void SAL_CALL StatusIndicator::setValue(sal_Int32 nValue)
(void) nValue;
#else
// SAFE ->
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory.get(), css::uno::UNO_QUERY);
aReadLock.unlock();
// <- SAFE
diff --git a/framework/source/helper/statusindicatorfactory.cxx b/framework/source/helper/statusindicatorfactory.cxx
index 3b55f7c..794f7cf 100644
--- a/framework/source/helper/statusindicatorfactory.cxx
+++ b/framework/source/helper/statusindicatorfactory.cxx
@@ -21,8 +21,7 @@
#include <helper/statusindicatorfactory.hxx>
#include <helper/statusindicator.hxx>
#include <helper/vclstatusindicator.hxx>
-#include <threadhelp/writeguard.hxx>
-#include <threadhelp/readguard.hxx>
+#include <threadhelp/guard.hxx>
#include <services.h>
#include <properties.h>
@@ -78,7 +77,7 @@ void SAL_CALL StatusIndicatorFactory::initialize(const css::uno::Sequence< css::
{
if (lArguments.getLength() > 0) {
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
css::uno::Reference< css::frame::XFrame > xTmpFrame;
css::uno::Reference< css::awt::XWindow > xTmpWindow;
@@ -126,7 +125,7 @@ void SAL_CALL StatusIndicatorFactory::update()
throw(css::uno::RuntimeException, std::exception)
{
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
m_bAllowReschedule = sal_True;
aWriteLock.unlock();
// <- SAFE ----------------------------------
@@ -138,7 +137,7 @@ void StatusIndicatorFactory::start(const css::uno::Reference< css::task::XStatus
sal_Int32 nRange)
{
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
// create new info structure for this child or move it to the front of our stack
IndicatorStack::iterator pItem = ::std::find(m_aStack.begin(), m_aStack.end(), xChild);
@@ -166,7 +165,7 @@ void StatusIndicatorFactory::start(const css::uno::Reference< css::task::XStatus
void StatusIndicatorFactory::reset(const css::uno::Reference< css::task::XStatusIndicator >& xChild)
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
// reset the internal info structure related to this child
IndicatorStack::iterator pItem = ::std::find(m_aStack.begin(), m_aStack.end(), xChild);
@@ -197,7 +196,7 @@ void StatusIndicatorFactory::reset(const css::uno::Reference< css::task::XStatus
void StatusIndicatorFactory::end(const css::uno::Reference< css::task::XStatusIndicator >& xChild)
{
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
// remove this child from our stack
IndicatorStack::iterator pItem = ::std::find(m_aStack.begin(), m_aStack.end(), xChild);
@@ -252,7 +251,7 @@ void StatusIndicatorFactory::setText(const css::uno::Reference< css::task::XStat
const OUString& sText )
{
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
IndicatorStack::iterator pItem = ::std::find(m_aStack.begin(), m_aStack.end(), xChild);
if (pItem != m_aStack.end())
@@ -282,7 +281,7 @@ void StatusIndicatorFactory::setValue( const css::uno::Reference< css::task::XSt
sal_Int32 nValue )
{
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
sal_Int32 nOldValue = 0;
IndicatorStack::iterator pItem = ::std::find(m_aStack.begin(), m_aStack.end(), xChild);
@@ -314,7 +313,7 @@ void StatusIndicatorFactory::setValue( const css::uno::Reference< css::task::XSt
void StatusIndicatorFactory::implts_makeParentVisibleIfAllowed()
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
if (!m_bAllowParentShow)
return;
@@ -407,7 +406,7 @@ void StatusIndicatorFactory::implts_makeParentVisibleIfAllowed()
void StatusIndicatorFactory::impl_createProgress()
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::frame::XFrame > xFrame (m_xFrame.get() , css::uno::UNO_QUERY);
css::uno::Reference< css::awt::XWindow > xWindow(m_xPluggWindow.get(), css::uno::UNO_QUERY);
@@ -447,7 +446,7 @@ void StatusIndicatorFactory::impl_createProgress()
}
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
m_xProgress = xProgress;
aWriteLock.lock();
// <- SAFE ----------------------------------
@@ -457,7 +456,7 @@ void StatusIndicatorFactory::impl_createProgress()
void StatusIndicatorFactory::impl_showProgress()
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::frame::XFrame > xFrame (m_xFrame.get() , css::uno::UNO_QUERY);
css::uno::Reference< css::awt::XWindow > xWindow(m_xPluggWindow.get(), css::uno::UNO_QUERY);
@@ -491,7 +490,7 @@ void StatusIndicatorFactory::impl_showProgress()
}
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
m_xProgress = xProgress;
aWriteLock.lock();
// <- SAFE ----------------------------------
@@ -502,7 +501,7 @@ void StatusIndicatorFactory::impl_showProgress()
void StatusIndicatorFactory::impl_hideProgress()
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::frame::XFrame > xFrame (m_xFrame.get() , css::uno::UNO_QUERY);
css::uno::Reference< css::awt::XWindow > xWindow(m_xPluggWindow.get(), css::uno::UNO_QUERY);
@@ -528,7 +527,7 @@ void StatusIndicatorFactory::impl_hideProgress()
void StatusIndicatorFactory::impl_reschedule(sal_Bool bForce)
{
// SAFE ->
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
if (m_bDisableReschedule)
return;
aReadLock.unlock();
@@ -538,7 +537,7 @@ void StatusIndicatorFactory::impl_reschedule(sal_Bool bForce)
if (!bReschedule)
{
// SAFE ->
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
bReschedule = m_bAllowReschedule;
m_bAllowReschedule = sal_False;
aWriteLock.unlock();
@@ -549,7 +548,7 @@ void StatusIndicatorFactory::impl_reschedule(sal_Bool bForce)
return;
// SAFE ->
- WriteGuard aGlobalLock(LockHelper::getGlobalLock());
+ Guard aGlobalLock(LockHelper::getGlobalLock());
if (m_nInReschedule == 0)
{
@@ -572,7 +571,7 @@ void StatusIndicatorFactory::impl_reschedule(sal_Bool bForce)
void StatusIndicatorFactory::impl_startWakeUpThread()
{
// SAFE ->
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
if (m_bDisableReschedule)
return;
@@ -590,7 +589,7 @@ void StatusIndicatorFactory::impl_startWakeUpThread()
void StatusIndicatorFactory::impl_stopWakeUpThread()
{
// SAFE ->
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
if (m_pWakeUp)
{
// Thread kill itself after terminate()!
diff --git a/framework/source/helper/tagwindowasmodified.cxx b/framework/source/helper/tagwindowasmodified.cxx
index 3e713ca..b0c68bc 100644
--- a/framework/source/helper/tagwindowasmodified.cxx
+++ b/framework/source/helper/tagwindowasmodified.cxx
@@ -19,8 +19,7 @@
#include <helper/tagwindowasmodified.hxx>
#include <pattern/window.hxx>
-#include <threadhelp/writeguard.hxx>
-#include <threadhelp/readguard.hxx>
+#include <threadhelp/guard.hxx>
#include <macros/generic.hxx>
#include <services.h>
@@ -67,7 +66,7 @@ void SAL_CALL TagWindowAsModified::initialize(const css::uno::Sequence< css::uno
return;
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
m_xFrame = xFrame ;
aWriteLock.unlock();
// <- SAFE ----------------------------------
@@ -81,7 +80,7 @@ void SAL_CALL TagWindowAsModified::modified(const css::lang::EventObject& aEvent
throw(css::uno::RuntimeException, std::exception)
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::util::XModifiable > xModel (m_xModel.get (), css::uno::UNO_QUERY);
css::uno::Reference< css::awt::XWindow > xWindow(m_xWindow.get(), css::uno::UNO_QUERY);
@@ -127,7 +126,7 @@ void SAL_CALL TagWindowAsModified::frameAction(const css::frame::FrameActionEven
return;
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
css::uno::Reference< css::frame::XFrame > xFrame(m_xFrame.get(), css::uno::UNO_QUERY);
if (
@@ -147,7 +146,7 @@ void SAL_CALL TagWindowAsModified::disposing(const css::lang::EventObject& aEven
throw(css::uno::RuntimeException, std::exception)
{
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
css::uno::Reference< css::frame::XFrame > xFrame(m_xFrame.get(), css::uno::UNO_QUERY);
if (
@@ -192,7 +191,7 @@ void TagWindowAsModified::impl_update (const css::uno::Reference< css::frame::XF
return;
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
// Note: frame was set as member outside ! we have to refresh connections
// regarding window and model only here.
m_xWindow = xWindow;
diff --git a/framework/source/helper/titlebarupdate.cxx b/framework/source/helper/titlebarupdate.cxx
index 5a95a93..1805872 100644
--- a/framework/source/helper/titlebarupdate.cxx
+++ b/framework/source/helper/titlebarupdate.cxx
@@ -20,8 +20,7 @@
#include <helper/titlebarupdate.hxx>
#include <pattern/window.hxx>
-#include <threadhelp/writeguard.hxx>
-#include <threadhelp/readguard.hxx>
+#include <threadhelp/guard.hxx>
#include <macros/generic.hxx>
#include <services.h>
#include <properties.h>
@@ -87,7 +86,7 @@ void SAL_CALL TitleBarUpdate::initialize(const css::uno::Sequence< css::uno::Any
1);
// SYNCHRONIZED ->
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
// hold the frame as weak reference(!) so it can die everytimes :-)
m_xFrame = xFrame;
aWriteLock.unlock();
@@ -146,7 +145,7 @@ void TitleBarUpdate::impl_updateApplicationID(const css::uno::Reference< css::fr
try
{
// SYNCHRONIZED ->
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
aReadLock.unlock();
// <- SYNCHRONIZED
@@ -217,7 +216,7 @@ void TitleBarUpdate::impl_updateApplicationID(const css::uno::Reference< css::fr
return sal_False;
// SYNCHRONIZED ->
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
aReadLock.unlock();
// <- SYNCHRONIZED
@@ -248,7 +247,7 @@ void TitleBarUpdate::impl_updateApplicationID(const css::uno::Reference< css::fr
void TitleBarUpdate::impl_forceUpdate()
{
// SYNCHRONIZED ->
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::frame::XFrame > xFrame(m_xFrame.get(), css::uno::UNO_QUERY);
aReadLock.unlock();
// <- SYNCHRONIZED
diff --git a/framework/source/helper/vclstatusindicator.cxx b/framework/source/helper/vclstatusindicator.cxx
index 3e66b5d..099e02a 100644
--- a/framework/source/helper/vclstatusindicator.cxx
+++ b/framework/source/helper/vclstatusindicator.cxx
@@ -19,8 +19,7 @@
#include <helper/vclstatusindicator.hxx>
-#include <threadhelp/readguard.hxx>
-#include <threadhelp/writeguard.hxx>
+#include <threadhelp/guard.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/svapp.hxx>
@@ -54,7 +53,7 @@ void SAL_CALL VCLStatusIndicator::start(const OUString& sText ,
throw(css::uno::RuntimeException, std::exception)
{
// SAFE -> ----------------------------------
- ReadGuard aReadLock(m_aLock);
+ Guard aReadLock(m_aLock);
css::uno::Reference< css::awt::XWindow > xParentWindow = m_xParentWindow;
aReadLock.unlock();
// <- SAFE ----------------------------------
@@ -81,7 +80,7 @@ void SAL_CALL VCLStatusIndicator::start(const OUString& sText ,
// <- SOLAR SAFE ----------------------------
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
m_sText = sText;
m_nRange = nRange;
m_nValue = 0;
@@ -108,7 +107,7 @@ void SAL_CALL VCLStatusIndicator::end()
throw(css::uno::RuntimeException, std::exception)
{
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
m_sText = OUString();
m_nRange = 0;
m_nValue = 0;
@@ -135,7 +134,7 @@ void SAL_CALL VCLStatusIndicator::setText(const OUString& sText)
throw(css::uno::RuntimeException, std::exception)
{
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
m_sText = sText;
aWriteLock.unlock();
// <- SAFE ----------------------------------
@@ -154,7 +153,7 @@ void SAL_CALL VCLStatusIndicator::setValue(sal_Int32 nValue)
throw(css::uno::RuntimeException, std::exception)
{
// SAFE -> ----------------------------------
- WriteGuard aWriteLock(m_aLock);
+ Guard aWriteLock(m_aLock);
if (nValue <= m_nRange)
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list