[Libreoffice-commits] core.git: connectivity/source
Marcos Paulo de Souza
marcos.souza.org at gmail.com
Wed Oct 9 08:04:00 PDT 2013
connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx | 10 +-----
connectivity/source/commontools/ParamterSubstitution.cxx | 11 ++-----
connectivity/source/cpool/ZPoolCollection.cxx | 10 +-----
connectivity/source/drivers/ado/ADriver.cxx | 11 +------
connectivity/source/drivers/ado/AResultSet.cxx | 11 ++-----
connectivity/source/drivers/calc/CResultSet.cxx | 11 ++-----
connectivity/source/drivers/dbase/DResultSet.cxx | 11 ++-----
connectivity/source/drivers/evoab2/NDriver.cxx | 11 ++-----
connectivity/source/drivers/evoab2/NResultSet.cxx | 11 ++-----
connectivity/source/drivers/file/FDriver.cxx | 10 +-----
connectivity/source/drivers/firebird/Driver.cxx | 9 +-----
connectivity/source/drivers/firebird/ResultSet.cxx | 9 +-----
connectivity/source/drivers/flat/EResultSet.cxx | 11 ++-----
connectivity/source/drivers/hsqldb/HDriver.cxx | 10 +-----
connectivity/source/drivers/jdbc/JDriver.cxx | 10 +-----
connectivity/source/drivers/kab/KDriver.cxx | 11 ++-----
connectivity/source/drivers/macab/MacabDriver.cxx | 11 ++-----
connectivity/source/drivers/mork/MDriver.cxx | 9 +-----
connectivity/source/drivers/mork/MResultSet.cxx | 11 ++-----
connectivity/source/drivers/mozab/MDriver.cxx | 10 +-----
connectivity/source/drivers/mozab/MResultSet.cxx | 11 ++-----
connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx | 15 +---------
connectivity/source/drivers/mysql/YDriver.cxx | 10 +-----
connectivity/source/drivers/odbcbase/ODriver.cxx | 10 +-----
connectivity/source/drivers/odbcbase/OResultSet.cxx | 11 ++-----
connectivity/source/drivers/postgresql/pq_driver.cxx | 7 +---
connectivity/source/drivers/postgresql/pq_xbase.cxx | 6 +---
connectivity/source/manager/mdrivermanager.cxx | 10 +-----
connectivity/source/sdbcx/VColumn.cxx | 11 ++-----
connectivity/source/sdbcx/VIndex.cxx | 13 ++------
connectivity/source/sdbcx/VIndexColumn.cxx | 11 ++-----
connectivity/source/sdbcx/VKey.cxx | 13 ++------
connectivity/source/sdbcx/VKeyColumn.cxx | 11 ++-----
connectivity/source/sdbcx/VTable.cxx | 12 ++------
34 files changed, 88 insertions(+), 271 deletions(-)
New commits:
commit 2b91dc3ae674648da6909b0ab96129a7d7d3ed39
Author: Marcos Paulo de Souza <marcos.souza.org at gmail.com>
Date: Wed Oct 9 08:34:12 2013 -0300
fdo#54938: Adapt connectivity module to use cppu::supportsService
Change-Id: I885b4c7a60ff51d44138c4f8a56a584c38a9804a
Reviewed-on: https://gerrit.libreoffice.org/6172
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
Tested-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
index 9373481..102a4f6 100644
--- a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
@@ -36,6 +36,7 @@
#include <comphelper/sequence.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implementationentry.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include "connectivity/dbexception.hxx"
#include "resource/common_res.hrc"
#include "TConnection.hxx"
@@ -855,16 +856,9 @@ void SAL_CALL ODatabaseMetaDataResultSet::initialize( const Sequence< Any >& _aA
return getImplementationName_Static();
}
- //------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::supportsService( const OUString& _rServiceName ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
//------------------------------------------------------------------
Sequence< OUString > SAL_CALL ODatabaseMetaDataResultSet::getSupportedServiceNames( ) throw(RuntimeException)
diff --git a/connectivity/source/commontools/ParamterSubstitution.cxx b/connectivity/source/commontools/ParamterSubstitution.cxx
index e628a63..57150ad 100644
--- a/connectivity/source/commontools/ParamterSubstitution.cxx
+++ b/connectivity/source/commontools/ParamterSubstitution.cxx
@@ -19,6 +19,7 @@
#include "ParameterSubstitution.hxx"
#include "connectivity/sqlparse.hxx"
#include <comphelper/sequenceashashmap.hxx>
+#include <cppuhelper/supportsservice.hxx>
namespace connectivity
{
@@ -48,16 +49,10 @@ namespace connectivity
{
return getImplementationName_Static();
}
- //------------------------------------------------------------------
+
sal_Bool SAL_CALL ParameterSubstitution::supportsService( const OUString& _rServiceName ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
//------------------------------------------------------------------
Sequence< OUString > SAL_CALL ParameterSubstitution::getSupportedServiceNames( ) throw(RuntimeException)
diff --git a/connectivity/source/cpool/ZPoolCollection.cxx b/connectivity/source/cpool/ZPoolCollection.cxx
index 0a5aa4b..1410984 100644
--- a/connectivity/source/cpool/ZPoolCollection.cxx
+++ b/connectivity/source/cpool/ZPoolCollection.cxx
@@ -29,6 +29,7 @@
#include <com/sun/star/sdbc/DriverManager.hpp>
#include <comphelper/extract.hxx>
#include <comphelper/processfactory.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include "diagnose_ex.h"
@@ -143,16 +144,9 @@ OUString SAL_CALL OPoolCollection::getImplementationName( ) throw(RuntimeExcept
return getImplementationName_Static();
}
-//--------------------------------------------------------------------------
sal_Bool SAL_CALL OPoolCollection::supportsService( const OUString& _rServiceName ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
//--------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/ado/ADriver.cxx b/connectivity/source/drivers/ado/ADriver.cxx
index e96311f..b1db424 100644
--- a/connectivity/source/drivers/ado/ADriver.cxx
+++ b/connectivity/source/drivers/ado/ADriver.cxx
@@ -30,10 +30,10 @@
#include "ado/adoimp.hxx"
#include <com/sun/star/lang/DisposedException.hpp>
#include "connectivity/dbexception.hxx"
+#include <cppuhelper/supportsservice.hxx>
#include "resource/ado_res.hrc"
#include <objbase.h>
-
#include "resource/sharedresources.hxx"
using namespace connectivity;
@@ -106,16 +106,9 @@ OUString SAL_CALL ODriver::getImplementationName( ) throw(RuntimeException)
return getImplementationName_Static();
}
-// --------------------------------------------------------------------------------
sal_Bool SAL_CALL ODriver::supportsService( const OUString& _rServiceName ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
// --------------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/ado/AResultSet.cxx b/connectivity/source/drivers/ado/AResultSet.cxx
index 3ae5f78..8994dc1 100644
--- a/connectivity/source/drivers/ado/AResultSet.cxx
+++ b/connectivity/source/drivers/ado/AResultSet.cxx
@@ -28,6 +28,7 @@
#include <com/sun/star/sdbc/ResultSetType.hpp>
#include <com/sun/star/sdbc/FetchDirection.hpp>
#include <cppuhelper/typeprovider.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <comphelper/sequence.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <comphelper/seqstream.hxx>
@@ -64,16 +65,10 @@ OUString SAL_CALL OResultSet::getImplementationName( ) throw (::com::sun::star:
aSupported[1] = OUString("com.sun.star.sdbcx.ResultSet");
return aSupported;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OResultSet::supportsService( const OUString& _rServiceName ) throw(::com::sun::star::uno::RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
// -------------------------------------------------------------------------
OResultSet::OResultSet(ADORecordset* _pRecordSet,OStatement_Base* pStmt) : OResultSet_BASE(m_aMutex)
diff --git a/connectivity/source/drivers/calc/CResultSet.cxx b/connectivity/source/drivers/calc/CResultSet.cxx
index d110297..81edb10 100644
--- a/connectivity/source/drivers/calc/CResultSet.cxx
+++ b/connectivity/source/drivers/calc/CResultSet.cxx
@@ -22,6 +22,7 @@
#include <com/sun/star/lang/DisposedException.hpp>
#include <comphelper/sequence.hxx>
#include <comphelper/types.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <connectivity/dbexception.hxx>
using namespace ::comphelper;
@@ -54,16 +55,10 @@ Sequence< OUString > SAL_CALL OCalcResultSet::getSupportedServiceNames( ) throw
aSupported[1] = OUString("com.sun.star.sdbcx.ResultSet");
return aSupported;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCalcResultSet::supportsService( const OUString& _rServiceName ) throw( RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
// -------------------------------------------------------------------------
Any SAL_CALL OCalcResultSet::queryInterface( const Type & rType ) throw(RuntimeException)
diff --git a/connectivity/source/drivers/dbase/DResultSet.cxx b/connectivity/source/drivers/dbase/DResultSet.cxx
index b5e0d13..0ae11dd 100644
--- a/connectivity/source/drivers/dbase/DResultSet.cxx
+++ b/connectivity/source/drivers/dbase/DResultSet.cxx
@@ -21,6 +21,7 @@
#include "dbase/DResultSet.hxx"
#include <com/sun/star/lang/DisposedException.hpp>
#include <comphelper/sequence.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include "dbase/DIndex.hxx"
#include "dbase/DIndexIter.hxx"
#include "dbase/DCode.hxx"
@@ -58,16 +59,10 @@ Sequence< OUString > SAL_CALL ODbaseResultSet::getSupportedServiceNames( ) thro
aSupported[1] = OUString("com.sun.star.sdbcx.ResultSet");
return aSupported;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODbaseResultSet::supportsService( const OUString& _rServiceName ) throw( RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
// -------------------------------------------------------------------------
Any SAL_CALL ODbaseResultSet::queryInterface( const Type & rType ) throw(RuntimeException)
diff --git a/connectivity/source/drivers/evoab2/NDriver.cxx b/connectivity/source/drivers/evoab2/NDriver.cxx
index 601a111..366ea73 100644
--- a/connectivity/source/drivers/evoab2/NDriver.cxx
+++ b/connectivity/source/drivers/evoab2/NDriver.cxx
@@ -24,6 +24,7 @@
#include <osl/file.hxx>
#include "osl/security.hxx"
#include <comphelper/processfactory.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/ucb/XContentAccess.hpp>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <ucbhelper/content.hxx>
@@ -99,16 +100,10 @@ OUString SAL_CALL OEvoabDriver::getImplementationName( ) throw(RuntimeException
{
return getImplementationName_Static();
}
-//------------------------------------------------------------------
+
sal_Bool SAL_CALL OEvoabDriver::supportsService( const OUString& _rServiceName ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
//------------------------------------------------------------------
Sequence< OUString > SAL_CALL OEvoabDriver::getSupportedServiceNames( ) throw(RuntimeException)
diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx
index 414d90c7..75743e6 100644
--- a/connectivity/source/drivers/evoab2/NResultSet.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSet.cxx
@@ -38,6 +38,7 @@
#include <comphelper/property.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/types.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <connectivity/dbexception.hxx>
#include <connectivity/sqlerror.hxx>
#include <cppuhelper/typeprovider.hxx>
@@ -74,16 +75,10 @@ OUString SAL_CALL OEvoabResultSet::getImplementationName( ) throw ( RuntimeExce
aSupported[0] = OUString("com.sun.star.sdbc.ResultSet");
return aSupported;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OEvoabResultSet::supportsService( const OUString& _rServiceName ) throw( RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
struct ComparisonData
diff --git a/connectivity/source/drivers/file/FDriver.cxx b/connectivity/source/drivers/file/FDriver.cxx
index 31ed681..0cbeb2a 100644
--- a/connectivity/source/drivers/file/FDriver.cxx
+++ b/connectivity/source/drivers/file/FDriver.cxx
@@ -22,6 +22,7 @@
#include "file/fcode.hxx"
#include <com/sun/star/lang/DisposedException.hpp>
#include <comphelper/types.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include "connectivity/dbexception.hxx"
#include "resource/common_res.hrc"
#include "resource/sharedresources.hxx"
@@ -80,16 +81,9 @@ OUString SAL_CALL OFileDriver::getImplementationName( ) throw(RuntimeException)
return getImplementationName_Static();
}
-//------------------------------------------------------------------
sal_Bool SAL_CALL OFileDriver::supportsService( const OUString& _rServiceName ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
//------------------------------------------------------------------
diff --git a/connectivity/source/drivers/firebird/Driver.cxx b/connectivity/source/drivers/firebird/Driver.cxx
index 6b4913c..ecbb395 100644
--- a/connectivity/source/drivers/firebird/Driver.cxx
+++ b/connectivity/source/drivers/firebird/Driver.cxx
@@ -26,6 +26,7 @@
#include "resource/sharedresources.hxx"
#include <comphelper/processfactory.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <osl/process.h>
using namespace com::sun::star;
@@ -116,13 +117,7 @@ OUString SAL_CALL FirebirdDriver::getImplementationName() throw(RuntimeException
sal_Bool SAL_CALL FirebirdDriver::supportsService(const OUString& _rServiceName)
throw(RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
Sequence< OUString > SAL_CALL FirebirdDriver::getSupportedServiceNames()
diff --git a/connectivity/source/drivers/firebird/ResultSet.cxx b/connectivity/source/drivers/firebird/ResultSet.cxx
index 0700e11..1e96d66 100644
--- a/connectivity/source/drivers/firebird/ResultSet.cxx
+++ b/connectivity/source/drivers/firebird/ResultSet.cxx
@@ -23,6 +23,7 @@
#include <comphelper/sequence.hxx>
#include <cppuhelper/typeprovider.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <connectivity/dbexception.hxx>
#include <propertyids.hxx>
#include <rtl/string.hxx>
@@ -815,13 +816,7 @@ Sequence< OUString > SAL_CALL OResultSet::getSupportedServiceNames()
sal_Bool SAL_CALL OResultSet::supportsService(const OUString& _rServiceName)
throw( RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/flat/EResultSet.cxx b/connectivity/source/drivers/flat/EResultSet.cxx
index 8e4f17c..b29aaf8 100644
--- a/connectivity/source/drivers/flat/EResultSet.cxx
+++ b/connectivity/source/drivers/flat/EResultSet.cxx
@@ -23,6 +23,7 @@
#include <com/sun/star/lang/DisposedException.hpp>
#include <comphelper/sequence.hxx>
#include <comphelper/types.hxx>
+#include <cppuhelper/supportsservice.hxx>
using namespace ::comphelper;
@@ -55,16 +56,10 @@ Sequence< OUString > SAL_CALL OFlatResultSet::getSupportedServiceNames( ) throw
aSupported[1] = OUString("com.sun.star.sdbcx.ResultSet");
return aSupported;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OFlatResultSet::supportsService( const OUString& _rServiceName ) throw( RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
// -------------------------------------------------------------------------
Any SAL_CALL OFlatResultSet::queryInterface( const Type & rType ) throw(RuntimeException)
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx
index f0ca4ef..e22bab2 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -48,6 +48,7 @@
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <unotools/confignode.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include "resource/hsqldb_res.hrc"
@@ -519,16 +520,9 @@ namespace connectivity
return getImplementationName_Static();
}
- //------------------------------------------------------------------
sal_Bool SAL_CALL ODriverDelegator::supportsService( const OUString& _rServiceName ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
//------------------------------------------------------------------
Sequence< OUString > SAL_CALL ODriverDelegator::getSupportedServiceNames( ) throw(RuntimeException)
diff --git a/connectivity/source/drivers/jdbc/JDriver.cxx b/connectivity/source/drivers/jdbc/JDriver.cxx
index 05424ae..0de6221 100644
--- a/connectivity/source/drivers/jdbc/JDriver.cxx
+++ b/connectivity/source/drivers/jdbc/JDriver.cxx
@@ -31,6 +31,7 @@
#include "resource/common_res.hrc"
#include "resource/sharedresources.hxx"
#include <comphelper/processfactory.hxx>
+#include <cppuhelper/supportsservice.hxx>
using namespace connectivity;
using namespace ::com::sun::star::uno;
@@ -76,16 +77,9 @@ OUString SAL_CALL java_sql_Driver::getImplementationName( ) throw(RuntimeExcept
return getImplementationName_Static();
}
-// --------------------------------------------------------------------------------
sal_Bool SAL_CALL java_sql_Driver::supportsService( const OUString& _rServiceName ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
// --------------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/kab/KDriver.cxx b/connectivity/source/drivers/kab/KDriver.cxx
index 0eedfea..9b1da85 100644
--- a/connectivity/source/drivers/kab/KDriver.cxx
+++ b/connectivity/source/drivers/kab/KDriver.cxx
@@ -28,6 +28,7 @@
#include <com/sun/star/lang/NullPointerException.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <comphelper/processfactory.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <rtl/ustrbuf.hxx>
#include <tools/diagnose_ex.h>
#include "resource/kab_res.hrc"
@@ -359,16 +360,10 @@ OUString SAL_CALL KabDriver::getImplementationName( ) throw(RuntimeException)
{
return getImplementationName_Static();
}
-//------------------------------------------------------------------
+
sal_Bool SAL_CALL KabDriver::supportsService( const OUString& _rServiceName ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
-
- while (pSupported != pEnd && !pSupported->equals(_rServiceName))
- ++pSupported;
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
//------------------------------------------------------------------
Sequence< OUString > SAL_CALL KabDriver::getSupportedServiceNames( ) throw(RuntimeException)
diff --git a/connectivity/source/drivers/macab/MacabDriver.cxx b/connectivity/source/drivers/macab/MacabDriver.cxx
index 7b0ab7c..b6d3066 100644
--- a/connectivity/source/drivers/macab/MacabDriver.cxx
+++ b/connectivity/source/drivers/macab/MacabDriver.cxx
@@ -28,6 +28,7 @@
#include <tools/diagnose_ex.h>
#include "resource/macab_res.hrc"
#include <comphelper/processfactory.hxx>
+#include <cppuhelper/supportsservice.hxx>
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
@@ -227,16 +228,10 @@ OUString SAL_CALL MacabDriver::getImplementationName( ) throw(RuntimeException)
{
return getImplementationName_Static();
}
-//------------------------------------------------------------------
+
sal_Bool SAL_CALL MacabDriver::supportsService( const OUString& _rServiceName ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
-
- while (pSupported != pEnd && !pSupported->equals(_rServiceName))
- ++pSupported;
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
//------------------------------------------------------------------
Sequence< OUString > SAL_CALL MacabDriver::getSupportedServiceNames( ) throw(RuntimeException)
diff --git a/connectivity/source/drivers/mork/MDriver.cxx b/connectivity/source/drivers/mork/MDriver.cxx
index 2cd17fc..c11ff08 100644
--- a/connectivity/source/drivers/mork/MDriver.cxx
+++ b/connectivity/source/drivers/mork/MDriver.cxx
@@ -7,6 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <cppuhelper/supportsservice.hxx>
#include "MDriver.hxx"
#include "MConnection.hxx"
#include "MNSProfileDiscover.hxx"
@@ -60,13 +61,7 @@ OUString SAL_CALL MorkDriver::getImplementationName()
sal_Bool SAL_CALL MorkDriver::supportsService(const OUString& serviceName)
throw (css::uno::RuntimeException)
{
- css::uno::Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(serviceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, serviceName);
}
css::uno::Sequence< OUString > MorkDriver::getSupportedServiceNames()
diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx
index 395fba8..524f9d0 100644
--- a/connectivity/source/drivers/mork/MResultSet.cxx
+++ b/connectivity/source/drivers/mork/MResultSet.cxx
@@ -22,6 +22,7 @@
#include <comphelper/property.hxx>
#include <comphelper/sequence.hxx>
#include <cppuhelper/typeprovider.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <comphelper/extract.hxx>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/sdbc/ResultSetType.hpp>
@@ -74,16 +75,10 @@ OUString SAL_CALL OResultSet::getImplementationName( ) throw ( RuntimeException
aSupported[1] = OUString("com.sun.star.sdbcx.ResultSet");
return aSupported;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OResultSet::supportsService( const OUString& _rServiceName ) throw( RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/mozab/MDriver.cxx b/connectivity/source/drivers/mozab/MDriver.cxx
index f7384cc..d292687 100644
--- a/connectivity/source/drivers/mozab/MDriver.cxx
+++ b/connectivity/source/drivers/mozab/MDriver.cxx
@@ -21,6 +21,7 @@
#include "MDriver.hxx"
#include "MConnection.hxx"
#include "connectivity/dbexception.hxx"
+#include <cppuhelper/supportsservice.hxx>
#include "resource/mozab_res.hrc"
#include "resource/common_res.hrc"
@@ -102,16 +103,9 @@ OUString SAL_CALL MozabDriver::getImplementationName( ) throw(RuntimeException)
return getImplementationName_Static();
}
-//------------------------------------------------------------------
sal_Bool SAL_CALL MozabDriver::supportsService( const OUString& _rServiceName ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
//------------------------------------------------------------------
diff --git a/connectivity/source/drivers/mozab/MResultSet.cxx b/connectivity/source/drivers/mozab/MResultSet.cxx
index 8c947e2..6d94fa7 100644
--- a/connectivity/source/drivers/mozab/MResultSet.cxx
+++ b/connectivity/source/drivers/mozab/MResultSet.cxx
@@ -22,6 +22,7 @@
#include <comphelper/property.hxx>
#include <comphelper/sequence.hxx>
#include <cppuhelper/typeprovider.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <comphelper/extract.hxx>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/sdbc/ResultSetType.hpp>
@@ -73,16 +74,10 @@ OUString SAL_CALL OResultSet::getImplementationName( ) throw ( RuntimeException
aSupported[1] = OUString("com.sun.star.sdbcx.ResultSet");
return aSupported;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OResultSet::supportsService( const OUString& _rServiceName ) throw( RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx
index b91bb0e..b68424f 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
+#include <cppuhelper/supportsservice.hxx>
#include "MMozillaBootstrap.hxx"
using namespace com::sun::star::uno;
@@ -45,10 +45,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL OMozillaBootstrap_CreateInstance
return pMozillaBootstrap;
}
-// --------------------------------------------------------------------------------
-
-
-// --------------------------------------------------------------------------------
MozillaBootstrap::MozillaBootstrap(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory)
: OMozillaBootstrap_BASE(m_aMutex), m_xMSFactory( _rxFactory )
@@ -104,16 +100,9 @@ OUString SAL_CALL MozillaBootstrap::getImplementationName( ) throw(RuntimeExcep
return getImplementationName_Static();
}
-//------------------------------------------------------------------
sal_Bool SAL_CALL MozillaBootstrap::supportsService( const OUString& _rServiceName ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
//------------------------------------------------------------------
diff --git a/connectivity/source/drivers/mysql/YDriver.cxx b/connectivity/source/drivers/mysql/YDriver.cxx
index c02a54e..51e5a11 100644
--- a/connectivity/source/drivers/mysql/YDriver.cxx
+++ b/connectivity/source/drivers/mysql/YDriver.cxx
@@ -22,6 +22,7 @@
#include <osl/diagnose.h>
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/processfactory.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include "connectivity/dbexception.hxx"
#include <connectivity/dbcharset.hxx>
#include <com/sun/star/sdbc/DriverManager.hpp>
@@ -487,16 +488,9 @@ namespace connectivity
return getImplementationName_Static();
}
- //------------------------------------------------------------------
sal_Bool SAL_CALL ODriverDelegator::supportsService( const OUString& _rServiceName ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
//------------------------------------------------------------------
Sequence< OUString > SAL_CALL ODriverDelegator::getSupportedServiceNames( ) throw(RuntimeException)
diff --git a/connectivity/source/drivers/odbcbase/ODriver.cxx b/connectivity/source/drivers/odbcbase/ODriver.cxx
index 2c04fa2..e5871f0 100644
--- a/connectivity/source/drivers/odbcbase/ODriver.cxx
+++ b/connectivity/source/drivers/odbcbase/ODriver.cxx
@@ -22,6 +22,7 @@
#include "odbc/OFunctions.hxx"
#include "odbc/OTools.hxx"
#include "connectivity/dbexception.hxx"
+#include <cppuhelper/supportsservice.hxx>
#include "resource/common_res.hrc"
#include "resource/sharedresources.hxx"
@@ -77,16 +78,9 @@ OUString SAL_CALL ODBCDriver::getImplementationName( ) throw(RuntimeException)
return getImplementationName_Static();
}
-//------------------------------------------------------------------
sal_Bool SAL_CALL ODBCDriver::supportsService( const OUString& _rServiceName ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
//------------------------------------------------------------------
diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx
index 2b58a03..bf6e9e9 100644
--- a/connectivity/source/drivers/odbcbase/OResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx
@@ -30,6 +30,7 @@
#include <comphelper/property.hxx>
#include <comphelper/sequence.hxx>
#include <cppuhelper/typeprovider.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <comphelper/extract.hxx>
#include <com/sun/star/lang/DisposedException.hpp>
#include <comphelper/types.hxx>
@@ -78,16 +79,10 @@ OUString SAL_CALL OResultSet::getImplementationName( ) throw ( RuntimeException
aSupported[1] = OUString("com.sun.star.sdbcx.ResultSet");
return aSupported;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OResultSet::supportsService( const OUString& _rServiceName ) throw( RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/postgresql/pq_driver.cxx b/connectivity/source/drivers/postgresql/pq_driver.cxx
index f701e31..98206be 100644
--- a/connectivity/source/drivers/postgresql/pq_driver.cxx
+++ b/connectivity/source/drivers/postgresql/pq_driver.cxx
@@ -41,6 +41,7 @@
#include <cppuhelper/compbase1.hxx>
#include <cppuhelper/compbase2.hxx>
#include <cppuhelper/implementationentry.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include "pq_driver.hxx"
@@ -150,11 +151,7 @@ OUString SAL_CALL Driver::getImplementationName()
sal_Bool Driver::supportsService(const OUString& ServiceName)
throw(::com::sun::star::uno::RuntimeException)
{
- Sequence< OUString > serviceNames = DriverGetSupportedServiceNames();
- for( int i = 0 ; i < serviceNames.getLength() ; i ++ )
- if( serviceNames[i] == ServiceName )
- return sal_True;
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
Sequence< OUString > Driver::getSupportedServiceNames(void)
diff --git a/connectivity/source/drivers/postgresql/pq_xbase.cxx b/connectivity/source/drivers/postgresql/pq_xbase.cxx
index 8cf9b03..a0b67a1 100644
--- a/connectivity/source/drivers/postgresql/pq_xbase.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xbase.cxx
@@ -35,6 +35,7 @@
************************************************************************/
#include <rtl/ustrbuf.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
#include "pq_tools.hxx"
@@ -148,10 +149,7 @@ OUString ReflectionBase::getImplementationName()
sal_Bool ReflectionBase::supportsService(const OUString& ServiceName)
throw(::com::sun::star::uno::RuntimeException)
{
- for( int i = 0 ; i < m_supportedServices.getLength() ; i ++ )
- if( m_supportedServices[i] == ServiceName )
- return sal_True;
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
Sequence< OUString > ReflectionBase::getSupportedServiceNames(void)
diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx
index 67ea3ec..f40e433 100644
--- a/connectivity/source/manager/mdrivermanager.cxx
+++ b/connectivity/source/manager/mdrivermanager.cxx
@@ -32,6 +32,7 @@
#include <comphelper/stl_types.hxx>
#include <comphelper/processfactory.hxx>
#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/weakref.hxx>
#include <osl/diagnose.h>
@@ -521,16 +522,9 @@ OUString SAL_CALL OSDBCDriverManager::getImplementationName( ) throw(RuntimeExc
return getImplementationName_static();
}
-//--------------------------------------------------------------------------
sal_Bool SAL_CALL OSDBCDriverManager::supportsService( const OUString& _rServiceName ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
//--------------------------------------------------------------------------
diff --git a/connectivity/source/sdbcx/VColumn.cxx b/connectivity/source/sdbcx/VColumn.cxx
index 8f1f858..0cc2e2b 100644
--- a/connectivity/source/sdbcx/VColumn.cxx
+++ b/connectivity/source/sdbcx/VColumn.cxx
@@ -20,6 +20,7 @@
#include "connectivity/sdbcx/VColumn.hxx"
#include <com/sun/star/lang/DisposedException.hpp>
#include <comphelper/sequence.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include "TConnection.hxx"
#include <com/sun/star/sdbc/ColumnValue.hpp>
// -------------------------------------------------------------------------
@@ -49,16 +50,10 @@ OUString SAL_CALL OColumn::getImplementationName( ) throw (::com::sun::star::un
return aSupported;
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OColumn::supportsService( const OUString& _rServiceName ) throw(::com::sun::star::uno::RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
// -------------------------------------------------------------------------
OColumn::OColumn(sal_Bool _bCase)
diff --git a/connectivity/source/sdbcx/VIndex.cxx b/connectivity/source/sdbcx/VIndex.cxx
index f607316..65a4520 100644
--- a/connectivity/source/sdbcx/VIndex.cxx
+++ b/connectivity/source/sdbcx/VIndex.cxx
@@ -23,8 +23,9 @@
#include <connectivity/dbexception.hxx>
#include <comphelper/sequence.hxx>
#include "connectivity/sdbcx/VCollection.hxx"
+#include <cppuhelper/supportsservice.hxx>
#include "TConnection.hxx"
-// -------------------------------------------------------------------------
+
using namespace ::connectivity;
using namespace ::dbtools;
using namespace ::connectivity::sdbcx;
@@ -54,16 +55,10 @@ OUString SAL_CALL OIndex::getImplementationName( ) throw (::com::sun::star::uno
return aSupported;
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OIndex::supportsService( const OUString& _rServiceName ) throw(::com::sun::star::uno::RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
// -------------------------------------------------------------------------
OIndex::OIndex(sal_Bool _bCase) : ODescriptor_BASE(m_aMutex)
diff --git a/connectivity/source/sdbcx/VIndexColumn.cxx b/connectivity/source/sdbcx/VIndexColumn.cxx
index b495278..cf18434 100644
--- a/connectivity/source/sdbcx/VIndexColumn.cxx
+++ b/connectivity/source/sdbcx/VIndexColumn.cxx
@@ -18,6 +18,7 @@
*/
#include "connectivity/sdbcx/VIndexColumn.hxx"
+#include <cppuhelper/supportsservice.hxx>
#include "TConnection.hxx"
using namespace connectivity;
@@ -42,16 +43,10 @@ OUString SAL_CALL OIndexColumn::getImplementationName( ) throw (::com::sun::sta
return aSupported;
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OIndexColumn::supportsService( const OUString& _rServiceName ) throw(::com::sun::star::uno::RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
// -----------------------------------------------------------------------------
OIndexColumn::OIndexColumn(sal_Bool _bCase) : OColumn(_bCase), m_IsAscending(sal_True)
diff --git a/connectivity/source/sdbcx/VKey.cxx b/connectivity/source/sdbcx/VKey.cxx
index 0f1ed72..bbe9f64 100644
--- a/connectivity/source/sdbcx/VKey.cxx
+++ b/connectivity/source/sdbcx/VKey.cxx
@@ -21,10 +21,11 @@
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/sdbc/KeyRule.hpp>
#include <comphelper/sequence.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include "connectivity/sdbcx/VColumn.hxx"
#include "connectivity/sdbcx/VCollection.hxx"
#include "TConnection.hxx"
-// -------------------------------------------------------------------------
+
using namespace connectivity;
using namespace connectivity::sdbcx;
using namespace ::com::sun::star::beans;
@@ -52,16 +53,10 @@ OUString SAL_CALL OKey::getImplementationName( ) throw (::com::sun::star::uno::
return aSupported;
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKey::supportsService( const OUString& _rServiceName ) throw(::com::sun::star::uno::RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
// -------------------------------------------------------------------------
OKey::OKey(sal_Bool _bCase) : ODescriptor_BASE(m_aMutex)
diff --git a/connectivity/source/sdbcx/VKeyColumn.cxx b/connectivity/source/sdbcx/VKeyColumn.cxx
index f2475fa..dbd9977 100644
--- a/connectivity/source/sdbcx/VKeyColumn.cxx
+++ b/connectivity/source/sdbcx/VKeyColumn.cxx
@@ -18,6 +18,7 @@
*/
#include "connectivity/sdbcx/VKeyColumn.hxx"
+#include <cppuhelper/supportsservice.hxx>
#include "TConnection.hxx"
using namespace connectivity;
@@ -43,16 +44,10 @@ OUString SAL_CALL OKeyColumn::getImplementationName( ) throw (::com::sun::star:
return aSupported;
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeyColumn::supportsService( const OUString& _rServiceName ) throw(::com::sun::star::uno::RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
// -------------------------------------------------------------------------
OKeyColumn::OKeyColumn(sal_Bool _bCase) : OColumn(_bCase)
diff --git a/connectivity/source/sdbcx/VTable.cxx b/connectivity/source/sdbcx/VTable.cxx
index 4bd63af..ae1735f 100644
--- a/connectivity/source/sdbcx/VTable.cxx
+++ b/connectivity/source/sdbcx/VTable.cxx
@@ -27,8 +27,8 @@
#include "connectivity/sdbcx/VKey.hxx"
#include "connectivity/dbtools.hxx"
#include <connectivity/dbexception.hxx>
+#include <cppuhelper/supportsservice.hxx>
-// -------------------------------------------------------------------------
using namespace ::connectivity;
using namespace ::connectivity::sdbcx;
using namespace ::dbtools;
@@ -58,16 +58,10 @@ OUString SAL_CALL OTable::getImplementationName( ) throw (::com::sun::star::uno
return aSupported;
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OTable::supportsService( const OUString& _rServiceName ) throw(::com::sun::star::uno::RuntimeException)
{
- Sequence< OUString > aSupported(getSupportedServiceNames());
- const OUString* pSupported = aSupported.getConstArray();
- const OUString* pEnd = pSupported + aSupported.getLength();
- for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
- ;
-
- return pSupported != pEnd;
+ return cppu::supportsService(this, _rServiceName);
}
// -------------------------------------------------------------------------
OTable::OTable(OCollection* _pTables,
More information about the Libreoffice-commits
mailing list