summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2013-10-24 11:26:31 -0200
committerStephan Bergmann <sbergman@redhat.com>2013-10-24 17:57:32 +0200
commitbe0adb9f0fc738fe8735d2e0802fd19091799d11 (patch)
tree3a603568b4bee2e7fd181814330318c3386141d0 /sw/source
parentb391da28fffa1f71967079189e7d60ff16ec2784 (diff)
fdo#54938: Remove SupportsServiceImpl from sw and use cppu instead
Change-Id: I285a03f615e2f2a2656873a8f433a2599bd62c28 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/unocore/unobkm.cxx4
-rw-r--r--sw/source/core/unocore/unoftn.cxx6
-rw-r--r--sw/source/core/unocore/unoidx.cxx16
-rw-r--r--sw/source/core/unocore/unoobj.cxx4
-rw-r--r--sw/source/core/unocore/unoobj2.cxx27
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx4
-rw-r--r--sw/source/core/unocore/unorefmk.cxx10
-rw-r--r--sw/source/core/unocore/unosect.cxx5
-rw-r--r--sw/source/core/unocore/unotext.cxx8
9 files changed, 27 insertions, 57 deletions
diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx
index 06467b2209d7..8e5724619568 100644
--- a/sw/source/core/unocore/unobkm.cxx
+++ b/sw/source/core/unocore/unobkm.cxx
@@ -21,6 +21,7 @@
#include <unobookmark.hxx>
#include <osl/mutex.hxx>
#include <cppuhelper/interfacecontainer.h>
+#include <cppuhelper/supportsservice.hxx>
#include <vcl/svapp.hxx>
#include <TextCursorHelper.hxx>
@@ -392,8 +393,7 @@ static const size_t g_nServicesBookmark(
sal_Bool SAL_CALL SwXBookmark::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
{
- return ::sw::SupportsServiceImpl(
- g_nServicesBookmark, g_ServicesBookmark, rServiceName);
+ return cppu::supportsService(this, rServiceName);
}
uno::Sequence< OUString > SAL_CALL
diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx
index 84aedbb2018d..fcefbf09793a 100644
--- a/sw/source/core/unocore/unoftn.cxx
+++ b/sw/source/core/unocore/unoftn.cxx
@@ -20,6 +20,7 @@
#include <osl/mutex.hxx>
#include <cppuhelper/interfacecontainer.h>
+#include <cppuhelper/supportsservice.hxx>
#include <vcl/svapp.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
@@ -206,10 +207,7 @@ static const size_t g_nServicesFootnote( g_nServicesEndnote - 1 ); // NB: omit!
sal_Bool SAL_CALL SwXFootnote::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
{
- SolarMutexGuard g;
- return ::sw::SupportsServiceImpl(
- (m_pImpl->m_bIsEndnote) ? g_nServicesEndnote : g_nServicesFootnote,
- g_ServicesFootnote, rServiceName);
+ return cppu::supportsService(this, rServiceName);
}
uno::Sequence< OUString > SAL_CALL
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index c2efe9801925..ef8fdcea6f87 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -30,6 +30,7 @@
#include <osl/mutex.hxx>
#include <cppuhelper/interfacecontainer.h>
+#include <cppuhelper/supportsservice.hxx>
#include <vcl/svapp.hxx>
#include <editeng/unolingu.hxx>
#include <hints.hxx>
@@ -2378,9 +2379,7 @@ sal_Bool SAL_CALL
SwXDocumentIndexes::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
{
- return ::sw::SupportsServiceImpl(
- SAL_N_ELEMENTS(g_ServicesDocumentIndexes),
- g_ServicesDocumentIndexes, rServiceName);
+ return cppu::supportsService(this, rServiceName);
}
uno::Sequence< OUString > SAL_CALL
@@ -2577,13 +2576,10 @@ static char const*const g_ServicesIndexStyleAccess[] =
};
sal_Bool SAL_CALL
-SwXDocumentIndex::StyleAccess_Impl::supportsService(
- const OUString& rServiceName)
+SwXDocumentIndex::StyleAccess_Impl::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
{
- return ::sw::SupportsServiceImpl(
- SAL_N_ELEMENTS(g_ServicesIndexStyleAccess),
- g_ServicesIndexStyleAccess, rServiceName);
+ return cppu::supportsService(this, rServiceName);
}
uno::Sequence< OUString > SAL_CALL
@@ -2715,9 +2711,7 @@ SwXDocumentIndex::TokenAccess_Impl::supportsService(
const OUString& rServiceName)
throw (uno::RuntimeException)
{
- return ::sw::SupportsServiceImpl(
- SAL_N_ELEMENTS(g_ServicesIndexTokenAccess),
- g_ServicesIndexTokenAccess, rServiceName);
+ return cppu::supportsService(this, rServiceName);
}
uno::Sequence< OUString > SAL_CALL
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index bae978929244..0ffc5b9b55ac 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -19,6 +19,7 @@
#include <com/sun/star/table/TableSortField.hpp>
#include <comphelper/string.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <osl/endian.h>
#include <rtl/ustrbuf.hxx>
#include <unotools/collatorwrapper.hxx>
@@ -919,8 +920,7 @@ static const size_t g_nServicesTextCursor(
sal_Bool SAL_CALL SwXTextCursor::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
{
- return ::sw::SupportsServiceImpl(
- g_nServicesTextCursor, g_ServicesTextCursor, rServiceName);
+ return cppu::supportsService(this, rServiceName);
}
uno::Sequence< OUString > SAL_CALL
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index 5fa34195437d..67f0c7112b23 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -106,25 +106,12 @@
#include <boost/bind.hpp>
#include <switerator.hxx>
#include <comphelper/servicehelper.hxx>
+#include <cppuhelper/supportsservice.hxx>
using namespace ::com::sun::star;
namespace sw {
-sal_Bool SupportsServiceImpl(
- size_t const nServices, char const*const pServices[],
- OUString const & rServiceName)
-{
- for (size_t i = 0; i < nServices; ++i)
- {
- if (rServiceName.equalsAscii(pServices[i]))
- {
- return sal_True;
- }
- }
- return sal_False;
-}
-
uno::Sequence< OUString >
GetSupportedServiceNamesImpl(
size_t const nServices, char const*const pServices[])
@@ -535,8 +522,7 @@ sal_Bool SAL_CALL
SwXParagraphEnumeration::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
{
- return ::sw::SupportsServiceImpl(
- g_nServicesParagraphEnum, g_ServicesParagraphEnum, rServiceName);
+ return cppu::supportsService(this, rServiceName);
}
uno::Sequence< OUString > SAL_CALL
@@ -917,8 +903,7 @@ static const size_t g_nServicesTextRange(
sal_Bool SAL_CALL SwXTextRange::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
{
- return ::sw::SupportsServiceImpl(
- g_nServicesTextRange, g_ServicesTextRange, rServiceName);
+ return cppu::supportsService(this, rServiceName);
}
uno::Sequence< OUString > SAL_CALL
@@ -1644,8 +1629,7 @@ static const size_t g_nServicesTextRanges(
sal_Bool SAL_CALL SwXTextRanges::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
{
- return ::sw::SupportsServiceImpl(
- g_nServicesTextRanges, g_ServicesTextRanges, rServiceName);
+ return cppu::supportsService(this, rServiceName);
}
uno::Sequence< OUString > SAL_CALL
@@ -1939,8 +1923,7 @@ sal_Bool SAL_CALL
SwXParaFrameEnumeration::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
{
- return ::sw::SupportsServiceImpl(
- g_nServicesParaFrameEnum, g_ServicesParaFrameEnum, rServiceName);
+ return cppu::supportsService(this, rServiceName);
}
uno::Sequence< OUString > SAL_CALL
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index ce18912ff4b8..fbe7c40f41b2 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -20,6 +20,7 @@
#include <unoparagraph.hxx>
#include <cppuhelper/interfacecontainer.h>
+#include <cppuhelper/supportsservice.hxx>
#include <cmdid.h>
#include <unomid.h>
@@ -305,8 +306,7 @@ sal_Bool SAL_CALL
SwXParagraph::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
{
- return ::sw::SupportsServiceImpl(
- g_nServicesParagraph, g_ServicesParagraph, rServiceName);
+ return cppu::supportsService(this, rServiceName);
}
uno::Sequence< OUString > SAL_CALL
diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx
index 403407fc9d4a..3ca9dd24c673 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -20,6 +20,7 @@
#include <osl/mutex.hxx>
#include <cppuhelper/interfacecontainer.h>
+#include <cppuhelper/supportsservice.hxx>
#include <vcl/svapp.hxx>
#include <unomid.h>
@@ -183,8 +184,7 @@ sal_Bool SAL_CALL
SwXReferenceMark::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
{
- return ::sw::SupportsServiceImpl(
- g_nServicesReferenceMark, g_ServicesReferenceMark, rServiceName);
+ return cppu::supportsService(this, rServiceName);
}
uno::Sequence< OUString > SAL_CALL
@@ -917,8 +917,7 @@ sal_Bool SAL_CALL
SwXMeta::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
{
- return ::sw::SupportsServiceImpl(
- g_nServicesMeta, g_ServicesMeta, rServiceName);
+ return cppu::supportsService(this, rServiceName);
}
uno::Sequence< OUString > SAL_CALL
@@ -1347,8 +1346,7 @@ sal_Bool SAL_CALL
SwXMetaField::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
{
- return ::sw::SupportsServiceImpl(
- g_nServicesMetaField, g_ServicesMetaField, rServiceName);
+ return cppu::supportsService(this, rServiceName);
}
uno::Sequence< OUString > SAL_CALL
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index d7a6e66768b4..bf4f91314713 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -23,6 +23,7 @@
#include <com/sun/star/text/SectionFileLink.hpp>
#include <cppuhelper/interfacecontainer.h>
+#include <cppuhelper/supportsservice.hxx>
#include <cmdid.h>
#include <hintids.hxx>
@@ -1763,9 +1764,7 @@ static char const*const g_ServicesTextSection[] =
sal_Bool SAL_CALL SwXTextSection::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
{
- return ::sw::SupportsServiceImpl(
- SAL_N_ELEMENTS(g_ServicesTextSection),
- g_ServicesTextSection, rServiceName);
+ return cppu::supportsService(this, rServiceName);
}
uno::Sequence< OUString > SAL_CALL
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index c712ba124bbe..cfbc5278ce1b 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -30,6 +30,7 @@
#include <vcl/svapp.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <cmdid.h>
#include <unotextbodyhf.hxx>
@@ -2408,8 +2409,7 @@ static const size_t g_nServicesBodyText(
sal_Bool SAL_CALL SwXBodyText::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
{
- return ::sw::SupportsServiceImpl(
- g_nServicesBodyText, g_ServicesBodyText, rServiceName);
+ return cppu::supportsService(this, rServiceName);
}
uno::Sequence< OUString > SAL_CALL
@@ -2702,9 +2702,7 @@ static char const*const g_ServicesHeadFootText[] =
sal_Bool SAL_CALL SwXHeadFootText::supportsService(const OUString& rServiceName)
throw (uno::RuntimeException)
{
- return ::sw::SupportsServiceImpl(
- SAL_N_ELEMENTS(g_ServicesHeadFootText),
- g_ServicesHeadFootText, rServiceName);
+ return cppu::supportsService(this, rServiceName);
}
uno::Sequence< OUString > SAL_CALL