Kaydet (Commit) 9ab1bdc2 authored tarafından kripton's avatar kripton Kaydeden (comit) Matúš Kukan

tdf#74608 comphelper: Constructor feature for NamedPropertyValuesContainer

Change-Id: I63390eca5c887bfd84846655cef6339ba9785e24
Reviewed-on: https://gerrit.libreoffice.org/21888Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMatúš Kukan <matus@libreoffice.org>
üst 830b758b
...@@ -17,12 +17,9 @@ ...@@ -17,12 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * 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/container/XNameContainer.hpp>
#include <com/sun/star/uno/Sequence.h> #include <com/sun/star/uno/Sequence.h>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/PropertyValue.hpp>
#include <comphelper/sequence.hxx> #include <comphelper/sequence.hxx>
#include <cppuhelper/implbase.hxx> #include <cppuhelper/implbase.hxx>
...@@ -74,11 +71,6 @@ public: ...@@ -74,11 +71,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(css::uno::RuntimeException, std::exception) override; 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; 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: private:
NamedPropertyValues maProperties; NamedPropertyValues maProperties;
}; };
...@@ -177,11 +169,6 @@ sal_Bool SAL_CALL NamedPropertyValuesContainer::hasElements( ) ...@@ -177,11 +169,6 @@ sal_Bool SAL_CALL NamedPropertyValuesContainer::hasElements( )
//XServiceInfo //XServiceInfo
OUString SAL_CALL NamedPropertyValuesContainer::getImplementationName( ) throw(css::uno::RuntimeException, std::exception) OUString SAL_CALL NamedPropertyValuesContainer::getImplementationName( ) throw(css::uno::RuntimeException, std::exception)
{
return getImplementationName_static();
}
OUString SAL_CALL NamedPropertyValuesContainer::getImplementationName_static( )
{ {
return OUString( "NamedPropertyValuesContainer" ); return OUString( "NamedPropertyValuesContainer" );
} }
...@@ -192,26 +179,18 @@ sal_Bool SAL_CALL NamedPropertyValuesContainer::supportsService( const OUString& ...@@ -192,26 +179,18 @@ sal_Bool SAL_CALL NamedPropertyValuesContainer::supportsService( const OUString&
} }
css::uno::Sequence< OUString > SAL_CALL NamedPropertyValuesContainer::getSupportedServiceNames( ) throw(css::uno::RuntimeException, std::exception) 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 OUString aServiceName( "com.sun.star.document.NamedPropertyValues" );
const uno::Sequence< OUString > aSeq( &aServiceName, 1 ); const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
return aSeq; return aSeq;
} }
uno::Reference< uno::XInterface > SAL_CALL NamedPropertyValuesContainer::Create( extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
SAL_UNUSED_PARAMETER const uno::Reference< uno::XComponentContext >&) NamedPropertyValuesContainer_get_implementation(
{ css::uno::XComponentContext *,
return static_cast<cppu::OWeakObject*>(new NamedPropertyValuesContainer()); css::uno::Sequence<css::uno::Any> const &)
}
void createRegistryInfo_NamedPropertyValuesContainer()
{ {
static ::comphelper::module::OAutoRegistration< NamedPropertyValuesContainer > aAutoRegistration; return cppu::acquire(new NamedPropertyValuesContainer());
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
void createRegistryInfo_AnyCompareFactory(); void createRegistryInfo_AnyCompareFactory();
void createRegistryInfo_Map(); void createRegistryInfo_Map();
void createRegistryInfo_NamedPropertyValuesContainer();
void createRegistryInfo_OInstanceLocker(); void createRegistryInfo_OInstanceLocker();
void createRegistryInfo_OPropertyBag(); void createRegistryInfo_OPropertyBag();
void createRegistryInfo_OSimpleLogRing(); void createRegistryInfo_OSimpleLogRing();
......
...@@ -38,7 +38,6 @@ namespace comphelper { namespace module ...@@ -38,7 +38,6 @@ namespace comphelper { namespace module
createRegistryInfo_SequenceOutputStream(); createRegistryInfo_SequenceOutputStream();
createRegistryInfo_SequenceInputStream(); createRegistryInfo_SequenceInputStream();
createRegistryInfo_UNOMemoryStream(); createRegistryInfo_UNOMemoryStream();
createRegistryInfo_NamedPropertyValuesContainer();
createRegistryInfo_AnyCompareFactory(); createRegistryInfo_AnyCompareFactory();
createRegistryInfo_OInstanceLocker(); createRegistryInfo_OInstanceLocker();
createRegistryInfo_Map(); createRegistryInfo_Map();
......
...@@ -26,7 +26,8 @@ ...@@ -26,7 +26,8 @@
constructor="IndexedPropertyValuesContainer_get_implementation"> constructor="IndexedPropertyValuesContainer_get_implementation">
<service name="com.sun.star.document.IndexedPropertyValues"/> <service name="com.sun.star.document.IndexedPropertyValues"/>
</implementation> </implementation>
<implementation name="NamedPropertyValuesContainer"> <implementation name="NamedPropertyValuesContainer"
constructor="NamedPropertyValuesContainer_get_implementation">
<service name="com.sun.star.document.NamedPropertyValues"/> <service name="com.sun.star.document.NamedPropertyValues"/>
</implementation> </implementation>
<implementation name="com.sun.star.comp.MemoryStream"> <implementation name="com.sun.star.comp.MemoryStream">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment