summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Vicenzi <vicenzi.alexandre@gmail.com>2014-01-31 03:09:23 -0200
committerMarcos Souza <marcos.souza.org@gmail.com>2014-02-02 18:53:03 +0000
commit32b8c5c4a9fd03b4e05dff2a77ec186973c126b3 (patch)
treeb00ed1cacd475a297e60168b664146ae4e6f8849
parent018500a73f3b1082b6662b7c123dfe5158ae5752 (diff)
fdo#54938 Convert basctl, mysqlc, sdext, svgio, writerp. to cppu::supportsSer.
Change-Id: I60128dbb5bf83f25eea847fe655d7126c9077414 Reviewed-on: https://gerrit.libreoffice.org/7756 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Marcos Souza <marcos.souza.org@gmail.com> Tested-by: Marcos Souza <marcos.souza.org@gmail.com>
-rw-r--r--basctl/source/basicide/unomodel.cxx12
-rw-r--r--mysqlc/source/mysqlc_driver.cxx23
-rw-r--r--mysqlc/source/mysqlc_resultset.cxx107
-rw-r--r--mysqlc/source/mysqlc_subcomponent.hxx57
-rw-r--r--sdext/source/minimizer/pppoptimizerdialog.cxx33
-rw-r--r--svgio/source/svguno/xsvgparser.cxx26
-rw-r--r--writerperfect/source/impress/KeynoteImportFilter.cxx37
7 files changed, 55 insertions, 240 deletions
diff --git a/basctl/source/basicide/unomodel.cxx b/basctl/source/basicide/unomodel.cxx
index 9b2bccd1e9f5..1f354122ef2b 100644
--- a/basctl/source/basicide/unomodel.cxx
+++ b/basctl/source/basicide/unomodel.cxx
@@ -18,15 +18,15 @@
*/
-#include "unomodel.hxx"
+#include <basdoc.hxx>
+#include <cppuhelper/supportsservice.hxx>
+#include <iderdll.hxx>
#include <osl/mutex.hxx>
-#include <vcl/svapp.hxx>
-
#include <sfx2/docfac.hxx>
#include <sfx2/objsh.hxx>
+#include <vcl/svapp.hxx>
-#include <iderdll.hxx>
-#include <basdoc.hxx>
+#include "unomodel.hxx"
namespace basctl
{
@@ -93,7 +93,7 @@ OUString SIDEModel::getImplementationName_Static()
sal_Bool SIDEModel::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
- return rServiceName == "com.sun.star.script.BasicIDE";
+ return cppu::supportsService(this, rServiceName);
}
uno::Sequence< OUString > SIDEModel::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
diff --git a/mysqlc/source/mysqlc_driver.cxx b/mysqlc/source/mysqlc_driver.cxx
index f6225d82086b..7d8d261ed106 100644
--- a/mysqlc/source/mysqlc_driver.cxx
+++ b/mysqlc/source/mysqlc_driver.cxx
@@ -32,6 +32,8 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::beans;
using namespace com::sun::star::sdbc;
using namespace connectivity::mysqlc;
+
+#include <cppuhelper/supportsservice.hxx>
#include <stdio.h>
#include <cppconn/exception.h>
@@ -39,7 +41,6 @@ using namespace connectivity::mysqlc;
#include <mysql_driver.h>
#endif
-
/* {{{ MysqlCDriver::MysqlCDriver() -I- */
MysqlCDriver::MysqlCDriver(const Reference< XMultiServiceFactory >& _rxFactory)
: ODriver_BASE(m_aMutex)
@@ -54,7 +55,6 @@ MysqlCDriver::MysqlCDriver(const Reference< XMultiServiceFactory >& _rxFactory)
}
/* }}} */
-
/* {{{ MysqlCDriver::disposing() -I- */
void MysqlCDriver::disposing()
{
@@ -75,7 +75,6 @@ void MysqlCDriver::disposing()
}
/* }}} */
-
// static ServiceInfo
/* {{{ MysqlCDriver::getImplementationName_Static() -I- */
OUString MysqlCDriver::getImplementationName_Static()
@@ -86,7 +85,6 @@ OUString MysqlCDriver::getImplementationName_Static()
}
/* }}} */
-
/* {{{ MysqlCDriver::getSupportedServiceNames_Static() -I- */
Sequence< OUString > MysqlCDriver::getSupportedServiceNames_Static()
throw(RuntimeException)
@@ -110,22 +108,15 @@ OUString SAL_CALL MysqlCDriver::getImplementationName()
}
/* }}} */
-
/* {{{ MysqlCDriver::supportsService() -I- */
sal_Bool SAL_CALL MysqlCDriver::supportsService(const OUString& _rServiceName)
throw(RuntimeException)
{
OSL_TRACE("MysqlCDriver::supportsService");
- 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);
}
/* }}} */
-
/* {{{ MysqlCDriver::getSupportedServiceNames() -I- */
Sequence< OUString > SAL_CALL MysqlCDriver::getSupportedServiceNames()
throw(RuntimeException)
@@ -135,7 +126,6 @@ Sequence< OUString > SAL_CALL MysqlCDriver::getSupportedServiceNames()
}
/* }}} */
-
extern "C" { static void SAL_CALL thisModule() {} }
void MysqlCDriver::impl_initCppConn_lck_throw()
@@ -251,7 +241,6 @@ Reference< XConnection > SAL_CALL MysqlCDriver::connect(const OUString& url, con
}
/* }}} */
-
/* {{{ MysqlCDriver::acceptsURL() -I- */
sal_Bool SAL_CALL MysqlCDriver::acceptsURL(const OUString& url)
throw(SQLException, RuntimeException)
@@ -261,7 +250,6 @@ sal_Bool SAL_CALL MysqlCDriver::acceptsURL(const OUString& url)
}
/* }}} */
-
/* {{{ MysqlCDriver::getPropertyInfo() -I- */
Sequence< DriverPropertyInfo > SAL_CALL MysqlCDriver::getPropertyInfo(const OUString& url, const Sequence< PropertyValue >& /* info */)
throw(SQLException, RuntimeException)
@@ -291,7 +279,6 @@ Sequence< DriverPropertyInfo > SAL_CALL MysqlCDriver::getPropertyInfo(const OUSt
}
/* }}} */
-
/* {{{ MysqlCDriver::getMajorVersion() -I- */
sal_Int32 SAL_CALL MysqlCDriver::getMajorVersion()
throw(RuntimeException)
@@ -301,7 +288,6 @@ sal_Int32 SAL_CALL MysqlCDriver::getMajorVersion()
}
/* }}} */
-
/* {{{ MysqlCDriver::getMinorVersion() -I- */
sal_Int32 SAL_CALL MysqlCDriver::getMinorVersion()
throw(RuntimeException)
@@ -311,7 +297,6 @@ sal_Int32 SAL_CALL MysqlCDriver::getMinorVersion()
}
/* }}} */
-
namespace connectivity
{
namespace mysqlc
@@ -359,8 +344,6 @@ void release(oslInterlockedCount& _refCount,
}
/* }}} */
-
-
/* {{{ connectivity::mysqlc::checkDisposed() -I- */
void checkDisposed(sal_Bool _bThrow)
throw (DisposedException)
diff --git a/mysqlc/source/mysqlc_resultset.cxx b/mysqlc/source/mysqlc_resultset.cxx
index 3d595858080a..56033482696e 100644
--- a/mysqlc/source/mysqlc_resultset.cxx
+++ b/mysqlc/source/mysqlc_resultset.cxx
@@ -22,14 +22,15 @@
#include "mysqlc_resultset.hxx"
#include "mysqlc_resultsetmetadata.hxx"
-#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <com/sun/star/sdbcx/CompareBookmark.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
+#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
#include <com/sun/star/sdbc/ResultSetType.hpp>
#include <com/sun/star/sdbc/FetchDirection.hpp>
+#include <com/sun/star/sdbcx/CompareBookmark.hpp>
+#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
-#include <com/sun/star/lang/DisposedException.hpp>
using namespace connectivity::mysqlc;
using namespace cppu;
@@ -48,7 +49,6 @@ using ::osl::MutexGuard;
#include <stdio.h>
-
// IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.OResultSet","com.sun.star.sdbc.ResultSet");
/* {{{ OResultSet::getImplementationName() -I- */
OUString SAL_CALL OResultSet::getImplementationName()
@@ -59,7 +59,6 @@ OUString SAL_CALL OResultSet::getImplementationName()
}
/* }}} */
-
/* {{{ OResultSet::getSupportedServiceNames() -I- */
Sequence< OUString > SAL_CALL OResultSet::getSupportedServiceNames()
throw(RuntimeException)
@@ -72,22 +71,15 @@ Sequence< OUString > SAL_CALL OResultSet::getSupportedServiceNames()
}
/* }}} */
-
/* {{{ OResultSet::supportsService() -I- */
sal_Bool SAL_CALL OResultSet::supportsService(const OUString& _rServiceName)
throw(RuntimeException)
{
OSL_TRACE("OResultSet::supportsService");
- 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() -I- */
OResultSet::OResultSet(OCommonStatement * pStmt, sql::ResultSet * result, rtl_TextEncoding _encoding )
: OResultSet_BASE(m_aMutex)
@@ -108,7 +100,6 @@ OResultSet::OResultSet(OCommonStatement * pStmt, sql::ResultSet * result, rtl_Te
}
/* }}} */
-
/* {{{ OResultSet::~OResultSet() -I- */
OResultSet::~OResultSet()
{
@@ -116,7 +107,6 @@ OResultSet::~OResultSet()
}
/* }}} */
-
/* {{{ OResultSet::disposing() -I- */
void OResultSet::disposing()
{
@@ -130,7 +120,6 @@ void OResultSet::disposing()
}
/* }}} */
-
/* {{{ OResultSet::queryInterface() -I- */
Any SAL_CALL OResultSet::queryInterface(const Type & rType)
throw(RuntimeException)
@@ -144,7 +133,6 @@ Any SAL_CALL OResultSet::queryInterface(const Type & rType)
}
/* }}} */
-
/* {{{ OResultSet::getTypes() -I- */
Sequence< Type > SAL_CALL OResultSet::getTypes()
throw(RuntimeException)
@@ -158,7 +146,6 @@ Sequence< Type > SAL_CALL OResultSet::getTypes()
}
/* }}} */
-
/* {{{ OResultSet::findColumn() -I- */
sal_Int32 SAL_CALL OResultSet::findColumn(const OUString& columnName)
throw(SQLException, RuntimeException)
@@ -189,7 +176,6 @@ sal_Int32 SAL_CALL OResultSet::findColumn(const OUString& columnName)
}
/* }}} */
-
/* {{{ OResultSet::getBinaryStream() -U- */
Reference< XInputStream > SAL_CALL OResultSet::getBinaryStream(sal_Int32 column)
throw(SQLException, RuntimeException)
@@ -204,7 +190,6 @@ Reference< XInputStream > SAL_CALL OResultSet::getBinaryStream(sal_Int32 column)
}
/* }}} */
-
/* {{{ OResultSet::getCharacterStream() -U- */
Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream(sal_Int32 column)
throw(SQLException, RuntimeException)
@@ -219,7 +204,6 @@ Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream(sal_Int32 colu
}
/* }}} */
-
/* {{{ OResultSet::getBoolean() -I- */
sal_Bool SAL_CALL OResultSet::getBoolean(sal_Int32 column)
throw(SQLException, RuntimeException)
@@ -238,7 +222,6 @@ sal_Bool SAL_CALL OResultSet::getBoolean(sal_Int32 column)
}
/* }}} */
-
/* {{{ OResultSet::getByte() -I- */
sal_Int8 SAL_CALL OResultSet::getByte(sal_Int32 column)
throw(SQLException, RuntimeException)
@@ -257,7 +240,6 @@ sal_Int8 SAL_CALL OResultSet::getByte(sal_Int32 column)
}
/* }}} */
-
/* {{{ OResultSet::getBytes() -I- */
Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes(sal_Int32 column)
throw(SQLException, RuntimeException)
@@ -267,7 +249,6 @@ Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes(sal_Int32 column)
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
MutexGuard aGuard(m_aMutex);
-
sql::SQLString val = m_result->getString(column);
if (!val.length()) {
return Sequence< sal_Int8>();
@@ -277,7 +258,6 @@ Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes(sal_Int32 column)
}
/* }}} */
-
/* {{{ OResultSet::getDate() -I- */
Date SAL_CALL OResultSet::getDate(sal_Int32 column)
throw(SQLException, RuntimeException)
@@ -316,7 +296,6 @@ Date SAL_CALL OResultSet::getDate(sal_Int32 column)
}
/* }}} */
-
/* {{{ OResultSet::getDouble() -I- */
double SAL_CALL OResultSet::getDouble(sal_Int32 column)
throw(SQLException, RuntimeException)
@@ -335,7 +314,6 @@ double SAL_CALL OResultSet::getDouble(sal_Int32 column)
}
/* }}} */
-
/* {{{ OResultSet::getFloat() -I- */
float SAL_CALL OResultSet::getFloat(sal_Int32 column)
throw(SQLException, RuntimeException)
@@ -354,7 +332,6 @@ float SAL_CALL OResultSet::getFloat(sal_Int32 column)
}
/* }}} */
-
/* {{{ OResultSet::getInt() -I- */
sal_Int32 SAL_CALL OResultSet::getInt(sal_Int32 column)
throw(SQLException, RuntimeException)
@@ -373,7 +350,6 @@ sal_Int32 SAL_CALL OResultSet::getInt(sal_Int32 column)
}
/* }}} */
-
/* {{{ OResultSet::getRow() -I- */
sal_Int32 SAL_CALL OResultSet::getRow()
throw(SQLException, RuntimeException)
@@ -391,7 +367,6 @@ sal_Int32 SAL_CALL OResultSet::getRow()
}
/* }}} */
-
/* {{{ OResultSet::getLong() -I- */
sal_Int64 SAL_CALL OResultSet::getLong(sal_Int32 column)
throw(SQLException, RuntimeException)
@@ -410,7 +385,6 @@ sal_Int64 SAL_CALL OResultSet::getLong(sal_Int32 column)
}
/* }}} */
-
/* {{{ OResultSet::getMetaData() -I- */
Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData()
throw(SQLException, RuntimeException)
@@ -431,7 +405,6 @@ Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData()
}
/* }}} */
-
/* {{{ OResultSet::getArray() -U- */
Reference< XArray > SAL_CALL OResultSet::getArray(sal_Int32 column)
throw(SQLException, RuntimeException)
@@ -446,7 +419,6 @@ Reference< XArray > SAL_CALL OResultSet::getArray(sal_Int32 column)
}
/* }}} */
-
/* {{{ OResultSet::getClob() -U- */
Reference< XClob > SAL_CALL OResultSet::getClob(sal_Int32 column)
throw(SQLException, RuntimeException)
@@ -461,7 +433,6 @@ Reference< XClob > SAL_CALL OResultSet::getClob(sal_Int32 column)
}
/* }}} */
-
/* {{{ OResultSet::getBlob() -U- */
Reference< XBlob > SAL_CALL OResultSet::getBlob(sal_Int32 column)
throw(SQLException, RuntimeException)
@@ -476,7 +447,6 @@ Reference< XBlob > SAL_CALL OResultSet::getBlob(sal_Int32 column)
}
/* }}} */
-
/* {{{ OResultSet::getRef() -U- */
Reference< XRef > SAL_CALL OResultSet::getRef(sal_Int32 column)
throw(SQLException, RuntimeException)
@@ -491,7 +461,6 @@ Reference< XRef > SAL_CALL OResultSet::getRef(sal_Int32 column)
}
/* }}} */
-
/* {{{ OResultSet::getObject() -U- */
Any SAL_CALL OResultSet::getObject(sal_Int32 column, const Reference< XNameAccess >& /* typeMap */)
throw(SQLException, RuntimeException)
@@ -508,7 +477,6 @@ Any SAL_CALL OResultSet::getObject(sal_Int32 column, const Reference< XNameAcces
}
/* }}} */
-
/* {{{ OResultSet::getShort() -I- */
sal_Int16 SAL_CALL OResultSet::getShort(sal_Int32 column)
throw(SQLException, RuntimeException)
@@ -526,7 +494,6 @@ sal_Int16 SAL_CALL OResultSet::getShort(sal_Int32 column)
}
/* }}} */
-
/* {{{ OResultSet::getString() -I- */
OUString SAL_CALL OResultSet::getString(sal_Int32 column)
throw(SQLException, RuntimeException)
@@ -551,7 +518,6 @@ OUString SAL_CALL OResultSet::getString(sal_Int32 column)
}
/* }}} */
-
/* {{{ OResultSet::getTime() -I- */
Time SAL_CALL OResultSet::getTime(sal_Int32 column)
throw(SQLException, RuntimeException)
@@ -588,7 +554,6 @@ Time SAL_CALL OResultSet::getTime(sal_Int32 column)
}
/* }}} */
-
/* {{{ OResultSet::getTimestamp() -I- */
DateTime SAL_CALL OResultSet::getTimestamp(sal_Int32 column)
throw(SQLException, RuntimeException)
@@ -612,7 +577,6 @@ DateTime SAL_CALL OResultSet::getTimestamp(sal_Int32 column)
}
/* }}} */
-
/* {{{ OResultSet::isBeforeFirst() -I- */
sal_Bool SAL_CALL OResultSet::isBeforeFirst()
throw(SQLException, RuntimeException)
@@ -630,7 +594,6 @@ sal_Bool SAL_CALL OResultSet::isBeforeFirst()
}
/* }}} */
-
/* {{{ OResultSet::isAfterLast() -I- */
sal_Bool SAL_CALL OResultSet::isAfterLast()
throw(SQLException, RuntimeException)
@@ -648,7 +611,6 @@ sal_Bool SAL_CALL OResultSet::isAfterLast()
}
/* }}} */
-
/* {{{ OResultSet::isFirst() -I- */
sal_Bool SAL_CALL OResultSet::isFirst()
throw(SQLException, RuntimeException)
@@ -666,7 +628,6 @@ sal_Bool SAL_CALL OResultSet::isFirst()
}
/* }}} */
-
/* {{{ OResultSet::isLast() -I- */
sal_Bool SAL_CALL OResultSet::isLast()
throw(SQLException, RuntimeException)
@@ -684,7 +645,6 @@ sal_Bool SAL_CALL OResultSet::isLast()
}
/* }}} */
-
/* {{{ OResultSet::beforeFirst() -I- */
void SAL_CALL OResultSet::beforeFirst()
throw(SQLException, RuntimeException)
@@ -701,7 +661,6 @@ void SAL_CALL OResultSet::beforeFirst()
}
/* }}} */
-
/* {{{ OResultSet::afterLast() -I- */
void SAL_CALL OResultSet::afterLast()
throw(SQLException, RuntimeException)
@@ -718,7 +677,6 @@ void SAL_CALL OResultSet::afterLast()
}
/* }}} */
-
/* {{{ OResultSet::close() -I- */
void SAL_CALL OResultSet::close() throw(SQLException, RuntimeException)
{
@@ -736,7 +694,6 @@ void SAL_CALL OResultSet::close() throw(SQLException, RuntimeException)
}
/* }}} */
-
/* {{{ OResultSet::first() -I- */
sal_Bool SAL_CALL OResultSet::first() throw(SQLException, RuntimeException)
{
@@ -753,7 +710,6 @@ sal_Bool SAL_CALL OResultSet::first() throw(SQLException, RuntimeException)
}
/* }}} */
-
/* {{{ OResultSet::last() -I- */
sal_Bool SAL_CALL OResultSet::last()
throw(SQLException, RuntimeException)
@@ -771,7 +727,6 @@ sal_Bool SAL_CALL OResultSet::last()
}
/* }}} */
-
/* {{{ OResultSet::absolute() -I- */
sal_Bool SAL_CALL OResultSet::absolute(sal_Int32 row)
throw(SQLException, RuntimeException)
@@ -789,7 +744,6 @@ sal_Bool SAL_CALL OResultSet::absolute(sal_Int32 row)
}
/* }}} */
-
/* {{{ OResultSet::relative() -I- */
sal_Bool SAL_CALL OResultSet::relative(sal_Int32 row)
throw(SQLException, RuntimeException)
@@ -807,7 +761,6 @@ sal_Bool SAL_CALL OResultSet::relative(sal_Int32 row)
}
/* }}} */
-
/* {{{ OResultSet::previous() -I- */
sal_Bool SAL_CALL OResultSet::previous()
throw(SQLException, RuntimeException)
@@ -825,7 +778,6 @@ sal_Bool SAL_CALL OResultSet::previous()
}
/* }}} */
-
/* {{{ OResultSet::getStatement() -I- */
Reference< XInterface > SAL_CALL OResultSet::getStatement()
throw(SQLException, RuntimeException)
@@ -838,7 +790,6 @@ Reference< XInterface > SAL_CALL OResultSet::getStatement()
}
/* }}} */
-
/* {{{ OResultSet::rowDeleted() -I- */
sal_Bool SAL_CALL OResultSet::rowDeleted()
throw(SQLException, RuntimeException)
@@ -851,7 +802,6 @@ sal_Bool SAL_CALL OResultSet::rowDeleted()
}
/* }}} */
-
/* {{{ OResultSet::rowInserted() -I- */
sal_Bool SAL_CALL OResultSet::rowInserted()
throw(SQLException, RuntimeException)
@@ -864,7 +814,6 @@ sal_Bool SAL_CALL OResultSet::rowInserted()
}
/* }}} */
-
/* {{{ OResultSet::rowUpdated() -I- */
sal_Bool SAL_CALL OResultSet::rowUpdated()
throw(SQLException, RuntimeException)
@@ -877,7 +826,6 @@ sal_Bool SAL_CALL OResultSet::rowUpdated()
}
/* }}} */
-
/* {{{ OResultSet::next() -I- */
sal_Bool SAL_CALL OResultSet::next()
throw(SQLException, RuntimeException)
@@ -895,7 +843,6 @@ sal_Bool SAL_CALL OResultSet::next()
}
/* }}} */
-
/* {{{ OResultSet::wasNull() -I- */
sal_Bool SAL_CALL OResultSet::wasNull()
throw(SQLException, RuntimeException)
@@ -913,7 +860,6 @@ sal_Bool SAL_CALL OResultSet::wasNull()
}
/* }}} */
-
/* {{{ OResultSet::cancel() -I- */
void SAL_CALL OResultSet::cancel()
throw(RuntimeException)
@@ -924,7 +870,6 @@ void SAL_CALL OResultSet::cancel()
}
/* }}} */
-
/* {{{ OResultSet::clearWarnings() -I- */
void SAL_CALL OResultSet::clearWarnings()
throw(SQLException, RuntimeException)
@@ -933,7 +878,6 @@ void SAL_CALL OResultSet::clearWarnings()
}
/* }}} */
-
/* {{{ OResultSet::getWarnings() -I- */
Any SAL_CALL OResultSet::getWarnings()
throw(SQLException, RuntimeException)
@@ -944,7 +888,6 @@ Any SAL_CALL OResultSet::getWarnings()
}
/* }}} */
-
/* {{{ OResultSet::insertRow() -I- */
void SAL_CALL OResultSet::insertRow()
throw(SQLException, RuntimeException)
@@ -957,7 +900,6 @@ void SAL_CALL OResultSet::insertRow()
}
/* }}} */
-
/* {{{ OResultSet::updateRow() -I- */
void SAL_CALL OResultSet::updateRow()
throw(SQLException, RuntimeException)
@@ -971,7 +913,6 @@ void SAL_CALL OResultSet::updateRow()
}
/* }}} */
-
/* {{{ OResultSet::deleteRow() -I- */
void SAL_CALL OResultSet::deleteRow()
throw(SQLException, RuntimeException)
@@ -983,7 +924,6 @@ void SAL_CALL OResultSet::deleteRow()
}
/* }}} */
-
/* {{{ OResultSet::cancelRowUpdates() -I- */
void SAL_CALL OResultSet::cancelRowUpdates()
throw(SQLException, RuntimeException)
@@ -995,7 +935,6 @@ void SAL_CALL OResultSet::cancelRowUpdates()
}
/* }}} */
-
/* {{{ OResultSet::moveToInsertRow() -I- */
void SAL_CALL OResultSet::moveToInsertRow()
throw(SQLException, RuntimeException)
@@ -1009,7 +948,6 @@ void SAL_CALL OResultSet::moveToInsertRow()
}
/* }}} */
-
/* {{{ OResultSet::moveToCurrentRow() -I- */
void SAL_CALL OResultSet::moveToCurrentRow()
throw(SQLException, RuntimeException)
@@ -1020,7 +958,6 @@ void SAL_CALL OResultSet::moveToCurrentRow()
}
/* }}} */
-
/* {{{ OResultSet::updateNull() -U- */
void SAL_CALL OResultSet::updateNull(sal_Int32 column)
throw(SQLException, RuntimeException)
@@ -1033,7 +970,6 @@ void SAL_CALL OResultSet::updateNull(sal_Int32 column)
}
/* }}} */
-
/* {{{ OResultSet::updateBoolean() -U- */
void SAL_CALL OResultSet::updateBoolean(sal_Int32 column, sal_Bool /* x */)
throw(SQLException, RuntimeException)
@@ -1046,7 +982,6 @@ void SAL_CALL OResultSet::updateBoolean(sal_Int32 column, sal_Bool /* x */)
}
/* }}} */
-
/* {{{ OResultSet::updateByte() -U- */
void SAL_CALL OResultSet::updateByte(sal_Int32 column, sal_Int8 /* x */)
throw(SQLException, RuntimeException)
@@ -1059,7 +994,6 @@ void SAL_CALL OResultSet::updateByte(sal_Int32 column, sal_Int8 /* x */)
}
/* }}} */
-
/* {{{ OResultSet::updateShort() -U- */
void SAL_CALL OResultSet::updateShort(sal_Int32 column, sal_Int16 /* x */)
throw(SQLException, RuntimeException)
@@ -1072,7 +1006,6 @@ void SAL_CALL OResultSet::updateShort(sal_Int32 column, sal_Int16 /* x */)
}
/* }}} */
-
/* {{{ OResultSet::updateInt() -U- */
void SAL_CALL OResultSet::updateInt(sal_Int32 column, sal_Int32 /* x */)
throw(SQLException, RuntimeException)
@@ -1085,7 +1018,6 @@ void SAL_CALL OResultSet::updateInt(sal_Int32 column, sal_Int32 /* x */)
}
/* }}} */
-
/* {{{ OResultSet::updateLong() -U- */
void SAL_CALL OResultSet::updateLong(sal_Int32 column, sal_Int64 /* x */)
throw(SQLException, RuntimeException)
@@ -1098,7 +1030,6 @@ void SAL_CALL OResultSet::updateLong(sal_Int32 column, sal_Int64 /* x */)
}
/* }}} */
-
/* {{{ OResultSet::updateFloat() -U- */
void SAL_CALL OResultSet::updateFloat(sal_Int32 column, float /* x */)
throw(SQLException, RuntimeException)
@@ -1111,7 +1042,6 @@ void SAL_CALL OResultSet::updateFloat(sal_Int32 column, float /* x */)
}
/* }}} */
-
/* {{{ OResultSet::updateDouble() -U- */
void SAL_CALL OResultSet::updateDouble(sal_Int32 column, double /* x */)
throw(SQLException, RuntimeException)
@@ -1124,7 +1054,6 @@ void SAL_CALL OResultSet::updateDouble(sal_Int32 column, double /* x */)
}
/* }}} */
-
/* {{{ OResultSet::updateString() -U- */
void SAL_CALL OResultSet::updateString(sal_Int32 column, const OUString& /* x */)
throw(SQLException, RuntimeException)
@@ -1137,7 +1066,6 @@ void SAL_CALL OResultSet::updateString(sal_Int32 column, const OUString& /* x */
}
/* }}} */
-
/* {{{ OResultSet::updateBytes() -U- */
void SAL_CALL OResultSet::updateBytes(sal_Int32 column, const Sequence< sal_Int8 >& /* x */)
throw(SQLException, RuntimeException)
@@ -1150,7 +1078,6 @@ void SAL_CALL OResultSet::updateBytes(sal_Int32 column, const Sequence< sal_Int8
}
/* }}} */
-
/* {{{ OResultSet::updateDate() -U- */
void SAL_CALL OResultSet::updateDate(sal_Int32 column, const Date& /* x */)
throw(SQLException, RuntimeException)
@@ -1163,7 +1090,6 @@ void SAL_CALL OResultSet::updateDate(sal_Int32 column, const Date& /* x */)
}
/* }}} */
-
/* {{{ OResultSet::updateTime() -U- */
void SAL_CALL OResultSet::updateTime(sal_Int32 column, const Time& /* x */)
throw(SQLException, RuntimeException)
@@ -1176,7 +1102,6 @@ void SAL_CALL OResultSet::updateTime(sal_Int32 column, const Time& /* x */)
}
/* }}} */
-
/* {{{ OResultSet::updateTimestamp() -U- */
void SAL_CALL OResultSet::updateTimestamp(sal_Int32 column, const DateTime& /* x */)
throw(SQLException, RuntimeException)
@@ -1189,7 +1114,6 @@ void SAL_CALL OResultSet::updateTimestamp(sal_Int32 column, const DateTime& /* x
}
/* }}} */
-
/* {{{ OResultSet::updateBinaryStream() -U- */
void SAL_CALL OResultSet::updateBinaryStream(sal_Int32 column, const Reference< XInputStream >& /* x */,
sal_Int32 /* length */)
@@ -1203,7 +1127,6 @@ void SAL_CALL OResultSet::updateBinaryStream(sal_Int32 column, const Reference<
}
/* }}} */
-
/* {{{ OResultSet::updateCharacterStream() -U- */
void SAL_CALL OResultSet::updateCharacterStream(sal_Int32 column, const Reference< XInputStream >& /* x */,
sal_Int32 /* length */)
@@ -1217,7 +1140,6 @@ void SAL_CALL OResultSet::updateCharacterStream(sal_Int32 column, const Referenc
}
/* }}} */
-
/* {{{ OResultSet::refreshRow() -U- */
void SAL_CALL OResultSet::refreshRow()
throw(SQLException, RuntimeException)
@@ -1229,7 +1151,6 @@ void SAL_CALL OResultSet::refreshRow()
}
/* }}} */
-
/* {{{ OResultSet::updateObject() -U- */
void SAL_CALL OResultSet::updateObject(sal_Int32 column, const Any& /* x */)
throw(SQLException, RuntimeException)
@@ -1242,7 +1163,6 @@ void SAL_CALL OResultSet::updateObject(sal_Int32 column, const Any& /* x */)
}
/* }}} */
-
/* {{{ OResultSet::updateNumericObject() -U- */
void SAL_CALL OResultSet::updateNumericObject(sal_Int32 column, const Any& /* x */, sal_Int32 /* scale */)
throw(SQLException, RuntimeException)
@@ -1255,7 +1175,6 @@ void SAL_CALL OResultSet::updateNumericObject(sal_Int32 column, const Any& /* x
}
/* }}} */
-
// XRowLocate
/* {{{ OResultSet::getBookmark() -U- */
Any SAL_CALL OResultSet::getBookmark()
@@ -1273,7 +1192,6 @@ Any SAL_CALL OResultSet::getBookmark()
}
/* }}} */
-
/* {{{ OResultSet::moveToBookmark() -U- */
sal_Bool SAL_CALL OResultSet::moveToBookmark(const Any& /* bookmark */)
throw(SQLException, RuntimeException)
@@ -1286,7 +1204,6 @@ sal_Bool SAL_CALL OResultSet::moveToBookmark(const Any& /* bookmark */)
}
/* }}} */
-
/* {{{ OResultSet::moveRelativeToBookmark() -U- */
sal_Bool SAL_CALL OResultSet::moveRelativeToBookmark(const Any& /* bookmark */, sal_Int32 /* rows */)
throw(SQLException, RuntimeException)
@@ -1300,7 +1217,6 @@ sal_Bool SAL_CALL OResultSet::moveRelativeToBookmark(const Any& /* bookmark */,
}
/* }}} */
-
/* {{{ OResultSet::compareBookmarks() -I- */
sal_Int32 SAL_CALL OResultSet::compareBookmarks(const Any& /* n1 */, const Any& /* n2 */)
throw(SQLException, RuntimeException)
@@ -1315,7 +1231,6 @@ sal_Int32 SAL_CALL OResultSet::compareBookmarks(const Any& /* n1 */, const Any&
}
/* }}} */
-
/* {{{ OResultSet::hasOrderedBookmarks() -I- */
sal_Bool SAL_CALL OResultSet::hasOrderedBookmarks()
throw(SQLException, RuntimeException)
@@ -1325,7 +1240,6 @@ sal_Bool SAL_CALL OResultSet::hasOrderedBookmarks()
}
/* }}} */
-
/* {{{ OResultSet::hashBookmark() -U- */
sal_Int32 SAL_CALL OResultSet::hashBookmark(const Any& /* bookmark */)
throw(SQLException, RuntimeException)
@@ -1336,7 +1250,6 @@ sal_Int32 SAL_CALL OResultSet::hashBookmark(const Any& /* bookmark */)
}
/* }}} */
-
// XDeleteRows
/* {{{ OResultSet::deleteRows() -U- */
Sequence< sal_Int32 > SAL_CALL OResultSet::deleteRows(const Sequence< Any >& /* rows */)
@@ -1352,7 +1265,6 @@ Sequence< sal_Int32 > SAL_CALL OResultSet::deleteRows(const Sequence< Any >& /*
}
/* }}} */
-
/* {{{ OResultSet::createArrayHelper() -I- */
IPropertyArrayHelper * OResultSet::createArrayHelper() const
{
@@ -1370,7 +1282,6 @@ IPropertyArrayHelper * OResultSet::createArrayHelper() const
}
/* }}} */
-
/* {{{ OResultSet::getInfoHelper() -I- */
IPropertyArrayHelper & OResultSet::getInfoHelper()
{
@@ -1379,7 +1290,6 @@ IPropertyArrayHelper & OResultSet::getInfoHelper()
}
/* }}} */
-
/* {{{ OResultSet::convertFastPropertyValue() -I- */
sal_Bool OResultSet::convertFastPropertyValue(Any & /* rConvertedValue */,
Any & /* rOldValue */,
@@ -1403,7 +1313,6 @@ sal_Bool OResultSet::convertFastPropertyValue(Any & /* rConvertedValue */,
}
/* }}} */
-
/* {{{ OResultSet::setFastPropertyValue_NoBroadcast() -I- */
void OResultSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const Any& /* rValue */)
throw (Exception)
@@ -1425,7 +1334,6 @@ void OResultSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const Any&
}
/* }}} */
-
/* {{{ OResultSet::getFastPropertyValue() -I- */
void OResultSet::getFastPropertyValue(Any& _rValue, sal_Int32 nHandle) const
{
@@ -1455,7 +1363,6 @@ void OResultSet::getFastPropertyValue(Any& _rValue, sal_Int32 nHandle) const
}
/* }}} */
-
/* {{{ OResultSet::acquire() -I- */
void SAL_CALL OResultSet::acquire()
throw()
@@ -1465,7 +1372,6 @@ void SAL_CALL OResultSet::acquire()
}
/* }}} */
-
/* {{{ OResultSet::release() -I- */
void SAL_CALL OResultSet::release()
throw()
@@ -1475,7 +1381,6 @@ void SAL_CALL OResultSet::release()
}
/* }}} */
-
/* {{{ OResultSet::getPropertySetInfo() -I- */
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL OResultSet::getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException)
{
@@ -1484,7 +1389,6 @@ void SAL_CALL OResultSet::release()
}
/* }}} */
-
/* {{{ OResultSet::checkColumnIndex() -I- */
void OResultSet::checkColumnIndex(sal_Int32 index)
throw (SQLException, RuntimeException)
@@ -1498,7 +1402,6 @@ void OResultSet::checkColumnIndex(sal_Int32 index)
}
/* }}} */
-
/*
* Local variables:
* tab-width: 4
diff --git a/mysqlc/source/mysqlc_subcomponent.hxx b/mysqlc/source/mysqlc_subcomponent.hxx
index 67c9b8a3669a..06475016d24c 100644
--- a/mysqlc/source/mysqlc_subcomponent.hxx
+++ b/mysqlc/source/mysqlc_subcomponent.hxx
@@ -20,12 +20,13 @@
#ifndef _CONNECTIVITY_OSUBCOMPONENT_HXX_
#define _CONNECTIVITY_OSUBCOMPONENT_HXX_
-#include <cppuhelper/weak.hxx>
-#include <cppuhelper/interfacecontainer.h>
#include <com/sun/star/lang/DisposedException.hpp>
+#include <cppuhelper/interfacecontainer.h>
#include <cppuhelper/propshlp.hxx>
-#include <osl/mutex.hxx>
+#include <cppuhelper/supportsservice.hxx>
+#include <cppuhelper/weak.hxx>
#include <osl/diagnose.h>
+#include <osl/mutex.hxx>
namespace cppu {
class IPropertyArrayHelper;
@@ -44,9 +45,9 @@ namespace com
}
}
}
+
namespace connectivity
{
-
namespace mysqlc
{
void release(oslInterlockedCount& _refCount,
@@ -55,9 +56,7 @@ namespace connectivity
::com::sun::star::lang::XComponent* _pObject);
void checkDisposed(sal_Bool _bThrow) throw (::com::sun::star::lang::DisposedException);
- //************************************************************
- // OSubComponent
- //************************************************************
+
template <class SELF, class WEAK> class OSubComponent
{
protected:
@@ -91,7 +90,6 @@ namespace connectivity
}
};
-
template <class TYPE>
class OPropertyArrayUsageHelper
{
@@ -141,7 +139,6 @@ namespace connectivity
template<class TYPE>
::osl::Mutex OPropertyArrayUsageHelper< TYPE >::s_aMutex;
- //------------------------------------------------------------------
template <class TYPE>
OPropertyArrayUsageHelper<TYPE>::OPropertyArrayUsageHelper()
{
@@ -149,7 +146,6 @@ namespace connectivity
++s_nRefCount;
}
- //------------------------------------------------------------------
template <class TYPE>
::cppu::IPropertyArrayHelper* OPropertyArrayUsageHelper<TYPE>::getArrayHelper()
{
@@ -164,7 +160,6 @@ namespace connectivity
return s_pProps;
}
-
class OBase_Mutex
{
public:
@@ -180,7 +175,7 @@ namespace connectivity
*_pDest = *_pSource;
}
}
- //-------------------------------------------------------------------------
+
/// concat two sequences
template <class T>
::com::sun::star::uno::Sequence<T> concatSequences(const ::com::sun::star::uno::Sequence<T>& _rLeft, const ::com::sun::star::uno::Sequence<T>& _rRight)
@@ -199,34 +194,26 @@ namespace connectivity
return aReturn;
}
-
-#define DECLARE_SERVICE_INFO() \
- virtual OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException); \
- virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(::com::sun::star::uno::RuntimeException); \
+#define DECLARE_SERVICE_INFO() \
+ virtual OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException); \
+ virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(::com::sun::star::uno::RuntimeException); \
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException) \
-#define IMPLEMENT_SERVICE_INFO(classname, implasciiname, serviceasciiname) \
+#define IMPLEMENT_SERVICE_INFO(classname, implasciiname, serviceasciiname) \
OUString SAL_CALL classname::getImplementationName() throw (::com::sun::star::uno::RuntimeException) \
- { \
- return OUString::createFromAscii(implasciiname); \
- } \
+ { \
+ return OUString::createFromAscii(implasciiname); \
+ } \
::com::sun::star::uno::Sequence< OUString > SAL_CALL classname::getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException) \
- { \
- ::com::sun::star::uno::Sequence< OUString > aSupported(1); \
- aSupported[0] = OUString::createFromAscii(serviceasciiname); \
- return aSupported; \
- } \
+ { \
+ ::com::sun::star::uno::Sequence< OUString > aSupported(1); \
+ aSupported[0] = OUString::createFromAscii(serviceasciiname); \
+ return aSupported; \
+ } \
sal_Bool SAL_CALL classname::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, ServiceName); \
+ } \
}
}
#endif // _CONNECTIVITY_OSUBCOMPONENT_HXX_
diff --git a/sdext/source/minimizer/pppoptimizerdialog.cxx b/sdext/source/minimizer/pppoptimizerdialog.cxx
index aa9787813e18..479896de1dfd 100644
--- a/sdext/source/minimizer/pppoptimizerdialog.cxx
+++ b/sdext/source/minimizer/pppoptimizerdialog.cxx
@@ -29,28 +29,19 @@ using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::beans;
#define SERVICE_NAME "com.sun.star.comp.PresentationMinimizer"
+#include <cppuhelper/supportsservice.hxx>
#include <rtl/ustrbuf.hxx>
-// ----------------------
-// - PPPOptimizerDialog -
-// ----------------------
-
PPPOptimizerDialog::PPPOptimizerDialog( const Reference< XComponentContext > &xContext ) :
mxContext( xContext ),
mpOptimizerDialog( NULL )
{
}
-// -----------------------------------------------------------------------------
-
PPPOptimizerDialog::~PPPOptimizerDialog()
{
}
-// -----------------------------------------------------------------------------
-// XInitialization
-// -----------------------------------------------------------------------------
-
void SAL_CALL PPPOptimizerDialog::initialize( const Sequence< Any >& aArguments )
throw ( Exception, RuntimeException )
{
@@ -62,10 +53,6 @@ void SAL_CALL PPPOptimizerDialog::initialize( const Sequence< Any >& aArguments
mxController = mxFrame->getController();
}
-// -----------------------------------------------------------------------------
-// XServiceInfo
-// -----------------------------------------------------------------------------
-
OUString SAL_CALL PPPOptimizerDialog::getImplementationName()
throw (RuntimeException)
{
@@ -75,7 +62,7 @@ OUString SAL_CALL PPPOptimizerDialog::getImplementationName()
sal_Bool SAL_CALL PPPOptimizerDialog::supportsService( const OUString& ServiceName )
throw ( RuntimeException )
{
- return ServiceName == SERVICE_NAME;
+ return cppu::supportsService(this, ServiceName);
}
Sequence< OUString > SAL_CALL PPPOptimizerDialog::getSupportedServiceNames()
@@ -84,10 +71,6 @@ Sequence< OUString > SAL_CALL PPPOptimizerDialog::getSupportedServiceNames()
return PPPOptimizerDialog_getSupportedServiceNames();
}
-// -----------------------------------------------------------------------------
-// XDispatchProvider
-// -----------------------------------------------------------------------------
-
Reference< com::sun::star::frame::XDispatch > SAL_CALL PPPOptimizerDialog::queryDispatch(
const URL& aURL, const OUString& /* aTargetFrameName */, sal_Int32 /* nSearchFlags */ ) throw( RuntimeException )
{
@@ -98,8 +81,6 @@ Reference< com::sun::star::frame::XDispatch > SAL_CALL PPPOptimizerDialog::query
return xRet;
}
-//------------------------------------------------------------------------------
-
Sequence< Reference< com::sun::star::frame::XDispatch > > SAL_CALL PPPOptimizerDialog::queryDispatches(
const Sequence< com::sun::star::frame::DispatchDescriptor >& aDescripts ) throw( RuntimeException )
{
@@ -113,10 +94,6 @@ Sequence< Reference< com::sun::star::frame::XDispatch > > SAL_CALL PPPOptimizerD
return aReturn;
}
-// -----------------------------------------------------------------------------
-// XDispatch
-// -----------------------------------------------------------------------------
-
void SAL_CALL PPPOptimizerDialog::dispatch( const URL& rURL,
const Sequence< PropertyValue >& rArguments )
throw( RuntimeException )
@@ -165,7 +142,6 @@ void SAL_CALL PPPOptimizerDialog::dispatch( const URL& rURL,
}
}
-//===============================================
void SAL_CALL PPPOptimizerDialog::addStatusListener( const Reference< XStatusListener >&, const URL& )
throw( RuntimeException )
{
@@ -173,7 +149,6 @@ void SAL_CALL PPPOptimizerDialog::addStatusListener( const Reference< XStatusLis
// OSL_FAIL( "PPPOptimizerDialog::addStatusListener()\nNot implemented yet!" );
}
-//===============================================
void SAL_CALL PPPOptimizerDialog::removeStatusListener( const Reference< XStatusListener >&, const URL& )
throw( RuntimeException )
{
@@ -181,8 +156,6 @@ void SAL_CALL PPPOptimizerDialog::removeStatusListener( const Reference< XStatus
// OSL_FAIL( "PPPOptimizerDialog::removeStatusListener()\nNot implemented yet!" );
}
-// -----------------------------------------------------------------------------
-
OUString PPPOptimizerDialog_getImplementationName()
{
return OUString( "com.sun.star.comp.PresentationMinimizerImp" );
@@ -202,6 +175,4 @@ Reference< XInterface > PPPOptimizerDialog_createInstance( const Reference< XCom
return (cppu::OWeakObject*) new PPPOptimizerDialog( rSMgr );
}
-// -----------------------------------------------------------------------------
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svgio/source/svguno/xsvgparser.cxx b/svgio/source/svguno/xsvgparser.cxx
index bafeb0e625d1..e32e712225cd 100644
--- a/svgio/source/svguno/xsvgparser.cxx
+++ b/svgio/source/svguno/xsvgparser.cxx
@@ -23,20 +23,17 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <cppuhelper/implbase2.hxx>
-#include <svgio/svgreader/svgdocumenthandler.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/xml/sax/XParser.hpp>
#include <com/sun/star/xml/sax/Parser.hpp>
#include <com/sun/star/xml/sax/InputSource.hpp>
#include <drawinglayer/geometry/viewinformation2d.hxx>
+#include <svgio/svgreader/svgdocumenthandler.hxx>
#include "xsvgparser.hxx"
-//////////////////////////////////////////////////////////////////////////////
-
using namespace ::com::sun::star;
-//////////////////////////////////////////////////////////////////////////////
-
namespace svgio
{
namespace svgreader
@@ -68,9 +65,7 @@ namespace svgio
} // end of namespace svgreader
} // end of namespace svgio
-//////////////////////////////////////////////////////////////////////////////
// uno functions
-
namespace svgio
{
namespace svgreader
@@ -95,8 +90,6 @@ namespace svgio
} // end of namespace svgreader
} // end of namespace svgio
-//////////////////////////////////////////////////////////////////////////////
-
namespace svgio
{
namespace svgreader
@@ -185,17 +178,7 @@ namespace svgio
sal_Bool SAL_CALL XSvgParser::supportsService(const OUString& rServiceName) throw(uno::RuntimeException)
{
- const uno::Sequence< OUString > aServices(XSvgParser_getSupportedServiceNames());
-
- for(sal_Int32 nService(0); nService < aServices.getLength(); nService++)
- {
- if(rServiceName == aServices[nService])
- {
- return sal_True;
- }
- }
-
- return sal_False;
+ return cppu::supportsService(this, rServiceName);
}
uno::Sequence< OUString > SAL_CALL XSvgParser::getSupportedServiceNames() throw(uno::RuntimeException)
@@ -206,7 +189,4 @@ namespace svgio
} // end of namespace svgreader
} // end of namespace svgio
-//////////////////////////////////////////////////////////////////////////////
-// eof
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/impress/KeynoteImportFilter.cxx b/writerperfect/source/impress/KeynoteImportFilter.cxx
index 9b22018360b1..4efbcb0e7ece 100644
--- a/writerperfect/source/impress/KeynoteImportFilter.cxx
+++ b/writerperfect/source/impress/KeynoteImportFilter.cxx
@@ -8,13 +8,6 @@
*/
#include <boost/shared_ptr.hpp>
-
-#include <osl/diagnose.h>
-#include <rtl/tencinfo.h>
-
-#include <comphelper/processfactory.hxx>
-#include <comphelper/types.hxx>
-
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/io/XInputStream.hpp>
@@ -26,21 +19,22 @@
#include <com/sun/star/xml/sax/XParser.hpp>
#include <com/sun/star/io/XSeekable.hpp>
#include <com/sun/star/uno/Reference.h>
-
-#include <ucbhelper/content.hxx>
-
-#include <xmloff/attrlist.hxx>
-
+#include <comphelper/processfactory.hxx>
+#include <comphelper/types.hxx>
+#include <cppuhelper/supportsservice.hxx>
+#include <iostream>
#include <libetonyek/libetonyek.h>
#include <libodfgen/libodfgen.hxx>
+#include <osl/diagnose.h>
+#include <rtl/tencinfo.h>
+#include <ucbhelper/content.hxx>
+#include <xmloff/attrlist.hxx>
#include "common/DirectoryStream.hxx"
#include "common/DocumentHandler.hxx"
#include "common/WPXSvStream.hxx"
#include "KeynoteImportFilter.hxx"
-#include <iostream>
-
using boost::shared_ptr;
using namespace ::com::sun::star::uno;
@@ -100,7 +94,6 @@ sal_Bool lcl_isPackage( const Any &rComponentData )
return false;
}
-
}
sal_Bool SAL_CALL KeynoteImportFilter::filter( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
@@ -329,7 +322,6 @@ throw( com::sun::star::uno::RuntimeException )
return sTypeName;
}
-
// XInitialization
void SAL_CALL KeynoteImportFilter::initialize( const Sequence< Any >& aArguments )
throw (Exception, RuntimeException)
@@ -351,6 +343,7 @@ throw (Exception, RuntimeException)
}
}
}
+
OUString KeynoteImportFilter_getImplementationName ()
throw (RuntimeException)
{
@@ -360,12 +353,7 @@ throw (RuntimeException)
#define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
#define SERVICE_NAME2 "com.sun.star.document.ExtendedTypeDetection"
-sal_Bool SAL_CALL KeynoteImportFilter_supportsService( const OUString &ServiceName )
-throw (RuntimeException)
-{
- SAL_INFO("writerperfect", "KeynoteImportFilter_supportsService");
- return ( ServiceName == SERVICE_NAME1 || ServiceName == SERVICE_NAME2 );
-}
+
Sequence< OUString > SAL_CALL KeynoteImportFilter_getSupportedServiceNames( )
throw (RuntimeException)
{
@@ -376,6 +364,7 @@ throw (RuntimeException)
pArray[1] = OUString ( SERVICE_NAME2 );
return aRet;
}
+
#undef SERVICE_NAME2
#undef SERVICE_NAME1
@@ -393,12 +382,14 @@ throw (RuntimeException)
SAL_INFO("writerperfect", "KeynoteImportFilter::getImplementationName");
return KeynoteImportFilter_getImplementationName();
}
+
sal_Bool SAL_CALL KeynoteImportFilter::supportsService( const OUString &rServiceName )
throw (RuntimeException)
{
SAL_INFO("writerperfect", "KeynoteImportFilter::supportsService");
- return KeynoteImportFilter_supportsService( rServiceName );
+ return cppu::supportsService(this, rServiceName);
}
+
Sequence< OUString > SAL_CALL KeynoteImportFilter::getSupportedServiceNames( )
throw (RuntimeException)
{