diff options
author | kripton <yeliztaneroglu@gmail.com> | 2016-01-28 02:35:52 +0200 |
---|---|---|
committer | Matúš Kukan <matus@libreoffice.org> | 2016-01-30 07:33:06 +0000 |
commit | 2416a2965f4d51e1b14b8539436f5f8fc16cc399 (patch) | |
tree | ec1596f0ae0b6529f0bf0e7c90dfcb79a085a52f /comphelper | |
parent | 9784ff3d878eaa21491fbd779e57d7d4710f5449 (diff) |
tdf#74608 comphelper: Constructor feature for IndexedPropertyValuesContainer
Change-Id: I0e9ea9e4c750918b33040dad2279fe55facd4cab
Reviewed-on: https://gerrit.libreoffice.org/21858
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Matúš Kukan <matus@libreoffice.org>
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/container/IndexedPropertyValuesContainer.cxx | 34 | ||||
-rw-r--r-- | comphelper/source/inc/comphelper_services.hxx | 1 | ||||
-rw-r--r-- | comphelper/source/misc/comphelper_services.cxx | 1 | ||||
-rw-r--r-- | comphelper/util/comphelp.component | 3 |
4 files changed, 8 insertions, 31 deletions
diff --git a/comphelper/source/container/IndexedPropertyValuesContainer.cxx b/comphelper/source/container/IndexedPropertyValuesContainer.cxx index 2ab5572332cf..914629a6271f 100644 --- a/comphelper/source/container/IndexedPropertyValuesContainer.cxx +++ b/comphelper/source/container/IndexedPropertyValuesContainer.cxx @@ -17,11 +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/XIndexContainer.hpp> #include <com/sun/star/uno/Sequence.h> +#include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/beans/PropertyValue.hpp> #include <cppuhelper/implbase.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> @@ -70,11 +68,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: IndexedPropertyValues maProperties; }; @@ -217,11 +210,6 @@ sal_Bool SAL_CALL IndexedPropertyValuesContainer::hasElements( ) //XServiceInfo OUString SAL_CALL IndexedPropertyValuesContainer::getImplementationName( ) throw(css::uno::RuntimeException, std::exception) { - return getImplementationName_static(); -} - -OUString SAL_CALL IndexedPropertyValuesContainer::getImplementationName_static( ) -{ return OUString( "IndexedPropertyValuesContainer" ); } @@ -232,27 +220,17 @@ sal_Bool SAL_CALL IndexedPropertyValuesContainer::supportsService( const OUStrin css::uno::Sequence< OUString > SAL_CALL IndexedPropertyValuesContainer::getSupportedServiceNames( ) throw(css::uno::RuntimeException, std::exception) { - return getSupportedServiceNames_static(); -} - - -css::uno::Sequence< OUString > SAL_CALL IndexedPropertyValuesContainer::getSupportedServiceNames_static( ) -{ const OUString aServiceName( "com.sun.star.document.IndexedPropertyValues" ); const uno::Sequence< OUString > aSeq( &aServiceName, 1 ); return aSeq; } - -uno::Reference< uno::XInterface > SAL_CALL IndexedPropertyValuesContainer::Create( - SAL_UNUSED_PARAMETER const uno::Reference< uno::XComponentContext >&) -{ - return static_cast<cppu::OWeakObject*>(new IndexedPropertyValuesContainer()); -} - -void createRegistryInfo_IndexedPropertyValuesContainer() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +IndexedPropertyValuesContainer_get_implementation( + css::uno::XComponentContext *, + css::uno::Sequence<css::uno::Any> const &) { - static ::comphelper::module::OAutoRegistration< IndexedPropertyValuesContainer > aAutoRegistration; + return cppu::acquire(new IndexedPropertyValuesContainer()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/inc/comphelper_services.hxx b/comphelper/source/inc/comphelper_services.hxx index d62a16a0d8e0..602ac7a5a3d8 100644 --- a/comphelper/source/inc/comphelper_services.hxx +++ b/comphelper/source/inc/comphelper_services.hxx @@ -23,7 +23,6 @@ #include <sal/config.h> void createRegistryInfo_AnyCompareFactory(); -void createRegistryInfo_IndexedPropertyValuesContainer(); void createRegistryInfo_Map(); void createRegistryInfo_NamedPropertyValuesContainer(); void createRegistryInfo_OInstanceLocker(); diff --git a/comphelper/source/misc/comphelper_services.cxx b/comphelper/source/misc/comphelper_services.cxx index 979cd366731b..fe534b7fe253 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_IndexedPropertyValuesContainer(); createRegistryInfo_NamedPropertyValuesContainer(); createRegistryInfo_AnyCompareFactory(); createRegistryInfo_OInstanceLocker(); diff --git a/comphelper/util/comphelp.component b/comphelper/util/comphelp.component index 3a6803f37e24..f7b7d9aeccd3 100644 --- a/comphelper/util/comphelp.component +++ b/comphelper/util/comphelp.component @@ -22,7 +22,8 @@ <implementation name="AnyCompareFactory"> <service name="com.sun.star.ucb.AnyCompareFactory"/> </implementation> - <implementation name="IndexedPropertyValuesContainer"> + <implementation name="IndexedPropertyValuesContainer" + constructor="IndexedPropertyValuesContainer_get_implementation"> <service name="com.sun.star.document.IndexedPropertyValues"/> </implementation> <implementation name="NamedPropertyValuesContainer"> |