Kaydet (Commit) 32b8c5c4 authored tarafından Alexandre Vicenzi's avatar Alexandre Vicenzi Kaydeden (comit) Marcos Souza

fdo#54938 Convert basctl, mysqlc, sdext, svgio, writerp. to cppu::supportsSer.

Change-Id: I60128dbb5bf83f25eea847fe655d7126c9077414
Reviewed-on: https://gerrit.libreoffice.org/7756Tested-by: 's avatarLibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: 's avatarMarcos Souza <marcos.souza.org@gmail.com>
Tested-by: 's avatarMarcos Souza <marcos.souza.org@gmail.com>
üst 018500a7
...@@ -18,15 +18,15 @@ ...@@ -18,15 +18,15 @@
*/ */
#include "unomodel.hxx" #include <basdoc.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <iderdll.hxx>
#include <osl/mutex.hxx> #include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <sfx2/docfac.hxx> #include <sfx2/docfac.hxx>
#include <sfx2/objsh.hxx> #include <sfx2/objsh.hxx>
#include <vcl/svapp.hxx>
#include <iderdll.hxx> #include "unomodel.hxx"
#include <basdoc.hxx>
namespace basctl namespace basctl
{ {
...@@ -93,7 +93,7 @@ OUString SIDEModel::getImplementationName_Static() ...@@ -93,7 +93,7 @@ OUString SIDEModel::getImplementationName_Static()
sal_Bool SIDEModel::supportsService(const OUString& rServiceName) throw( uno::RuntimeException ) 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 ) uno::Sequence< OUString > SIDEModel::getSupportedServiceNames(void) throw( uno::RuntimeException )
{ {
......
...@@ -32,6 +32,8 @@ using namespace com::sun::star::lang; ...@@ -32,6 +32,8 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::beans; using namespace com::sun::star::beans;
using namespace com::sun::star::sdbc; using namespace com::sun::star::sdbc;
using namespace connectivity::mysqlc; using namespace connectivity::mysqlc;
#include <cppuhelper/supportsservice.hxx>
#include <stdio.h> #include <stdio.h>
#include <cppconn/exception.h> #include <cppconn/exception.h>
...@@ -39,7 +41,6 @@ using namespace connectivity::mysqlc; ...@@ -39,7 +41,6 @@ using namespace connectivity::mysqlc;
#include <mysql_driver.h> #include <mysql_driver.h>
#endif #endif
/* {{{ MysqlCDriver::MysqlCDriver() -I- */ /* {{{ MysqlCDriver::MysqlCDriver() -I- */
MysqlCDriver::MysqlCDriver(const Reference< XMultiServiceFactory >& _rxFactory) MysqlCDriver::MysqlCDriver(const Reference< XMultiServiceFactory >& _rxFactory)
: ODriver_BASE(m_aMutex) : ODriver_BASE(m_aMutex)
...@@ -54,7 +55,6 @@ MysqlCDriver::MysqlCDriver(const Reference< XMultiServiceFactory >& _rxFactory) ...@@ -54,7 +55,6 @@ MysqlCDriver::MysqlCDriver(const Reference< XMultiServiceFactory >& _rxFactory)
} }
/* }}} */ /* }}} */
/* {{{ MysqlCDriver::disposing() -I- */ /* {{{ MysqlCDriver::disposing() -I- */
void MysqlCDriver::disposing() void MysqlCDriver::disposing()
{ {
...@@ -75,7 +75,6 @@ void MysqlCDriver::disposing() ...@@ -75,7 +75,6 @@ void MysqlCDriver::disposing()
} }
/* }}} */ /* }}} */
// static ServiceInfo // static ServiceInfo
/* {{{ MysqlCDriver::getImplementationName_Static() -I- */ /* {{{ MysqlCDriver::getImplementationName_Static() -I- */
OUString MysqlCDriver::getImplementationName_Static() OUString MysqlCDriver::getImplementationName_Static()
...@@ -86,7 +85,6 @@ OUString MysqlCDriver::getImplementationName_Static() ...@@ -86,7 +85,6 @@ OUString MysqlCDriver::getImplementationName_Static()
} }
/* }}} */ /* }}} */
/* {{{ MysqlCDriver::getSupportedServiceNames_Static() -I- */ /* {{{ MysqlCDriver::getSupportedServiceNames_Static() -I- */
Sequence< OUString > MysqlCDriver::getSupportedServiceNames_Static() Sequence< OUString > MysqlCDriver::getSupportedServiceNames_Static()
throw(RuntimeException) throw(RuntimeException)
...@@ -110,22 +108,15 @@ OUString SAL_CALL MysqlCDriver::getImplementationName() ...@@ -110,22 +108,15 @@ OUString SAL_CALL MysqlCDriver::getImplementationName()
} }
/* }}} */ /* }}} */
/* {{{ MysqlCDriver::supportsService() -I- */ /* {{{ MysqlCDriver::supportsService() -I- */
sal_Bool SAL_CALL MysqlCDriver::supportsService(const OUString& _rServiceName) sal_Bool SAL_CALL MysqlCDriver::supportsService(const OUString& _rServiceName)
throw(RuntimeException) throw(RuntimeException)
{ {
OSL_TRACE("MysqlCDriver::supportsService"); OSL_TRACE("MysqlCDriver::supportsService");
Sequence< OUString > aSupported(getSupportedServiceNames()); return cppu::supportsService(this, _rServiceName);
const OUString* pSupported = aSupported.getConstArray();
const OUString* pEnd = pSupported + aSupported.getLength();
for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported){}
return (pSupported != pEnd);
} }
/* }}} */ /* }}} */
/* {{{ MysqlCDriver::getSupportedServiceNames() -I- */ /* {{{ MysqlCDriver::getSupportedServiceNames() -I- */
Sequence< OUString > SAL_CALL MysqlCDriver::getSupportedServiceNames() Sequence< OUString > SAL_CALL MysqlCDriver::getSupportedServiceNames()
throw(RuntimeException) throw(RuntimeException)
...@@ -135,7 +126,6 @@ Sequence< OUString > SAL_CALL MysqlCDriver::getSupportedServiceNames() ...@@ -135,7 +126,6 @@ Sequence< OUString > SAL_CALL MysqlCDriver::getSupportedServiceNames()
} }
/* }}} */ /* }}} */
extern "C" { static void SAL_CALL thisModule() {} } extern "C" { static void SAL_CALL thisModule() {} }
void MysqlCDriver::impl_initCppConn_lck_throw() void MysqlCDriver::impl_initCppConn_lck_throw()
...@@ -251,7 +241,6 @@ Reference< XConnection > SAL_CALL MysqlCDriver::connect(const OUString& url, con ...@@ -251,7 +241,6 @@ Reference< XConnection > SAL_CALL MysqlCDriver::connect(const OUString& url, con
} }
/* }}} */ /* }}} */
/* {{{ MysqlCDriver::acceptsURL() -I- */ /* {{{ MysqlCDriver::acceptsURL() -I- */
sal_Bool SAL_CALL MysqlCDriver::acceptsURL(const OUString& url) sal_Bool SAL_CALL MysqlCDriver::acceptsURL(const OUString& url)
throw(SQLException, RuntimeException) throw(SQLException, RuntimeException)
...@@ -261,7 +250,6 @@ sal_Bool SAL_CALL MysqlCDriver::acceptsURL(const OUString& url) ...@@ -261,7 +250,6 @@ sal_Bool SAL_CALL MysqlCDriver::acceptsURL(const OUString& url)
} }
/* }}} */ /* }}} */
/* {{{ MysqlCDriver::getPropertyInfo() -I- */ /* {{{ MysqlCDriver::getPropertyInfo() -I- */
Sequence< DriverPropertyInfo > SAL_CALL MysqlCDriver::getPropertyInfo(const OUString& url, const Sequence< PropertyValue >& /* info */) Sequence< DriverPropertyInfo > SAL_CALL MysqlCDriver::getPropertyInfo(const OUString& url, const Sequence< PropertyValue >& /* info */)
throw(SQLException, RuntimeException) throw(SQLException, RuntimeException)
...@@ -291,7 +279,6 @@ Sequence< DriverPropertyInfo > SAL_CALL MysqlCDriver::getPropertyInfo(const OUSt ...@@ -291,7 +279,6 @@ Sequence< DriverPropertyInfo > SAL_CALL MysqlCDriver::getPropertyInfo(const OUSt
} }
/* }}} */ /* }}} */
/* {{{ MysqlCDriver::getMajorVersion() -I- */ /* {{{ MysqlCDriver::getMajorVersion() -I- */
sal_Int32 SAL_CALL MysqlCDriver::getMajorVersion() sal_Int32 SAL_CALL MysqlCDriver::getMajorVersion()
throw(RuntimeException) throw(RuntimeException)
...@@ -301,7 +288,6 @@ sal_Int32 SAL_CALL MysqlCDriver::getMajorVersion() ...@@ -301,7 +288,6 @@ sal_Int32 SAL_CALL MysqlCDriver::getMajorVersion()
} }
/* }}} */ /* }}} */
/* {{{ MysqlCDriver::getMinorVersion() -I- */ /* {{{ MysqlCDriver::getMinorVersion() -I- */
sal_Int32 SAL_CALL MysqlCDriver::getMinorVersion() sal_Int32 SAL_CALL MysqlCDriver::getMinorVersion()
throw(RuntimeException) throw(RuntimeException)
...@@ -311,7 +297,6 @@ sal_Int32 SAL_CALL MysqlCDriver::getMinorVersion() ...@@ -311,7 +297,6 @@ sal_Int32 SAL_CALL MysqlCDriver::getMinorVersion()
} }
/* }}} */ /* }}} */
namespace connectivity namespace connectivity
{ {
namespace mysqlc namespace mysqlc
...@@ -359,8 +344,6 @@ void release(oslInterlockedCount& _refCount, ...@@ -359,8 +344,6 @@ void release(oslInterlockedCount& _refCount,
} }
/* }}} */ /* }}} */
/* {{{ connectivity::mysqlc::checkDisposed() -I- */ /* {{{ connectivity::mysqlc::checkDisposed() -I- */
void checkDisposed(sal_Bool _bThrow) void checkDisposed(sal_Bool _bThrow)
throw (DisposedException) throw (DisposedException)
......
...@@ -20,12 +20,13 @@ ...@@ -20,12 +20,13 @@
#ifndef _CONNECTIVITY_OSUBCOMPONENT_HXX_ #ifndef _CONNECTIVITY_OSUBCOMPONENT_HXX_
#define _CONNECTIVITY_OSUBCOMPONENT_HXX_ #define _CONNECTIVITY_OSUBCOMPONENT_HXX_
#include <cppuhelper/weak.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/lang/DisposedException.hpp>
#include <cppuhelper/interfacecontainer.h>
#include <cppuhelper/propshlp.hxx> #include <cppuhelper/propshlp.hxx>
#include <osl/mutex.hxx> #include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/weak.hxx>
#include <osl/diagnose.h> #include <osl/diagnose.h>
#include <osl/mutex.hxx>
namespace cppu { namespace cppu {
class IPropertyArrayHelper; class IPropertyArrayHelper;
...@@ -44,9 +45,9 @@ namespace com ...@@ -44,9 +45,9 @@ namespace com
} }
} }
} }
namespace connectivity namespace connectivity
{ {
namespace mysqlc namespace mysqlc
{ {
void release(oslInterlockedCount& _refCount, void release(oslInterlockedCount& _refCount,
...@@ -55,9 +56,7 @@ namespace connectivity ...@@ -55,9 +56,7 @@ namespace connectivity
::com::sun::star::lang::XComponent* _pObject); ::com::sun::star::lang::XComponent* _pObject);
void checkDisposed(sal_Bool _bThrow) throw (::com::sun::star::lang::DisposedException); void checkDisposed(sal_Bool _bThrow) throw (::com::sun::star::lang::DisposedException);
//************************************************************
// OSubComponent
//************************************************************
template <class SELF, class WEAK> class OSubComponent template <class SELF, class WEAK> class OSubComponent
{ {
protected: protected:
...@@ -91,7 +90,6 @@ namespace connectivity ...@@ -91,7 +90,6 @@ namespace connectivity
} }
}; };
template <class TYPE> template <class TYPE>
class OPropertyArrayUsageHelper class OPropertyArrayUsageHelper
{ {
...@@ -141,7 +139,6 @@ namespace connectivity ...@@ -141,7 +139,6 @@ namespace connectivity
template<class TYPE> template<class TYPE>
::osl::Mutex OPropertyArrayUsageHelper< TYPE >::s_aMutex; ::osl::Mutex OPropertyArrayUsageHelper< TYPE >::s_aMutex;
//------------------------------------------------------------------
template <class TYPE> template <class TYPE>
OPropertyArrayUsageHelper<TYPE>::OPropertyArrayUsageHelper() OPropertyArrayUsageHelper<TYPE>::OPropertyArrayUsageHelper()
{ {
...@@ -149,7 +146,6 @@ namespace connectivity ...@@ -149,7 +146,6 @@ namespace connectivity
++s_nRefCount; ++s_nRefCount;
} }
//------------------------------------------------------------------
template <class TYPE> template <class TYPE>
::cppu::IPropertyArrayHelper* OPropertyArrayUsageHelper<TYPE>::getArrayHelper() ::cppu::IPropertyArrayHelper* OPropertyArrayUsageHelper<TYPE>::getArrayHelper()
{ {
...@@ -164,7 +160,6 @@ namespace connectivity ...@@ -164,7 +160,6 @@ namespace connectivity
return s_pProps; return s_pProps;
} }
class OBase_Mutex class OBase_Mutex
{ {
public: public:
...@@ -180,7 +175,7 @@ namespace connectivity ...@@ -180,7 +175,7 @@ namespace connectivity
*_pDest = *_pSource; *_pDest = *_pSource;
} }
} }
//-------------------------------------------------------------------------
/// concat two sequences /// concat two sequences
template <class T> 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) ::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 ...@@ -199,34 +194,26 @@ namespace connectivity
return aReturn; return aReturn;
} }
#define DECLARE_SERVICE_INFO() \
#define DECLARE_SERVICE_INFO() \ virtual OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException); \
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 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) \ 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) \ 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 > SAL_CALL classname::getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException) \
{ \ { \
::com::sun::star::uno::Sequence< OUString > aSupported(1); \ ::com::sun::star::uno::Sequence< OUString > aSupported(1); \
aSupported[0] = OUString::createFromAscii(serviceasciiname); \ aSupported[0] = OUString::createFromAscii(serviceasciiname); \
return aSupported; \ return aSupported; \
} \ } \
sal_Bool SAL_CALL classname::supportsService(const OUString& _rServiceName) throw(::com::sun::star::uno::RuntimeException) \ sal_Bool SAL_CALL classname::supportsService(const OUString& _rServiceName) throw(::com::sun::star::uno::RuntimeException) \
{ \ { \
Sequence< OUString > aSupported(getSupportedServiceNames()); \ return cppu::supportsService(this, ServiceName); \
const OUString* pSupported = aSupported.getConstArray(); \ } \
const OUString* pEnd = pSupported + aSupported.getLength(); \
for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported) \
; \
return pSupported != pEnd; \
} \
} }
} }
#endif // _CONNECTIVITY_OSUBCOMPONENT_HXX_ #endif // _CONNECTIVITY_OSUBCOMPONENT_HXX_
......
...@@ -29,28 +29,19 @@ using namespace ::com::sun::star::frame; ...@@ -29,28 +29,19 @@ using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::beans; using namespace ::com::sun::star::beans;
#define SERVICE_NAME "com.sun.star.comp.PresentationMinimizer" #define SERVICE_NAME "com.sun.star.comp.PresentationMinimizer"
#include <cppuhelper/supportsservice.hxx>
#include <rtl/ustrbuf.hxx> #include <rtl/ustrbuf.hxx>
// ----------------------
// - PPPOptimizerDialog -
// ----------------------
PPPOptimizerDialog::PPPOptimizerDialog( const Reference< XComponentContext > &xContext ) : PPPOptimizerDialog::PPPOptimizerDialog( const Reference< XComponentContext > &xContext ) :
mxContext( xContext ), mxContext( xContext ),
mpOptimizerDialog( NULL ) mpOptimizerDialog( NULL )
{ {
} }
// -----------------------------------------------------------------------------
PPPOptimizerDialog::~PPPOptimizerDialog() PPPOptimizerDialog::~PPPOptimizerDialog()
{ {
} }
// -----------------------------------------------------------------------------
// XInitialization
// -----------------------------------------------------------------------------
void SAL_CALL PPPOptimizerDialog::initialize( const Sequence< Any >& aArguments ) void SAL_CALL PPPOptimizerDialog::initialize( const Sequence< Any >& aArguments )
throw ( Exception, RuntimeException ) throw ( Exception, RuntimeException )
{ {
...@@ -62,10 +53,6 @@ void SAL_CALL PPPOptimizerDialog::initialize( const Sequence< Any >& aArguments ...@@ -62,10 +53,6 @@ void SAL_CALL PPPOptimizerDialog::initialize( const Sequence< Any >& aArguments
mxController = mxFrame->getController(); mxController = mxFrame->getController();
} }
// -----------------------------------------------------------------------------
// XServiceInfo
// -----------------------------------------------------------------------------
OUString SAL_CALL PPPOptimizerDialog::getImplementationName() OUString SAL_CALL PPPOptimizerDialog::getImplementationName()
throw (RuntimeException) throw (RuntimeException)
{ {
...@@ -75,7 +62,7 @@ OUString SAL_CALL PPPOptimizerDialog::getImplementationName() ...@@ -75,7 +62,7 @@ OUString SAL_CALL PPPOptimizerDialog::getImplementationName()
sal_Bool SAL_CALL PPPOptimizerDialog::supportsService( const OUString& ServiceName ) sal_Bool SAL_CALL PPPOptimizerDialog::supportsService( const OUString& ServiceName )
throw ( RuntimeException ) throw ( RuntimeException )
{ {
return ServiceName == SERVICE_NAME; return cppu::supportsService(this, ServiceName);
} }
Sequence< OUString > SAL_CALL PPPOptimizerDialog::getSupportedServiceNames() Sequence< OUString > SAL_CALL PPPOptimizerDialog::getSupportedServiceNames()
...@@ -84,10 +71,6 @@ Sequence< OUString > SAL_CALL PPPOptimizerDialog::getSupportedServiceNames() ...@@ -84,10 +71,6 @@ Sequence< OUString > SAL_CALL PPPOptimizerDialog::getSupportedServiceNames()
return PPPOptimizerDialog_getSupportedServiceNames(); return PPPOptimizerDialog_getSupportedServiceNames();
} }
// -----------------------------------------------------------------------------
// XDispatchProvider
// -----------------------------------------------------------------------------
Reference< com::sun::star::frame::XDispatch > SAL_CALL PPPOptimizerDialog::queryDispatch( Reference< com::sun::star::frame::XDispatch > SAL_CALL PPPOptimizerDialog::queryDispatch(
const URL& aURL, const OUString& /* aTargetFrameName */, sal_Int32 /* nSearchFlags */ ) throw( RuntimeException ) 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 ...@@ -98,8 +81,6 @@ Reference< com::sun::star::frame::XDispatch > SAL_CALL PPPOptimizerDialog::query
return xRet; return xRet;
} }
//------------------------------------------------------------------------------
Sequence< Reference< com::sun::star::frame::XDispatch > > SAL_CALL PPPOptimizerDialog::queryDispatches( Sequence< Reference< com::sun::star::frame::XDispatch > > SAL_CALL PPPOptimizerDialog::queryDispatches(
const Sequence< com::sun::star::frame::DispatchDescriptor >& aDescripts ) throw( RuntimeException ) const Sequence< com::sun::star::frame::DispatchDescriptor >& aDescripts ) throw( RuntimeException )
{ {
...@@ -113,10 +94,6 @@ Sequence< Reference< com::sun::star::frame::XDispatch > > SAL_CALL PPPOptimizerD ...@@ -113,10 +94,6 @@ Sequence< Reference< com::sun::star::frame::XDispatch > > SAL_CALL PPPOptimizerD
return aReturn; return aReturn;
} }
// -----------------------------------------------------------------------------
// XDispatch
// -----------------------------------------------------------------------------
void SAL_CALL PPPOptimizerDialog::dispatch( const URL& rURL, void SAL_CALL PPPOptimizerDialog::dispatch( const URL& rURL,
const Sequence< PropertyValue >& rArguments ) const Sequence< PropertyValue >& rArguments )
throw( RuntimeException ) throw( RuntimeException )
...@@ -165,7 +142,6 @@ void SAL_CALL PPPOptimizerDialog::dispatch( const URL& rURL, ...@@ -165,7 +142,6 @@ void SAL_CALL PPPOptimizerDialog::dispatch( const URL& rURL,
} }
} }
//===============================================
void SAL_CALL PPPOptimizerDialog::addStatusListener( const Reference< XStatusListener >&, const URL& ) void SAL_CALL PPPOptimizerDialog::addStatusListener( const Reference< XStatusListener >&, const URL& )
throw( RuntimeException ) throw( RuntimeException )
{ {
...@@ -173,7 +149,6 @@ void SAL_CALL PPPOptimizerDialog::addStatusListener( const Reference< XStatusLis ...@@ -173,7 +149,6 @@ void SAL_CALL PPPOptimizerDialog::addStatusListener( const Reference< XStatusLis
// OSL_FAIL( "PPPOptimizerDialog::addStatusListener()\nNot implemented yet!" ); // OSL_FAIL( "PPPOptimizerDialog::addStatusListener()\nNot implemented yet!" );
} }
//===============================================
void SAL_CALL PPPOptimizerDialog::removeStatusListener( const Reference< XStatusListener >&, const URL& ) void SAL_CALL PPPOptimizerDialog::removeStatusListener( const Reference< XStatusListener >&, const URL& )
throw( RuntimeException ) throw( RuntimeException )
{ {
...@@ -181,8 +156,6 @@ void SAL_CALL PPPOptimizerDialog::removeStatusListener( const Reference< XStatus ...@@ -181,8 +156,6 @@ void SAL_CALL PPPOptimizerDialog::removeStatusListener( const Reference< XStatus
// OSL_FAIL( "PPPOptimizerDialog::removeStatusListener()\nNot implemented yet!" ); // OSL_FAIL( "PPPOptimizerDialog::removeStatusListener()\nNot implemented yet!" );
} }
// -----------------------------------------------------------------------------
OUString PPPOptimizerDialog_getImplementationName() OUString PPPOptimizerDialog_getImplementationName()
{ {
return OUString( "com.sun.star.comp.PresentationMinimizerImp" ); return OUString( "com.sun.star.comp.PresentationMinimizerImp" );
...@@ -202,6 +175,4 @@ Reference< XInterface > PPPOptimizerDialog_createInstance( const Reference< XCom ...@@ -202,6 +175,4 @@ Reference< XInterface > PPPOptimizerDialog_createInstance( const Reference< XCom
return (cppu::OWeakObject*) new PPPOptimizerDialog( rSMgr ); return (cppu::OWeakObject*) new PPPOptimizerDialog( rSMgr );
} }
// -----------------------------------------------------------------------------
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -23,20 +23,17 @@ ...@@ -23,20 +23,17 @@
#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/XInitialization.hpp>
#include <cppuhelper/implbase2.hxx> #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/XParser.hpp>
#include <com/sun/star/xml/sax/Parser.hpp> #include <com/sun/star/xml/sax/Parser.hpp>
#include <com/sun/star/xml/sax/InputSource.hpp> #include <com/sun/star/xml/sax/InputSource.hpp>
#include <drawinglayer/geometry/viewinformation2d.hxx> #include <drawinglayer/geometry/viewinformation2d.hxx>
#include <svgio/svgreader/svgdocumenthandler.hxx>
#include "xsvgparser.hxx" #include "xsvgparser.hxx"
//////////////////////////////////////////////////////////////////////////////
using namespace ::com::sun::star; using namespace ::com::sun::star;
//////////////////////////////////////////////////////////////////////////////
namespace svgio namespace svgio
{ {
namespace svgreader namespace svgreader
...@@ -68,9 +65,7 @@ namespace svgio ...@@ -68,9 +65,7 @@ namespace svgio
} // end of namespace svgreader } // end of namespace svgreader
} // end of namespace svgio } // end of namespace svgio
//////////////////////////////////////////////////////////////////////////////
// uno functions // uno functions
namespace svgio namespace svgio
{ {
namespace svgreader namespace svgreader
...@@ -95,8 +90,6 @@ namespace svgio ...@@ -95,8 +90,6 @@ namespace svgio
} // end of namespace svgreader } // end of namespace svgreader
} // end of namespace svgio } // end of namespace svgio
//////////////////////////////////////////////////////////////////////////////
namespace svgio namespace svgio
{ {
namespace svgreader namespace svgreader
...@@ -185,17 +178,7 @@ namespace svgio ...@@ -185,17 +178,7 @@ namespace svgio
sal_Bool SAL_CALL XSvgParser::supportsService(const OUString& rServiceName) throw(uno::RuntimeException) sal_Bool SAL_CALL XSvgParser::supportsService(const OUString& rServiceName) throw(uno::RuntimeException)
{ {
const uno::Sequence< OUString > aServices(XSvgParser_getSupportedServiceNames()); return cppu::supportsService(this, rServiceName);
for(sal_Int32 nService(0); nService < aServices.getLength(); nService++)
{
if(rServiceName == aServices[nService])
{
return sal_True;
}
}
return sal_False;
} }
uno::Sequence< OUString > SAL_CALL XSvgParser::getSupportedServiceNames() throw(uno::RuntimeException) uno::Sequence< OUString > SAL_CALL XSvgParser::getSupportedServiceNames() throw(uno::RuntimeException)
...@@ -206,7 +189,4 @@ namespace svgio ...@@ -206,7 +189,4 @@ namespace svgio
} // end of namespace svgreader } // end of namespace svgreader
} // end of namespace svgio } // end of namespace svgio
//////////////////////////////////////////////////////////////////////////////
// eof
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -8,13 +8,6 @@ ...@@ -8,13 +8,6 @@
*/ */
#include <boost/shared_ptr.hpp> #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/beans/NamedValue.hpp>
#include <com/sun/star/container/XChild.hpp> #include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/io/XInputStream.hpp>
...@@ -26,21 +19,22 @@ ...@@ -26,21 +19,22 @@
#include <com/sun/star/xml/sax/XParser.hpp> #include <com/sun/star/xml/sax/XParser.hpp>
#include <com/sun/star/io/XSeekable.hpp> #include <com/sun/star/io/XSeekable.hpp>
#include <com/sun/star/uno/Reference.h> #include <com/sun/star/uno/Reference.h>
#include <comphelper/processfactory.hxx>
#include <ucbhelper/content.hxx> #include <comphelper/types.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <xmloff/attrlist.hxx> #include <iostream>
#include <libetonyek/libetonyek.h> #include <libetonyek/libetonyek.h>
#include <libodfgen/libodfgen.hxx> #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/DirectoryStream.hxx"
#include "common/DocumentHandler.hxx" #include "common/DocumentHandler.hxx"
#include "common/WPXSvStream.hxx" #include "common/WPXSvStream.hxx"
#include "KeynoteImportFilter.hxx" #include "KeynoteImportFilter.hxx"
#include <iostream>
using boost::shared_ptr; using boost::shared_ptr;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
...@@ -100,7 +94,6 @@ sal_Bool lcl_isPackage( const Any &rComponentData ) ...@@ -100,7 +94,6 @@ sal_Bool lcl_isPackage( const Any &rComponentData )
return false; return false;
} }
} }
sal_Bool SAL_CALL KeynoteImportFilter::filter( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor ) sal_Bool SAL_CALL KeynoteImportFilter::filter( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
...@@ -329,7 +322,6 @@ throw( com::sun::star::uno::RuntimeException ) ...@@ -329,7 +322,6 @@ throw( com::sun::star::uno::RuntimeException )
return sTypeName; return sTypeName;
} }
// XInitialization // XInitialization
void SAL_CALL KeynoteImportFilter::initialize( const Sequence< Any >& aArguments ) void SAL_CALL KeynoteImportFilter::initialize( const Sequence< Any >& aArguments )
throw (Exception, RuntimeException) throw (Exception, RuntimeException)
...@@ -351,6 +343,7 @@ throw (Exception, RuntimeException) ...@@ -351,6 +343,7 @@ throw (Exception, RuntimeException)
} }
} }
} }
OUString KeynoteImportFilter_getImplementationName () OUString KeynoteImportFilter_getImplementationName ()
throw (RuntimeException) throw (RuntimeException)
{ {
...@@ -360,12 +353,7 @@ throw (RuntimeException) ...@@ -360,12 +353,7 @@ throw (RuntimeException)
#define SERVICE_NAME1 "com.sun.star.document.ImportFilter" #define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
#define SERVICE_NAME2 "com.sun.star.document.ExtendedTypeDetection" #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( ) Sequence< OUString > SAL_CALL KeynoteImportFilter_getSupportedServiceNames( )
throw (RuntimeException) throw (RuntimeException)
{ {
...@@ -376,6 +364,7 @@ throw (RuntimeException) ...@@ -376,6 +364,7 @@ throw (RuntimeException)
pArray[1] = OUString ( SERVICE_NAME2 ); pArray[1] = OUString ( SERVICE_NAME2 );
return aRet; return aRet;
} }
#undef SERVICE_NAME2 #undef SERVICE_NAME2
#undef SERVICE_NAME1 #undef SERVICE_NAME1
...@@ -393,12 +382,14 @@ throw (RuntimeException) ...@@ -393,12 +382,14 @@ throw (RuntimeException)
SAL_INFO("writerperfect", "KeynoteImportFilter::getImplementationName"); SAL_INFO("writerperfect", "KeynoteImportFilter::getImplementationName");
return KeynoteImportFilter_getImplementationName(); return KeynoteImportFilter_getImplementationName();
} }
sal_Bool SAL_CALL KeynoteImportFilter::supportsService( const OUString &rServiceName ) sal_Bool SAL_CALL KeynoteImportFilter::supportsService( const OUString &rServiceName )
throw (RuntimeException) throw (RuntimeException)
{ {
SAL_INFO("writerperfect", "KeynoteImportFilter::supportsService"); SAL_INFO("writerperfect", "KeynoteImportFilter::supportsService");
return KeynoteImportFilter_supportsService( rServiceName ); return cppu::supportsService(this, rServiceName);
} }
Sequence< OUString > SAL_CALL KeynoteImportFilter::getSupportedServiceNames( ) Sequence< OUString > SAL_CALL KeynoteImportFilter::getSupportedServiceNames( )
throw (RuntimeException) throw (RuntimeException)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment