summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2014-03-04 08:41:53 -0300
committerMarcos Paulo de Souza <marcos.souza.org@gmail.com>2014-03-04 07:30:02 -0600
commit4d6560f5066d143552cba861aaadc2f49b4357d4 (patch)
tree34c7cfba1a7cd2fce5f9bfde5d4d06910e1ac774 /framework
parent8f210c26c53cf5480819d983e57977d531422ff1 (diff)
fdo#54938: Convert some places to use cppu::supportsService
The last cases are non obvious, so it's pratically done Change-Id: Icae1da8e238f516eaed0f7fbdf96fff778eac547 Reviewed-on: https://gerrit.libreoffice.org/8445 Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Tested-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uielement/popuptoolbarcontroller.cxx37
1 files changed, 17 insertions, 20 deletions
diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx
index e0ce22aba52e..51274af905bc 100644
--- a/framework/source/uielement/popuptoolbarcontroller.cxx
+++ b/framework/source/uielement/popuptoolbarcontroller.cxx
@@ -18,6 +18,7 @@
*/
#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <comphelper/processfactory.hxx>
#include <framework/menuconfiguration.hxx>
#include <rtl/ref.hxx>
@@ -46,7 +47,11 @@ using namespace framework;
namespace {
-class PopupMenuToolbarController : public svt::ToolboxController
+typedef cppu::ImplInheritanceHelper1< svt::ToolboxController,
+ css::lang::XServiceInfo >
+ ToolBarBase;
+
+class PopupMenuToolbarController : public ToolBarBase
{
public:
virtual ~PopupMenuToolbarController();
@@ -80,8 +85,7 @@ private:
PopupMenuToolbarController::PopupMenuToolbarController(
const css::uno::Reference< css::uno::XComponentContext >& xContext,
const OUString &rPopupCommand )
- : svt::ToolboxController()
- , m_xContext( xContext )
+ : m_xContext( xContext )
, m_bHasController( sal_False )
, m_aPopupCommand( rPopupCommand )
{
@@ -249,14 +253,11 @@ public:
WizardsToolbarController( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
// XServiceInfo
- OUString SAL_CALL getImplementationName()
- throw (css::uno::RuntimeException);
+ virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException);
- sal_Bool SAL_CALL supportsService(OUString const & rServiceName)
- throw (css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(OUString const & rServiceName) throw (css::uno::RuntimeException);
- css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
- throw (css::uno::RuntimeException);
+ virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException);
private:
sal_uInt16 getDropDownStyle() const;
@@ -277,7 +278,7 @@ OUString WizardsToolbarController::getImplementationName()
sal_Bool WizardsToolbarController::supportsService(OUString const & rServiceName)
throw (css::uno::RuntimeException)
{
- return rServiceName == "com.sun.star.frame.ToolbarController";
+ return cppu::supportsService( this, rServiceName );
}
css::uno::Sequence<OUString> WizardsToolbarController::getSupportedServiceNames()
@@ -300,14 +301,11 @@ public:
OpenToolbarController( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
// XServiceInfo
- OUString SAL_CALL getImplementationName()
- throw (css::uno::RuntimeException);
+ virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException);
- sal_Bool SAL_CALL supportsService(OUString const & rServiceName)
- throw (css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(OUString const & rServiceName) throw (css::uno::RuntimeException);
- css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
- throw (css::uno::RuntimeException);
+ virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException);
};
OpenToolbarController::OpenToolbarController(
@@ -325,7 +323,7 @@ OUString OpenToolbarController::getImplementationName()
sal_Bool OpenToolbarController::supportsService(OUString const & rServiceName)
throw (css::uno::RuntimeException)
{
- return rServiceName == "com.sun.star.frame.ToolbarController";
+ return cppu::supportsService( this, rServiceName );
}
css::uno::Sequence<OUString> OpenToolbarController::getSupportedServiceNames()
@@ -346,8 +344,7 @@ public:
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException);
- sal_Bool SAL_CALL supportsService(OUString const & rServiceName)
- throw (css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(OUString const & rServiceName) throw (css::uno::RuntimeException);
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException);
@@ -378,7 +375,7 @@ OUString NewToolbarController::getImplementationName()
sal_Bool NewToolbarController::supportsService(OUString const & rServiceName)
throw (css::uno::RuntimeException)
{
- return rServiceName == "com.sun.star.frame.ToolbarController";
+ return cppu::supportsService( this, rServiceName );
}
css::uno::Sequence<OUString> NewToolbarController::getSupportedServiceNames()