sw/source/core/unocore/SwXTextDefaults.cxx |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

New commits:
commit 722c675241d3d652e744f445780766effd58b942
Author: Miklos Vajna <vmik...@suse.cz>
Date:   Mon Jun 25 18:18:43 2012 +0200

    SwXTextDefaults: use comphelper/stlunosequence.hxx
    
    Change-Id: I4bf0214737c3f37eb4cf514f58e66c72617f857c

diff --git a/sw/source/core/unocore/SwXTextDefaults.cxx 
b/sw/source/core/unocore/SwXTextDefaults.cxx
index 0bc4fc5..c17e802 100644
--- a/sw/source/core/unocore/SwXTextDefaults.cxx
+++ b/sw/source/core/unocore/SwXTextDefaults.cxx
@@ -31,6 +31,7 @@
 
 #include <osl/mutex.hxx>
 #include <vcl/svapp.hxx>
+#include <comphelper/stlunosequence.hxx>
 
 #include <SwXTextDefaults.hxx>
 #include <SwStyleNameMapper.hxx>
@@ -259,13 +260,8 @@ rtl::OUString SAL_CALL 
SwXTextDefaults::getImplementationName(  )
 sal_Bool SAL_CALL SwXTextDefaults::supportsService( const ::rtl::OUString& 
rServiceName )
     throw (RuntimeException)
 {
-    return  rServiceName == "com.sun.star.text.Defaults" ||
-            rServiceName == "com.sun.star.style.CharacterProperties" ||
-            rServiceName == "com.sun.star.style.CharacterPropertiesAsian" ||
-            rServiceName == "com.sun.star.style.CharacterPropertiesComplex" ||
-            rServiceName == "com.sun.star.style.ParagraphProperties" ||
-            rServiceName == "com.sun.star.style.ParagraphPropertiesAsian" ||
-            rServiceName == "com.sun.star.style.ParagraphPropertiesComplex";
+    uno::Sequence< ::rtl::OUString > aSeq(getSupportedServiceNames());
+    return std::find(comphelper::stl_begin(aSeq), comphelper::stl_end(aSeq), 
rServiceName) != comphelper::stl_end(aSeq);
 }
 
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to