summaryrefslogtreecommitdiff
path: root/svx/source/unogallery
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2014-01-14 12:27:09 -0200
committerMatúš Kukan <matus.kukan@collabora.com>2014-01-16 10:25:53 +0100
commita2218b0d8b39e5018342b9085a3ec98941631952 (patch)
tree5aa97c50be7479c6d301fdd5718424debbff5a38 /svx/source/unogallery
parentf32f8285966a0455a7c0db71e196e5ea92390329 (diff)
fdo#54938: Convert svx and svl to cppu::supportsService...
...final season Change-Id: Ie51ac231def4a8a6e2681b81de7580798c95eed2
Diffstat (limited to 'svx/source/unogallery')
-rw-r--r--svx/source/unogallery/unogaltheme.cxx18
-rw-r--r--svx/source/unogallery/unogaltheme.hxx6
-rw-r--r--svx/source/unogallery/unogalthemeprovider.cxx22
3 files changed, 8 insertions, 38 deletions
diff --git a/svx/source/unogallery/unogaltheme.cxx b/svx/source/unogallery/unogaltheme.cxx
index 692305232dbc..7017871b7519 100644
--- a/svx/source/unogallery/unogaltheme.cxx
+++ b/svx/source/unogallery/unogaltheme.cxx
@@ -32,6 +32,7 @@
#include <vcl/svapp.hxx>
#include <unotools/pathoptions.hxx>
#include <comphelper/servicehelper.hxx>
+#include <cppuhelper/supportsservice.hxx>
using namespace ::com::sun::star;
@@ -89,39 +90,24 @@ uno::Sequence< OUString > GalleryTheme::getSupportedServiceNames_Static()
return aSeq;
}
-// ------------------------------------------------------------------------------
-
OUString SAL_CALL GalleryTheme::getImplementationName()
throw( uno::RuntimeException )
{
return getImplementationName_Static();
}
-// ------------------------------------------------------------------------------
-
sal_Bool SAL_CALL GalleryTheme::supportsService( const OUString& ServiceName )
throw( uno::RuntimeException )
{
- uno::Sequence< OUString > aSNL( getSupportedServiceNames() );
- const OUString* pArray = aSNL.getConstArray();
-
- for( int i = 0; i < aSNL.getLength(); i++ )
- if( pArray[i] == ServiceName )
- return true;
-
- return false;
+ return cppu::supportsService( this, ServiceName );
}
-// ------------------------------------------------------------------------------
-
uno::Sequence< OUString > SAL_CALL GalleryTheme::getSupportedServiceNames()
throw( uno::RuntimeException )
{
return getSupportedServiceNames_Static();
}
-// ------------------------------------------------------------------------------
-
uno::Sequence< uno::Type > SAL_CALL GalleryTheme::getTypes()
throw(uno::RuntimeException)
{
diff --git a/svx/source/unogallery/unogaltheme.hxx b/svx/source/unogallery/unogaltheme.hxx
index c2d06898528b..5359d14c0b75 100644
--- a/svx/source/unogallery/unogaltheme.hxx
+++ b/svx/source/unogallery/unogaltheme.hxx
@@ -22,7 +22,7 @@
#include <list>
-#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase2.hxx>
#include <svl/lstner.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/gallery/XGalleryTheme.hpp>
@@ -38,7 +38,9 @@ namespace unogallery {
// - GalleryTheme -
// ----------------
-class GalleryTheme : public ::cppu::WeakImplHelper1< ::com::sun::star::gallery::XGalleryTheme >,
+class GalleryTheme : public ::cppu::WeakImplHelper2<
+ ::com::sun::star::gallery::XGalleryTheme,
+ ::com::sun::star::lang::XServiceInfo >,
public SfxListener
{
friend class ::unogallery::GalleryItem;
diff --git a/svx/source/unogallery/unogalthemeprovider.cxx b/svx/source/unogallery/unogalthemeprovider.cxx
index 2400573197be..7878e906ecd7 100644
--- a/svx/source/unogallery/unogalthemeprovider.cxx
+++ b/svx/source/unogallery/unogalthemeprovider.cxx
@@ -25,6 +25,7 @@
#include <vcl/svapp.hxx>
#include <unotools/pathoptions.hxx>
#include <comphelper/servicehelper.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/gallery/XGalleryTheme.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
@@ -38,37 +39,22 @@ GalleryThemeProvider::GalleryThemeProvider() :
mpGallery = ::Gallery::GetGalleryInstance();
}
-// ------------------------------------------------------------------------------
-
GalleryThemeProvider::~GalleryThemeProvider()
{
}
-// ------------------------------------------------------------------------------
-
OUString SAL_CALL GalleryThemeProvider::getImplementationName()
throw( uno::RuntimeException )
{
return OUString( "com.sun.star.comp.gallery.GalleryThemeProvider" );
}
-// ------------------------------------------------------------------------------
-
sal_Bool SAL_CALL GalleryThemeProvider::supportsService( const OUString& ServiceName )
throw( uno::RuntimeException )
{
- uno::Sequence< OUString > aSNL( getSupportedServiceNames() );
- const OUString* pArray = aSNL.getConstArray();
-
- for( int i = 0; i < aSNL.getLength(); i++ )
- if( pArray[i] == ServiceName )
- return true;
-
- return false;
+ return cppu::supportsService( this, ServiceName );
}
-// ------------------------------------------------------------------------------
-
uno::Sequence< OUString > SAL_CALL GalleryThemeProvider::getSupportedServiceNames()
throw( uno::RuntimeException )
{
@@ -77,8 +63,6 @@ uno::Sequence< OUString > SAL_CALL GalleryThemeProvider::getSupportedServiceName
return aSeq;
}
-// ------------------------------------------------------------------------------
-
uno::Sequence< uno::Type > SAL_CALL GalleryThemeProvider::getTypes()
throw(uno::RuntimeException)
{
@@ -106,8 +90,6 @@ uno::Sequence< sal_Int8 > SAL_CALL GalleryThemeProvider::getImplementationId()
return theGalleryThemeProviderImplementationId::get().getSeq();
}
-// ------------------------------------------------------------------------------
-
void SAL_CALL GalleryThemeProvider::initialize( const uno::Sequence< uno::Any >& rArguments )
throw ( uno::Exception, uno::RuntimeException )
{