summaryrefslogtreecommitdiff
path: root/sw/source/ui/uno/unomailmerge.cxx
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2013-12-05 19:17:18 -0200
committerStephan Bergmann <sbergman@redhat.com>2013-12-09 17:25:13 +0100
commit2f50ce6cfab2871cd879c1429e1938d3642616ef (patch)
tree2dfc1793987c36f75e042118dcac4805c85fc667 /sw/source/ui/uno/unomailmerge.cxx
parent28de078a73ad5f8effa7de8b60db2f4cbed14f2a (diff)
fdo#54938: Convert sw to use cppu::supportsService
Change-Id: Ic27bf31e5eb991ccceb8b97713d1e50a736709c8 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/source/ui/uno/unomailmerge.cxx')
-rw-r--r--sw/source/ui/uno/unomailmerge.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx
index f1a75fe0bf73..89c896baee88 100644
--- a/sw/source/ui/uno/unomailmerge.cxx
+++ b/sw/source/ui/uno/unomailmerge.cxx
@@ -29,6 +29,7 @@
#include <sfx2/docfilt.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <vcl/timer.hxx>
#include <com/sun/star/sdb/CommandType.hpp>
#include <com/sun/star/text/MailMergeType.hpp>
@@ -70,9 +71,6 @@
#include <unomid.h>
-#define SN_MAIL_MERGE "com.sun.star.text.MailMerge"
-#define SN_DATA_ACCESS_DESCRIPTOR "com.sun.star.sdb.DataAccessDescriptor"
-
using namespace ::com::sun::star;
using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::uno;
@@ -1162,8 +1160,7 @@ OUString SAL_CALL SwXMailMerge::getImplementationName()
sal_Bool SAL_CALL SwXMailMerge::supportsService( const OUString& rServiceName )
throw(RuntimeException)
{
- SolarMutexGuard aGuard;
- return rServiceName == SN_MAIL_MERGE || rServiceName == SN_DATA_ACCESS_DESCRIPTOR;
+ return cppu::supportsService(this, rServiceName);
}
uno::Sequence< OUString > SAL_CALL SwXMailMerge::getSupportedServiceNames()
@@ -1178,8 +1175,8 @@ uno::Sequence< OUString > SAL_CALL SwXMailMerge_getSupportedServiceNames()
{
uno::Sequence< OUString > aNames(2);
OUString *pName = aNames.getArray();
- pName[0] = SN_MAIL_MERGE;
- pName[1] = SN_DATA_ACCESS_DESCRIPTOR;
+ pName[0] = "com.sun.star.text.MailMerge";
+ pName[1] = "com.sun.star.sdb.DataAccessDescriptor";
return aNames;
}