summaryrefslogtreecommitdiff
path: root/configmgr/source
diff options
context:
space:
mode:
Diffstat (limited to 'configmgr/source')
-rw-r--r--configmgr/source/access.cxx99
-rw-r--r--configmgr/source/access.hxx6
-rw-r--r--configmgr/source/additions.hxx3
-rw-r--r--configmgr/source/broadcaster.cxx3
-rw-r--r--configmgr/source/broadcaster.hxx3
-rw-r--r--configmgr/source/childaccess.cxx15
-rw-r--r--configmgr/source/childaccess.hxx5
-rw-r--r--configmgr/source/components.cxx23
-rw-r--r--configmgr/source/components.hxx7
-rw-r--r--configmgr/source/configurationprovider.cxx13
-rw-r--r--configmgr/source/configurationprovider.hxx3
-rw-r--r--configmgr/source/configurationregistry.cxx3
-rw-r--r--configmgr/source/configurationregistry.hxx3
-rw-r--r--configmgr/source/data.cxx3
-rw-r--r--configmgr/source/data.hxx3
-rw-r--r--configmgr/source/defaultprovider.cxx13
-rw-r--r--configmgr/source/defaultprovider.hxx3
-rw-r--r--configmgr/source/groupnode.cxx3
-rw-r--r--configmgr/source/groupnode.hxx3
-rw-r--r--configmgr/source/localizedpropertynode.cxx3
-rw-r--r--configmgr/source/localizedpropertynode.hxx3
-rw-r--r--configmgr/source/localizedvaluenode.cxx3
-rw-r--r--configmgr/source/localizedvaluenode.hxx3
-rw-r--r--configmgr/source/lock.cxx11
-rw-r--r--configmgr/source/lock.hxx7
-rw-r--r--configmgr/source/modifications.cxx3
-rw-r--r--configmgr/source/modifications.hxx3
-rw-r--r--configmgr/source/node.cxx3
-rw-r--r--configmgr/source/node.hxx3
-rw-r--r--configmgr/source/nodemap.cxx3
-rw-r--r--configmgr/source/nodemap.hxx3
-rw-r--r--configmgr/source/pad.cxx3
-rw-r--r--configmgr/source/pad.hxx3
-rw-r--r--configmgr/source/parsemanager.cxx3
-rw-r--r--configmgr/source/parsemanager.hxx3
-rw-r--r--configmgr/source/parser.hxx3
-rw-r--r--configmgr/source/partial.cxx3
-rw-r--r--configmgr/source/partial.hxx3
-rw-r--r--configmgr/source/path.hxx3
-rw-r--r--configmgr/source/propertynode.cxx11
-rw-r--r--configmgr/source/propertynode.hxx7
-rw-r--r--configmgr/source/rootaccess.cxx21
-rw-r--r--configmgr/source/rootaccess.hxx6
-rw-r--r--configmgr/source/services.cxx3
-rw-r--r--configmgr/source/setnode.cxx3
-rw-r--r--configmgr/source/setnode.hxx3
-rw-r--r--configmgr/source/span.hxx3
-rw-r--r--configmgr/source/type.cxx3
-rw-r--r--configmgr/source/type.hxx3
-rw-r--r--configmgr/source/update.cxx19
-rw-r--r--configmgr/source/update.hxx3
-rw-r--r--configmgr/source/valueparser.cxx3
-rw-r--r--configmgr/source/valueparser.hxx3
-rw-r--r--configmgr/source/writemodfile.cxx3
-rw-r--r--configmgr/source/writemodfile.hxx3
-rw-r--r--configmgr/source/xcdparser.cxx3
-rw-r--r--configmgr/source/xcdparser.hxx3
-rw-r--r--configmgr/source/xcsparser.cxx3
-rw-r--r--configmgr/source/xcsparser.hxx3
-rw-r--r--configmgr/source/xcuparser.cxx3
-rw-r--r--configmgr/source/xcuparser.hxx3
-rw-r--r--configmgr/source/xmldata.cxx3
-rw-r--r--configmgr/source/xmldata.hxx3
-rw-r--r--configmgr/source/xmlreader.cxx8
-rw-r--r--configmgr/source/xmlreader.hxx3
65 files changed, 333 insertions, 85 deletions
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index eda60e6d61..0382054533 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -165,7 +166,9 @@ void Access::initBroadcaster(
Access::Access(Components & components):
components_(components), disposed_(false)
-{}
+{
+ lock_ = lock();
+}
Access::~Access() {}
@@ -850,7 +853,7 @@ css::uno::Sequence< css::uno::Type > Access::getTypes()
throw (css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
comphelper::SequenceAsVector< css::uno::Type > types;
types.push_back(cppu::UnoType< css::uno::XInterface >::get());
@@ -899,7 +902,7 @@ css::uno::Sequence< sal_Int8 > Access::getImplementationId()
throw (css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
return css::uno::Sequence< sal_Int8 >();
}
@@ -907,7 +910,7 @@ css::uno::Sequence< sal_Int8 > Access::getImplementationId()
rtl::OUString Access::getImplementationName() throw (css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
throw css::uno::RuntimeException(
rtl::OUString(
@@ -920,7 +923,7 @@ sal_Bool Access::supportsService(rtl::OUString const & ServiceName)
throw (css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
css::uno::Sequence< rtl::OUString > names(getSupportedServiceNames());
for (sal_Int32 i = 0; i < names.getLength(); ++i) {
@@ -935,7 +938,7 @@ css::uno::Sequence< rtl::OUString > Access::getSupportedServiceNames()
throw (css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
comphelper::SequenceAsVector< rtl::OUString > services;
services.push_back(
@@ -999,7 +1002,7 @@ void Access::dispose() throw (css::uno::RuntimeException) {
OSL_ASSERT(thisIs(IS_ANY));
Broadcaster bc;
{
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
if (getParentAccess().is()) {
throw css::uno::RuntimeException(
@@ -1024,7 +1027,7 @@ void Access::addEventListener(
{
OSL_ASSERT(thisIs(IS_ANY));
{
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
if (!xListener.is()) {
throw css::uno::RuntimeException(
@@ -1047,7 +1050,7 @@ void Access::removeEventListener(
throw (css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
DisposeListeners::iterator i(disposeListeners_.find(aListener));
if (i != disposeListeners_.end()) {
@@ -1057,7 +1060,7 @@ void Access::removeEventListener(
css::uno::Type Access::getElementType() throw (css::uno::RuntimeException) {
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
rtl::Reference< Node > p(getNode());
switch (p->kind()) {
@@ -1081,7 +1084,7 @@ css::uno::Type Access::getElementType() throw (css::uno::RuntimeException) {
sal_Bool Access::hasElements() throw (css::uno::RuntimeException) {
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
return !getAllChildren().empty(); //TODO: optimize
}
@@ -1092,7 +1095,7 @@ css::uno::Any Access::getByName(rtl::OUString const & aName)
css::lang::WrappedTargetException, css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
rtl::Reference< ChildAccess > child(getChild(aName));
if (!child.is()) {
@@ -1106,7 +1109,7 @@ css::uno::Sequence< rtl::OUString > Access::getElementNames()
throw (css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
std::vector< rtl::Reference< ChildAccess > > children(getAllChildren());
comphelper::SequenceAsVector< rtl::OUString > names;
@@ -1123,7 +1126,7 @@ sal_Bool Access::hasByName(rtl::OUString const & aName)
throw (css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
return getChild(aName).is();
}
@@ -1132,7 +1135,7 @@ css::uno::Any Access::getByHierarchicalName(rtl::OUString const & aName)
throw (css::container::NoSuchElementException, css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
rtl::Reference< ChildAccess > child(getSubChild(aName));
if (!child.is()) {
@@ -1146,7 +1149,7 @@ sal_Bool Access::hasByHierarchicalName(rtl::OUString const & aName)
throw (css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
return getSubChild(aName).is();
}
@@ -1157,7 +1160,7 @@ void Access::addContainerListener(
{
OSL_ASSERT(thisIs(IS_ANY));
{
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
if (!xListener.is()) {
throw css::uno::RuntimeException(
@@ -1180,7 +1183,7 @@ void Access::removeContainerListener(
throw (css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
ContainerListeners::iterator i(containerListeners_.find(xListener));
if (i != containerListeners_.end()) {
@@ -1192,7 +1195,7 @@ rtl::OUString Access::getExactName(rtl::OUString const & aApproximateName)
throw (css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
return aApproximateName;
}
@@ -1201,7 +1204,7 @@ css::uno::Sequence< css::beans::Property > Access::getProperties()
throw (css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_GROUP));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
std::vector< rtl::Reference< ChildAccess > > children(getAllChildren());
comphelper::SequenceAsVector< css::beans::Property > properties;
for (std::vector< rtl::Reference< ChildAccess > >::iterator i(
@@ -1217,7 +1220,7 @@ css::beans::Property Access::getPropertyByName(rtl::OUString const & aName)
throw (css::beans::UnknownPropertyException, css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_GROUP));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
rtl::Reference< ChildAccess > child(getChild(aName));
if (!child.is()) {
throw css::beans::UnknownPropertyException(
@@ -1230,13 +1233,13 @@ sal_Bool Access::hasPropertyByName(rtl::OUString const & Name)
throw (css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_GROUP));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
return getChild(Name).is();
}
rtl::OUString Access::getHierarchicalName() throw (css::uno::RuntimeException) {
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
// For backwards compatibility, return an absolute path representation where
// available:
@@ -1260,7 +1263,7 @@ rtl::OUString Access::composeHierarchicalName(
css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
if (aRelativeName.getLength() == 0 || aRelativeName[0] == '/') {
throw css::lang::IllegalArgumentException(
@@ -1280,7 +1283,7 @@ rtl::OUString Access::composeHierarchicalName(
rtl::OUString Access::getName() throw (css::uno::RuntimeException) {
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
return getNameInternal();
}
@@ -1291,7 +1294,7 @@ void Access::setName(rtl::OUString const & aName)
OSL_ASSERT(thisIs(IS_ANY));
Broadcaster bc;
{
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
checkFinalized();
Modifications localMods;
@@ -1355,7 +1358,7 @@ void Access::setName(rtl::OUString const & aName)
css::beans::Property Access::getAsProperty() throw (css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
return asProperty();
}
@@ -1377,7 +1380,7 @@ void Access::setPropertyValue(
OSL_ASSERT(thisIs(IS_GROUP));
Broadcaster bc;
{
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
if (!getRootAccess()->isUpdate()) {
throw css::uno::RuntimeException(
rtl::OUString(
@@ -1401,7 +1404,7 @@ css::uno::Any Access::getPropertyValue(rtl::OUString const & PropertyName)
css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_GROUP));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
rtl::Reference< ChildAccess > child(getChild(PropertyName));
if (!child.is()) {
throw css::beans::UnknownPropertyException(
@@ -1420,7 +1423,7 @@ void Access::addPropertyChangeListener(
{
OSL_ASSERT(thisIs(IS_GROUP));
{
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
if (!xListener.is()) {
throw css::uno::RuntimeException(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("null listener")),
@@ -1447,7 +1450,7 @@ void Access::removePropertyChangeListener(
css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_GROUP));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkKnownProperty(aPropertyName);
PropertyChangeListeners::iterator i(
propertyChangeListeners_.find(aPropertyName));
@@ -1472,7 +1475,7 @@ void Access::addVetoableChangeListener(
{
OSL_ASSERT(thisIs(IS_GROUP));
{
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
if (!aListener.is()) {
throw css::uno::RuntimeException(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("null listener")),
@@ -1500,7 +1503,7 @@ void Access::removeVetoableChangeListener(
css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_GROUP));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkKnownProperty(PropertyName);
VetoableChangeListeners::iterator i(
vetoableChangeListeners_.find(PropertyName));
@@ -1525,7 +1528,7 @@ void Access::setPropertyValues(
OSL_ASSERT(thisIs(IS_GROUP));
Broadcaster bc;
{
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
if (!getRootAccess()->isUpdate()) {
throw css::uno::RuntimeException(
rtl::OUString(
@@ -1562,7 +1565,7 @@ css::uno::Sequence< css::uno::Any > Access::getPropertyValues(
throw (css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_GROUP));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
css::uno::Sequence< css::uno::Any > vals(aPropertyNames.getLength());
for (sal_Int32 i = 0; i < aPropertyNames.getLength(); ++i) {
rtl::Reference< ChildAccess > child(getChild(aPropertyNames[i]));
@@ -1587,7 +1590,7 @@ void Access::addPropertiesChangeListener(
{
OSL_ASSERT(thisIs(IS_GROUP));
{
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
if (!xListener.is()) {
throw css::uno::RuntimeException(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("null listener")),
@@ -1610,7 +1613,7 @@ void Access::removePropertiesChangeListener(
throw (css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_GROUP));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
PropertiesChangeListeners::iterator i(
propertiesChangeListeners_.find(xListener));
if (i != propertiesChangeListeners_.end()) {
@@ -1653,7 +1656,7 @@ void Access::setHierarchicalPropertyValue(
OSL_ASSERT(thisIs(IS_GROUP));
Broadcaster bc;
{
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
if (!getRootAccess()->isUpdate()) {
throw css::uno::RuntimeException(
rtl::OUString(
@@ -1685,7 +1688,7 @@ css::uno::Any Access::getHierarchicalPropertyValue(
css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_GROUP));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
rtl::Reference< ChildAccess > child(getSubChild(aHierarchicalPropertyName));
if (!child.is()) {
throw css::beans::UnknownPropertyException(
@@ -1705,7 +1708,7 @@ void Access::setHierarchicalPropertyValues(
OSL_ASSERT(thisIs(IS_GROUP));
Broadcaster bc;
{
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
if (!getRootAccess()->isUpdate()) {
throw css::uno::RuntimeException(
rtl::OUString(
@@ -1749,7 +1752,7 @@ css::uno::Sequence< css::uno::Any > Access::getHierarchicalPropertyValues(
css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_GROUP));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
css::uno::Sequence< css::uno::Any > vals(
aHierarchicalPropertyNames.getLength());
for (sal_Int32 i = 0; i < aHierarchicalPropertyNames.getLength(); ++i) {
@@ -1773,7 +1776,7 @@ css::beans::Property Access::getPropertyByHierarchicalName(
throw (css::beans::UnknownPropertyException, css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_GROUP));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
rtl::Reference< ChildAccess > child(getSubChild(aHierarchicalName));
if (!child.is()) {
throw css::beans::UnknownPropertyException(
@@ -1787,7 +1790,7 @@ sal_Bool Access::hasPropertyByHierarchicalName(
throw (css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_GROUP));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
return getSubChild(aHierarchicalName).is();
}
@@ -1801,7 +1804,7 @@ void Access::replaceByName(
OSL_ASSERT(thisIs(IS_UPDATE));
Broadcaster bc;
{
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
rtl::Reference< ChildAccess > child(getChild(aName));
if (!child.is()) {
@@ -1845,7 +1848,7 @@ void Access::insertByName(
OSL_ASSERT(thisIs(IS_EXTENSIBLE|IS_UPDATE));
Broadcaster bc;
{
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
checkFinalized();
if (getChild(aName).is()) {
@@ -1895,7 +1898,7 @@ void Access::removeByName(rtl::OUString const & aName)
OSL_ASSERT(thisIs(IS_EXTENSIBLE|IS_UPDATE));
Broadcaster bc;
{
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
rtl::Reference< ChildAccess > child(getChild(aName));
if (!child.is() || child->isFinalized() ||
@@ -2188,7 +2191,7 @@ rtl::Reference< Access > Access::getNotificationRoot() {
#if OSL_DEBUG_LEVEL > 0
bool Access::thisIs(int what) {
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
rtl::Reference< Node > p(getNode());
Node::Kind k(p->kind());
return k != Node::KIND_PROPERTY && k != Node::KIND_LOCALIZED_VALUE &&
@@ -2205,3 +2208,5 @@ bool Access::thisIs(int what) {
#endif
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/access.hxx b/configmgr/source/access.hxx
index 8c10aa8cce..8a05329683 100644
--- a/configmgr/source/access.hxx
+++ b/configmgr/source/access.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,6 +36,7 @@
#include <vector>
#include "boost/noncopyable.hpp"
+#include "boost/shared_ptr.hpp"
#include "com/sun/star/beans/PropertyVetoException.hpp"
#include "com/sun/star/beans/UnknownPropertyException.hpp"
#include "com/sun/star/beans/XExactName.hpp"
@@ -568,6 +570,8 @@ private:
PropertiesChangeListeners propertiesChangeListeners_;
bool disposed_;
+ boost::shared_ptr<osl::Mutex> lock_;
+
#if OSL_DEBUG_LEVEL > 0
protected:
enum {
@@ -580,3 +584,5 @@ protected:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/additions.hxx b/configmgr/source/additions.hxx
index f34373c7f7..5278dec299 100644
--- a/configmgr/source/additions.hxx
+++ b/configmgr/source/additions.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,3 +42,5 @@ typedef std::list< Path > Additions;
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/broadcaster.cxx b/configmgr/source/broadcaster.cxx
index ab59d333d6..8634dfa08b 100644
--- a/configmgr/source/broadcaster.cxx
+++ b/configmgr/source/broadcaster.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -256,3 +257,5 @@ Broadcaster::ChangesNotification::ChangesNotification(
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/broadcaster.hxx b/configmgr/source/broadcaster.hxx
index 95c4b1fac4..75db85ec01 100644
--- a/configmgr/source/broadcaster.hxx
+++ b/configmgr/source/broadcaster.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -179,3 +180,5 @@ private:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/childaccess.cxx b/configmgr/source/childaccess.cxx
index d387f351de..3d9c40bc07 100644
--- a/configmgr/source/childaccess.cxx
+++ b/configmgr/source/childaccess.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -94,6 +95,7 @@ ChildAccess::ChildAccess(
Access(components), root_(root), parent_(parent), name_(name), node_(node),
inTransaction_(false)
{
+ lock_ = lock();
OSL_ASSERT(root.is() && parent.is() && node.is());
}
@@ -102,6 +104,7 @@ ChildAccess::ChildAccess(
rtl::Reference< Node > const & node):
Access(components), root_(root), node_(node), inTransaction_(false)
{
+ lock_ = lock();
OSL_ASSERT(root.is() && node.is());
}
@@ -168,7 +171,7 @@ css::uno::Reference< css::uno::XInterface > ChildAccess::getParent()
throw (css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
return static_cast< cppu::OWeakObject * >(parent_.get());
}
@@ -177,7 +180,7 @@ void ChildAccess::setParent(css::uno::Reference< css::uno::XInterface > const &)
throw (css::lang::NoSupportException, css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
throw css::lang::NoSupportException(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("setParent")),
@@ -189,7 +192,7 @@ sal_Int64 ChildAccess::getSomething(
throw (css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
return aIdentifier == getTunnelId()
? reinterpret_cast< sal_Int64 >(this) : 0;
@@ -359,7 +362,7 @@ void ChildAccess::commitChanges(bool valid, Modifications * globalModifications)
}
ChildAccess::~ChildAccess() {
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
if (parent_.is()) {
parent_->releaseChild(name_);
}
@@ -389,7 +392,7 @@ css::uno::Any ChildAccess::queryInterface(css::uno::Type const & aType)
throw (css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
css::uno::Any res(Access::queryInterface(aType));
return res.hasValue()
@@ -400,3 +403,5 @@ css::uno::Any ChildAccess::queryInterface(css::uno::Type const & aType)
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/childaccess.hxx b/configmgr/source/childaccess.hxx
index c1cb148969..977d97e307 100644
--- a/configmgr/source/childaccess.hxx
+++ b/configmgr/source/childaccess.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,6 +40,7 @@
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/RuntimeException.hpp"
#include "com/sun/star/uno/Sequence.hxx"
+#include "boost/shared_ptr.hpp"
#include "rtl/ref.hxx"
#include "sal/types.h"
@@ -150,8 +152,11 @@ private:
std::auto_ptr< com::sun::star::uno::Any > changedValue_;
bool inTransaction_;
// to determine if a free node can be inserted underneath some root
+ boost::shared_ptr<osl::Mutex> lock_;
};
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index d812e54498..e6cfb10314 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -182,6 +183,7 @@ private:
rtl::OUString url_;
Data const & data_;
osl::Condition delay_;
+ boost::shared_ptr<osl::Mutex> lock_;
};
Components::WriteThread::WriteThread(
@@ -189,6 +191,7 @@ Components::WriteThread::WriteThread(
rtl::OUString const & url, Data const & data):
reference_(reference), components_(components), url_(url), data_(data)
{
+ lock_ = lock();
OSL_ASSERT(reference != 0);
acquire();
}
@@ -196,7 +199,7 @@ Components::WriteThread::WriteThread(
void Components::WriteThread::run() {
TimeValue t = { 1, 0 }; // 1 sec
delay_.wait(&t); // must not throw; result_error is harmless and ignored
- osl::MutexGuard g(lock); // must not throw
+ osl::MutexGuard g(*lock_); // must not throw
try {
try {
writeModFile(components_, url_, data_);
@@ -219,9 +222,9 @@ void Components::initSingleton(
{
OSL_ASSERT(context.is());
if (!singletonCreated) {
- singletonCreated = true;
static Components theSingleton(context);
singleton = &theSingleton;
+ singletonCreated = true;
}
}
@@ -303,7 +306,17 @@ void Components::addModification(Path const & path) {
data_.modifications.add(path);
}
+bool Components::hasModifications() const
+{
+ return data_.modifications.getRoot().children.begin() !=
+ data_.modifications.getRoot().children.end();
+}
+
void Components::writeModifications() {
+
+ if (!hasModifications())
+ return;
+
if (!writeThread_.is()) {
writeThread_ = new WriteThread(
&writeThread_, *this, getModificationFileUrl(), data_);
@@ -314,7 +327,7 @@ void Components::writeModifications() {
void Components::flushModifications() {
rtl::Reference< WriteThread > thread;
{
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
thread = writeThread_;
}
if (thread.is()) {
@@ -505,6 +518,8 @@ Components::Components(
css::uno::Reference< css::uno::XComponentContext > const & context):
context_(context)
{
+ lock_ = lock();
+
OSL_ASSERT(context.is());
RTL_LOGFILE_TRACE_AUTHOR("configmgr", "sb", "begin parsing");
parseXcsXcuLayer(
@@ -865,3 +880,5 @@ void Components::parseModificationLayer() {
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/components.hxx b/configmgr/source/components.hxx
index 1c735efca6..e810c6aee2 100644
--- a/configmgr/source/components.hxx
+++ b/configmgr/source/components.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,6 +35,7 @@
#include <set>
#include "boost/noncopyable.hpp"
+#include "boost/shared_ptr.hpp"
#include "com/sun/star/beans/Optional.hpp"
#include "com/sun/star/uno/Reference.hxx"
#include "rtl/ref.hxx"
@@ -94,6 +96,8 @@ public:
void writeModifications();
+ bool hasModifications() const;
+
void flushModifications();
// must be called with configmgr::lock unaquired; must be called before
// shutdown if writeModifications has ever been called (probably
@@ -173,8 +177,11 @@ private:
WeakRootSet roots_;
ExternalServices externalServices_;
rtl::Reference< WriteThread > writeThread_;
+ boost::shared_ptr<osl::Mutex> lock_;
};
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/configurationprovider.cxx b/configmgr/source/configurationprovider.cxx
index 3cd58b145b..cccb74658c 100644
--- a/configmgr/source/configurationprovider.cxx
+++ b/configmgr/source/configurationprovider.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -108,6 +109,7 @@ public:
ServiceBase(*static_cast< osl::Mutex * >(this)), context_(context),
locale_(locale)
{
+ lock_ = lock();
OSL_ASSERT(context.is());
}
@@ -172,6 +174,7 @@ private:
css::uno::Reference< css::uno::XComponentContext > context_;
rtl::OUString locale_;
+ boost::shared_ptr<osl::Mutex> lock_;
};
css::uno::Reference< css::uno::XInterface > Service::createInstance(
@@ -275,7 +278,7 @@ Service::createInstanceWithArguments(
ServiceSpecifier),
static_cast< cppu::OWeakObject * >(this));
}
- osl::MutexGuard guard(lock);
+ osl::MutexGuard guard(*lock_);
Components::initSingleton(context_);
Components & components = Components::getSingleton();
rtl::Reference< RootAccess > root(
@@ -357,13 +360,13 @@ void Service::removeFlushListener(
void Service::setLocale(css::lang::Locale const & eLocale)
throw (css::uno::RuntimeException)
{
- osl::MutexGuard guard(lock);
+ osl::MutexGuard guard(*lock_);
locale_ = comphelper::Locale(
eLocale.Language, eLocale.Country, eLocale.Variant).toISO();
}
css::lang::Locale Service::getLocale() throw (css::uno::RuntimeException) {
- osl::MutexGuard guard(lock);
+ osl::MutexGuard guard(*lock_);
css::lang::Locale loc;
if (locale_.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("*"))) {
loc.Language = locale_;
@@ -387,7 +390,7 @@ css::lang::Locale Service::getLocale() throw (css::uno::RuntimeException) {
void Service::flushModifications() const {
Components * components;
{
- osl::MutexGuard guard(lock);
+ osl::MutexGuard guard(*lock_);
Components::initSingleton(context_);
components = &Components::getSingleton();
}
@@ -533,3 +536,5 @@ createFactory(
}
} }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/configurationprovider.hxx b/configmgr/source/configurationprovider.hxx
index 4a8c383837..a55e99809d 100644
--- a/configmgr/source/configurationprovider.hxx
+++ b/configmgr/source/configurationprovider.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,3 +66,5 @@ SAL_CALL createFactory(
} }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/configurationregistry.cxx b/configmgr/source/configurationregistry.cxx
index ffd7174c0a..f4fe588d01 100644
--- a/configmgr/source/configurationregistry.cxx
+++ b/configmgr/source/configurationregistry.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -948,3 +949,5 @@ css::uno::Reference< css::lang::XSingleComponentFactory > createFactory(
}
} }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/configurationregistry.hxx b/configmgr/source/configurationregistry.hxx
index 6cba122188..459fcc4535 100644
--- a/configmgr/source/configurationregistry.hxx
+++ b/configmgr/source/configurationregistry.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -55,3 +56,5 @@ SAL_CALL createFactory(
} }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/data.cxx b/configmgr/source/data.cxx
index 50466ca053..989f543b19 100644
--- a/configmgr/source/data.cxx
+++ b/configmgr/source/data.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -370,3 +371,5 @@ rtl::Reference< Data::ExtensionXcu > Data::removeExtensionXcuAdditions(
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/data.hxx b/configmgr/source/data.hxx
index 8f5f7af0d8..f60ecfa1e8 100644
--- a/configmgr/source/data.hxx
+++ b/configmgr/source/data.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -104,3 +105,5 @@ private:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/defaultprovider.cxx b/configmgr/source/defaultprovider.cxx
index d069663290..16cf66df0d 100644
--- a/configmgr/source/defaultprovider.cxx
+++ b/configmgr/source/defaultprovider.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,6 +30,7 @@
#include "sal/config.h"
#include "boost/noncopyable.hpp"
+#include "boost/shared_ptr.hpp"
#include "com/sun/star/lang/XSingleComponentFactory.hpp"
#include "com/sun/star/uno/Any.hxx"
#include "com/sun/star/uno/Exception.hpp"
@@ -59,7 +61,10 @@ class Factory:
private boost::noncopyable
{
public:
- Factory() {}
+ Factory()
+ {
+ lock_ = lock();
+ }
private:
virtual ~Factory() {}
@@ -74,6 +79,8 @@ private:
css::uno::Sequence< css::uno::Any > const & Arguments,
css::uno::Reference< css::uno::XComponentContext > const & Context)
throw (css::uno::Exception, css::uno::RuntimeException);
+
+ boost::shared_ptr<osl::Mutex> lock_;
};
css::uno::Reference< css::uno::XInterface > Factory::createInstanceWithContext(
@@ -98,7 +105,7 @@ Factory::createInstanceWithArgumentsAndContext(
" instantiated without arguments")),
static_cast< cppu::OWeakObject * >(this));
}
- osl::MutexGuard guard(lock);
+ osl::MutexGuard guard(*lock_);
static css::uno::Reference< css::uno::XInterface > singleton(
configuration_provider::createDefault(Context));
return singleton;
@@ -129,3 +136,5 @@ SAL_CALL createFactory(
}
} }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/defaultprovider.hxx b/configmgr/source/defaultprovider.hxx
index 7b267a80b4..5202148fa3 100644
--- a/configmgr/source/defaultprovider.hxx
+++ b/configmgr/source/defaultprovider.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,3 +58,5 @@ SAL_CALL createFactory(
} }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/groupnode.cxx b/configmgr/source/groupnode.cxx
index 59c0f89df5..fa56afa1a2 100644
--- a/configmgr/source/groupnode.cxx
+++ b/configmgr/source/groupnode.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -88,3 +89,5 @@ void GroupNode::clear() {
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/groupnode.hxx b/configmgr/source/groupnode.hxx
index 9d7bbbafa5..02f1679998 100644
--- a/configmgr/source/groupnode.hxx
+++ b/configmgr/source/groupnode.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,3 +74,5 @@ private:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/localizedpropertynode.cxx b/configmgr/source/localizedpropertynode.cxx
index 54560d7ade..c03f552de1 100644
--- a/configmgr/source/localizedpropertynode.cxx
+++ b/configmgr/source/localizedpropertynode.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -85,3 +86,5 @@ void LocalizedPropertyNode::clear() {
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/localizedpropertynode.hxx b/configmgr/source/localizedpropertynode.hxx
index 4ebcf8e243..bbe934e36b 100644
--- a/configmgr/source/localizedpropertynode.hxx
+++ b/configmgr/source/localizedpropertynode.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,3 +75,5 @@ private:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/localizedvaluenode.cxx b/configmgr/source/localizedvaluenode.cxx
index c0e3bc3331..ac6346f092 100644
--- a/configmgr/source/localizedvaluenode.cxx
+++ b/configmgr/source/localizedvaluenode.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -76,3 +77,5 @@ Node::Kind LocalizedValueNode::kind() const {
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/localizedvaluenode.hxx b/configmgr/source/localizedvaluenode.hxx
index bfcbdea1de..23139bec40 100644
--- a/configmgr/source/localizedvaluenode.hxx
+++ b/configmgr/source/localizedvaluenode.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,3 +65,5 @@ private:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/lock.cxx b/configmgr/source/lock.cxx
index dc7f26a34e..3950a2d5e3 100644
--- a/configmgr/source/lock.cxx
+++ b/configmgr/source/lock.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,6 +35,14 @@
namespace configmgr {
-osl::Mutex lock;
+boost::shared_ptr<osl::Mutex> lock()
+{
+ static boost::shared_ptr<osl::Mutex> theLock;
+ if (!theLock.get())
+ theLock.reset(new osl::Mutex);
+ return theLock;
+}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/lock.hxx b/configmgr/source/lock.hxx
index b541f48fbe..b37e83a44e 100644
--- a/configmgr/source/lock.hxx
+++ b/configmgr/source/lock.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,13 +30,15 @@
#define INCLUDED_CONFIGMGR_SOURCE_LOCK_HXX
#include "sal/config.h"
-
#include "osl/mutex.hxx"
+#include "boost/shared_ptr.hpp"
namespace configmgr {
-extern osl::Mutex lock;
+boost::shared_ptr<osl::Mutex> lock();
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/modifications.cxx b/configmgr/source/modifications.cxx
index add18ceaa1..e83d4a501a 100644
--- a/configmgr/source/modifications.cxx
+++ b/configmgr/source/modifications.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -85,3 +86,5 @@ Modifications::Node const & Modifications::getRoot() const {
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/modifications.hxx b/configmgr/source/modifications.hxx
index c28b1aadd1..fa4f08a157 100644
--- a/configmgr/source/modifications.hxx
+++ b/configmgr/source/modifications.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,3 +66,5 @@ private:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/node.cxx b/configmgr/source/node.cxx
index a5a089106b..69f53e28b1 100644
--- a/configmgr/source/node.cxx
+++ b/configmgr/source/node.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -106,3 +107,5 @@ rtl::Reference< Node > Node::findMember(rtl::OUString const &) {
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/node.hxx b/configmgr/source/node.hxx
index 7c9417e68e..4f4aece82b 100644
--- a/configmgr/source/node.hxx
+++ b/configmgr/source/node.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -84,3 +85,5 @@ protected:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/nodemap.cxx b/configmgr/source/nodemap.cxx
index 8e4d06030b..432aa64e79 100644
--- a/configmgr/source/nodemap.cxx
+++ b/configmgr/source/nodemap.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,3 +49,5 @@ void cloneNodeMap(NodeMap const & source, NodeMap * target) {
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/nodemap.hxx b/configmgr/source/nodemap.hxx
index 92ea324091..c2454e8df2 100644
--- a/configmgr/source/nodemap.hxx
+++ b/configmgr/source/nodemap.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,3 +48,5 @@ void cloneNodeMap(NodeMap const & source, NodeMap * target);
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/pad.cxx b/configmgr/source/pad.cxx
index c8c7218b6d..68a92b5aa7 100644
--- a/configmgr/source/pad.cxx
+++ b/configmgr/source/pad.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -89,3 +90,5 @@ void Pad::flushSpan() {
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/pad.hxx b/configmgr/source/pad.hxx
index 66a51f4800..1e86a0af91 100644
--- a/configmgr/source/pad.hxx
+++ b/configmgr/source/pad.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,3 +60,5 @@ private:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/parsemanager.cxx b/configmgr/source/parsemanager.cxx
index 69a5515b97..b6fe53f171 100644
--- a/configmgr/source/parsemanager.cxx
+++ b/configmgr/source/parsemanager.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -83,3 +84,5 @@ bool ParseManager::parse() {
ParseManager::~ParseManager() {}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/parsemanager.hxx b/configmgr/source/parsemanager.hxx
index 18292859ab..47719fce8a 100644
--- a/configmgr/source/parsemanager.hxx
+++ b/configmgr/source/parsemanager.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,3 +68,5 @@ private:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/parser.hxx b/configmgr/source/parser.hxx
index da29941953..0c2435ed19 100644
--- a/configmgr/source/parser.hxx
+++ b/configmgr/source/parser.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,3 +61,5 @@ protected:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/partial.cxx b/configmgr/source/partial.cxx
index 4c9189ed05..f3f91a4c05 100644
--- a/configmgr/source/partial.cxx
+++ b/configmgr/source/partial.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -135,3 +136,5 @@ Partial::Containment Partial::contains(Path const & path) const {
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/partial.hxx b/configmgr/source/partial.hxx
index 39931448c6..135aa5d663 100644
--- a/configmgr/source/partial.hxx
+++ b/configmgr/source/partial.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69,3 +70,5 @@ private:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/path.hxx b/configmgr/source/path.hxx
index fc70287dfe..2de401099d 100644
--- a/configmgr/source/path.hxx
+++ b/configmgr/source/path.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,3 +42,5 @@ typedef std::vector< rtl::OUString > Path;
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/propertynode.cxx b/configmgr/source/propertynode.cxx
index f3e459998e..8e2eec660d 100644
--- a/configmgr/source/propertynode.cxx
+++ b/configmgr/source/propertynode.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,8 +52,8 @@ namespace css = com::sun::star;
PropertyNode::PropertyNode(
int layer, Type staticType, bool nillable, css::uno::Any const & value,
bool extension):
- Node(layer), staticType_(staticType), nillable_(nillable), value_(value),
- extension_(extension)
+ Node(layer), staticType_(staticType), nillable_(nillable),
+ extension_(extension), value_(value)
{}
rtl::Reference< Node > PropertyNode::clone(bool) const {
@@ -97,8 +98,8 @@ bool PropertyNode::isExtension() const {
PropertyNode::PropertyNode(PropertyNode const & other):
Node(other), staticType_(other.staticType_), nillable_(other.nillable_),
- value_(other.value_), externalDescriptor_(other.externalDescriptor_),
- extension_(other.extension_)
+ extension_(other.extension_), externalDescriptor_(other.externalDescriptor_),
+ value_(other.value_)
{}
PropertyNode::~PropertyNode() {}
@@ -108,3 +109,5 @@ Node::Kind PropertyNode::kind() const {
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/propertynode.hxx b/configmgr/source/propertynode.hxx
index 506526ffcc..6e0edc895f 100644
--- a/configmgr/source/propertynode.hxx
+++ b/configmgr/source/propertynode.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73,11 +74,13 @@ private:
// as specified in the component-schema (TYPE_ANY, ...,
// TYPE_HEXBINARY_LIST; not TYPE_ERROR or TYPE_NIL)
bool nillable_;
- com::sun::star::uno::Any value_;
- rtl::OUString externalDescriptor_;
bool extension_;
+ rtl::OUString externalDescriptor_;
+ com::sun::star::uno::Any value_;
};
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/rootaccess.cxx b/configmgr/source/rootaccess.cxx
index f5d0bb1372..27f3884f2f 100644
--- a/configmgr/source/rootaccess.cxx
+++ b/configmgr/source/rootaccess.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,7 +78,9 @@ RootAccess::RootAccess(
rtl::OUString const & locale, bool update):
Access(components), pathRepresentation_(pathRepresentation),
locale_(locale), update_(update)
-{}
+{
+ lock_ = lock();
+}
Path RootAccess::getAbsolutePath() {
getNode();
@@ -128,7 +131,7 @@ bool RootAccess::isUpdate() const {
}
RootAccess::~RootAccess() {
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
getComponents().removeRootAccess(this);
}
@@ -226,7 +229,7 @@ css::uno::Any RootAccess::queryInterface(css::uno::Type const & aType)
throw (css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
css::uno::Any res(Access::queryInterface(aType));
if (res.hasValue()) {
@@ -250,7 +253,7 @@ void RootAccess::addChangesListener(
{
OSL_ASSERT(thisIs(IS_ANY));
{
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
if (!aListener.is()) {
throw css::uno::RuntimeException(
@@ -273,7 +276,7 @@ void RootAccess::removeChangesListener(
throw (css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_ANY));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
ChangesListeners::iterator i(changesListeners_.find(aListener));
if (i != changesListeners_.end()) {
@@ -287,7 +290,7 @@ void RootAccess::commitChanges()
OSL_ASSERT(thisIs(IS_UPDATE));
Broadcaster bc;
{
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
int finalizedLayer;
Modifications globalMods;
@@ -305,7 +308,7 @@ void RootAccess::commitChanges()
sal_Bool RootAccess::hasPendingChanges() throw (css::uno::RuntimeException) {
OSL_ASSERT(thisIs(IS_UPDATE));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
//TODO: Optimize:
std::vector< css::util::ElementChange > changes;
@@ -317,7 +320,7 @@ css::util::ChangesSet RootAccess::getPendingChanges()
throw (css::uno::RuntimeException)
{
OSL_ASSERT(thisIs(IS_UPDATE));
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
comphelper::SequenceAsVector< css::util::ElementChange > changes;
reportChildChanges(&changes);
@@ -325,3 +328,5 @@ css::util::ChangesSet RootAccess::getPendingChanges()
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/rootaccess.hxx b/configmgr/source/rootaccess.hxx
index 77d945cdbb..4d74167c85 100644
--- a/configmgr/source/rootaccess.hxx
+++ b/configmgr/source/rootaccess.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,6 +39,7 @@
#include "com/sun/star/util/ChangesSet.hpp"
#include "com/sun/star/util/XChangesBatch.hpp"
#include "com/sun/star/util/XChangesNotifier.hpp"
+#include "boost/shared_ptr.hpp"
#include "rtl/ref.hxx"
#include "rtl/ustring.hxx"
#include "sal/types.h"
@@ -150,8 +152,12 @@ private:
rtl::OUString name_;
bool finalized_;
ChangesListeners changesListeners_;
+
+ boost::shared_ptr<osl::Mutex> lock_;
};
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/services.cxx b/configmgr/source/services.cxx
index f8c3289664..6dc4b92c8b 100644
--- a/configmgr/source/services.cxx
+++ b/configmgr/source/services.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -133,3 +134,5 @@ extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
}
return true;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/setnode.cxx b/configmgr/source/setnode.cxx
index 465345a5f8..52b117bb01 100644
--- a/configmgr/source/setnode.cxx
+++ b/configmgr/source/setnode.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -127,3 +128,5 @@ void SetNode::clear() {
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/setnode.hxx b/configmgr/source/setnode.hxx
index 94ce537add..00bcab2a55 100644
--- a/configmgr/source/setnode.hxx
+++ b/configmgr/source/setnode.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,3 +83,5 @@ private:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/span.hxx b/configmgr/source/span.hxx
index 6896186137..20843be31e 100644
--- a/configmgr/source/span.hxx
+++ b/configmgr/source/span.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -62,3 +63,5 @@ struct Span {
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/type.cxx b/configmgr/source/type.cxx
index e1b8a95859..b3bfd72d3e 100644
--- a/configmgr/source/type.cxx
+++ b/configmgr/source/type.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -185,3 +186,5 @@ Type getDynamicType(css::uno::Any const & value) {
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/type.hxx b/configmgr/source/type.hxx
index 85edc9b5e9..91e335de1e 100644
--- a/configmgr/source/type.hxx
+++ b/configmgr/source/type.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54,3 +55,5 @@ Type getDynamicType(com::sun::star::uno::Any const & value);
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/update.cxx b/configmgr/source/update.cxx
index 403b761a5a..7208eb3f8c 100644
--- a/configmgr/source/update.cxx
+++ b/configmgr/source/update.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,6 +32,7 @@
#include <set>
#include "boost/noncopyable.hpp"
+#include "boost/shared_ptr.hpp"
#include "com/sun/star/configuration/XUpdate.hpp"
#include "com/sun/star/lang/XSingleComponentFactory.hpp"
#include "com/sun/star/uno/Any.hxx"
@@ -76,7 +78,10 @@ class Service:
private boost::noncopyable
{
public:
- Service() {}
+ Service()
+ {
+ lock_ = lock();
+ }
private:
virtual ~Service() {}
@@ -97,13 +102,15 @@ private:
css::uno::Sequence< rtl::OUString > const & includedPaths,
css::uno::Sequence< rtl::OUString > const & excludedPaths)
throw (css::uno::RuntimeException);
+
+ boost::shared_ptr<osl::Mutex> lock_;
};
void Service::insertExtensionXcsFile(
sal_Bool shared, rtl::OUString const & fileUri)
throw (css::uno::RuntimeException)
{
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
Components::getSingleton().insertExtensionXcsFile(shared, fileUri);
}
@@ -113,7 +120,7 @@ void Service::insertExtensionXcuFile(
{
Broadcaster bc;
{
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
Modifications mods;
Components::getSingleton().insertExtensionXcuFile(
shared, fileUri, &mods);
@@ -128,7 +135,7 @@ void Service::removeExtensionXcuFile(rtl::OUString const & fileUri)
{
Broadcaster bc;
{
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
Modifications mods;
Components::getSingleton().removeExtensionXcuFile(fileUri, &mods);
Components::getSingleton().initGlobalBroadcaster(
@@ -145,7 +152,7 @@ void Service::insertModificationXcuFile(
{
Broadcaster bc;
{
- osl::MutexGuard g(lock);
+ osl::MutexGuard g(*lock_);
Modifications mods;
Components::getSingleton().insertModificationXcuFile(
fileUri, seqToSet(includedPaths), seqToSet(excludedPaths), &mods);
@@ -225,3 +232,5 @@ css::uno::Reference< css::lang::XSingleComponentFactory > createFactory(
}
} }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/update.hxx b/configmgr/source/update.hxx
index faa5c86b15..77b7affb48 100644
--- a/configmgr/source/update.hxx
+++ b/configmgr/source/update.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,3 +58,5 @@ SAL_CALL createFactory(
} }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/valueparser.cxx b/configmgr/source/valueparser.cxx
index 4adf452c40..03201d26f9 100644
--- a/configmgr/source/valueparser.cxx
+++ b/configmgr/source/valueparser.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -468,3 +469,5 @@ template< typename T > css::uno::Any ValueParser::convertItems() {
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/valueparser.hxx b/configmgr/source/valueparser.hxx
index 4e899f4632..66f3fafd82 100644
--- a/configmgr/source/valueparser.hxx
+++ b/configmgr/source/valueparser.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -90,3 +91,5 @@ private:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/writemodfile.cxx b/configmgr/source/writemodfile.cxx
index c2573ab674..7e01aabeb5 100644
--- a/configmgr/source/writemodfile.cxx
+++ b/configmgr/source/writemodfile.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -599,3 +600,5 @@ void writeModFile(
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/writemodfile.hxx b/configmgr/source/writemodfile.hxx
index 250edfd095..0277bacdc4 100644
--- a/configmgr/source/writemodfile.hxx
+++ b/configmgr/source/writemodfile.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,3 +44,5 @@ void writeModFile(
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/xcdparser.cxx b/configmgr/source/xcdparser.cxx
index ad774d5ca3..06bb88858d 100644
--- a/configmgr/source/xcdparser.cxx
+++ b/configmgr/source/xcdparser.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -181,3 +182,5 @@ void XcdParser::characters(Span const & text) {
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/xcdparser.hxx b/configmgr/source/xcdparser.hxx
index 2ad8ecea7f..a57646a537 100644
--- a/configmgr/source/xcdparser.hxx
+++ b/configmgr/source/xcdparser.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -76,3 +77,5 @@ private:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/xcsparser.cxx b/configmgr/source/xcsparser.cxx
index 37b46494c6..7d28718ff8 100644
--- a/configmgr/source/xcsparser.cxx
+++ b/configmgr/source/xcsparser.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -671,3 +672,5 @@ void XcsParser::handleSetItem(XmlReader & reader, SetNode * set) {
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/xcsparser.hxx b/configmgr/source/xcsparser.hxx
index 196add9a82..43d65a93b4 100644
--- a/configmgr/source/xcsparser.hxx
+++ b/configmgr/source/xcsparser.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -104,3 +105,5 @@ private:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/xcuparser.cxx b/configmgr/source/xcuparser.cxx
index 91f3b244c5..44eb445333 100644
--- a/configmgr/source/xcuparser.cxx
+++ b/configmgr/source/xcuparser.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1123,3 +1124,5 @@ void XcuParser::recordModification(bool addition) {
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/xcuparser.hxx b/configmgr/source/xcuparser.hxx
index 02ef4e5ff1..e4d91d3093 100644
--- a/configmgr/source/xcuparser.hxx
+++ b/configmgr/source/xcuparser.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -153,3 +154,5 @@ private:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/xmldata.cxx b/configmgr/source/xmldata.cxx
index 07ad4d17a3..07cbd6f2c8 100644
--- a/configmgr/source/xmldata.cxx
+++ b/configmgr/source/xmldata.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -202,3 +203,5 @@ rtl::OUString parseTemplateReference(
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/xmldata.hxx b/configmgr/source/xmldata.hxx
index 15a0a36336..36034f3f96 100644
--- a/configmgr/source/xmldata.hxx
+++ b/configmgr/source/xmldata.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -56,3 +57,5 @@ rtl::OUString parseTemplateReference(
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/xmlreader.cxx b/configmgr/source/xmlreader.cxx
index ac6a08d186..49963ca318 100644
--- a/configmgr/source/xmlreader.cxx
+++ b/configmgr/source/xmlreader.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,6 +28,7 @@
#include "precompiled_configmgr.hxx"
#include "sal/config.h"
+#include "sal/macros.h"
#include <cstddef>
@@ -429,7 +431,7 @@ XmlReader::Namespace XmlReader::scanNamespaceIri(
XmlReader::NAMESPACE_XSI },
{ RTL_CONSTASCII_STRINGPARAM("http://www.w3.org/XML/1998/namespace"),
XmlReader::NAMESPACE_XML } };
- for (std::size_t i = 0; i < sizeof iris / sizeof iris[0]; ++i) {
+ for (std::size_t i = 0; i < SAL_N_ELEMENTS( iris ); ++i) {
if (rtl_str_compare_WithLength(
iri.begin, iri.length, iris[i].begin, iris[i].length) ==
0)
@@ -549,7 +551,7 @@ char const * XmlReader::handleReference(char const * position, char const * end)
RTL_CONSTASCII_STRINGPARAM("'") },
{ RTL_CONSTASCII_STRINGPARAM("quot;"),
RTL_CONSTASCII_STRINGPARAM("\"") } };
- for (std::size_t i = 0; i < sizeof refs / sizeof refs[0]; ++i) {
+ for (std::size_t i = 0; i < SAL_N_ELEMENTS( refs ); ++i) {
if (rtl_str_shortenedCompare_WithLength(
position, end - position, refs[i].inBegin, refs[i].inLength,
refs[i].inLength) ==
@@ -1052,3 +1054,5 @@ XmlReader::Result XmlReader::handleNormalizedText(Span * text) {
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/xmlreader.hxx b/configmgr/source/xmlreader.hxx
index 83ccac148c..9bb07592b6 100644
--- a/configmgr/source/xmlreader.hxx
+++ b/configmgr/source/xmlreader.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -184,3 +185,5 @@ private:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */