summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkripton <yeliztaneroglu@gmail.com>2016-01-29 00:59:41 +0200
committerMatúš Kukan <matus@libreoffice.org>2016-01-31 13:31:03 +0000
commit9ab1bdc217792e90b1b27d81128881d57152afc8 (patch)
tree7476d6ce61f251a98f0b4bf747db079f94eab533
parent830b758b11645730306e9f9e5b67e3b22ce17ec6 (diff)
tdf#74608 comphelper: Constructor feature for NamedPropertyValuesContainer
Change-Id: I63390eca5c887bfd84846655cef6339ba9785e24 Reviewed-on: https://gerrit.libreoffice.org/21888 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Matúš Kukan <matus@libreoffice.org>
-rw-r--r--comphelper/source/container/NamedPropertyValuesContainer.cxx33
-rw-r--r--comphelper/source/inc/comphelper_services.hxx1
-rw-r--r--comphelper/source/misc/comphelper_services.cxx1
-rw-r--r--comphelper/util/comphelp.component3
4 files changed, 8 insertions, 30 deletions
diff --git a/comphelper/source/container/NamedPropertyValuesContainer.cxx b/comphelper/source/container/NamedPropertyValuesContainer.cxx
index 90ce4cd723d1..e4bb48663210 100644
--- a/comphelper/source/container/NamedPropertyValuesContainer.cxx
+++ b/comphelper/source/container/NamedPropertyValuesContainer.cxx
@@ -17,12 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
-#include "comphelper_module.hxx"
-#include "comphelper_services.hxx"
-
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/uno/Sequence.h>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <comphelper/sequence.hxx>
#include <cppuhelper/implbase.hxx>
@@ -74,11 +71,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(css::uno::RuntimeException, std::exception) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(css::uno::RuntimeException, std::exception) override;
- // XServiceInfo - static versions (used for component registration)
- static OUString SAL_CALL getImplementationName_static();
- static uno::Sequence< OUString > SAL_CALL getSupportedServiceNames_static();
- static uno::Reference< uno::XInterface > SAL_CALL Create( const uno::Reference< uno::XComponentContext >& );
-
private:
NamedPropertyValues maProperties;
};
@@ -178,11 +170,6 @@ sal_Bool SAL_CALL NamedPropertyValuesContainer::hasElements( )
//XServiceInfo
OUString SAL_CALL NamedPropertyValuesContainer::getImplementationName( ) throw(css::uno::RuntimeException, std::exception)
{
- return getImplementationName_static();
-}
-
-OUString SAL_CALL NamedPropertyValuesContainer::getImplementationName_static( )
-{
return OUString( "NamedPropertyValuesContainer" );
}
@@ -193,25 +180,17 @@ sal_Bool SAL_CALL NamedPropertyValuesContainer::supportsService( const OUString&
css::uno::Sequence< OUString > SAL_CALL NamedPropertyValuesContainer::getSupportedServiceNames( ) throw(css::uno::RuntimeException, std::exception)
{
- return getSupportedServiceNames_static();
-}
-
-css::uno::Sequence< OUString > SAL_CALL NamedPropertyValuesContainer::getSupportedServiceNames_static( )
-{
const OUString aServiceName( "com.sun.star.document.NamedPropertyValues" );
const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
return aSeq;
}
-uno::Reference< uno::XInterface > SAL_CALL NamedPropertyValuesContainer::Create(
- SAL_UNUSED_PARAMETER const uno::Reference< uno::XComponentContext >&)
-{
- return static_cast<cppu::OWeakObject*>(new NamedPropertyValuesContainer());
-}
-
-void createRegistryInfo_NamedPropertyValuesContainer()
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+NamedPropertyValuesContainer_get_implementation(
+ css::uno::XComponentContext *,
+ css::uno::Sequence<css::uno::Any> const &)
{
- static ::comphelper::module::OAutoRegistration< NamedPropertyValuesContainer > aAutoRegistration;
+ return cppu::acquire(new NamedPropertyValuesContainer());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/comphelper/source/inc/comphelper_services.hxx b/comphelper/source/inc/comphelper_services.hxx
index 602ac7a5a3d8..04cbcb38ef87 100644
--- a/comphelper/source/inc/comphelper_services.hxx
+++ b/comphelper/source/inc/comphelper_services.hxx
@@ -24,7 +24,6 @@
void createRegistryInfo_AnyCompareFactory();
void createRegistryInfo_Map();
-void createRegistryInfo_NamedPropertyValuesContainer();
void createRegistryInfo_OInstanceLocker();
void createRegistryInfo_OPropertyBag();
void createRegistryInfo_OSimpleLogRing();
diff --git a/comphelper/source/misc/comphelper_services.cxx b/comphelper/source/misc/comphelper_services.cxx
index fe534b7fe253..da76ced51edf 100644
--- a/comphelper/source/misc/comphelper_services.cxx
+++ b/comphelper/source/misc/comphelper_services.cxx
@@ -38,7 +38,6 @@ namespace comphelper { namespace module
createRegistryInfo_SequenceOutputStream();
createRegistryInfo_SequenceInputStream();
createRegistryInfo_UNOMemoryStream();
- createRegistryInfo_NamedPropertyValuesContainer();
createRegistryInfo_AnyCompareFactory();
createRegistryInfo_OInstanceLocker();
createRegistryInfo_Map();
diff --git a/comphelper/util/comphelp.component b/comphelper/util/comphelp.component
index f7b7d9aeccd3..a9481505c9d4 100644
--- a/comphelper/util/comphelp.component
+++ b/comphelper/util/comphelp.component
@@ -26,7 +26,8 @@
constructor="IndexedPropertyValuesContainer_get_implementation">
<service name="com.sun.star.document.IndexedPropertyValues"/>
</implementation>
- <implementation name="NamedPropertyValuesContainer">
+ <implementation name="NamedPropertyValuesContainer"
+ constructor="NamedPropertyValuesContainer_get_implementation">
<service name="com.sun.star.document.NamedPropertyValues"/>
</implementation>
<implementation name="com.sun.star.comp.MemoryStream">