summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls/tbunosearchcontrollers.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/tbxctrls/tbunosearchcontrollers.cxx')
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.cxx143
1 files changed, 72 insertions, 71 deletions
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index 39e839f352b5..6089e39f5423 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -41,9 +41,8 @@
#include <osl/mutex.hxx>
#include <rtl/instance.hxx>
-using namespace css;
-
-namespace {
+namespace svx
+{
static const char SEARCHITEM_COMMAND[] = "SearchItem.Command";
static const char SEARCHITEM_SEARCHSTRING[] = "SearchItem.SearchString";
@@ -380,7 +379,7 @@ void SAL_CALL FindTextToolbarController::release() throw ()
// XServiceInfo
OUString SAL_CALL FindTextToolbarController::getImplementationName() throw( css::uno::RuntimeException )
{
- return OUString("com.sun.star.svx.FindTextToolboxController");
+ return getImplementationName_Static();
}
sal_Bool SAL_CALL FindTextToolbarController::supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException )
@@ -390,6 +389,11 @@ sal_Bool SAL_CALL FindTextToolbarController::supportsService( const OUString& Se
css::uno::Sequence< OUString > SAL_CALL FindTextToolbarController::getSupportedServiceNames() throw( css::uno::RuntimeException )
{
+ return getSupportedServiceNames_Static();
+}
+
+css::uno::Sequence< OUString > FindTextToolbarController::getSupportedServiceNames_Static() throw()
+{
css::uno::Sequence< OUString > aSNS( 1 );
aSNS[0] = "com.sun.star.frame.ToolbarController";
return aSNS;
@@ -541,9 +545,7 @@ void SAL_CALL UpDownSearchToolboxController::release() throw ()
// XServiceInfo
OUString SAL_CALL UpDownSearchToolboxController::getImplementationName() throw( css::uno::RuntimeException )
{
- return meType == UpDownSearchToolboxController::UP?
- OUString( "com.sun.star.svx.UpSearchToolboxController" ) :
- OUString( "com.sun.star.svx.DownSearchToolboxController" );
+ return getImplementationName_Static( meType );
}
sal_Bool SAL_CALL UpDownSearchToolboxController::supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException )
@@ -553,6 +555,11 @@ sal_Bool SAL_CALL UpDownSearchToolboxController::supportsService( const OUString
css::uno::Sequence< OUString > SAL_CALL UpDownSearchToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException )
{
+ return getSupportedServiceNames_Static();
+}
+
+css::uno::Sequence< OUString > UpDownSearchToolboxController::getSupportedServiceNames_Static() throw()
+{
css::uno::Sequence< OUString > aSNS( 1 );
aSNS[0] = "com.sun.star.frame.ToolbarController";
return aSNS;
@@ -639,7 +646,7 @@ void SAL_CALL MatchCaseToolboxController::release() throw ()
// XServiceInfo
OUString SAL_CALL MatchCaseToolboxController::getImplementationName() throw( css::uno::RuntimeException )
{
- return OUString( "com.sun.star.svx.MatchCaseToolboxController" );
+ return getImplementationName_Static();
}
sal_Bool SAL_CALL MatchCaseToolboxController::supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException )
@@ -649,6 +656,11 @@ sal_Bool SAL_CALL MatchCaseToolboxController::supportsService( const OUString& S
css::uno::Sequence< OUString > SAL_CALL MatchCaseToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException )
{
+ return getSupportedServiceNames_Static();
+}
+
+css::uno::Sequence< OUString > MatchCaseToolboxController::getSupportedServiceNames_Static() throw()
+{
css::uno::Sequence< OUString > aSNS( 1 );
aSNS[0] = "com.sun.star.frame.ToolbarController";
return aSNS;
@@ -745,7 +757,7 @@ void SAL_CALL FindAllToolboxController::release() throw ()
// XServiceInfo
OUString SAL_CALL FindAllToolboxController::getImplementationName() throw( css::uno::RuntimeException )
{
- return OUString( "com.sun.star.svx.FindAllToolboxController" );
+ return getImplementationName_Static( );
}
@@ -756,6 +768,11 @@ sal_Bool SAL_CALL FindAllToolboxController::supportsService( const OUString& Ser
css::uno::Sequence< OUString > SAL_CALL FindAllToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException )
{
+ return getSupportedServiceNames_Static();
+}
+
+css::uno::Sequence< OUString > FindAllToolboxController::getSupportedServiceNames_Static() throw()
+{
css::uno::Sequence< OUString > aSNS( 1 );
aSNS[0] = "com.sun.star.frame.ToolbarController";
return aSNS;
@@ -835,9 +852,10 @@ void SAL_CALL ExitSearchToolboxController::release() throw ()
// XServiceInfo
OUString SAL_CALL ExitSearchToolboxController::getImplementationName() throw( css::uno::RuntimeException )
{
- return OUString( "com.sun.star.svx.ExitFindbarToolboxController" );
+ return getImplementationName_Static( );
}
+
sal_Bool SAL_CALL ExitSearchToolboxController::supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException )
{
return cppu::supportsService(this, ServiceName);
@@ -845,6 +863,11 @@ sal_Bool SAL_CALL ExitSearchToolboxController::supportsService( const OUString&
css::uno::Sequence< OUString > SAL_CALL ExitSearchToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException )
{
+ return getSupportedServiceNames_Static();
+}
+
+css::uno::Sequence< OUString > ExitSearchToolboxController::getSupportedServiceNames_Static() throw()
+{
css::uno::Sequence< OUString > aSNS( 1 );
aSNS[0] = "com.sun.star.frame.ToolbarController";
return aSNS;
@@ -938,7 +961,7 @@ void SAL_CALL FindbarDispatcher::release() throw()
// XServiceInfo
OUString SAL_CALL FindbarDispatcher::getImplementationName() throw( css::uno::RuntimeException )
{
- return OUString("com.sun.star.comp.svx.Impl.FindbarDispatcher");
+ return getImplementationName_Static();
}
sal_Bool SAL_CALL FindbarDispatcher::supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException )
@@ -948,6 +971,11 @@ sal_Bool SAL_CALL FindbarDispatcher::supportsService( const OUString& ServiceNam
css::uno::Sequence< OUString > SAL_CALL FindbarDispatcher::getSupportedServiceNames() throw( css::uno::RuntimeException )
{
+ return getSupportedServiceNames_Static();
+}
+
+css::uno::Sequence< OUString > FindbarDispatcher::getSupportedServiceNames_Static() throw()
+{
css::uno::Sequence< OUString > aSNS( 2 );
aSNS[0] = "com.sun.star.comp.svx.FindbarDispatcher";
aSNS[1] = "com.sun.star.frame.ProtocolHandler";
@@ -1046,86 +1074,59 @@ void SAL_CALL FindbarDispatcher::removeStatusListener( const css::uno::Reference
{
}
-}
+//-----------------------------------------------------------------------------------------------------------
+// create Instance
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
-com_sun_star_svx_FindTextToolboxController_implementation_getFactory(
- css::uno::XComponentContext *context, uno_Sequence * arguments)
+css::uno::Reference< css::uno::XInterface > SAL_CALL FindTextToolbarController_createInstance(
+ const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr )
{
- assert(arguments != 0 && arguments->nElements == 0); (void) arguments;
- css::uno::Reference<css::uno::XInterface> x(
- static_cast<cppu::OWeakObject *>(new FindTextToolbarController(context)));
- x->acquire();
- return x.get();
+ return static_cast< cppu::OWeakObject * >(
+ new FindTextToolbarController( comphelper::getComponentContext(rSMgr) ) );
}
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
-com_sun_star_svx_ExitFindbarToolboxController_implementation_getFactory(
- css::uno::XComponentContext *context, uno_Sequence * arguments)
+css::uno::Reference< css::uno::XInterface > SAL_CALL DownSearchToolboxController_createInstance(
+ const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr )
{
- assert(arguments != 0 && arguments->nElements == 0); (void) arguments;
- css::uno::Reference<css::uno::XInterface> x(
- static_cast<cppu::OWeakObject *>(new ExitSearchToolboxController(context)));
- x->acquire();
- return x.get();
+ return static_cast< cppu::OWeakObject * >(
+ new UpDownSearchToolboxController(
+ comphelper::getComponentContext(rSMgr), UpDownSearchToolboxController::DOWN ) );
}
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
-com_sun_star_svx_UpSearchToolboxController_implementation_getFactory(
- css::uno::XComponentContext *context, uno_Sequence * arguments)
+css::uno::Reference< css::uno::XInterface > SAL_CALL UpSearchToolboxController_createInstance(
+ const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr )
{
- assert(arguments != 0 && arguments->nElements == 0); (void) arguments;
- css::uno::Reference<css::uno::XInterface> x(
- static_cast<cppu::OWeakObject *>(new UpDownSearchToolboxController(
- context, UpDownSearchToolboxController::UP )));
- x->acquire();
- return x.get();
+ return static_cast< cppu::OWeakObject * >(
+ new UpDownSearchToolboxController(
+ comphelper::getComponentContext(rSMgr), UpDownSearchToolboxController::UP ) );
}
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
-com_sun_star_svx_DownSearchToolboxController_implementation_getFactory(
- css::uno::XComponentContext *context, uno_Sequence * arguments)
+css::uno::Reference< css::uno::XInterface > SAL_CALL MatchCaseToolboxController_createInstance(
+ const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr )
{
- assert(arguments != 0 && arguments->nElements == 0); (void) arguments;
- css::uno::Reference<css::uno::XInterface> x(
- static_cast<cppu::OWeakObject *>(new UpDownSearchToolboxController(
- context, UpDownSearchToolboxController::DOWN )));
- x->acquire();
- return x.get();
+ return static_cast< cppu::OWeakObject * >(
+ new MatchCaseToolboxController( comphelper::getComponentContext(rSMgr) ) );
}
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
-com_sun_star_svx_MatchCaseToolboxController_implementation_getFactory(
- css::uno::XComponentContext *context, uno_Sequence * arguments)
+css::uno::Reference< css::uno::XInterface > SAL_CALL FindAllToolboxController_createInstance(
+ const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr )
{
- assert(arguments != 0 && arguments->nElements == 0); (void) arguments;
- css::uno::Reference<css::uno::XInterface> x(
- static_cast<cppu::OWeakObject *>(new MatchCaseToolboxController(context)));
- x->acquire();
- return x.get();
+ return static_cast< cppu::OWeakObject * >(
+ new FindAllToolboxController( comphelper::getComponentContext(rSMgr) ) );
}
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
-com_sun_star_svx_FindAllToolboxController_implementation_getFactory(
- css::uno::XComponentContext *context, uno_Sequence * arguments)
+css::uno::Reference< css::uno::XInterface > SAL_CALL ExitFindbarToolboxController_createInstance(
+ const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr )
{
- assert(arguments != 0 && arguments->nElements == 0); (void) arguments;
- css::uno::Reference<css::uno::XInterface> x(
- static_cast<cppu::OWeakObject *>(new FindAllToolboxController(context)));
- x->acquire();
- return x.get();
+ return *new ExitSearchToolboxController( comphelper::getComponentContext(rSMgr) );
}
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
-com_sun_star_comp_svx_Impl_FindbarDispatcher_implementation_getFactory(
- SAL_UNUSED_PARAMETER css::uno::XComponentContext *,
- uno_Sequence * arguments)
+css::uno::Reference< css::uno::XInterface > SAL_CALL FindbarDispatcher_createInstance(
+ const css::uno::Reference< css::lang::XMultiServiceFactory >& )
{
- assert(arguments != 0 && arguments->nElements == 0); (void) arguments;
- css::uno::Reference<css::uno::XInterface> x(
- static_cast<cppu::OWeakObject *>(new FindbarDispatcher));
- x->acquire();
- return x.get();
+ return static_cast< cppu::OWeakObject * >( new FindbarDispatcher );
+}
+
+//-----------------------------------------------------------------------------------------------------------
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */