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>
This commit is contained in:
Steven Guo 2016-03-26 12:35:45 -07:00 committed by Michael Stahl
parent 5c05f1b201
commit 85f404151e
5 changed files with 12 additions and 41 deletions

View File

@ -23,7 +23,6 @@
#include <sal/config.h>
void createRegistryInfo_Map();
void createRegistryInfo_OPropertyBag();
void createRegistryInfo_UNOMemoryStream();
#endif

View File

@ -34,7 +34,6 @@ namespace comphelper { namespace module
public:
doInitialize()
{
createRegistryInfo_OPropertyBag();
createRegistryInfo_UNOMemoryStream();
createRegistryInfo_Map();
}

View File

@ -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,

View File

@ -91,16 +91,10 @@ namespace comphelper
//noncopyable
OPropertyBag(const OPropertyBag&) = delete;
const OPropertyBag& operator=(const OPropertyBag&) = delete;
// XServiceInfo - static versions
static css::uno::Sequence< OUString > getSupportedServiceNames_static() throw( css::uno::RuntimeException );
static OUString getImplementationName_static() throw( css::uno::RuntimeException );
static css::uno::Reference< css::uno::XInterface >
SAL_CALL Create(const css::uno::Reference< css::uno::XComponentContext >&);
protected:
OPropertyBag();
virtual ~OPropertyBag();
protected:
DECLARE_XINTERFACE()
DECLARE_XTYPEPROVIDER()

View File

@ -42,7 +42,8 @@
constructor="com_sun_star_comp_SequenceOutputStreamService">
<service name="com.sun.star.io.SequenceOutputStream"/>
</implementation>
<implementation name="com.sun.star.comp.comphelper.OPropertyBag">
<implementation name="com.sun.star.comp.comphelper.OPropertyBag"
constructor="com_sun_star_comp_comphelper_OPropertyBag"> >
<service name="com.sun.star.beans.PropertyBag"/>
</implementation>
<implementation name="com.sun.star.comp.embed.InstanceLocker"