summaryrefslogtreecommitdiff
path: root/connectivity/source/sdbcx
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2013-10-09 08:34:12 -0300
committerStephan Bergmann <sbergman@redhat.com>2013-10-09 15:03:38 +0000
commit2b91dc3ae674648da6909b0ab96129a7d7d3ed39 (patch)
treec15ee480564327cc011217dd8ad7aa4bae7ea724 /connectivity/source/sdbcx
parentfdba797bd9c2a3fe4de82f92c3ee815c15f8ac84 (diff)
fdo#54938: Adapt connectivity module to use cppu::supportsService
Change-Id: I885b4c7a60ff51d44138c4f8a56a584c38a9804a Reviewed-on: https://gerrit.libreoffice.org/6172 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'connectivity/source/sdbcx')
-rw-r--r--connectivity/source/sdbcx/VColumn.cxx11
-rw-r--r--connectivity/source/sdbcx/VIndex.cxx13
-rw-r--r--connectivity/source/sdbcx/VIndexColumn.cxx11
-rw-r--r--connectivity/source/sdbcx/VKey.cxx13
-rw-r--r--connectivity/source/sdbcx/VKeyColumn.cxx11
-rw-r--r--connectivity/source/sdbcx/VTable.cxx12
6 files changed, 20 insertions, 51 deletions
diff --git a/connectivity/source/sdbcx/VColumn.cxx b/connectivity/source/sdbcx/VColumn.cxx
index 8f1f858ad040..0cc2e2bc1ed5 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 f60731646089..65a45208ebad 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 b4952784e872..cf184346b375 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 0f1ed7294c53..bbe9f64ed2d6 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 f2475fa7bf02..dbd99779859b 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 4bd63af39102..ae1735ff5521 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,