summaryrefslogtreecommitdiff
path: root/extensions
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 /extensions
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 'extensions')
-rw-r--r--extensions/source/bibliography/framectr.cxx5
-rw-r--r--extensions/source/plugin/base/manager.cxx9
-rw-r--r--extensions/source/plugin/inc/plugin/impl.hxx3
3 files changed, 8 insertions, 9 deletions
diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx
index 45e6faf44050..440d19bcfdc4 100644
--- a/extensions/source/bibliography/framectr.cxx
+++ b/extensions/source/bibliography/framectr.cxx
@@ -18,7 +18,6 @@
*/
#include <vcl/waitobj.hxx>
-#include <cppuhelper/interfacecontainer.hxx>
#include <com/sun/star/util/URL.hpp>
#include <vcl/msgbox.hxx>
#include <tools/debug.hxx>
@@ -46,6 +45,8 @@
#include <com/sun/star/sdb/RowChangeAction.hpp>
#include <com/sun/star/frame/CommandGroup.hpp>
#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
+#include <cppuhelper/interfacecontainer.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <sot/exchange.hxx>
#include <sot/formats.hxx>
#include <vcl/edit.hxx>
@@ -208,7 +209,7 @@ OUString SAL_CALL BibFrameController_Impl::getImplementationName() throw (::com:
sal_Bool SAL_CALL BibFrameController_Impl::supportsService( const OUString& sServiceName ) throw (::com::sun::star::uno::RuntimeException, std::exception)
{
- return ( sServiceName == "com.sun.star.frame.Bibliography" || sServiceName == "com.sun.star.frame.Controller" );
+ return cppu::supportsService( this, sServiceName );
}
::com::sun::star::uno::Sequence< OUString > SAL_CALL BibFrameController_Impl::getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException, std::exception)
diff --git a/extensions/source/plugin/base/manager.cxx b/extensions/source/plugin/base/manager.cxx
index b5039b1096dd..a83c4b9b96ff 100644
--- a/extensions/source/plugin/base/manager.cxx
+++ b/extensions/source/plugin/base/manager.cxx
@@ -57,6 +57,8 @@
#include "com/sun/star/container/XIndexAccess.hpp"
#include "com/sun/star/loader/XImplementationLoader.hpp"
+#include <cppuhelper/supportsservice.hxx>
+
PluginManager* PluginManager::pManager = NULL;
PluginManager& PluginManager::get()
@@ -115,12 +117,7 @@ OUString XPluginManager_Impl::getImplementationName() throw( )
// ::com::sun::star::lang::XServiceInfo
sal_Bool XPluginManager_Impl::supportsService(const OUString& ServiceName) throw( )
{
- Sequence< OUString > aSNL = getSupportedServiceNames();
- const OUString * pArray = aSNL.getConstArray();
- for( sal_Int32 i = 0; i < aSNL.getLength(); i++ )
- if( pArray[i] == ServiceName )
- return sal_True;
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
// ::com::sun::star::lang::XServiceInfo
diff --git a/extensions/source/plugin/inc/plugin/impl.hxx b/extensions/source/plugin/inc/plugin/impl.hxx
index 57620f49e760..85be9c80653b 100644
--- a/extensions/source/plugin/inc/plugin/impl.hxx
+++ b/extensions/source/plugin/inc/plugin/impl.hxx
@@ -288,7 +288,8 @@ public:
};
class XPluginManager_Impl :
- public cppu::WeakAggImplHelper1< com::sun::star::plugin::XPluginManager >
+ public cppu::WeakAggImplHelper2< com::sun::star::plugin::XPluginManager,
+ com::sun::star::lang::XServiceInfo >
{
Reference< com::sun::star::uno::XComponentContext > m_xContext;
public: