summaryrefslogtreecommitdiff
path: root/svx
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
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')
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeEngine.cxx4
-rw-r--r--svx/source/sdr/primitive2d/primitivefactory2d.cxx4
-rw-r--r--svx/source/sidebar/PanelFactory.cxx4
-rw-r--r--svx/source/tbxctrls/tbunocontroller.cxx4
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.cxx28
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx4
-rw-r--r--svx/source/unodraw/recoveryui.cxx4
-rw-r--r--svx/source/unodraw/unoctabl.cxx4
-rw-r--r--svx/source/unodraw/unoshcol.cxx4
-rw-r--r--svx/source/unogallery/unogalthemeprovider.cxx4
-rw-r--r--svx/source/xml/xmlgrhlp.cxx8
11 files changed, 36 insertions, 36 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
index 6d8e62ab226a..e1ceb9591b20 100644
--- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
@@ -492,9 +492,9 @@ Sequence< Reference< drawing::XCustomShapeHandle > > SAL_CALL EnhancedCustomShap
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_drawing_EnhancedCustomShapeEngine_get_implementation(
css::uno::XComponentContext *,
- cppu::constructor_InitializationFunc &)
+ css::uno::Sequence<css::uno::Any> const &)
{
- return static_cast<cppu::OWeakObject *>(new EnhancedCustomShapeEngine);
+ return cppu::acquire(new EnhancedCustomShapeEngine);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sdr/primitive2d/primitivefactory2d.cxx b/svx/source/sdr/primitive2d/primitivefactory2d.cxx
index a5dede56473d..06bafe870eb2 100644
--- a/svx/source/sdr/primitive2d/primitivefactory2d.cxx
+++ b/svx/source/sdr/primitive2d/primitivefactory2d.cxx
@@ -91,9 +91,9 @@ Primitive2DSequence SAL_CALL PrimitiveFactory2D::createPrimitivesFromXDrawPage(
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_comp_graphic_PrimitiveFactory2D_get_implementation(
css::uno::XComponentContext *,
- cppu::constructor_InitializationFunc &)
+ css::uno::Sequence<css::uno::Any> const &)
{
- return static_cast<cppu::OWeakObject *>(new PrimitiveFactory2D);
+ return cppu::acquire(new PrimitiveFactory2D);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sidebar/PanelFactory.cxx b/svx/source/sidebar/PanelFactory.cxx
index d8839db828fc..982f470782ec 100644
--- a/svx/source/sidebar/PanelFactory.cxx
+++ b/svx/source/sidebar/PanelFactory.cxx
@@ -207,7 +207,7 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement (
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
org_apache_openoffice_comp_svx_sidebar_PanelFactory_get_implementation(
css::uno::XComponentContext *,
- cppu::constructor_InitializationFunc &)
+ css::uno::Sequence<css::uno::Any> const &)
{
- return static_cast<cppu::OWeakObject *>(new PanelFactory);
+ return cppu::acquire(new PanelFactory);
}
diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx
index 418fab4ee3de..47330431a5b6 100644
--- a/svx/source/tbxctrls/tbunocontroller.cxx
+++ b/svx/source/tbxctrls/tbunocontroller.cxx
@@ -442,9 +442,9 @@ void FontHeightToolBoxControl::dispatchCommand(
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_svx_FontHeightToolBoxController_get_implementation(
css::uno::XComponentContext *rxContext,
- cppu::constructor_InitializationFunc &)
+ css::uno::Sequence<css::uno::Any> const &)
{
- return static_cast<cppu::OWeakObject *>(new FontHeightToolBoxControl(rxContext));
+ return cppu::acquire(new FontHeightToolBoxControl(rxContext));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index 19c0adb9ab40..8cedb04d2e11 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -1053,57 +1053,57 @@ void SAL_CALL FindbarDispatcher::removeStatusListener( const css::uno::Reference
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_svx_FindTextToolboxController_get_implementation(
css::uno::XComponentContext *context,
- cppu::constructor_InitializationFunc &)
+ css::uno::Sequence<css::uno::Any> const &)
{
- return static_cast<cppu::OWeakObject *>(new FindTextToolbarController(context));
+ return cppu::acquire(new FindTextToolbarController(context));
}
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_svx_ExitFindbarToolboxController_get_implementation(
css::uno::XComponentContext *context,
- cppu::constructor_InitializationFunc &)
+ css::uno::Sequence<css::uno::Any> const &)
{
- return static_cast<cppu::OWeakObject *>(new ExitSearchToolboxController(context));
+ return cppu::acquire(new ExitSearchToolboxController(context));
}
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_svx_UpSearchToolboxController_get_implementation(
css::uno::XComponentContext *context,
- cppu::constructor_InitializationFunc &)
+ css::uno::Sequence<css::uno::Any> const &)
{
- return static_cast<cppu::OWeakObject *>(new UpDownSearchToolboxController(context, UpDownSearchToolboxController::UP));
+ return cppu::acquire(new UpDownSearchToolboxController(context, UpDownSearchToolboxController::UP));
}
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_svx_DownSearchToolboxController_get_implementation(
css::uno::XComponentContext *context,
- cppu::constructor_InitializationFunc &)
+ css::uno::Sequence<css::uno::Any> const &)
{
- return static_cast<cppu::OWeakObject *>(new UpDownSearchToolboxController(context, UpDownSearchToolboxController::DOWN));
+ return cppu::acquire(new UpDownSearchToolboxController(context, UpDownSearchToolboxController::DOWN));
}
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_svx_MatchCaseToolboxController_get_implementation(
css::uno::XComponentContext *context,
- cppu::constructor_InitializationFunc &)
+ css::uno::Sequence<css::uno::Any> const &)
{
- return static_cast<cppu::OWeakObject *>(new MatchCaseToolboxController(context));
+ return cppu::acquire(new MatchCaseToolboxController(context));
}
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_svx_FindAllToolboxController_get_implementation(
css::uno::XComponentContext *context,
- cppu::constructor_InitializationFunc &)
+ css::uno::Sequence<css::uno::Any> const &)
{
- return static_cast<cppu::OWeakObject *>(new FindAllToolboxController(context));
+ return cppu::acquire(new FindAllToolboxController(context));
}
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_comp_svx_Impl_FindbarDispatcher_get_implementation(
SAL_UNUSED_PARAMETER css::uno::XComponentContext *,
- cppu::constructor_InitializationFunc &)
+ css::uno::Sequence<css::uno::Any> const &)
{
- return static_cast<cppu::OWeakObject *>(new FindbarDispatcher);
+ return cppu::acquire(new FindbarDispatcher);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index 6d4c7d318b7b..57344500d64c 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -1283,9 +1283,9 @@ Graphic SvxGetGraphicForShape( SdrObject& rShape, bool bVector )
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_comp_Draw_GraphicExporter_get_implementation(
css::uno::XComponentContext *,
- cppu::constructor_InitializationFunc &)
+ css::uno::Sequence<css::uno::Any> const &)
{
- return static_cast<cppu::OWeakObject *>(new GraphicExporter);
+ return cppu::acquire(new GraphicExporter);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/unodraw/recoveryui.cxx b/svx/source/unodraw/recoveryui.cxx
index 19142a4601e5..65033f63fe37 100644
--- a/svx/source/unodraw/recoveryui.cxx
+++ b/svx/source/unodraw/recoveryui.cxx
@@ -423,9 +423,9 @@ void RecoveryUI::impl_showAllRecoveredDocs()
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_comp_svx_RecoveryUI_get_implementation(
css::uno::XComponentContext *context,
- cppu::constructor_InitializationFunc &)
+ css::uno::Sequence<css::uno::Any> const &)
{
- return static_cast<cppu::OWeakObject *>(new RecoveryUI(context));
+ return cppu::acquire(new RecoveryUI(context));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/unodraw/unoctabl.cxx b/svx/source/unodraw/unoctabl.cxx
index 6205d0cd4791..3a3b91707a37 100644
--- a/svx/source/unodraw/unoctabl.cxx
+++ b/svx/source/unodraw/unoctabl.cxx
@@ -188,9 +188,9 @@ sal_Bool SAL_CALL SvxUnoColorTable::hasElements()
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_drawing_SvxUnoColorTable_get_implementation(
css::uno::XComponentContext *,
- cppu::constructor_InitializationFunc &)
+ css::uno::Sequence<css::uno::Any> const &)
{
- return static_cast<cppu::OWeakObject *>(new SvxUnoColorTable);
+ return cppu::acquire(new SvxUnoColorTable);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/unodraw/unoshcol.cxx b/svx/source/unodraw/unoshcol.cxx
index 76f48ad7b2fd..925a88146d9b 100644
--- a/svx/source/unodraw/unoshcol.cxx
+++ b/svx/source/unodraw/unoshcol.cxx
@@ -272,9 +272,9 @@ uno::Sequence< OUString > SAL_CALL SvxShapeCollection::getSupportedServiceNames(
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_drawing_SvxShapeCollection_get_implementation(
css::uno::XComponentContext *,
- cppu::constructor_InitializationFunc &)
+ css::uno::Sequence<css::uno::Any> const &)
{
- return static_cast<cppu::OWeakObject *>(new SvxShapeCollection);
+ return cppu::acquire(new SvxShapeCollection);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/unogallery/unogalthemeprovider.cxx b/svx/source/unogallery/unogalthemeprovider.cxx
index 0961198bfe7d..a94224673d22 100644
--- a/svx/source/unogallery/unogalthemeprovider.cxx
+++ b/svx/source/unogallery/unogalthemeprovider.cxx
@@ -234,9 +234,9 @@ void SAL_CALL GalleryThemeProvider::removeByName( const OUString& rName )
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_comp_gallery_GalleryThemeProvider_get_implementation(
css::uno::XComponentContext *,
- cppu::constructor_InitializationFunc &)
+ css::uno::Sequence<css::uno::Any> const &)
{
- return static_cast<cppu::OWeakObject *>(new GalleryThemeProvider);
+ return cppu::acquire(new GalleryThemeProvider);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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: */