summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-05-14 13:15:38 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-05-14 14:41:54 +0200
commit11fd73acce5d8bff7025bb6ddcbaf99d9d70b545 (patch)
tree1a3d4dbe24e4bbbf301eca3a277e211483b3312a /dbaccess
parenta883783c2a1b0e7a8ee5b46387d1e1e3bc5e19bd (diff)
SolarMutex does not belong into the URE interface
...so move it from osl/mutex.hxx to its own comphelper/solarmutex.hxx. It looks like a newbie mistake that 59e7685d8d812ee8773f57475cbe3aa2a0bdfc81 "Create an abstract interface to be used to implement a SolarMutex" put it here in the first place. I do not consider this an incompatible change really, as no external URE client code should have used SolarMutex anyway. (Also included some clean up, like removing unused {Clearable,Resettable}SolarGuard, and spelling out SolarGuard in the few places it is used.) Change-Id: I121ffb5b7cefbc19e88b5405e5a85ffc895be852
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.cxx12
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.hxx11
2 files changed, 11 insertions, 12 deletions
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 95af6b73e65b..e015e7cbfa78 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -95,19 +95,19 @@ VosMutexFacade::VosMutexFacade( ::osl::Mutex& _rMutex )
{
}
-void SAL_CALL VosMutexFacade::acquire()
+void VosMutexFacade::acquire()
{
m_rMutex.acquire();
}
-sal_Bool SAL_CALL VosMutexFacade::tryToAcquire()
+void VosMutexFacade::release()
{
- return m_rMutex.tryToAcquire();
+ m_rMutex.release();
}
-void SAL_CALL VosMutexFacade::release()
+bool VosMutexFacade::tryToAcquire()
{
- m_rMutex.release();
+ return m_rMutex.tryToAcquire();
}
//============================================================
@@ -1194,7 +1194,7 @@ namespace
{
void lcl_modifyListening( ::sfx2::IModifiableDocument& _rDocument,
const Reference< XStorage >& _rxStorage, ::rtl::Reference< ::sfx2::DocumentStorageModifyListener >& _inout_rListener,
- ::osl::SolarMutex& _rMutex, bool _bListen )
+ comphelper::SolarMutex& _rMutex, bool _bListen )
{
Reference< XModifiable > xModify( _rxStorage, UNO_QUERY );
OSL_ENSURE( xModify.is() || !_rxStorage.is(), "lcl_modifyListening: storage can't notify us!" );
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.hxx b/dbaccess/source/core/dataaccess/ModelImpl.hxx
index fa595648336c..eff4138ea316 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.hxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.hxx
@@ -62,13 +62,13 @@
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/proparrhlp.hxx>
#include <comphelper/sharedmutex.hxx>
+#include <comphelper/solarmutex.hxx>
#include <connectivity/CommonTools.hxx>
#include <cppuhelper/propshlp.hxx>
#include <cppuhelper/weakref.hxx>
#include <sfx2/docmacromode.hxx>
#include <sfx2/docstoragemodifylistener.hxx>
#include <unotools/sharedunocomponent.hxx>
-#include <osl/mutex.hxx>
#include <rtl/ref.hxx>
#include <memory>
@@ -128,7 +128,7 @@ class OSharedConnectionManager;
//============================================================
/** a class which provides an IMutex interface to an OSL-based mutex
*/
-class VosMutexFacade : public ::osl::SolarMutex
+class VosMutexFacade : public comphelper::SolarMutex
{
public:
/** beware of life time: the mutex you pass here must live as least as long
@@ -136,10 +136,9 @@ public:
*/
VosMutexFacade( ::osl::Mutex& _rMutex );
- // IMutex
- virtual void SAL_CALL acquire();
- virtual sal_Bool SAL_CALL tryToAcquire();
- virtual void SAL_CALL release();
+ virtual void acquire();
+ virtual void release();
+ virtual bool tryToAcquire();
private:
::osl::Mutex& m_rMutex;