summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/mozab
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/mozab')
-rw-r--r--connectivity/source/drivers/mozab/MDriver.cxx10
-rw-r--r--connectivity/source/drivers/mozab/MResultSet.cxx11
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx15
3 files changed, 7 insertions, 29 deletions
diff --git a/connectivity/source/drivers/mozab/MDriver.cxx b/connectivity/source/drivers/mozab/MDriver.cxx
index f7384cc18807..d292687b767d 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 8c947e25ad2e..6d94fa7c8dff 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 b91bb0e7e433..b68424f8d59d 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);
}
//------------------------------------------------------------------