summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-03-18 15:48:04 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-03-18 17:37:54 +0100
commita395484051e6f85a52c5402fa4bd23830f30d1ed (patch)
tree1eaad3c0b789fab4e13a8ec3f5cd5ac87e67d2f5
parent99508583e0cb3d25dfff2ab7dea5c6e8ca0119e7 (diff)
Use SolarMutexGuard directly
Change-Id: I8fda577ed06cb194e728e2d829c2b2edfa3068f8
-rw-r--r--framework/inc/jobs/joburl.hxx3
-rw-r--r--framework/source/jobs/joburl.cxx47
2 files changed, 9 insertions, 41 deletions
diff --git a/framework/inc/jobs/joburl.hxx b/framework/inc/jobs/joburl.hxx
index 3f80c4a0be15..df6dfe828885 100644
--- a/framework/inc/jobs/joburl.hxx
+++ b/framework/inc/jobs/joburl.hxx
@@ -20,7 +20,6 @@
#ifndef INCLUDED_FRAMEWORK_INC_JOBS_JOBURL_HXX
#define INCLUDED_FRAMEWORK_INC_JOBS_JOBURL_HXX
-#include <threadhelp/threadhelpbase.hxx>
#include <stdtypes.h>
#include <general.h>
@@ -53,7 +52,7 @@ namespace framework{
This class can analyze this structure and separate it into his different parts.
After doing that these parts are accessible by the methods of this class.
*/
-class JobURL : private ThreadHelpBase
+class JobURL
{
// types
diff --git a/framework/source/jobs/joburl.cxx b/framework/source/jobs/joburl.cxx
index d930c78c19af..f1e3c8e6cf8d 100644
--- a/framework/source/jobs/joburl.cxx
+++ b/framework/source/jobs/joburl.cxx
@@ -18,7 +18,6 @@
*/
#include <jobs/joburl.hxx>
-#include <threadhelp/guard.hxx>
#include <general.h>
#include <rtl/ustrbuf.hxx>
@@ -38,7 +37,6 @@ namespace framework{
the job URL for parsing
*/
JobURL::JobURL( /*IN*/ const OUString& sURL )
- : ThreadHelpBase( &Application::GetSolarMutex() )
{
#ifdef ENABLE_COMPONENT_SELF_CHECK
JobURL::impldbg_checkIt();
@@ -107,8 +105,7 @@ JobURL::JobURL( /*IN*/ const OUString& sURL )
*/
sal_Bool JobURL::isValid() const
{
- /* SAFE { */
- Guard aReadLock(m_aLock);
+ SolarMutexGuard g;
return (m_eRequest!=E_UNKNOWN);
}
@@ -131,17 +128,13 @@ sal_Bool JobURL::isValid() const
*/
sal_Bool JobURL::getEvent( /*OUT*/ OUString& sEvent ) const
{
- /* SAFE { */
- Guard aReadLock(m_aLock);
+ SolarMutexGuard g;
sEvent = OUString();
sal_Bool bSet = ((m_eRequest & E_EVENT) == E_EVENT);
if (bSet)
sEvent = m_sEvent;
- aReadLock.unlock();
- /* } SAFE */
-
return bSet;
}
@@ -164,17 +157,13 @@ sal_Bool JobURL::getEvent( /*OUT*/ OUString& sEvent ) const
*/
sal_Bool JobURL::getAlias( /*OUT*/ OUString& sAlias ) const
{
- /* SAFE { */
- Guard aReadLock(m_aLock);
+ SolarMutexGuard g;
sAlias = OUString();
sal_Bool bSet = ((m_eRequest & E_ALIAS) == E_ALIAS);
if (bSet)
sAlias = m_sAlias;
- aReadLock.unlock();
- /* } SAFE */
-
return bSet;
}
@@ -197,17 +186,13 @@ sal_Bool JobURL::getAlias( /*OUT*/ OUString& sAlias ) const
*/
sal_Bool JobURL::getService( /*OUT*/ OUString& sService ) const
{
- /* SAFE { */
- Guard aReadLock(m_aLock);
+ SolarMutexGuard g;
sService = OUString();
sal_Bool bSet = ((m_eRequest & E_SERVICE) == E_SERVICE);
if (bSet)
sService = m_sService;
- aReadLock.unlock();
- /* } SAFE */
-
return bSet;
}
@@ -537,8 +522,7 @@ void JobURL::impldbg_checkURL( /*IN*/ const sal_Char* pURL ,
*/
OUString JobURL::impldbg_toString() const
{
- /* SAFE { */
- Guard aReadLock(m_aLock);
+ SolarMutexGuard g;
OUStringBuffer sBuffer(256);
@@ -558,9 +542,6 @@ OUString JobURL::impldbg_toString() const
sBuffer.append (m_sService );
sBuffer.appendAscii("\" }" );
- aReadLock.unlock();
- /* } SAFE */
-
return sBuffer.makeStringAndClear();
}
@@ -568,17 +549,13 @@ OUString JobURL::impldbg_toString() const
sal_Bool JobURL::getServiceArgs( /*OUT*/ OUString& sServiceArgs ) const
{
- /* SAFE { */
- Guard aReadLock(m_aLock);
+ SolarMutexGuard g;
sServiceArgs = OUString();
sal_Bool bSet = ((m_eRequest & E_SERVICE) == E_SERVICE);
if (bSet)
sServiceArgs = m_sServiceArgs;
- aReadLock.unlock();
- /* } SAFE */
-
return bSet;
}
@@ -586,17 +563,13 @@ sal_Bool JobURL::getServiceArgs( /*OUT*/ OUString& sServiceArgs ) const
sal_Bool JobURL::getEventArgs( /*OUT*/ OUString& sEventArgs ) const
{
- /* SAFE { */
- Guard aReadLock(m_aLock);
+ SolarMutexGuard g;
sEventArgs = OUString();
sal_Bool bSet = ((m_eRequest & E_EVENT) == E_EVENT);
if (bSet)
sEventArgs = m_sEventArgs;
- aReadLock.unlock();
- /* } SAFE */
-
return bSet;
}
@@ -604,17 +577,13 @@ sal_Bool JobURL::getEventArgs( /*OUT*/ OUString& sEventArgs ) const
sal_Bool JobURL::getAliasArgs( /*OUT*/ OUString& sAliasArgs ) const
{
- /* SAFE { */
- Guard aReadLock(m_aLock);
+ SolarMutexGuard g;
sAliasArgs = OUString();
sal_Bool bSet = ((m_eRequest & E_ALIAS) == E_ALIAS);
if (bSet)
sAliasArgs = m_sAliasArgs;
- aReadLock.unlock();
- /* } SAFE */
-
return bSet;
}