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

fdo#54938 Convert to cppu::supportsService

Change-Id: I512c525029ebd63d261560d27e9f38bbe94f7e10
Reviewed-on: https://gerrit.libreoffice.org/7649Tested-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 326bec33
...@@ -31,16 +31,16 @@ ...@@ -31,16 +31,16 @@
#include <com/sun/star/drawing/XShape.hpp> #include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/animations/AnimationNodeType.hpp> #include <com/sun/star/animations/AnimationNodeType.hpp>
#include <com/sun/star/animations/XAnimate.hpp> #include <com/sun/star/animations/XAnimate.hpp>
#include <animations/animationnodehelper.hxx>
#include <boost/unordered_map.hpp>
#include <cppuhelper/compbase3.hxx> #include <cppuhelper/compbase3.hxx>
#include <cppuhelper/factory.hxx> #include <cppuhelper/factory.hxx>
#include <cppuhelper/implementationentry.hxx> #include <cppuhelper/implementationentry.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <comphelper/broadcasthelper.hxx> #include <comphelper/broadcasthelper.hxx>
#include <comphelper/sequence.hxx> #include <comphelper/sequence.hxx>
#include <animations/animationnodehelper.hxx>
#include <vector> #include <vector>
#include <boost/unordered_map.hpp>
using namespace ::com::sun::star; using namespace ::com::sun::star;
...@@ -88,8 +88,6 @@ namespace animcore ...@@ -88,8 +88,6 @@ namespace animcore
TargetPropertiesCreator( const uno::Reference< uno::XComponentContext >& rxContext ); TargetPropertiesCreator( const uno::Reference< uno::XComponentContext >& rxContext );
}; };
// --------------------------------------------------------------------
uno::Reference< uno::XInterface > SAL_CALL createInstance_TargetPropertiesCreator( const uno::Reference< uno::XComponentContext > & rSMgr ) throw (uno::Exception) uno::Reference< uno::XInterface > SAL_CALL createInstance_TargetPropertiesCreator( const uno::Reference< uno::XComponentContext > & rSMgr ) throw (uno::Exception)
{ {
return TargetPropertiesCreator::createInstance( rSMgr ); return TargetPropertiesCreator::createInstance( rSMgr );
...@@ -107,8 +105,6 @@ namespace animcore ...@@ -107,8 +105,6 @@ namespace animcore
return aRet; return aRet;
} }
// --------------------------------------------------------------------
namespace namespace
{ {
// Vector containing all properties for a given shape // Vector containing all properties for a given shape
...@@ -201,7 +197,6 @@ namespace animcore ...@@ -201,7 +197,6 @@ namespace animcore
{ {
// extract target shape from iterate node // extract target shape from iterate node
// (will override the target for all children) // (will override the target for all children)
// --------------------------------------------------
uno::Reference< animations::XIterateContainer > xIterNode( xNode, uno::Reference< animations::XIterateContainer > xIterNode( xNode,
uno::UNO_QUERY ); uno::UNO_QUERY );
...@@ -395,8 +390,6 @@ namespace animcore ...@@ -395,8 +390,6 @@ namespace animcore
}; };
} }
// --------------------------------------------------------------------
TargetPropertiesCreator::TargetPropertiesCreator( const uno::Reference< uno::XComponentContext >& ) : TargetPropertiesCreator::TargetPropertiesCreator( const uno::Reference< uno::XComponentContext >& ) :
TargetPropertiesCreator_Base( m_aMutex ) TargetPropertiesCreator_Base( m_aMutex )
{ {
...@@ -433,10 +426,7 @@ namespace animcore ...@@ -433,10 +426,7 @@ namespace animcore
// it actually does right now, for the slideshow implementation). // it actually does right now, for the slideshow implementation).
aFunctor( xRootNode ); aFunctor( xRootNode );
// output to result sequence // output to result sequence
// ----------------------------------------------------------------------
uno::Sequence< animations::TargetProperties > aRes( aShapeHash.size() ); uno::Sequence< animations::TargetProperties > aRes( aShapeHash.size() );
::std::size_t nCurrIndex(0); ::std::size_t nCurrIndex(0);
...@@ -474,7 +464,7 @@ namespace animcore ...@@ -474,7 +464,7 @@ namespace animcore
sal_Bool SAL_CALL TargetPropertiesCreator::supportsService( const OUString& ServiceName ) throw( uno::RuntimeException ) sal_Bool SAL_CALL TargetPropertiesCreator::supportsService( const OUString& ServiceName ) throw( uno::RuntimeException )
{ {
return ServiceName.equalsIgnoreAsciiCase(SERVICE_NAME); return cppu::supportsService(this, ServiceName);
} }
uno::Sequence< OUString > SAL_CALL TargetPropertiesCreator::getSupportedServiceNames() throw( uno::RuntimeException ) uno::Sequence< OUString > SAL_CALL TargetPropertiesCreator::getSupportedServiceNames() throw( uno::RuntimeException )
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <basegfx/polygon/b2dpolypolygontools.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/tools/unopolypolygon.hxx> #include <basegfx/tools/unopolypolygon.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <cppuhelper/supportsservice.hxx>
using namespace ::com::sun::star; using namespace ::com::sun::star;
...@@ -443,7 +444,7 @@ namespace unotools ...@@ -443,7 +444,7 @@ namespace unotools
sal_Bool SAL_CALL UnoPolyPolygon::supportsService( const OUString& ServiceName ) throw( uno::RuntimeException ) sal_Bool SAL_CALL UnoPolyPolygon::supportsService( const OUString& ServiceName ) throw( uno::RuntimeException )
{ {
return ServiceName == SERVICE_NAME; return cppu::supportsService(this, ServiceName);
} }
uno::Sequence< OUString > SAL_CALL UnoPolyPolygon::getSupportedServiceNames() throw( uno::RuntimeException ) uno::Sequence< OUString > SAL_CALL UnoPolyPolygon::getSupportedServiceNames() throw( uno::RuntimeException )
......
...@@ -954,8 +954,7 @@ OUString OFactoryProxyHelper::getImplementationName() ...@@ -954,8 +954,7 @@ OUString OFactoryProxyHelper::getImplementationName()
sal_Bool OFactoryProxyHelper::supportsService(const OUString& ServiceName) sal_Bool OFactoryProxyHelper::supportsService(const OUString& ServiceName)
throw(::com::sun::star::uno::RuntimeException) throw(::com::sun::star::uno::RuntimeException)
{ {
Reference<XServiceInfo > xInfo( xFactory, UNO_QUERY ); return cppu::supportsService(this, ServiceName);
return xInfo.is() && xInfo->supportsService( ServiceName );
} }
// XServiceInfo // XServiceInfo
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
using namespace ::com::sun::star; using namespace ::com::sun::star;
//-------------------------------------------------------------------------
uno::Sequence< OUString > SAL_CALL OOoEmbeddedObjectFactory::impl_staticGetSupportedServiceNames() uno::Sequence< OUString > SAL_CALL OOoEmbeddedObjectFactory::impl_staticGetSupportedServiceNames()
{ {
uno::Sequence< OUString > aRet(2); uno::Sequence< OUString > aRet(2);
...@@ -44,20 +43,17 @@ uno::Sequence< OUString > SAL_CALL OOoEmbeddedObjectFactory::impl_staticGetSuppo ...@@ -44,20 +43,17 @@ uno::Sequence< OUString > SAL_CALL OOoEmbeddedObjectFactory::impl_staticGetSuppo
return aRet; return aRet;
} }
//-------------------------------------------------------------------------
OUString SAL_CALL OOoEmbeddedObjectFactory::impl_staticGetImplementationName() OUString SAL_CALL OOoEmbeddedObjectFactory::impl_staticGetImplementationName()
{ {
return OUString("com.sun.star.comp.embed.OOoEmbeddedObjectFactory"); return OUString("com.sun.star.comp.embed.OOoEmbeddedObjectFactory");
} }
//-------------------------------------------------------------------------
uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::impl_staticCreateSelfInstance( uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::impl_staticCreateSelfInstance(
const uno::Reference< lang::XMultiServiceFactory >& xServiceManager ) const uno::Reference< lang::XMultiServiceFactory >& xServiceManager )
{ {
return uno::Reference< uno::XInterface >( *new OOoEmbeddedObjectFactory( comphelper::getComponentContext(xServiceManager) ) ); return uno::Reference< uno::XInterface >( *new OOoEmbeddedObjectFactory( comphelper::getComponentContext(xServiceManager) ) );
} }
//-------------------------------------------------------------------------
uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInstanceInitFromEntry( uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInstanceInitFromEntry(
const uno::Reference< embed::XStorage >& xStorage, const uno::Reference< embed::XStorage >& xStorage,
const OUString& sEntName, const OUString& sEntName,
...@@ -149,7 +145,6 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta ...@@ -149,7 +145,6 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta
return xResult; return xResult;
} }
//-------------------------------------------------------------------------
uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInstanceInitFromMediaDescriptor( uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInstanceInitFromMediaDescriptor(
const uno::Reference< embed::XStorage >& xStorage, const uno::Reference< embed::XStorage >& xStorage,
const OUString& sEntName, const OUString& sEntName,
...@@ -213,7 +208,6 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta ...@@ -213,7 +208,6 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta
return xResult; return xResult;
} }
//-------------------------------------------------------------------------
uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInstanceInitNew( uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInstanceInitNew(
const uno::Sequence< sal_Int8 >& aClassID, const uno::Sequence< sal_Int8 >& aClassID,
const OUString& /*aClassName*/, const OUString& /*aClassName*/,
...@@ -264,7 +258,6 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta ...@@ -264,7 +258,6 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta
return xResult; return xResult;
} }
//-------------------------------------------------------------------------
uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInstanceUserInit( uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInstanceUserInit(
const uno::Sequence< sal_Int8 >& aClassID, const uno::Sequence< sal_Int8 >& aClassID,
const OUString& /*aClassName*/, const OUString& /*aClassName*/,
...@@ -326,8 +319,6 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta ...@@ -326,8 +319,6 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta
return xResult; return xResult;
} }
//-------------------------------------------------------------------------
uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInstanceLink( uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInstanceLink(
const uno::Reference< embed::XStorage >& /*xStorage*/, const uno::Reference< embed::XStorage >& /*xStorage*/,
const OUString& /*sEntName*/, const OUString& /*sEntName*/,
...@@ -381,7 +372,6 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta ...@@ -381,7 +372,6 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta
return xResult; return xResult;
} }
//-------------------------------------------------------------------------
uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInstanceLinkUserInit( uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInstanceLinkUserInit(
const uno::Sequence< sal_Int8 >& aClassID, const uno::Sequence< sal_Int8 >& aClassID,
const OUString& /*aClassName*/, const OUString& /*aClassName*/,
...@@ -447,7 +437,6 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta ...@@ -447,7 +437,6 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta
return xResult; return xResult;
} }
//-------------------------------------------------------------------------
OUString SAL_CALL OOoEmbeddedObjectFactory::getImplementationName() OUString SAL_CALL OOoEmbeddedObjectFactory::getImplementationName()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
...@@ -460,14 +449,12 @@ sal_Bool SAL_CALL OOoEmbeddedObjectFactory::supportsService( const OUString& Ser ...@@ -460,14 +449,12 @@ sal_Bool SAL_CALL OOoEmbeddedObjectFactory::supportsService( const OUString& Ser
return cppu::supportsService(this, ServiceName); return cppu::supportsService(this, ServiceName);
} }
//-------------------------------------------------------------------------
uno::Sequence< OUString > SAL_CALL OOoEmbeddedObjectFactory::getSupportedServiceNames() uno::Sequence< OUString > SAL_CALL OOoEmbeddedObjectFactory::getSupportedServiceNames()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
return impl_staticGetSupportedServiceNames(); return impl_staticGetSupportedServiceNames();
} }
//-------------------------------------------------------------------------
uno::Sequence< OUString > SAL_CALL OOoSpecialEmbeddedObjectFactory::impl_staticGetSupportedServiceNames() uno::Sequence< OUString > SAL_CALL OOoSpecialEmbeddedObjectFactory::impl_staticGetSupportedServiceNames()
{ {
uno::Sequence< OUString > aRet(2); uno::Sequence< OUString > aRet(2);
...@@ -476,20 +463,17 @@ uno::Sequence< OUString > SAL_CALL OOoSpecialEmbeddedObjectFactory::impl_staticG ...@@ -476,20 +463,17 @@ uno::Sequence< OUString > SAL_CALL OOoSpecialEmbeddedObjectFactory::impl_staticG
return aRet; return aRet;
} }
//-------------------------------------------------------------------------
OUString SAL_CALL OOoSpecialEmbeddedObjectFactory::impl_staticGetImplementationName() OUString SAL_CALL OOoSpecialEmbeddedObjectFactory::impl_staticGetImplementationName()
{ {
return OUString("com.sun.star.comp.embed.OOoSpecialEmbeddedObjectFactory"); return OUString("com.sun.star.comp.embed.OOoSpecialEmbeddedObjectFactory");
} }
//-------------------------------------------------------------------------
uno::Reference< uno::XInterface > SAL_CALL OOoSpecialEmbeddedObjectFactory::impl_staticCreateSelfInstance( uno::Reference< uno::XInterface > SAL_CALL OOoSpecialEmbeddedObjectFactory::impl_staticCreateSelfInstance(
const uno::Reference< lang::XMultiServiceFactory >& xServiceManager ) const uno::Reference< lang::XMultiServiceFactory >& xServiceManager )
{ {
return uno::Reference< uno::XInterface >( *new OOoSpecialEmbeddedObjectFactory( comphelper::getComponentContext(xServiceManager) ) ); return uno::Reference< uno::XInterface >( *new OOoSpecialEmbeddedObjectFactory( comphelper::getComponentContext(xServiceManager) ) );
} }
//-------------------------------------------------------------------------
uno::Reference< uno::XInterface > SAL_CALL OOoSpecialEmbeddedObjectFactory::createInstanceUserInit( uno::Reference< uno::XInterface > SAL_CALL OOoSpecialEmbeddedObjectFactory::createInstanceUserInit(
const uno::Sequence< sal_Int8 >& aClassID, const uno::Sequence< sal_Int8 >& aClassID,
const OUString& /*aClassName*/, const OUString& /*aClassName*/,
...@@ -515,32 +499,22 @@ uno::Reference< uno::XInterface > SAL_CALL OOoSpecialEmbeddedObjectFactory::crea ...@@ -515,32 +499,22 @@ uno::Reference< uno::XInterface > SAL_CALL OOoSpecialEmbeddedObjectFactory::crea
return xResult; return xResult;
} }
//-------------------------------------------------------------------------
OUString SAL_CALL OOoSpecialEmbeddedObjectFactory::getImplementationName() OUString SAL_CALL OOoSpecialEmbeddedObjectFactory::getImplementationName()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
return impl_staticGetImplementationName(); return impl_staticGetImplementationName();
} }
//-------------------------------------------------------------------------
sal_Bool SAL_CALL OOoSpecialEmbeddedObjectFactory::supportsService( const OUString& ServiceName ) sal_Bool SAL_CALL OOoSpecialEmbeddedObjectFactory::supportsService( const OUString& ServiceName )
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
uno::Sequence< OUString > aSeq = impl_staticGetSupportedServiceNames(); return cppu::supportsService(this, ServiceName);
for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ )
if ( ServiceName == aSeq[nInd] )
return sal_True;
return sal_False;
} }
//-------------------------------------------------------------------------
uno::Sequence< OUString > SAL_CALL OOoSpecialEmbeddedObjectFactory::getSupportedServiceNames() uno::Sequence< OUString > SAL_CALL OOoSpecialEmbeddedObjectFactory::getSupportedServiceNames()
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
return impl_staticGetSupportedServiceNames(); return impl_staticGetSupportedServiceNames();
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -20,14 +20,14 @@ ...@@ -20,14 +20,14 @@
#include "FormattedFieldWrapper.hxx" #include "FormattedFieldWrapper.hxx"
#include "Edit.hxx" #include "Edit.hxx"
#include "FormattedField.hxx" #include "FormattedField.hxx"
#include <tools/debug.hxx>
#include "EditBase.hxx" #include "EditBase.hxx"
#include "services.hxx" #include "services.hxx"
#include <comphelper/processfactory.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <connectivity/dbtools.hxx> #include <connectivity/dbtools.hxx>
#include <tools/debug.hxx>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
#include <comphelper/processfactory.hxx>
//.........................................................................
namespace frm namespace frm
{ {
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
...@@ -42,9 +42,6 @@ using namespace ::com::sun::star::io; ...@@ -42,9 +42,6 @@ using namespace ::com::sun::star::io;
using namespace ::com::sun::star::lang; using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::util; using namespace ::com::sun::star::util;
//==================================================================
// OFormattedFieldWrapper
//==================================================================
Reference<XInterface> SAL_CALL OFormattedFieldWrapper_CreateInstance_ForceFormatted(const Reference<XMultiServiceFactory>& _rxFactory) Reference<XInterface> SAL_CALL OFormattedFieldWrapper_CreateInstance_ForceFormatted(const Reference<XMultiServiceFactory>& _rxFactory)
{ {
...@@ -138,7 +135,6 @@ OFormattedFieldWrapper::~OFormattedFieldWrapper() ...@@ -138,7 +135,6 @@ OFormattedFieldWrapper::~OFormattedFieldWrapper()
} }
//------------------------------------------------------------------
Any SAL_CALL OFormattedFieldWrapper::queryAggregation(const Type& _rType) throw (RuntimeException) Any SAL_CALL OFormattedFieldWrapper::queryAggregation(const Type& _rType) throw (RuntimeException)
{ {
Any aReturn; Any aReturn;
...@@ -183,29 +179,22 @@ Any SAL_CALL OFormattedFieldWrapper::queryAggregation(const Type& _rType) throw ...@@ -183,29 +179,22 @@ Any SAL_CALL OFormattedFieldWrapper::queryAggregation(const Type& _rType) throw
return aReturn; return aReturn;
} }
//------------------------------------------------------------------
OUString SAL_CALL OFormattedFieldWrapper::getServiceName() throw(RuntimeException) OUString SAL_CALL OFormattedFieldWrapper::getServiceName() throw(RuntimeException)
{ {
// return the old compatibility name for an EditModel // return the old compatibility name for an EditModel
return OUString(FRM_COMPONENT_EDIT); return OUString(FRM_COMPONENT_EDIT);
} }
//------------------------------------------------------------------
OUString SAL_CALL OFormattedFieldWrapper::getImplementationName( ) throw (RuntimeException) OUString SAL_CALL OFormattedFieldWrapper::getImplementationName( ) throw (RuntimeException)
{ {
return OUString("com.sun.star.comp.forms.OFormattedFieldWrapper"); return OUString("com.sun.star.comp.forms.OFormattedFieldWrapper");
} }
//------------------------------------------------------------------
sal_Bool SAL_CALL OFormattedFieldWrapper::supportsService( const OUString& _rServiceName ) throw (RuntimeException) sal_Bool SAL_CALL OFormattedFieldWrapper::supportsService( const OUString& _rServiceName ) throw (RuntimeException)
{ {
DBG_ASSERT(m_xAggregate.is(), "OFormattedFieldWrapper::supportsService: should never have made it 'til here without an aggregate!"); return cppu::supportsService(this, _rServiceName);
Reference< XServiceInfo > xSI;
m_xAggregate->queryAggregation(::getCppuType(static_cast< Reference< XServiceInfo >* >(NULL))) >>= xSI;
return xSI->supportsService(_rServiceName);
} }
//------------------------------------------------------------------
Sequence< OUString > SAL_CALL OFormattedFieldWrapper::getSupportedServiceNames( ) throw (RuntimeException) Sequence< OUString > SAL_CALL OFormattedFieldWrapper::getSupportedServiceNames( ) throw (RuntimeException)
{ {
DBG_ASSERT(m_xAggregate.is(), "OFormattedFieldWrapper::getSupportedServiceNames: should never have made it 'til here without an aggregate!"); DBG_ASSERT(m_xAggregate.is(), "OFormattedFieldWrapper::getSupportedServiceNames: should never have made it 'til here without an aggregate!");
...@@ -214,7 +203,6 @@ Sequence< OUString > SAL_CALL OFormattedFieldWrapper::getSupportedServiceNames( ...@@ -214,7 +203,6 @@ Sequence< OUString > SAL_CALL OFormattedFieldWrapper::getSupportedServiceNames(
return xSI->getSupportedServiceNames(); return xSI->getSupportedServiceNames();
} }
//------------------------------------------------------------------
void SAL_CALL OFormattedFieldWrapper::write(const Reference<XObjectOutputStream>& _rxOutStream) throw( IOException, RuntimeException ) void SAL_CALL OFormattedFieldWrapper::write(const Reference<XObjectOutputStream>& _rxOutStream) throw( IOException, RuntimeException )
{ {
// can't write myself // can't write myself
...@@ -254,7 +242,6 @@ void SAL_CALL OFormattedFieldWrapper::write(const Reference<XObjectOutputStream> ...@@ -254,7 +242,6 @@ void SAL_CALL OFormattedFieldWrapper::write(const Reference<XObjectOutputStream>
m_xFormattedPart->write(_rxOutStream); m_xFormattedPart->write(_rxOutStream);
} }
//------------------------------------------------------------------
void SAL_CALL OFormattedFieldWrapper::read(const Reference<XObjectInputStream>& _rxInStream) throw( IOException, RuntimeException ) void SAL_CALL OFormattedFieldWrapper::read(const Reference<XObjectInputStream>& _rxInStream) throw( IOException, RuntimeException )
{ {
SolarMutexGuard g; SolarMutexGuard g;
...@@ -327,7 +314,6 @@ void SAL_CALL OFormattedFieldWrapper::read(const Reference<XObjectInputStream>& ...@@ -327,7 +314,6 @@ void SAL_CALL OFormattedFieldWrapper::read(const Reference<XObjectInputStream>&
decrement(m_refCount); decrement(m_refCount);
} }
//------------------------------------------------------------------
void OFormattedFieldWrapper::ensureAggregate() void OFormattedFieldWrapper::ensureAggregate()
{ {
if (m_xAggregate.is()) if (m_xAggregate.is())
...@@ -365,9 +351,7 @@ void OFormattedFieldWrapper::ensureAggregate() ...@@ -365,9 +351,7 @@ void OFormattedFieldWrapper::ensureAggregate()
decrement(m_refCount); decrement(m_refCount);
} }
//.........................................................................
} }
//.........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -1596,11 +1596,6 @@ Sequence< OUString > ZipPackage::static_getSupportedServiceNames() ...@@ -1596,11 +1596,6 @@ Sequence< OUString > ZipPackage::static_getSupportedServiceNames()
return aNames; return aNames;
} }
sal_Bool SAL_CALL ZipPackage::static_supportsService( OUString const & rServiceName )
{
return cppu::supportsService(this, rServiceName);
}
OUString ZipPackage::getImplementationName() OUString ZipPackage::getImplementationName()
throw ( RuntimeException ) throw ( RuntimeException )
{ {
...@@ -1616,7 +1611,7 @@ Sequence< OUString > ZipPackage::getSupportedServiceNames() ...@@ -1616,7 +1611,7 @@ Sequence< OUString > ZipPackage::getSupportedServiceNames()
sal_Bool SAL_CALL ZipPackage::supportsService( OUString const & rServiceName ) sal_Bool SAL_CALL ZipPackage::supportsService( OUString const & rServiceName )
throw ( RuntimeException ) throw ( RuntimeException )
{ {
return static_supportsService ( rServiceName ); return cppu::supportsService(this, rServiceName);
} }
uno::Reference < XSingleServiceFactory > ZipPackage::createServiceFactory( uno::Reference < XMultiServiceFactory > const & rServiceFactory ) uno::Reference < XSingleServiceFactory > ZipPackage::createServiceFactory( uno::Reference < XMultiServiceFactory > const & rServiceFactory )
......
...@@ -16,12 +16,14 @@ ...@@ -16,12 +16,14 @@
* except in compliance with the License. You may obtain a copy of * except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <XTempFile.hxx>
#include <cppuhelper/factory.hxx> #include <cppuhelper/factory.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx> #include <cppuhelper/typeprovider.hxx>
#include <unotools/tempfile.hxx>
#include <osl/file.hxx> #include <osl/file.hxx>
#include <unotools/configmgr.hxx> #include <unotools/configmgr.hxx>
#include <unotools/tempfile.hxx>
#include <XTempFile.hxx>
OTempFileService::OTempFileService(css::uno::Reference< css::uno::XComponentContext > const & context) OTempFileService::OTempFileService(css::uno::Reference< css::uno::XComponentContext > const & context)
: ::cppu::PropertySetMixin< css::io::XTempFile >( : ::cppu::PropertySetMixin< css::io::XTempFile >(
...@@ -432,8 +434,7 @@ throw ( css::uno::RuntimeException ) ...@@ -432,8 +434,7 @@ throw ( css::uno::RuntimeException )
sal_Bool SAL_CALL OTempFileService::supportsService( OUString const & rServiceName ) sal_Bool SAL_CALL OTempFileService::supportsService( OUString const & rServiceName )
throw ( css::uno::RuntimeException ) throw ( css::uno::RuntimeException )
{ {
css::uno::Sequence< OUString > aServices(getSupportedServiceNames_Static()); return cppu::supportsService(this, rServiceName);
return rServiceName == aServices[0];
} }
css::uno::Sequence < OUString > SAL_CALL OTempFileService::getSupportedServiceNames() css::uno::Sequence < OUString > SAL_CALL OTempFileService::getSupportedServiceNames()
......
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