summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMichael Stahl <mst@openoffice.org>2010-01-08 17:13:48 +0100
committerMichael Stahl <mst@openoffice.org>2010-01-08 17:13:48 +0100
commit6e3f9b6a9a1f70811e393d10a21addfaeedc174e (patch)
tree06939eca99ef623b58b8edc1fb17fb44cf8bcd89 /sw/source
parenta22723dc6276d018fcd2fffa04c143e9c6c04c7a (diff)
swunolocking1: #i105557#: unobaseclass.hxx: add XServiceInfo helpers:
new functions GetSupportedServiceNamesImpl and SupportsServiceImpl.
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/unocore/unoobj2.cxx31
1 files changed, 31 insertions, 0 deletions
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index 6d2a0d49f9d5..a7f6119e5962 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -146,6 +146,37 @@ using namespace ::com::sun::star::drawing;
using ::rtl::OUString;
+namespace sw {
+
+sal_Bool SupportsServiceImpl(
+ size_t const nServices, char const*const pServices[],
+ ::rtl::OUString const & rServiceName)
+{
+ for (size_t i = 0; i < nServices; ++i)
+ {
+ if (rServiceName.equalsAscii(pServices[i]))
+ {
+ return sal_True;
+ }
+ }
+ return sal_False;
+}
+
+uno::Sequence< ::rtl::OUString >
+GetSupportedServiceNamesImpl(
+ size_t const nServices, char const*const pServices[])
+{
+ uno::Sequence< ::rtl::OUString > ret(nServices);
+ for (size_t i = 0; i < nServices; ++i)
+ {
+ ret[i] = C2U(pServices[i]);
+ }
+ return ret;
+}
+
+} // namespace sw
+
+
struct FrameDependSortListLess
{
bool operator() (FrameDependSortListEntry const& r1,