summaryrefslogtreecommitdiff
path: root/configmgr/source/update.cxx
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2010-10-25 14:43:41 +0200
committersb <sb@openoffice.org>2010-10-25 14:43:41 +0200
commit7e5eda3334b1fb465e957e00c11c26f0375ce1ca (patch)
tree043c53e8dd35bb410bc8673e0a86a69e8fbe8080 /configmgr/source/update.cxx
parentcc065c4937433f944cd7f6e4332f599d5346a5e9 (diff)
sb132: #i115142# component factories should implement XServiceInfo
Diffstat (limited to 'configmgr/source/update.cxx')
-rw-r--r--configmgr/source/update.cxx56
1 files changed, 1 insertions, 55 deletions
diff --git a/configmgr/source/update.cxx b/configmgr/source/update.cxx
index 403b761a5abd..73074aa7c338 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"
@@ -155,55 +150,14 @@ void Service::insertModificationXcuFile(
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::XInterface > create(
css::uno::Reference< css::uno::XComponentContext > const &)
- throw (css::uno::Exception, css::uno::RuntimeException)
{
- 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);
}
-}
-
rtl::OUString getImplementationName() {
return rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.configuration.Update"));
@@ -216,12 +170,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;
-}
-
} }