summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configmgr/source/access.cxx10
-rw-r--r--configmgr/source/childaccess.cxx17
-rw-r--r--configmgr/source/components.cxx6
-rw-r--r--configmgr/source/components.hxx4
-rw-r--r--configmgr/source/configurationprovider.cxx24
-rw-r--r--configmgr/source/configurationregistry.cxx58
-rw-r--r--configmgr/source/configurationregistry.hxx22
-rw-r--r--configmgr/source/defaultprovider.cxx68
-rw-r--r--configmgr/source/defaultprovider.hxx22
-rw-r--r--configmgr/source/node.cxx4
-rw-r--r--configmgr/source/node.hxx5
-rw-r--r--configmgr/source/services.cxx15
-rw-r--r--configmgr/source/update.cxx86
-rw-r--r--configmgr/source/update.hxx22
-rwxr-xr-xshell/qa/makefile.mk2
15 files changed, 106 insertions, 259 deletions
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index eda60e6d61..933a414d33 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -909,11 +909,8 @@ rtl::OUString Access::getImplementationName() throw (css::uno::RuntimeException)
OSL_ASSERT(thisIs(IS_ANY));
osl::MutexGuard g(lock);
checkLocalizedPropertyAccess();
- throw css::uno::RuntimeException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "configmgr Access has no service implementation name")),
- static_cast< cppu::OWeakObject * >(this));
+ return rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("org.openoffice-configmgr::Access"));
}
sal_Bool Access::supportsService(rtl::OUString const & ServiceName)
@@ -2092,7 +2089,8 @@ css::beans::Property Access::asProperty() {
default:
type = cppu::UnoType< css::uno::XInterface >::get(); //TODO: correct?
nillable = false;
- removable = getParentNode()->kind() == Node::KIND_SET;
+ rtl::Reference< Node > parent(getParentNode());
+ removable = parent.is() && parent->kind() == Node::KIND_SET;
break;
}
return css::beans::Property(
diff --git a/configmgr/source/childaccess.cxx b/configmgr/source/childaccess.cxx
index ef2b213d4e..c20fa49fb1 100644
--- a/configmgr/source/childaccess.cxx
+++ b/configmgr/source/childaccess.cxx
@@ -283,8 +283,9 @@ css::uno::Any ChildAccess::asValue() {
// Find best match using an adaption of RFC 4647 lookup matching
// rules, removing "-" or "_" delimited segments from the end;
// defaults are the empty string locale, the "en-US" locale, the
- // first child (if any), or a nil value (even though it may be
- // illegal for the given property), in that order:
+ // "en" locale, the first child (if any), or a nil value (even
+ // though it may be illegal for the given property), in that
+ // order:
rtl::Reference< ChildAccess > child;
for (;;) {
child = getChild(locale);
@@ -301,10 +302,14 @@ css::uno::Any ChildAccess::asValue() {
child = getChild(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en-US")));
if (!child.is()) {
- std::vector< rtl::Reference< ChildAccess > > all(
- getAllChildren());
- if (!all.empty()) {
- child = all.front();
+ child = getChild(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en")));
+ if (!child.is()) {
+ std::vector< rtl::Reference< ChildAccess > > all(
+ getAllChildren());
+ if (!all.empty()) {
+ child = all.front();
+ }
}
}
}
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index 32478e9681..2d148959ed 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -214,7 +214,7 @@ void Components::WriteThread::run() {
reference_->clear();
}
-void Components::initSingleton(
+Components & Components::getSingleton(
css::uno::Reference< css::uno::XComponentContext > const & context)
{
OSL_ASSERT(context.is());
@@ -223,10 +223,6 @@ void Components::initSingleton(
static Components theSingleton(context);
singleton = &theSingleton;
}
-}
-
-Components & Components::getSingleton() {
- OSL_ASSERT(singletonCreated);
if (singleton == 0) {
throw css::uno::RuntimeException(
rtl::OUString(
diff --git a/configmgr/source/components.hxx b/configmgr/source/components.hxx
index 1c735efca6..34b693c7e5 100644
--- a/configmgr/source/components.hxx
+++ b/configmgr/source/components.hxx
@@ -65,12 +65,10 @@ class RootAccess;
class Components: private boost::noncopyable {
public:
- static void initSingleton(
+ static Components & getSingleton(
com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
const & context);
- static Components & getSingleton();
-
static bool allLocales(rtl::OUString const & locale);
rtl::Reference< Node > resolvePathRepresentation(
diff --git a/configmgr/source/configurationprovider.cxx b/configmgr/source/configurationprovider.cxx
index 3cd58b145b..999253118f 100644
--- a/configmgr/source/configurationprovider.cxx
+++ b/configmgr/source/configurationprovider.cxx
@@ -55,7 +55,7 @@
#include "cppu/unotype.hxx"
#include "cppuhelper/compbase5.hxx"
#include "cppuhelper/factory.hxx"
-#include "cppuhelper/implbase1.hxx"
+#include "cppuhelper/implbase2.hxx"
#include "cppuhelper/interfacecontainer.hxx"
#include "cppuhelper/weak.hxx"
#include "osl/diagnose.h"
@@ -127,7 +127,6 @@ private:
virtual css::uno::Sequence< rtl::OUString > SAL_CALL
getSupportedServiceNames() throw (css::uno::RuntimeException)
{ return configuration_provider::getSupportedServiceNames(); }
- //TODO: DefaultProvider?
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(
rtl::OUString const & aServiceSpecifier)
@@ -276,8 +275,7 @@ Service::createInstanceWithArguments(
static_cast< cppu::OWeakObject * >(this));
}
osl::MutexGuard guard(lock);
- Components::initSingleton(context_);
- Components & components = Components::getSingleton();
+ Components & components = Components::getSingleton(context_);
rtl::Reference< RootAccess > root(
new RootAccess(components, nodepath, locale, update));
if (root->isValue()) {
@@ -388,14 +386,14 @@ void Service::flushModifications() const {
Components * components;
{
osl::MutexGuard guard(lock);
- Components::initSingleton(context_);
- components = &Components::getSingleton();
+ components = &Components::getSingleton(context_);
}
components->flushModifications();
}
class Factory:
- public cppu::WeakImplHelper1< css::lang::XSingleComponentFactory >,
+ public cppu::WeakImplHelper2<
+ css::lang::XSingleComponentFactory, css::lang::XServiceInfo >,
private boost::noncopyable
{
public:
@@ -414,6 +412,18 @@ private:
css::uno::Sequence< css::uno::Any > const & Arguments,
css::uno::Reference< css::uno::XComponentContext > const & Context)
throw (css::uno::Exception, css::uno::RuntimeException);
+
+ virtual rtl::OUString SAL_CALL getImplementationName()
+ throw (css::uno::RuntimeException)
+ { return configuration_provider::getImplementationName(); }
+
+ virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName)
+ throw (css::uno::RuntimeException)
+ { return ServiceName == getSupportedServiceNames()[0]; } //TODO
+
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL
+ getSupportedServiceNames() throw (css::uno::RuntimeException)
+ { return configuration_provider::getSupportedServiceNames(); }
};
css::uno::Reference< css::uno::XInterface > Factory::createInstanceWithContext(
diff --git a/configmgr/source/configurationregistry.cxx b/configmgr/source/configurationregistry.cxx
index ffd7174c0a..f4810eb34f 100644
--- a/configmgr/source/configurationregistry.cxx
+++ b/configmgr/source/configurationregistry.cxx
@@ -36,7 +36,6 @@
#include "com/sun/star/lang/XMultiComponentFactory.hpp"
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "com/sun/star/lang/XServiceInfo.hpp"
-#include "com/sun/star/lang/XSingleComponentFactory.hpp"
#include "com/sun/star/registry/InvalidRegistryException.hpp"
#include "com/sun/star/registry/InvalidValueException.hpp"
#include "com/sun/star/registry/MergeConflictException.hpp"
@@ -56,13 +55,11 @@
#include "com/sun/star/uno/XInterface.hpp"
#include "com/sun/star/util/XFlushable.hpp"
#include "cppu/unotype.hxx"
-#include "cppuhelper/factory.hxx"
#include "cppuhelper/implbase1.hxx"
#include "cppuhelper/implbase3.hxx"
#include "cppuhelper/weak.hxx"
#include "osl/diagnose.h"
#include "osl/mutex.hxx"
-#include "rtl/unload.h"
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
#include "sal/types.h"
@@ -877,53 +874,12 @@ rtl::OUString RegistryKey::getResolvedName(rtl::OUString const & aKeyName)
return aKeyName;
}
-class Factory:
- public cppu::WeakImplHelper1< css::lang::XSingleComponentFactory >,
- private boost::noncopyable
-{
-public:
- Factory() {}
-
-private:
- virtual ~Factory() {}
-
- virtual css::uno::Reference< css::uno::XInterface > SAL_CALL
- createInstanceWithContext(
- css::uno::Reference< css::uno::XComponentContext > const & Context)
- throw (css::uno::Exception, css::uno::RuntimeException);
-
- virtual css::uno::Reference< css::uno::XInterface > SAL_CALL
- createInstanceWithArgumentsAndContext(
- css::uno::Sequence< css::uno::Any > const & Arguments,
- css::uno::Reference< css::uno::XComponentContext > const & Context)
- throw (css::uno::Exception, css::uno::RuntimeException);
-};
-
-css::uno::Reference< css::uno::XInterface > Factory::createInstanceWithContext(
- css::uno::Reference< css::uno::XComponentContext > const & Context)
- throw (css::uno::Exception, css::uno::RuntimeException)
-{
- return createInstanceWithArgumentsAndContext(
- css::uno::Sequence< css::uno::Any >(), Context);
}
-css::uno::Reference< css::uno::XInterface >
-Factory::createInstanceWithArgumentsAndContext(
- css::uno::Sequence< css::uno::Any > const & Arguments,
- css::uno::Reference< css::uno::XComponentContext > const & Context)
- throw (css::uno::Exception, css::uno::RuntimeException)
+css::uno::Reference< css::uno::XInterface > create(
+ css::uno::Reference< css::uno::XComponentContext > const & context)
{
- if (Arguments.getLength() != 0) {
- throw css::uno::Exception(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.configuration.ConfigurationRegistry must be"
- " instantiated without arguments")),
- static_cast< cppu::OWeakObject * >(this));
- }
- return static_cast< cppu::OWeakObject * >(new Service(Context));
-}
-
+ return static_cast< cppu::OWeakObject * >(new Service(context));
}
rtl::OUString getImplementationName() {
@@ -939,12 +895,4 @@ css::uno::Sequence< rtl::OUString > getSupportedServiceNames() {
return css::uno::Sequence< rtl::OUString >(&name, 1);
}
-css::uno::Reference< css::lang::XSingleComponentFactory > createFactory(
- cppu::ComponentFactoryFunc, rtl::OUString const &,
- css::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *)
- SAL_THROW(())
-{
- return new Factory;
-}
-
} }
diff --git a/configmgr/source/configurationregistry.hxx b/configmgr/source/configurationregistry.hxx
index 6cba122188..417c519b97 100644
--- a/configmgr/source/configurationregistry.hxx
+++ b/configmgr/source/configurationregistry.hxx
@@ -30,28 +30,28 @@
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/Sequence.hxx"
-#include "cppuhelper/factory.hxx"
-#include "rtl/unload.h"
#include "sal/types.h"
-namespace com { namespace sun { namespace star { namespace lang {
- class XSingleComponentFactory;
-} } } }
+namespace com { namespace sun { namespace star {
+ namespace uno {
+ class XComponentContext;
+ class XInterface;
+ }
+} } }
namespace rtl { class OUString; }
namespace configmgr { namespace configuration_registry {
+com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL
+create(
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
+ const & context);
+
rtl::OUString SAL_CALL getImplementationName();
com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL
getSupportedServiceNames();
-com::sun::star::uno::Reference< com::sun::star::lang::XSingleComponentFactory >
-SAL_CALL createFactory(
- cppu::ComponentFactoryFunc, rtl::OUString const &,
- com::sun::star::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *)
- SAL_THROW(());
-
} }
#endif
diff --git a/configmgr/source/defaultprovider.cxx b/configmgr/source/defaultprovider.cxx
index d069663290..9079d4736a 100644
--- a/configmgr/source/defaultprovider.cxx
+++ b/configmgr/source/defaultprovider.cxx
@@ -28,24 +28,16 @@
#include "precompiled_configmgr.hxx"
#include "sal/config.h"
-#include "boost/noncopyable.hpp"
-#include "com/sun/star/lang/XSingleComponentFactory.hpp"
-#include "com/sun/star/uno/Any.hxx"
-#include "com/sun/star/uno/Exception.hpp"
#include "com/sun/star/uno/Reference.hxx"
-#include "com/sun/star/uno/RuntimeException.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/XComponentContext.hpp"
#include "com/sun/star/uno/XInterface.hpp"
-#include "cppuhelper/factory.hxx"
-#include "cppuhelper/implbase1.hxx"
-#include "cppuhelper/weak.hxx"
-#include "sal/types.h"
-#include "rtl/unload.h"
+#include "osl/mutex.hxx"
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
#include "configurationprovider.hxx"
+#include "defaultprovider.hxx"
#include "lock.hxx"
namespace configmgr { namespace default_provider {
@@ -54,58 +46,17 @@ namespace {
namespace css = com::sun::star;
-class Factory:
- public cppu::WeakImplHelper1< css::lang::XSingleComponentFactory >,
- private boost::noncopyable
-{
-public:
- Factory() {}
-
-private:
- virtual ~Factory() {}
-
- virtual css::uno::Reference< css::uno::XInterface > SAL_CALL
- createInstanceWithContext(
- css::uno::Reference< css::uno::XComponentContext > const & Context)
- throw (css::uno::Exception, css::uno::RuntimeException);
-
- virtual css::uno::Reference< css::uno::XInterface > SAL_CALL
- createInstanceWithArgumentsAndContext(
- css::uno::Sequence< css::uno::Any > const & Arguments,
- css::uno::Reference< css::uno::XComponentContext > const & Context)
- throw (css::uno::Exception, css::uno::RuntimeException);
-};
-
-css::uno::Reference< css::uno::XInterface > Factory::createInstanceWithContext(
- css::uno::Reference< css::uno::XComponentContext > const & Context)
- throw (css::uno::Exception, css::uno::RuntimeException)
-{
- return createInstanceWithArgumentsAndContext(
- css::uno::Sequence< css::uno::Any >(), Context);
}
-css::uno::Reference< css::uno::XInterface >
-Factory::createInstanceWithArgumentsAndContext(
- css::uno::Sequence< css::uno::Any > const & Arguments,
- css::uno::Reference< css::uno::XComponentContext > const & Context)
- throw (css::uno::Exception, css::uno::RuntimeException)
+css::uno::Reference< css::uno::XInterface > create(
+ css::uno::Reference< css::uno::XComponentContext > const & context)
{
- if (Arguments.getLength() != 0) {
- throw css::uno::Exception(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.configuration.DefaultProvider must be"
- " instantiated without arguments")),
- static_cast< cppu::OWeakObject * >(this));
- }
osl::MutexGuard guard(lock);
static css::uno::Reference< css::uno::XInterface > singleton(
- configuration_provider::createDefault(Context));
+ configuration_provider::createDefault(context));
return singleton;
}
-}
-
rtl::OUString getImplementationName() {
return rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(
@@ -119,13 +70,4 @@ css::uno::Sequence< rtl::OUString > getSupportedServiceNames() {
return css::uno::Sequence< rtl::OUString >(&name, 1);
}
-css::uno::Reference< css::lang::XSingleComponentFactory >
-SAL_CALL createFactory(
- cppu::ComponentFactoryFunc, rtl::OUString const &,
- css::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *)
- SAL_THROW(())
-{
- return new Factory;
-}
-
} }
diff --git a/configmgr/source/defaultprovider.hxx b/configmgr/source/defaultprovider.hxx
index 7b267a80b4..f678931d35 100644
--- a/configmgr/source/defaultprovider.hxx
+++ b/configmgr/source/defaultprovider.hxx
@@ -32,28 +32,28 @@
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/Sequence.hxx"
-#include "cppuhelper/factory.hxx"
-#include "rtl/unload.h"
#include "sal/types.h"
-namespace com { namespace sun { namespace star { namespace lang {
- class XSingleComponentFactory;
-} } } }
+namespace com { namespace sun { namespace star {
+ namespace uno {
+ class XComponentContext;
+ class XInterface;
+ }
+} } }
namespace rtl { class OUString; }
namespace configmgr { namespace default_provider {
+com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL
+create(
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
+ const & context);
+
rtl::OUString SAL_CALL getImplementationName();
com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL
getSupportedServiceNames();
-com::sun::star::uno::Reference< com::sun::star::lang::XSingleComponentFactory >
-SAL_CALL createFactory(
- cppu::ComponentFactoryFunc, rtl::OUString const &,
- com::sun::star::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *)
- SAL_THROW(());
-
} }
#endif
diff --git a/configmgr/source/node.cxx b/configmgr/source/node.cxx
index a5a089106b..5473b6b1de 100644
--- a/configmgr/source/node.cxx
+++ b/configmgr/source/node.cxx
@@ -101,8 +101,4 @@ Node::~Node() {}
void Node::clear() {}
-rtl::Reference< Node > Node::findMember(rtl::OUString const &) {
- return rtl::Reference< Node >();
-}
-
}
diff --git a/configmgr/source/node.hxx b/configmgr/source/node.hxx
index 7c9417e68e..f79e7ba296 100644
--- a/configmgr/source/node.hxx
+++ b/configmgr/source/node.hxx
@@ -31,11 +31,12 @@
#include "sal/config.h"
#include "rtl/ref.hxx"
-#include "rtl/ustring.hxx"
#include "salhelper/simplereferenceobject.hxx"
#include "nodemap.hxx"
+namespace rtl { class OUString; }
+
namespace configmgr {
class Node: public salhelper::SimpleReferenceObject {
@@ -75,8 +76,6 @@ protected:
virtual void clear();
- virtual rtl::Reference< Node > findMember(rtl::OUString const & name);
-
int layer_;
int finalized_;
};
diff --git a/configmgr/source/services.cxx b/configmgr/source/services.cxx
index b1ef8d2169..dd01189be6 100644
--- a/configmgr/source/services.cxx
+++ b/configmgr/source/services.cxx
@@ -32,6 +32,7 @@
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/XComponentContext.hpp"
#include "com/sun/star/uno/XInterface.hpp"
+#include "cppuhelper/factory.hxx"
#include "cppuhelper/implementationentry.hxx"
#include "osl/diagnose.h"
#include "uno/lbnames.h"
@@ -58,15 +59,17 @@ static cppu::ImplementationEntry const services[] = {
{ &dummy, &configmgr::configuration_provider::getImplementationName,
&configmgr::configuration_provider::getSupportedServiceNames,
&configmgr::configuration_provider::createFactory, 0, 0 },
- { &dummy, &configmgr::default_provider::getImplementationName,
+ { &configmgr::default_provider::create,
+ &configmgr::default_provider::getImplementationName,
&configmgr::default_provider::getSupportedServiceNames,
- &configmgr::default_provider::createFactory, 0, 0 },
- { &dummy, &configmgr::configuration_registry::getImplementationName,
+ &cppu::createSingleComponentFactory, 0, 0 },
+ { &configmgr::configuration_registry::create,
+ &configmgr::configuration_registry::getImplementationName,
&configmgr::configuration_registry::getSupportedServiceNames,
- &configmgr::configuration_registry::createFactory, 0, 0 },
- { &dummy, &configmgr::update::getImplementationName,
+ &cppu::createSingleComponentFactory, 0, 0 },
+ { &configmgr::update::create, &configmgr::update::getImplementationName,
&configmgr::update::getSupportedServiceNames,
- &configmgr::update::createFactory, 0, 0 },
+ &cppu::createSingleComponentFactory, 0, 0 },
{ 0, 0, 0, 0, 0, 0 }
};
diff --git a/configmgr/source/update.cxx b/configmgr/source/update.cxx
index 403b761a5a..258765158a 100644
--- a/configmgr/source/update.cxx
+++ b/configmgr/source/update.cxx
@@ -32,20 +32,15 @@
#include "boost/noncopyable.hpp"
#include "com/sun/star/configuration/XUpdate.hpp"
-#include "com/sun/star/lang/XSingleComponentFactory.hpp"
-#include "com/sun/star/uno/Any.hxx"
-#include "com/sun/star/uno/Exception.hpp"
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/RuntimeException.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/XComponentContext.hpp"
#include "com/sun/star/uno/XInterface.hpp"
-#include "cppuhelper/factory.hxx"
#include "cppuhelper/implbase1.hxx"
#include "cppuhelper/weak.hxx"
#include "osl/mutex.hxx"
#include "rtl/ref.hxx"
-#include "rtl/unload.h"
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
#include "sal/types.h"
@@ -76,7 +71,11 @@ class Service:
private boost::noncopyable
{
public:
- Service() {}
+ Service(css::uno::Reference< css::uno::XComponentContext > const context):
+ context_(context)
+ {
+ OSL_ASSERT(context.is());
+ }
private:
virtual ~Service() {}
@@ -97,6 +96,8 @@ private:
css::uno::Sequence< rtl::OUString > const & includedPaths,
css::uno::Sequence< rtl::OUString > const & excludedPaths)
throw (css::uno::RuntimeException);
+
+ css::uno::Reference< css::uno::XComponentContext > context_;
};
void Service::insertExtensionXcsFile(
@@ -104,7 +105,7 @@ void Service::insertExtensionXcsFile(
throw (css::uno::RuntimeException)
{
osl::MutexGuard g(lock);
- Components::getSingleton().insertExtensionXcsFile(shared, fileUri);
+ Components::getSingleton(context_).insertExtensionXcsFile(shared, fileUri);
}
void Service::insertExtensionXcuFile(
@@ -114,10 +115,10 @@ void Service::insertExtensionXcuFile(
Broadcaster bc;
{
osl::MutexGuard g(lock);
+ Components & components = Components::getSingleton(context_);
Modifications mods;
- Components::getSingleton().insertExtensionXcuFile(
- shared, fileUri, &mods);
- Components::getSingleton().initGlobalBroadcaster(
+ components.insertExtensionXcuFile(shared, fileUri, &mods);
+ components.initGlobalBroadcaster(
mods, rtl::Reference< RootAccess >(), &bc);
}
bc.send();
@@ -129,9 +130,10 @@ void Service::removeExtensionXcuFile(rtl::OUString const & fileUri)
Broadcaster bc;
{
osl::MutexGuard g(lock);
+ Components & components = Components::getSingleton(context_);
Modifications mods;
- Components::getSingleton().removeExtensionXcuFile(fileUri, &mods);
- Components::getSingleton().initGlobalBroadcaster(
+ components.removeExtensionXcuFile(fileUri, &mods);
+ components.initGlobalBroadcaster(
mods, rtl::Reference< RootAccess >(), &bc);
}
bc.send();
@@ -146,62 +148,22 @@ void Service::insertModificationXcuFile(
Broadcaster bc;
{
osl::MutexGuard g(lock);
+ Components & components = Components::getSingleton(context_);
Modifications mods;
- Components::getSingleton().insertModificationXcuFile(
+ components.insertModificationXcuFile(
fileUri, seqToSet(includedPaths), seqToSet(excludedPaths), &mods);
- Components::getSingleton().initGlobalBroadcaster(
+ components.initGlobalBroadcaster(
mods, rtl::Reference< RootAccess >(), &bc);
}
bc.send();
}
-class Factory:
- public cppu::WeakImplHelper1< css::lang::XSingleComponentFactory >,
- private boost::noncopyable
-{
-public:
- Factory() {}
-
-private:
- virtual ~Factory() {}
-
- virtual css::uno::Reference< css::uno::XInterface > SAL_CALL
- createInstanceWithContext(
- css::uno::Reference< css::uno::XComponentContext > const & Context)
- throw (css::uno::Exception, css::uno::RuntimeException);
-
- virtual css::uno::Reference< css::uno::XInterface > SAL_CALL
- createInstanceWithArgumentsAndContext(
- css::uno::Sequence< css::uno::Any > const & Arguments,
- css::uno::Reference< css::uno::XComponentContext > const & Context)
- throw (css::uno::Exception, css::uno::RuntimeException);
-};
-
-css::uno::Reference< css::uno::XInterface > Factory::createInstanceWithContext(
- css::uno::Reference< css::uno::XComponentContext > const & Context)
- throw (css::uno::Exception, css::uno::RuntimeException)
-{
- return createInstanceWithArgumentsAndContext(
- css::uno::Sequence< css::uno::Any >(), Context);
}
-css::uno::Reference< css::uno::XInterface >
-Factory::createInstanceWithArgumentsAndContext(
- css::uno::Sequence< css::uno::Any > const & Arguments,
- css::uno::Reference< css::uno::XComponentContext > const &)
- throw (css::uno::Exception, css::uno::RuntimeException)
+css::uno::Reference< css::uno::XInterface > create(
+ css::uno::Reference< css::uno::XComponentContext > const & context)
{
- if (Arguments.getLength() != 0) {
- throw css::uno::Exception(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.configuration.Update must be"
- " instantiated without arguments")),
- static_cast< cppu::OWeakObject * >(this));
- }
- return static_cast< cppu::OWeakObject * >(new Service);
-}
-
+ return static_cast< cppu::OWeakObject * >(new Service(context));
}
rtl::OUString getImplementationName() {
@@ -216,12 +178,4 @@ css::uno::Sequence< rtl::OUString > getSupportedServiceNames() {
return css::uno::Sequence< rtl::OUString >(&name, 1);
}
-css::uno::Reference< css::lang::XSingleComponentFactory > createFactory(
- cppu::ComponentFactoryFunc, rtl::OUString const &,
- css::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *)
- SAL_THROW(())
-{
- return new Factory;
-}
-
} }
diff --git a/configmgr/source/update.hxx b/configmgr/source/update.hxx
index faa5c86b15..a60264e67a 100644
--- a/configmgr/source/update.hxx
+++ b/configmgr/source/update.hxx
@@ -32,28 +32,28 @@
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/Sequence.hxx"
-#include "cppuhelper/factory.hxx"
-#include "rtl/unload.h"
#include "sal/types.h"
-namespace com { namespace sun { namespace star { namespace lang {
- class XSingleComponentFactory;
-} } } }
+namespace com { namespace sun { namespace star {
+ namespace uno {
+ class XComponentContext;
+ class XInterface;
+ }
+} } }
namespace rtl { class OUString; }
namespace configmgr { namespace update {
+com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL
+create(
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
+ const &);
+
rtl::OUString SAL_CALL getImplementationName();
com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL
getSupportedServiceNames();
-com::sun::star::uno::Reference< com::sun::star::lang::XSingleComponentFactory >
-SAL_CALL createFactory(
- cppu::ComponentFactoryFunc, rtl::OUString const &,
- com::sun::star::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *)
- SAL_THROW(());
-
} }
#endif
diff --git a/shell/qa/makefile.mk b/shell/qa/makefile.mk
index cc91a6b1ad..290798bab1 100755
--- a/shell/qa/makefile.mk
+++ b/shell/qa/makefile.mk
@@ -28,8 +28,6 @@ PRJ=..
PRJNAME=shell
TARGET=qa
-# this is removed at the moment because we need some enhancements
-# TESTDIR=TRUE
ENABLE_EXCEPTIONS=TRUE