summaryrefslogtreecommitdiffstats
path: root/forms/source/component/DatabaseForm.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/DatabaseForm.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/DatabaseForm.cxx')
-rw-r--r--forms/source/component/DatabaseForm.cxx14
1 files changed, 2 insertions, 12 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index fc33131b6f14..e1eb01f90847 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -67,6 +67,7 @@
#include <connectivity/dbtools.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <rtl/math.hxx>
#include <rtl/tencinfo.h>
#include <svl/inettype.hxx>
@@ -3841,31 +3842,20 @@ Sequence< OUString > SAL_CALL ODatabaseForm::getSupportedServiceNames() throw( R
// better solution _may_ be to return the compatible names at runtime, too
}
-//------------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseForm::supportsService(const OUString& ServiceName) throw( RuntimeException )
{
- Sequence< OUString > aSupported( getSupportedServiceNames() );
- const OUString* pArray = aSupported.getConstArray();
- for( sal_Int32 i = 0; i < aSupported.getLength(); ++i, ++pArray )
- if( pArray->equals( ServiceName ) )
- return sal_True;
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
-//==============================================================================
// com::sun::star::io::XPersistObject
-//------------------------------------------------------------------------------
-
const sal_uInt16 CYCLE = 0x0001;
const sal_uInt16 DONTAPPLYFILTER = 0x0002;
-//------------------------------------------------------------------------------
OUString ODatabaseForm::getServiceName() throw( RuntimeException )
{
return OUString(FRM_COMPONENT_FORM); // old (non-sun) name for compatibility !
}
-//------------------------------------------------------------------------------
void SAL_CALL ODatabaseForm::write(const Reference<XObjectOutputStream>& _rxOutStream) throw( IOException, RuntimeException )
{
DBG_ASSERT(m_xAggregateSet.is(), "ODatabaseForm::write : only to be called if the aggregate exists !");