summaryrefslogtreecommitdiffstats
path: root/forms/source/component/FormsCollection.cxx
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2013-10-24 14:55:08 -0200
committerStephan Bergmann <sbergman@redhat.com>2013-10-25 08:07:04 +0000
commitda5449da0c056a3a0da239eff2e2b8b66cfd6224 (patch)
tree6f6698e676726bd8a07f281a9707e448a711d983 /forms/source/component/FormsCollection.cxx
parentFix bit-rot (diff)
downloadcore-da5449da0c056a3a0da239eff2e2b8b66cfd6224.tar.gz
core-da5449da0c056a3a0da239eff2e2b8b66cfd6224.zip
fdo#54938: More uses of cppu::supportsService
Change-Id: Id6bed78d92eba52283a17ab3ca66e751c225e48d Reviewed-on: https://gerrit.libreoffice.org/6423 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'forms/source/component/FormsCollection.cxx')
-rw-r--r--forms/source/component/FormsCollection.cxx12
1 files changed, 2 insertions, 10 deletions
diff --git a/forms/source/component/FormsCollection.cxx b/forms/source/component/FormsCollection.cxx
index e4e0c06e0ad7..ad941fe790e4 100644
--- a/forms/source/component/FormsCollection.cxx
+++ b/forms/source/component/FormsCollection.cxx
@@ -22,6 +22,7 @@
#include "services.hxx"
#include <comphelper/sequence.hxx>
#include <comphelper/processfactory.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <tools/debug.hxx>
#include <com/sun/star/form/XForm.hpp>
@@ -105,24 +106,16 @@ Any SAL_CALL OFormsCollection::queryAggregation(const Type& _rType) throw(Runtim
return aReturn;
}
-//------------------------------------------------------------------------------
OUString SAL_CALL OFormsCollection::getImplementationName() throw(RuntimeException)
{
return OUString("com.sun.star.comp.forms.OFormsCollection");
}
-//------------------------------------------------------------------------------
sal_Bool SAL_CALL OFormsCollection::supportsService( const OUString& _rServiceName ) throw(RuntimeException)
{
- Sequence<OUString> aSupported = getSupportedServiceNames();
- const OUString* pSupported = aSupported.getConstArray();
- for (sal_Int32 i=0; i<aSupported.getLength(); ++i, ++pSupported)
- if (pSupported->equals(_rServiceName))
- return sal_True;
- return sal_False;
+ return cppu::supportsService(this, _rServiceName);
}
-//------------------------------------------------------------------------------
StringSequence SAL_CALL OFormsCollection::getSupportedServiceNames() throw(RuntimeException)
{
StringSequence aReturn(2);
@@ -134,7 +127,6 @@ StringSequence SAL_CALL OFormsCollection::getSupportedServiceNames() throw(Runti
}
// XCloneable
-//------------------------------------------------------------------------------
Reference< XCloneable > SAL_CALL OFormsCollection::createClone( ) throw (RuntimeException)
{
OFormsCollection* pClone = new OFormsCollection( *this );