summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-01-14 09:09:57 +0100
committerMatúš Kukan <matus.kukan@collabora.com>2014-01-15 08:51:25 +0100
commitbdeb57c23973f3ef79020847b2fe39f312cf3c0b (patch)
tree8e3b8d052b753c228bea7b438d9b18da39ac1b65 /svx
parenta3f97e65570855858e73e89c050f9c6589d3c7be (diff)
Initialize constructor based implementations in one place.
Change-Id: I324f25bb5ec7d792c3e015815f2a11b08f519764
Diffstat (limited to 'svx')
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeEngine.cxx10
-rw-r--r--svx/source/tbxctrls/tbunocontroller.cxx10
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.cxx70
-rw-r--r--svx/source/unogallery/unogalthemeprovider.cxx10
-rw-r--r--svx/source/xml/xmlgrhlp.cxx20
5 files changed, 12 insertions, 108 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
index b9bc674c4d14..8cbd2f244134 100644
--- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
@@ -493,18 +493,10 @@ com_sun_star_drawing_EnhancedCustomShapeEngine_implementation_getFactory(
SAL_UNUSED_PARAMETER css::uno::XComponentContext *,
uno_Sequence * arguments)
{
- assert(arguments != 0);
+ assert(arguments != 0); (void) arguments;
css::uno::Reference<css::uno::XInterface> x(
static_cast<cppu::OWeakObject *>(new EnhancedCustomShapeEngine));
x->acquire();
- css::uno::Reference< css::lang::XInitialization > xx(x, css::uno::UNO_QUERY);
- if (xx.is())
- {
- css::uno::Sequence<css::uno::Any> aArgs(
- reinterpret_cast<css::uno::Any *>(arguments->elements),
- arguments->nElements);
- xx->initialize(aArgs);
- }
return x.get();
}
diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx
index 56dc41e031fa..0d560e9500ff 100644
--- a/svx/source/tbxctrls/tbunocontroller.cxx
+++ b/svx/source/tbxctrls/tbunocontroller.cxx
@@ -443,18 +443,10 @@ com_sun_star_svx_FontHeightToolBoxController_implementation_getFactory(
css::uno::XComponentContext *rxContext,
uno_Sequence * arguments)
{
- assert(arguments != 0);
+ assert(arguments != 0); (void) arguments;
css::uno::Reference<css::uno::XInterface> x(
static_cast<cppu::OWeakObject *>(new FontHeightToolBoxControl(rxContext)));
x->acquire();
- css::uno::Reference< css::lang::XInitialization > xx(x, css::uno::UNO_QUERY);
- if (xx.is())
- {
- css::uno::Sequence<css::uno::Any> aArgs(
- reinterpret_cast<css::uno::Any *>(arguments->elements),
- arguments->nElements);
- xx->initialize(aArgs);
- }
return x.get();
}
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index aecea5c5a5c0..8534bb3d38c1 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -1053,18 +1053,10 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_svx_FindTextToolboxController_implementation_getFactory(
css::uno::XComponentContext *context, uno_Sequence * arguments)
{
- assert(arguments != 0);
+ assert(arguments != 0); (void) arguments;
css::uno::Reference<css::uno::XInterface> x(
static_cast<cppu::OWeakObject *>(new FindTextToolbarController(context)));
x->acquire();
- css::uno::Reference< css::lang::XInitialization > xx(x, css::uno::UNO_QUERY);
- if (xx.is())
- {
- css::uno::Sequence<css::uno::Any> aArgs(
- reinterpret_cast<css::uno::Any *>(arguments->elements),
- arguments->nElements);
- xx->initialize(aArgs);
- }
return x.get();
}
@@ -1072,18 +1064,10 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_svx_ExitFindbarToolboxController_implementation_getFactory(
css::uno::XComponentContext *context, uno_Sequence * arguments)
{
- assert(arguments != 0);
+ assert(arguments != 0); (void) arguments;
css::uno::Reference<css::uno::XInterface> x(
static_cast<cppu::OWeakObject *>(new ExitSearchToolboxController(context)));
x->acquire();
- css::uno::Reference< css::lang::XInitialization > xx(x, css::uno::UNO_QUERY);
- if (xx.is())
- {
- css::uno::Sequence<css::uno::Any> aArgs(
- reinterpret_cast<css::uno::Any *>(arguments->elements),
- arguments->nElements);
- xx->initialize(aArgs);
- }
return x.get();
}
@@ -1091,19 +1075,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_svx_UpSearchToolboxController_implementation_getFactory(
css::uno::XComponentContext *context, uno_Sequence * arguments)
{
- assert(arguments != 0);
+ assert(arguments != 0); (void) arguments;
css::uno::Reference<css::uno::XInterface> x(
static_cast<cppu::OWeakObject *>(new UpDownSearchToolboxController(
context, UpDownSearchToolboxController::UP )));
x->acquire();
- css::uno::Reference< css::lang::XInitialization > xx(x, css::uno::UNO_QUERY);
- if (xx.is())
- {
- css::uno::Sequence<css::uno::Any> aArgs(
- reinterpret_cast<css::uno::Any *>(arguments->elements),
- arguments->nElements);
- xx->initialize(aArgs);
- }
return x.get();
}
@@ -1111,19 +1087,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_svx_DownSearchToolboxController_implementation_getFactory(
css::uno::XComponentContext *context, uno_Sequence * arguments)
{
- assert(arguments != 0);
+ assert(arguments != 0); (void) arguments;
css::uno::Reference<css::uno::XInterface> x(
static_cast<cppu::OWeakObject *>(new UpDownSearchToolboxController(
context, UpDownSearchToolboxController::DOWN )));
x->acquire();
- css::uno::Reference< css::lang::XInitialization > xx(x, css::uno::UNO_QUERY);
- if (xx.is())
- {
- css::uno::Sequence<css::uno::Any> aArgs(
- reinterpret_cast<css::uno::Any *>(arguments->elements),
- arguments->nElements);
- xx->initialize(aArgs);
- }
return x.get();
}
@@ -1131,18 +1099,10 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_svx_MatchCaseToolboxController_implementation_getFactory(
css::uno::XComponentContext *context, uno_Sequence * arguments)
{
- assert(arguments != 0);
+ assert(arguments != 0); (void) arguments;
css::uno::Reference<css::uno::XInterface> x(
static_cast<cppu::OWeakObject *>(new MatchCaseToolboxController(context)));
x->acquire();
- css::uno::Reference< css::lang::XInitialization > xx(x, css::uno::UNO_QUERY);
- if (xx.is())
- {
- css::uno::Sequence<css::uno::Any> aArgs(
- reinterpret_cast<css::uno::Any *>(arguments->elements),
- arguments->nElements);
- xx->initialize(aArgs);
- }
return x.get();
}
@@ -1150,18 +1110,10 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_svx_FindAllToolboxController_implementation_getFactory(
css::uno::XComponentContext *context, uno_Sequence * arguments)
{
- assert(arguments != 0);
+ assert(arguments != 0); (void) arguments;
css::uno::Reference<css::uno::XInterface> x(
static_cast<cppu::OWeakObject *>(new FindAllToolboxController(context)));
x->acquire();
- css::uno::Reference< css::lang::XInitialization > xx(x, css::uno::UNO_QUERY);
- if (xx.is())
- {
- css::uno::Sequence<css::uno::Any> aArgs(
- reinterpret_cast<css::uno::Any *>(arguments->elements),
- arguments->nElements);
- xx->initialize(aArgs);
- }
return x.get();
}
@@ -1170,18 +1122,10 @@ com_sun_star_comp_svx_Impl_FindbarDispatcher_implementation_getFactory(
SAL_UNUSED_PARAMETER css::uno::XComponentContext *,
uno_Sequence * arguments)
{
- assert(arguments != 0);
+ assert(arguments != 0); (void) arguments;
css::uno::Reference<css::uno::XInterface> x(
static_cast<cppu::OWeakObject *>(new FindbarDispatcher));
x->acquire();
- css::uno::Reference< css::lang::XInitialization > xx(x, css::uno::UNO_QUERY);
- if (xx.is())
- {
- css::uno::Sequence<css::uno::Any> aArgs(
- reinterpret_cast<css::uno::Any *>(arguments->elements),
- arguments->nElements);
- xx->initialize(aArgs);
- }
return x.get();
}
diff --git a/svx/source/unogallery/unogalthemeprovider.cxx b/svx/source/unogallery/unogalthemeprovider.cxx
index 71b0736f6491..78c4628a6eab 100644
--- a/svx/source/unogallery/unogalthemeprovider.cxx
+++ b/svx/source/unogallery/unogalthemeprovider.cxx
@@ -253,18 +253,10 @@ com_sun_star_comp_gallery_GalleryThemeProvider_implementation_getFactory(
SAL_UNUSED_PARAMETER css::uno::XComponentContext *,
uno_Sequence * arguments)
{
- assert(arguments != 0);
+ assert(arguments != 0); (void) arguments;
css::uno::Reference<css::uno::XInterface> x(
static_cast<cppu::OWeakObject *>(new GalleryThemeProvider));
x->acquire();
- css::uno::Reference< css::lang::XInitialization > xx(x, css::uno::UNO_QUERY);
- if (xx.is())
- {
- css::uno::Sequence<css::uno::Any> aArgs(
- reinterpret_cast<css::uno::Any *>(arguments->elements),
- arguments->nElements);
- xx->initialize(aArgs);
- }
return x.get();
}
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 913ca6cf1d21..4c705977e68e 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -1055,19 +1055,11 @@ com_sun_star_comp_Svx_GraphicImportHelper_implementation_getFactory(
SAL_UNUSED_PARAMETER css::uno::XComponentContext *,
uno_Sequence * arguments)
{
- assert(arguments != 0);
+ assert(arguments != 0); (void) arguments;
css::uno::Reference<css::uno::XInterface> x(
static_cast<cppu::OWeakObject *>(new SvXMLGraphicImportExportHelper(
GRAPHICHELPER_MODE_READ)));
x->acquire();
- css::uno::Reference< css::lang::XInitialization > xx(x, css::uno::UNO_QUERY);
- if (xx.is())
- {
- css::uno::Sequence<css::uno::Any> aArgs(
- reinterpret_cast<css::uno::Any *>(arguments->elements),
- arguments->nElements);
- xx->initialize(aArgs);
- }
return x.get();
}
@@ -1088,19 +1080,11 @@ com_sun_star_comp_Svx_GraphicExportHelper_implementation_getFactory(
SAL_UNUSED_PARAMETER css::uno::XComponentContext *,
uno_Sequence * arguments)
{
- assert(arguments != 0);
+ assert(arguments != 0); (void) arguments;
css::uno::Reference<css::uno::XInterface> x(
static_cast<cppu::OWeakObject *>(new SvXMLGraphicImportExportHelper(
GRAPHICHELPER_MODE_WRITE )));
x->acquire();
- css::uno::Reference< css::lang::XInitialization > xx(x, css::uno::UNO_QUERY);
- if (xx.is())
- {
- css::uno::Sequence<css::uno::Any> aArgs(
- reinterpret_cast<css::uno::Any *>(arguments->elements),
- arguments->nElements);
- xx->initialize(aArgs);
- }
return x.get();
}