summaryrefslogtreecommitdiff
path: root/configmgr/source/configurationprovider.cxx
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2010-10-04 13:59:08 +0200
committersb <sb@openoffice.org>2010-10-04 13:59:08 +0200
commit9c3ac85b0904ffb3a3bd7ccbfae9f871659edcb3 (patch)
tree092c591a5d066d73d0e83aa042f86f9c94ed0462 /configmgr/source/configurationprovider.cxx
parent4ad5d2ff2763a17d0ab7eebe735add9dcf12aa46 (diff)
sb133: #i114705# for performance reasons, call configmgr::writeModFile asynchronously
Diffstat (limited to 'configmgr/source/configurationprovider.cxx')
-rw-r--r--configmgr/source/configurationprovider.cxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/configmgr/source/configurationprovider.cxx b/configmgr/source/configurationprovider.cxx
index a89540a881..688361a773 100644
--- a/configmgr/source/configurationprovider.cxx
+++ b/configmgr/source/configurationprovider.cxx
@@ -114,6 +114,8 @@ public:
private:
virtual ~Service() {}
+ virtual void SAL_CALL disposing() { flushModifications(); }
+
virtual rtl::OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException)
{ return configuration_provider::getImplementationName(); }
@@ -166,6 +168,8 @@ private:
virtual css::lang::Locale SAL_CALL getLocale()
throw (css::uno::RuntimeException);
+ void flushModifications() const;
+
css::uno::Reference< css::uno::XComponentContext > context_;
rtl::OUString locale_;
};
@@ -326,7 +330,7 @@ void Service::removeRefreshListener(
}
void Service::flush() throw (css::uno::RuntimeException) {
- //TODO
+ flushModifications();
cppu::OInterfaceContainerHelper * cont = rBHelper.getContainer(
cppu::UnoType< css::util::XFlushListener >::get());
if (cont != 0) {
@@ -380,6 +384,16 @@ css::lang::Locale Service::getLocale() throw (css::uno::RuntimeException) {
return loc;
}
+void Service::flushModifications() const {
+ Components * components;
+ {
+ osl::MutexGuard guard(lock);
+ Components::initSingleton(context_);
+ components = &Components::getSingleton();
+ }
+ components->flushModifications();
+}
+
class Factory:
public cppu::WeakImplHelper1< css::lang::XSingleComponentFactory >,
private boost::noncopyable