Kaydet (Commit) 01739fc6 authored tarafından Matúš Kukan's avatar Matúš Kukan

svx: Use constructor feature for uno search controllers.

Change-Id: If84ee775c5172eb40361b93aece920ab94c9e15c
üst 29298475
......@@ -40,8 +40,7 @@
#include <map>
#include <vector>
namespace svx
{
namespace {
class FindTextFieldControl : public ComboBox
{
......@@ -105,13 +104,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException );
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException );
static OUString getImplementationName_Static() throw()
{
return OUString("com.sun.star.svx.FindTextToolboxController");
}
static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static() throw();
// XComponent
virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException );
......@@ -153,13 +145,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException );
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException );
static OUString getImplementationName_Static( ) throw()
{
return OUString( "com.sun.star.svx.ExitFindbarToolboxController" );
}
static css::uno::Sequence< OUString > getSupportedServiceNames_Static() throw();
// XComponent
virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException );
......@@ -192,14 +177,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException );
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException );
static OUString getImplementationName_Static( Type eType ) throw()
{
return eType == UP? OUString( "com.sun.star.svx.UpSearchToolboxController" ) :
OUString( "com.sun.star.svx.DownSearchToolboxController" );
}
static css::uno::Sequence< OUString > getSupportedServiceNames_Static() throw();
// XComponent
virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException );
......@@ -233,13 +210,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException );
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException );
static OUString getImplementationName_Static( ) throw()
{
return OUString( "com.sun.star.svx.MatchCaseToolboxController" );
}
static css::uno::Sequence< OUString > getSupportedServiceNames_Static() throw();
// XComponent
virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException );
......@@ -274,13 +244,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException );
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException );
static OUString getImplementationName_Static( ) throw()
{
return OUString( "com.sun.star.svx.FindAllToolboxController" );
}
static css::uno::Sequence< OUString > getSupportedServiceNames_Static() throw();
// XComponent
virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException );
......@@ -317,13 +280,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException );
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException );
static OUString getImplementationName_Static() throw()
{
return OUString("com.sun.star.comp.svx.Impl.FindbarDispatcher");
}
static css::uno::Sequence< OUString > getSupportedServiceNames_Static() throw();
// XInitialization
virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException );
......@@ -342,15 +298,6 @@ private:
};
// createInstance
css::uno::Reference< css::uno::XInterface > SAL_CALL FindTextToolbarController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr );
css::uno::Reference< css::uno::XInterface > SAL_CALL DownSearchToolboxController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr );
css::uno::Reference< css::uno::XInterface > SAL_CALL UpSearchToolboxController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr );
css::uno::Reference< css::uno::XInterface > SAL_CALL MatchCaseToolboxController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr );
css::uno::Reference< css::uno::XInterface > SAL_CALL FindAllToolboxController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr );
css::uno::Reference< css::uno::XInterface > SAL_CALL ExitFindbarToolboxController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr );
css::uno::Reference< css::uno::XInterface > SAL_CALL FindbarDispatcher_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr );
}
#endif // INCLUDED_SVX_INC_TBUNOSEARCHCONTROLLERS_HXX
......
......@@ -28,7 +28,6 @@
#include "svx/unoshcol.hxx"
#include "recoveryui.hxx"
#include "tbunocontroller.hxx"
#include "tbunosearchcontrollers.hxx"
using namespace ::com::sun::star;
using namespace ::rtl;
......@@ -281,55 +280,6 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL svx_component_getFactory (
svx::FontHeightToolBoxControl_createInstance,
svx::FontHeightToolBoxControl::getSupportedServiceNames_Static() );
}
else if ( svx::FindTextToolbarController::getImplementationName_Static().equalsAscii( pImplName ) )
{
xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ),
svx::FindTextToolbarController::getImplementationName_Static(),
svx::FindTextToolbarController_createInstance,
svx::FindTextToolbarController::getSupportedServiceNames_Static() );
}
else if ( svx::UpDownSearchToolboxController::getImplementationName_Static( svx::UpDownSearchToolboxController::DOWN ).equalsAscii( pImplName ) )
{
xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ),
svx::UpDownSearchToolboxController::getImplementationName_Static( svx::UpDownSearchToolboxController::DOWN ),
svx::DownSearchToolboxController_createInstance,
svx::UpDownSearchToolboxController::getSupportedServiceNames_Static() );
}
else if ( svx::UpDownSearchToolboxController::getImplementationName_Static( svx::UpDownSearchToolboxController::UP ).equalsAscii( pImplName ) )
{
xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ),
svx::UpDownSearchToolboxController::getImplementationName_Static( svx::UpDownSearchToolboxController::UP ),
svx::UpSearchToolboxController_createInstance,
svx::UpDownSearchToolboxController::getSupportedServiceNames_Static() );
}
else if ( svx::MatchCaseToolboxController::getImplementationName_Static().equalsAscii( pImplName ) )
{
xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ),
svx::MatchCaseToolboxController::getImplementationName_Static(),
svx::MatchCaseToolboxController_createInstance,
svx::MatchCaseToolboxController::getSupportedServiceNames_Static() );
}
else if ( svx::FindAllToolboxController::getImplementationName_Static().equalsAscii( pImplName ) )
{
xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ),
svx::FindAllToolboxController::getImplementationName_Static(),
svx::FindAllToolboxController_createInstance,
svx::FindAllToolboxController::getSupportedServiceNames_Static() );
}
else if ( svx::ExitSearchToolboxController::getImplementationName_Static().equalsAscii( pImplName ) )
{
xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ),
svx::ExitSearchToolboxController::getImplementationName_Static(),
svx::ExitFindbarToolboxController_createInstance,
svx::ExitSearchToolboxController::getSupportedServiceNames_Static() );
}
else if ( svx::FindbarDispatcher::getImplementationName_Static().equalsAscii( pImplName ) )
{
xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ),
svx::FindbarDispatcher::getImplementationName_Static(),
svx::FindbarDispatcher_createInstance,
svx::FindbarDispatcher::getSupportedServiceNames_Static() );
}
if( xFactory.is())
{
......
......@@ -26,7 +26,8 @@
constructor="com_sun_star_comp_gallery_GalleryThemeProvider_implementation_getFactory">
<service name="com.sun.star.gallery.GalleryThemeProvider"/>
</implementation>
<implementation name="com.sun.star.comp.svx.Impl.FindbarDispatcher">
<implementation name="com.sun.star.comp.svx.Impl.FindbarDispatcher"
constructor="com_sun_star_comp_svx_Impl_FindbarDispatcher_implementation_getFactory">
<service name="com.sun.star.comp.svx.FindbarDispatcher"/>
<service name="com.sun.star.frame.ProtocolHandler"/>
</implementation>
......@@ -42,25 +43,31 @@
<implementation name="com.sun.star.drawing.SvxUnoColorTable">
<service name="com.sun.star.drawing.ColorTable"/>
</implementation>
<implementation name="com.sun.star.svx.DownSearchToolboxController">
<implementation name="com.sun.star.svx.DownSearchToolboxController"
constructor="com_sun_star_svx_DownSearchToolboxController_implementation_getFactory">
<service name="com.sun.star.frame.ToolbarController"/>
</implementation>
<implementation name="com.sun.star.svx.FindTextToolboxController">
<implementation name="com.sun.star.svx.FindTextToolboxController"
constructor="com_sun_star_svx_FindTextToolboxController_implementation_getFactory">
<service name="com.sun.star.frame.ToolbarController"/>
</implementation>
<implementation name="com.sun.star.svx.MatchCaseToolboxController">
<implementation name="com.sun.star.svx.MatchCaseToolboxController"
constructor="com_sun_star_svx_MatchCaseToolboxController_implementation_getFactory">
<service name="com.sun.star.frame.ToolbarController"/>
</implementation>
<implementation name="com.sun.star.svx.FindAllToolboxController">
<implementation name="com.sun.star.svx.FindAllToolboxController"
constructor="com_sun_star_svx_FindAllToolboxController_implementation_getFactory">
<service name="com.sun.star.frame.ToolbarController"/>
</implementation>
<implementation name="com.sun.star.svx.FontHeightToolBoxController">
<service name="com.sun.star.frame.ToolbarController"/>
</implementation>
<implementation name="com.sun.star.svx.UpSearchToolboxController">
<implementation name="com.sun.star.svx.UpSearchToolboxController"
constructor="com_sun_star_svx_UpSearchToolboxController_implementation_getFactory">
<service name="com.sun.star.frame.ToolbarController"/>
</implementation>
<implementation name="com.sun.star.svx.ExitFindbarToolboxController">
<implementation name="com.sun.star.svx.ExitFindbarToolboxController"
constructor="com_sun_star_svx_ExitFindbarToolboxController_implementation_getFactory">
<service name="com.sun.star.frame.ToolbarController"/>
</implementation>
<implementation name="org.apache.openoffice.comp.svx.sidebar.PanelFactory"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment