Kaydet (Commit) fbc72e5f authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Use SolarMutexGuard directly

Change-Id: I6ca88538be5400714fcbe880776ac30cca3d68ae
üst 65b718da
......@@ -19,7 +19,6 @@
#include <accelerators/acceleratorconfiguration.hxx>
#include <accelerators/presethandler.hxx>
#include <threadhelp/guard.hxx>
#include "helper/mischelper.hxx"
#include <acceleratorconst.h>
......@@ -109,7 +108,7 @@ ModuleAcceleratorConfiguration::ModuleAcceleratorConfiguration(
const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& lArguments)
: ModuleAcceleratorConfiguration_BASE(xContext)
{
Guard aWriteLock(m_aLock);
SolarMutexGuard g;
OUString sModule;
if (lArguments.getLength() == 1 && (lArguments[0] >>= sModule))
......@@ -126,8 +125,6 @@ ModuleAcceleratorConfiguration::ModuleAcceleratorConfiguration(
throw css::uno::RuntimeException(
OUString("The module dependend accelerator configuration service was initialized with an empty module identifier!"),
static_cast< ::cppu::OWeakObject* >(this));
aWriteLock.unlock();
}
ModuleAcceleratorConfiguration::~ModuleAcceleratorConfiguration()
......@@ -136,11 +133,10 @@ ModuleAcceleratorConfiguration::~ModuleAcceleratorConfiguration()
void ModuleAcceleratorConfiguration::fillCache()
{
// SAFE -> ----------------------------------
Guard aReadLock(m_aLock);
m_sModuleCFG = m_sModule;
aReadLock.unlock();
// <- SAFE ----------------------------------
{
SolarMutexGuard g;
m_sModuleCFG = m_sModule;
}
#if 0
// get current office locale ... but dont cache it.
......
......@@ -26,7 +26,6 @@
#include <accelerators/keymapping.hxx>
#include <macros/xinterface.hxx>
#include <macros/xtypeprovider.hxx>
#include <threadhelp/threadhelpbase.hxx>
#include <general.h>
#include <stdtypes.h>
......@@ -281,8 +280,7 @@ class XMLBasedAcceleratorConfiguration : public IStorageListener,
};
class XCUBasedAcceleratorConfiguration : protected ThreadHelpBase, // attention! Must be the first base class to guarentee right initialize lock ...
public ::cppu::WeakImplHelper4<
class XCUBasedAcceleratorConfiguration : public ::cppu::WeakImplHelper4<
css::util::XChangesListener,
css::lang::XComponent,
css::form::XReset, // TODO use XPresetHandler instead if available
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment