summaryrefslogtreecommitdiff
path: root/svx/source/xml
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-01-22 11:54:19 +0100
committerJan Holesovsky <kendy@collabora.com>2014-01-22 15:09:28 +0100
commitc2c530da69152ff9192b9726aa95961803ce9b29 (patch)
tree15e514573f35d9f376520fc2c015634dc4ee8c25 /svx/source/xml
parent219a2939c9f58690356b2a3f64c580a0865fdc64 (diff)
Introduce static inline cppu::acquire(), and make use of that.
This is much better approach compared to the callback function, as it allows passing arguments to the c++ constructor directly, while still allowing some additional initialization after having acquired the instance. Change-Id: I5a0f981915dd58f1522ee6054e53a3550b29d624
Diffstat (limited to 'svx/source/xml')
-rw-r--r--svx/source/xml/xmlgrhlp.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index d6c8d26c7a28..41e94a93359e 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -1053,9 +1053,9 @@ Sequence< OUString > SAL_CALL SvXMLGraphicImportExportHelper::getSupportedServic
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_comp_Svx_GraphicImportHelper_get_implementation(
css::uno::XComponentContext *,
- cppu::constructor_InitializationFunc &)
+ css::uno::Sequence<css::uno::Any> const &)
{
- return static_cast<cppu::OWeakObject *>(new SvXMLGraphicImportExportHelper(GRAPHICHELPER_MODE_READ));
+ return cppu::acquire(new SvXMLGraphicImportExportHelper(GRAPHICHELPER_MODE_READ));
}
/** Create this with createInstanceWithArguments. service name
@@ -1073,9 +1073,9 @@ com_sun_star_comp_Svx_GraphicImportHelper_get_implementation(
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_comp_Svx_GraphicExportHelper_get_implementation(
css::uno::XComponentContext *,
- cppu::constructor_InitializationFunc &)
+ css::uno::Sequence<css::uno::Any> const &)
{
- return static_cast<cppu::OWeakObject *>(new SvXMLGraphicImportExportHelper(GRAPHICHELPER_MODE_WRITE));
+ return cppu::acquire(new SvXMLGraphicImportExportHelper(GRAPHICHELPER_MODE_WRITE));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */