summaryrefslogtreecommitdiff
path: root/sw/source/ui/uno/SwXDocumentSettings.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/uno/SwXDocumentSettings.cxx')
-rw-r--r--sw/source/ui/uno/SwXDocumentSettings.cxx11
1 files changed, 2 insertions, 9 deletions
diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx
index c10ddfd5812c..d21805662132 100644
--- a/sw/source/ui/uno/SwXDocumentSettings.cxx
+++ b/sw/source/ui/uno/SwXDocumentSettings.cxx
@@ -22,6 +22,7 @@
#include <sfx2/sfxbasecontroller.hxx>
#include <SwXDocumentSettings.hxx>
#include <comphelper/MasterPropertySetInfo.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/i18n/XForbiddenCharacters.hpp>
#include <com/sun/star/document/PrinterIndependentLayout.hpp>
@@ -1239,15 +1240,7 @@ OUString SAL_CALL SwXDocumentSettings::getImplementationName( )
sal_Bool SAL_CALL SwXDocumentSettings::supportsService( const OUString& ServiceName )
throw(RuntimeException)
{
- const Sequence< OUString > aSeq( getSupportedServiceNames() );
- sal_Int32 nCount = aSeq.getLength();
- const OUString* pServices = aSeq.getConstArray();
- while( nCount-- )
- {
- if( *pServices++ == ServiceName )
- return sal_True;
- }
- return sal_True;
+ return cppu::supportsService(this, ServiceName);
}
Sequence< OUString > SAL_CALL SwXDocumentSettings::getSupportedServiceNames( )