summaryrefslogtreecommitdiff
path: root/filter/source/xmlfilteradaptor
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2014-01-14 13:09:33 -0200
committerMatúš Kukan <matus.kukan@collabora.com>2014-01-16 10:26:04 +0100
commiteeeefd6fd87b3cff18ba9078869bdfcd0e351d6f (patch)
tree3074028ba5615b40c092ee51b3b5e2cb26cadb89 /filter/source/xmlfilteradaptor
parentccf47bd943bf8d09e60fd3310ba31d550e744765 (diff)
fdo#54938: Convert filter to cppu::supportsService
final part Change-Id: If9387b4f7aa8ca694092f51eabeac096c71347eb
Diffstat (limited to 'filter/source/xmlfilteradaptor')
-rw-r--r--filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx19
1 files changed, 7 insertions, 12 deletions
diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
index 539f7462bcff..465cdcc3f0bd 100644
--- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
+++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
@@ -48,6 +48,7 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <comphelper/genericpropertyset.hxx>
#include <comphelper/propertysetinfo.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <unotools/pathoptions.hxx>
using namespace comphelper;
@@ -354,24 +355,16 @@ OUString XmlFilterAdaptor_getImplementationName ()
{
return OUString( "com.sun.star.comp.Writer.XmlFilterAdaptor" );
}
-#define SERVICE_NAME1 "com.sun.star.document.ExportFilter"
-#define SERVICE_NAME2 "com.sun.star.document.ImportFilter"
-sal_Bool SAL_CALL XmlFilterAdaptor_supportsService( const OUString& ServiceName )
- throw (RuntimeException)
-{
- return ServiceName == SERVICE_NAME1 || ServiceName == SERVICE_NAME2;
-}
+
Sequence< OUString > SAL_CALL XmlFilterAdaptor_getSupportedServiceNames( )
throw (RuntimeException)
{
Sequence < OUString > aRet(2);
OUString* pArray = aRet.getArray();
- pArray[0] = OUString ( SERVICE_NAME1 );
- pArray[1] = OUString ( SERVICE_NAME2 );
+ pArray[0] = "com.sun.star.document.ExportFilter";
+ pArray[1] = "com.sun.star.document.ImportFilter";
return aRet;
}
-#undef SERVICE_NAME1
-#undef SERVICE_NAME2
Reference< XInterface > SAL_CALL XmlFilterAdaptor_createInstance( const Reference< XMultiServiceFactory > & rSMgr)
throw( Exception )
@@ -385,11 +378,13 @@ OUString SAL_CALL XmlFilterAdaptor::getImplementationName( )
{
return XmlFilterAdaptor_getImplementationName();
}
+
sal_Bool SAL_CALL XmlFilterAdaptor::supportsService( const OUString& rServiceName )
throw (RuntimeException)
{
- return XmlFilterAdaptor_supportsService( rServiceName );
+ return cppu::supportsService( this, rServiceName );
}
+
Sequence< OUString > SAL_CALL XmlFilterAdaptor::getSupportedServiceNames( )
throw (RuntimeException)
{