diff options
author | Steven Guo <steventimothyguo@gmail.com> | 2016-03-26 12:35:45 -0700 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-05-26 20:52:43 +0000 |
commit | 85f404151e308bc1e97a0f3f15702c1c40a3b59b (patch) | |
tree | bb58427f8c92fc0082ff6f89492abfbb6c8d83d9 /comphelper/source/property/opropertybag.cxx | |
parent | 5c05f1b201be8c1b978dc8d409f3c4dbf0b4beb6 (diff) |
tdf#74608 Constructor functions for OPropertyBag
Added constructor function for OPropertyBag in /comphelper/source/property/.
Change-Id: I28d6aa5c6fa2aa4324cf4ac61c5f2e3ab0a5e14a
Reviewed-on: https://gerrit.libreoffice.org/23541
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'comphelper/source/property/opropertybag.cxx')
-rw-r--r-- | comphelper/source/property/opropertybag.cxx | 38 |
1 files changed, 8 insertions, 30 deletions
diff --git a/comphelper/source/property/opropertybag.cxx b/comphelper/source/property/opropertybag.cxx index 512003beb142..fb694398d9b5 100644 --- a/comphelper/source/property/opropertybag.cxx +++ b/comphelper/source/property/opropertybag.cxx @@ -19,8 +19,6 @@ #include "opropertybag.hxx" -#include "comphelper_module.hxx" -#include "comphelper_services.hxx" #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/beans/NamedValue.hpp> @@ -39,12 +37,14 @@ using namespace ::com::sun::star; -void createRegistryInfo_OPropertyBag() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +com_sun_star_comp_comphelper_OPropertyBag ( + css::uno::XComponentContext *, + css::uno::Sequence<css::uno::Any> const &) { - static ::comphelper::module::OAutoRegistration< ::comphelper::OPropertyBag > aAutoRegistration; + return cppu::acquire(new comphelper::OPropertyBag()); } - namespace comphelper { @@ -74,14 +74,6 @@ namespace comphelper IMPLEMENT_FORWARD_XINTERFACE2( OPropertyBag, OPropertyBag_Base, OPropertyBag_PBase ) IMPLEMENT_FORWARD_XTYPEPROVIDER2( OPropertyBag, OPropertyBag_Base, OPropertyBag_PBase ) - - Sequence< OUString > OPropertyBag::getSupportedServiceNames_static() throw( RuntimeException ) - { - Sequence< OUString > aServices { "com.sun.star.beans.PropertyBag" }; - return aServices; - } - - void SAL_CALL OPropertyBag::initialize( const Sequence< Any >& _rArguments ) throw (Exception, RuntimeException, std::exception) { Sequence< Type > aTypes; @@ -120,22 +112,9 @@ namespace comphelper } } - - OUString OPropertyBag::getImplementationName_static() throw( RuntimeException ) - { - return OUString( "com.sun.star.comp.comphelper.OPropertyBag" ); - } - - - Reference< XInterface > SAL_CALL OPropertyBag::Create( SAL_UNUSED_PARAMETER const Reference< XComponentContext >& ) - { - return *new OPropertyBag; - } - - OUString SAL_CALL OPropertyBag::getImplementationName() throw (RuntimeException, std::exception) { - return getImplementationName_static(); + return OUString( "com.sun.star.comp.comphelper.OPropertyBag" ); } sal_Bool SAL_CALL OPropertyBag::supportsService( const OUString& rServiceName ) throw (RuntimeException, std::exception) @@ -143,13 +122,12 @@ namespace comphelper return cppu::supportsService(this, rServiceName); } - Sequence< OUString > SAL_CALL OPropertyBag::getSupportedServiceNames( ) throw (RuntimeException, std::exception) { - return getSupportedServiceNames_static(); + Sequence< OUString > aServices { "com.sun.star.beans.PropertyBag" }; + return aServices; } - void OPropertyBag::fireEvents( sal_Int32 * /*pnHandles*/, sal_Int32 nCount, |