Kaydet (Commit) 6ad41af7 authored tarafından Alexandre Vicenzi's avatar Alexandre Vicenzi Kaydeden (comit) Stephan Bergmann

fdo#54938 Convert dtrans, remoteb., reportd., ucbhelper to cppu::supportsSer..

Change-Id: I42cf7dc139b79b715f3c330f9bca7d333de8bafc
Reviewed-on: https://gerrit.libreoffice.org/7762Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
Tested-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst a4835f66
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <com/sun/star/datatransfer/XTransferable.hpp> #include <com/sun/star/datatransfer/XTransferable.hpp>
#include <com/sun/star/awt/MouseButton.hpp> #include <com/sun/star/awt/MouseButton.hpp>
#include <com/sun/star/awt/MouseEvent.hpp> #include <com/sun/star/awt/MouseEvent.hpp>
#include <cppuhelper/supportsservice.hxx>
#include <process.h> #include <process.h>
#include <memory> #include <memory>
...@@ -68,7 +68,6 @@ DragSource::~DragSource() ...@@ -68,7 +68,6 @@ DragSource::~DragSource()
{ {
} }
//----------------------------------------------------
/** First start a new drag and drop thread if /** First start a new drag and drop thread if
the last one has finished the last one has finished
...@@ -135,10 +134,7 @@ void DragSource::StartDragImpl( ...@@ -135,10 +134,7 @@ void DragSource::StartDragImpl(
} }
// XInitialization // XInitialization
/** aArguments contains a machine id */
//----------------------------------------------------
/** aArguments contains a machine id
*/
void SAL_CALL DragSource::initialize( const Sequence< Any >& aArguments ) void SAL_CALL DragSource::initialize( const Sequence< Any >& aArguments )
throw(Exception, RuntimeException) throw(Exception, RuntimeException)
{ {
...@@ -147,28 +143,21 @@ void SAL_CALL DragSource::initialize( const Sequence< Any >& aArguments ) ...@@ -147,28 +143,21 @@ void SAL_CALL DragSource::initialize( const Sequence< Any >& aArguments )
OSL_ASSERT( IsWindow( m_hAppWindow) ); OSL_ASSERT( IsWindow( m_hAppWindow) );
} }
//---------------------------------------------------- /** XDragSource */
/** XDragSource
*/
sal_Bool SAL_CALL DragSource::isDragImageSupported( ) sal_Bool SAL_CALL DragSource::isDragImageSupported( )
throw(RuntimeException) throw(RuntimeException)
{ {
return 0; return 0;
} }
//----------------------------------------------------
/**
*/
sal_Int32 SAL_CALL DragSource::getDefaultCursor( sal_Int8 /*dragAction*/ ) sal_Int32 SAL_CALL DragSource::getDefaultCursor( sal_Int8 /*dragAction*/ )
throw( IllegalArgumentException, RuntimeException) throw( IllegalArgumentException, RuntimeException)
{ {
return 0; return 0;
} }
//----------------------------------------------------
/** Notifies the XDragSourceListener by /** Notifies the XDragSourceListener by
calling dragDropEnd calling dragDropEnd */
*/
void SAL_CALL DragSource::startDrag( void SAL_CALL DragSource::startDrag(
const DragGestureEvent& trigger, const DragGestureEvent& trigger,
sal_Int8 sourceActions, sal_Int8 sourceActions,
...@@ -206,9 +195,7 @@ void SAL_CALL DragSource::startDrag( ...@@ -206,9 +195,7 @@ void SAL_CALL DragSource::startDrag(
} }
} }
//---------------------------------------------------- /** IDropTarget */
/**IDropTarget
*/
HRESULT STDMETHODCALLTYPE DragSource::QueryInterface( REFIID riid, void **ppvObject) HRESULT STDMETHODCALLTYPE DragSource::QueryInterface( REFIID riid, void **ppvObject)
{ {
if( !ppvObject) if( !ppvObject)
...@@ -230,18 +217,12 @@ HRESULT STDMETHODCALLTYPE DragSource::QueryInterface( REFIID riid, void **ppvOb ...@@ -230,18 +217,12 @@ HRESULT STDMETHODCALLTYPE DragSource::QueryInterface( REFIID riid, void **ppvOb
} }
//----------------------------------------------------
/**
*/
ULONG STDMETHODCALLTYPE DragSource::AddRef( void) ULONG STDMETHODCALLTYPE DragSource::AddRef( void)
{ {
acquire(); acquire();
return (ULONG) m_refCount; return (ULONG) m_refCount;
} }
//----------------------------------------------------
/**
*/
ULONG STDMETHODCALLTYPE DragSource::Release( void) ULONG STDMETHODCALLTYPE DragSource::Release( void)
{ {
ULONG ref= m_refCount; ULONG ref= m_refCount;
...@@ -249,9 +230,7 @@ ULONG STDMETHODCALLTYPE DragSource::Release( void) ...@@ -249,9 +230,7 @@ ULONG STDMETHODCALLTYPE DragSource::Release( void)
return --ref; return --ref;
} }
//---------------------------------------------------- /** IDropSource */
/** IDropSource
*/
HRESULT STDMETHODCALLTYPE DragSource::QueryContinueDrag( HRESULT STDMETHODCALLTYPE DragSource::QueryContinueDrag(
/* [in] */ BOOL fEscapePressed, /* [in] */ BOOL fEscapePressed,
/* [in] */ DWORD grfKeyState) /* [in] */ DWORD grfKeyState)
...@@ -292,9 +271,6 @@ HRESULT STDMETHODCALLTYPE DragSource::QueryContinueDrag( ...@@ -292,9 +271,6 @@ HRESULT STDMETHODCALLTYPE DragSource::QueryContinueDrag(
return retVal; return retVal;
} }
//----------------------------------------------------
/**
*/
HRESULT STDMETHODCALLTYPE DragSource::GiveFeedback( HRESULT STDMETHODCALLTYPE DragSource::GiveFeedback(
/* [in] */ DWORD /* [in] */ DWORD
#if defined DBG_CONSOLE_OUT #if defined DBG_CONSOLE_OUT
...@@ -317,9 +293,7 @@ OUString SAL_CALL DragSource::getImplementationName( ) throw (RuntimeException) ...@@ -317,9 +293,7 @@ OUString SAL_CALL DragSource::getImplementationName( ) throw (RuntimeException)
// XServiceInfo // XServiceInfo
sal_Bool SAL_CALL DragSource::supportsService( const OUString& ServiceName ) throw (RuntimeException) sal_Bool SAL_CALL DragSource::supportsService( const OUString& ServiceName ) throw (RuntimeException)
{ {
if( ServiceName == DNDSOURCE_SERVICE_NAME ) return cppu::supportsService(this, ServiceName);
return sal_True;
return sal_False;
} }
Sequence< OUString > SAL_CALL DragSource::getSupportedServiceNames( ) throw (RuntimeException) Sequence< OUString > SAL_CALL DragSource::getSupportedServiceNames( ) throw (RuntimeException)
...@@ -329,13 +303,11 @@ Sequence< OUString > SAL_CALL DragSource::getSupportedServiceNames( ) throw (Ru ...@@ -329,13 +303,11 @@ Sequence< OUString > SAL_CALL DragSource::getSupportedServiceNames( ) throw (Ru
return Sequence<OUString>(names, 1); return Sequence<OUString>(names, 1);
} }
//---------------------------------------------------- /** This function is called as extra thread from
/**This function is called as extra thread from
DragSource::executeDrag. The function DragSource::executeDrag. The function
carries out a drag and drop operation by calling carries out a drag and drop operation by calling
DoDragDrop. The thread also notifies all DoDragDrop. The thread also notifies all
XSourceListener. XSourceListener. */
*/
unsigned __stdcall DndOleSTAFunc(LPVOID pParams) unsigned __stdcall DndOleSTAFunc(LPVOID pParams)
{ {
// The structure contains all arguments for DoDragDrop and other // The structure contains all arguments for DoDragDrop and other
...@@ -400,7 +372,4 @@ unsigned __stdcall DndOleSTAFunc(LPVOID pParams) ...@@ -400,7 +372,4 @@ unsigned __stdcall DndOleSTAFunc(LPVOID pParams)
return 0; return 0;
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp> #include <com/sun/star/datatransfer/dnd/DNDConstants.hpp>
#include <com/sun/star/datatransfer/XTransferable.hpp> #include <com/sun/star/datatransfer/XTransferable.hpp>
#include <cppuhelper/supportsservice.hxx>
#include <stdio.h> #include <stdio.h>
#include "target.hxx" #include "target.hxx"
#include "idroptarget.hxx" #include "idroptarget.hxx"
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "targetdropcontext.hxx" #include "targetdropcontext.hxx"
#include "targetdragcontext.hxx" #include "targetdragcontext.hxx"
#include <rtl/ustring.h> #include <rtl/ustring.h>
using namespace cppu; using namespace cppu;
using namespace osl; using namespace osl;
using namespace com::sun::star::datatransfer; using namespace com::sun::star::datatransfer;
...@@ -238,9 +239,6 @@ DWORD WINAPI DndTargetOleSTAFunc(LPVOID pParams) ...@@ -238,9 +239,6 @@ DWORD WINAPI DndTargetOleSTAFunc(LPVOID pParams)
return 0; return 0;
} }
// XServiceInfo // XServiceInfo
OUString SAL_CALL DropTarget::getImplementationName( ) throw (RuntimeException) OUString SAL_CALL DropTarget::getImplementationName( ) throw (RuntimeException)
{ {
...@@ -249,9 +247,7 @@ OUString SAL_CALL DropTarget::getImplementationName( ) throw (RuntimeException) ...@@ -249,9 +247,7 @@ OUString SAL_CALL DropTarget::getImplementationName( ) throw (RuntimeException)
// XServiceInfo // XServiceInfo
sal_Bool SAL_CALL DropTarget::supportsService( const OUString& ServiceName ) throw (RuntimeException) sal_Bool SAL_CALL DropTarget::supportsService( const OUString& ServiceName ) throw (RuntimeException)
{ {
if( ServiceName == DNDTARGET_SERVICE_NAME ) return cppu::supportsService(this, ServiceName);
return sal_True;
return sal_False;
} }
Sequence< OUString > SAL_CALL DropTarget::getSupportedServiceNames( ) throw (RuntimeException) Sequence< OUString > SAL_CALL DropTarget::getSupportedServiceNames( ) throw (RuntimeException)
...@@ -260,8 +256,7 @@ Sequence< OUString > SAL_CALL DropTarget::getSupportedServiceNames( ) throw (Ru ...@@ -260,8 +256,7 @@ Sequence< OUString > SAL_CALL DropTarget::getSupportedServiceNames( ) throw (Ru
return Sequence<OUString>(names, 1); return Sequence<OUString>(names, 1);
} }
// XDropTarget
// XDropTarget ----------------------------------------------------------------
void SAL_CALL DropTarget::addDropTargetListener( const Reference< XDropTargetListener >& dtl ) void SAL_CALL DropTarget::addDropTargetListener( const Reference< XDropTargetListener >& dtl )
throw(RuntimeException) throw(RuntimeException)
{ {
...@@ -286,7 +281,6 @@ void SAL_CALL DropTarget::setActive( sal_Bool _b ) throw(RuntimeException) ...@@ -286,7 +281,6 @@ void SAL_CALL DropTarget::setActive( sal_Bool _b ) throw(RuntimeException)
m_bActive= _b; m_bActive= _b;
} }
sal_Int8 SAL_CALL DropTarget::getDefaultActions( ) throw(RuntimeException) sal_Int8 SAL_CALL DropTarget::getDefaultActions( ) throw(RuntimeException)
{ {
return m_nDefaultActions; return m_nDefaultActions;
...@@ -298,7 +292,6 @@ void SAL_CALL DropTarget::setDefaultActions( sal_Int8 actions ) throw(RuntimeExc ...@@ -298,7 +292,6 @@ void SAL_CALL DropTarget::setDefaultActions( sal_Int8 actions ) throw(RuntimeExc
m_nDefaultActions= actions; m_nDefaultActions= actions;
} }
HRESULT DropTarget::DragEnter( IDataObject *pDataObj, HRESULT DropTarget::DragEnter( IDataObject *pDataObj,
DWORD grfKeyState, DWORD grfKeyState,
POINTL pt, POINTL pt,
...@@ -490,8 +483,6 @@ HRESULT DropTarget::Drop( IDataObject * /*pDataObj*/, ...@@ -490,8 +483,6 @@ HRESULT DropTarget::Drop( IDataObject * /*pDataObj*/,
return S_OK; return S_OK;
} }
void DropTarget::fire_drop( const DropTargetDropEvent& dte) void DropTarget::fire_drop( const DropTargetDropEvent& dte)
{ {
OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (Reference<XDropTargetListener>* )0 ) ); OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (Reference<XDropTargetListener>* )0 ) );
...@@ -563,7 +554,7 @@ void DropTarget::fire_dropActionChanged( const DropTargetDragEvent& dtde ) ...@@ -563,7 +554,7 @@ void DropTarget::fire_dropActionChanged( const DropTargetDragEvent& dtde )
} }
} }
// Non - interface functions ============================================================ // Non - interface functions
// DropTarget fires events to XDropTargetListeners. The event object contains an // DropTarget fires events to XDropTargetListeners. The event object contains an
// XDropTargetDropContext implementaion. When the listener calls on that interface // XDropTargetDropContext implementaion. When the listener calls on that interface
// then the calls are delegated from DropContext (XDropTargetDropContext) to these // then the calls are delegated from DropContext (XDropTargetDropContext) to these
...@@ -597,7 +588,7 @@ void DropTarget::_dropComplete(sal_Bool success, const Reference<XDropTargetDrop ...@@ -597,7 +588,7 @@ void DropTarget::_dropComplete(sal_Bool success, const Reference<XDropTargetDrop
m_bDropComplete= success; m_bDropComplete= success;
} }
} }
// --------------------------------------------------------------------------------------
// DropTarget fires events to XDropTargetListeners. The event object can contains an // DropTarget fires events to XDropTargetListeners. The event object can contains an
// XDropTargetDragContext implementaion. When the listener calls on that interface // XDropTargetDragContext implementaion. When the listener calls on that interface
// then the calls are delegated from DragContext (XDropTargetDragContext) to these // then the calls are delegated from DragContext (XDropTargetDragContext) to these
...@@ -620,10 +611,6 @@ void DropTarget::_rejectDrag( const Reference<XDropTargetDragContext>& context) ...@@ -620,10 +611,6 @@ void DropTarget::_rejectDrag( const Reference<XDropTargetDragContext>& context)
} }
} }
//--------------------------------------------------------------------------------------
// This function determines the action dependend on the pressed // This function determines the action dependend on the pressed
// key modifiers ( CTRL, SHIFT, ALT, Right Mouse Button). The result // key modifiers ( CTRL, SHIFT, ALT, Right Mouse Button). The result
// is then checked against the allowed actions which can be set through // is then checked against the allowed actions which can be set through
......
...@@ -17,21 +17,22 @@ ...@@ -17,21 +17,22 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <osl/diagnose.h>
#include <osl/mutex.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/implementationentry.hxx>
#include "cppuhelper/unourl.hxx"
#include "rtl/malformeduriexception.hxx" #include "rtl/malformeduriexception.hxx"
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp> #include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/connection/XConnector.hpp>
#include <com/sun/star/bridge/BridgeFactory.hpp> #include <com/sun/star/bridge/BridgeFactory.hpp>
#include <com/sun/star/bridge/XBridgeFactory.hpp> #include <com/sun/star/bridge/XBridgeFactory.hpp>
#include <com/sun/star/bridge/XUnoUrlResolver.hpp> #include <com/sun/star/bridge/XUnoUrlResolver.hpp>
#include <com/sun/star/connection/XConnector.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/implementationentry.hxx>
#include <cppuhelper/supportsservice.hxx>
#include "cppuhelper/unourl.hxx"
#include <osl/diagnose.h>
#include <osl/mutex.hxx>
using namespace cppu; using namespace cppu;
using namespace osl; using namespace osl;
...@@ -47,7 +48,7 @@ using namespace com::sun::star::registry; ...@@ -47,7 +48,7 @@ using namespace com::sun::star::registry;
namespace unourl_resolver namespace unourl_resolver
{ {
//--------------------------------------------------------------------------------------------------
Sequence< OUString > resolver_getSupportedServiceNames() Sequence< OUString > resolver_getSupportedServiceNames()
{ {
Sequence< OUString > seqNames(1); Sequence< OUString > seqNames(1);
...@@ -60,7 +61,6 @@ OUString resolver_getImplementationName() ...@@ -60,7 +61,6 @@ OUString resolver_getImplementationName()
return OUString(IMPLNAME); return OUString(IMPLNAME);
} }
//==================================================================================================
class ResolverImpl : public WeakImplHelper2< XServiceInfo, XUnoUrlResolver > class ResolverImpl : public WeakImplHelper2< XServiceInfo, XUnoUrlResolver >
{ {
Reference< XMultiComponentFactory > _xSMgr; Reference< XMultiComponentFactory > _xSMgr;
...@@ -80,37 +80,26 @@ public: ...@@ -80,37 +80,26 @@ public:
throw (NoConnectException, ConnectionSetupException, RuntimeException); throw (NoConnectException, ConnectionSetupException, RuntimeException);
}; };
//##################################################################################################
//__________________________________________________________________________________________________
ResolverImpl::ResolverImpl( const Reference< XComponentContext > & xCtx ) ResolverImpl::ResolverImpl( const Reference< XComponentContext > & xCtx )
: _xSMgr( xCtx->getServiceManager() ) : _xSMgr( xCtx->getServiceManager() )
, _xCtx( xCtx ) , _xCtx( xCtx )
{} {}
//__________________________________________________________________________________________________
ResolverImpl::~ResolverImpl() {} ResolverImpl::~ResolverImpl() {}
// XServiceInfo // XServiceInfo
//__________________________________________________________________________________________________
OUString ResolverImpl::getImplementationName() OUString ResolverImpl::getImplementationName()
throw(::com::sun::star::uno::RuntimeException) throw(::com::sun::star::uno::RuntimeException)
{ {
return resolver_getImplementationName(); return resolver_getImplementationName();
} }
//__________________________________________________________________________________________________
sal_Bool ResolverImpl::supportsService( const OUString & rServiceName ) sal_Bool ResolverImpl::supportsService( const OUString & rServiceName )
throw(::com::sun::star::uno::RuntimeException) throw(::com::sun::star::uno::RuntimeException)
{ {
const Sequence< OUString > & rSNL = getSupportedServiceNames(); return cppu::supportsService(this, rServiceName);
const OUString * pArray = rSNL.getConstArray();
for ( sal_Int32 nPos = rSNL.getLength(); nPos--; )
{
if (pArray[nPos] == rServiceName)
return sal_True;
}
return sal_False;
} }
//__________________________________________________________________________________________________
Sequence< OUString > ResolverImpl::getSupportedServiceNames() Sequence< OUString > ResolverImpl::getSupportedServiceNames()
throw(::com::sun::star::uno::RuntimeException) throw(::com::sun::star::uno::RuntimeException)
{ {
...@@ -118,7 +107,6 @@ Sequence< OUString > ResolverImpl::getSupportedServiceNames() ...@@ -118,7 +107,6 @@ Sequence< OUString > ResolverImpl::getSupportedServiceNames()
} }
// XUnoUrlResolver // XUnoUrlResolver
//__________________________________________________________________________________________________
Reference< XInterface > ResolverImpl::resolve( const OUString & rUnoUrl ) Reference< XInterface > ResolverImpl::resolve( const OUString & rUnoUrl )
throw (NoConnectException, ConnectionSetupException, RuntimeException) throw (NoConnectException, ConnectionSetupException, RuntimeException)
{ {
...@@ -161,13 +149,11 @@ Reference< XInterface > ResolverImpl::resolve( const OUString & rUnoUrl ) ...@@ -161,13 +149,11 @@ Reference< XInterface > ResolverImpl::resolve( const OUString & rUnoUrl )
return xRet; return xRet;
} }
//==================================================================================================
static Reference< XInterface > SAL_CALL ResolverImpl_create( const Reference< XComponentContext > & xCtx ) static Reference< XInterface > SAL_CALL ResolverImpl_create( const Reference< XComponentContext > & xCtx )
{ {
return Reference< XInterface >( *new ResolverImpl( xCtx ) ); return Reference< XInterface >( *new ResolverImpl( xCtx ) );
} }
} }
using namespace unourl_resolver; using namespace unourl_resolver;
......
...@@ -17,39 +17,27 @@ ...@@ -17,39 +17,27 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
/**************************************************************************
TODO
**************************************************************************
*************************************************************************/
#include <boost/unordered_map.hpp> #include <boost/unordered_map.hpp>
#include <com/sun/star/beans/XPropertyAccess.hpp> #include <com/sun/star/beans/XPropertyAccess.hpp>
#include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/container/XNamed.hpp> #include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/ucb/Store.hpp> #include <com/sun/star/ucb/Store.hpp>
#include <com/sun/star/ucb/XPropertySetRegistryFactory.hpp>
#include <com/sun/star/ucb/XPropertySetRegistry.hpp> #include <com/sun/star/ucb/XPropertySetRegistry.hpp>
#include <com/sun/star/ucb/XPropertySetRegistryFactory.hpp>
#include <cppuhelper/supportsservice.hxx>
#include <ucbhelper/contenthelper.hxx>
#include <ucbhelper/contentidentifier.hxx>
#include <ucbhelper/providerhelper.hxx>
#include "osl/diagnose.h" #include "osl/diagnose.h"
#include "osl/mutex.hxx" #include "osl/mutex.hxx"
#include "cppuhelper/weakref.hxx" #include "cppuhelper/weakref.hxx"
#include <ucbhelper/contentidentifier.hxx>
#include <ucbhelper/providerhelper.hxx>
#include <ucbhelper/contenthelper.hxx>
using namespace com::sun::star; using namespace com::sun::star;
namespace ucbhelper_impl namespace ucbhelper_impl
{ {
//=========================================================================
//
// Contents.
//
//=========================================================================
struct equalString struct equalString
{ {
bool operator()( bool operator()(
...@@ -76,12 +64,6 @@ typedef boost::unordered_map ...@@ -76,12 +64,6 @@ typedef boost::unordered_map
> >
Contents; Contents;
//=========================================================================
//
// struct ContentProviderImplHelper_Impl.
//
//=========================================================================
struct ContentProviderImplHelper_Impl struct ContentProviderImplHelper_Impl
{ {
uno::Reference< com::sun::star::ucb::XPropertySetRegistry > uno::Reference< com::sun::star::ucb::XPropertySetRegistry >
...@@ -92,14 +74,6 @@ struct ContentProviderImplHelper_Impl ...@@ -92,14 +74,6 @@ struct ContentProviderImplHelper_Impl
} // namespace ucbhelper_impl } // namespace ucbhelper_impl
//=========================================================================
//=========================================================================
//
// ContentProviderImplHelper Implementation.
//
//=========================================================================
//=========================================================================
namespace ucbhelper { namespace ucbhelper {
ContentProviderImplHelper::ContentProviderImplHelper( ContentProviderImplHelper::ContentProviderImplHelper(
...@@ -109,63 +83,30 @@ ContentProviderImplHelper::ContentProviderImplHelper( ...@@ -109,63 +83,30 @@ ContentProviderImplHelper::ContentProviderImplHelper(
{ {
} }
//=========================================================================
// virtual // virtual
ContentProviderImplHelper::~ContentProviderImplHelper() ContentProviderImplHelper::~ContentProviderImplHelper()
{ {
delete m_pImpl; delete m_pImpl;
} }
//=========================================================================
//
// XInterface methods.
//
//=========================================================================
XINTERFACE_IMPL_3( ContentProviderImplHelper, XINTERFACE_IMPL_3( ContentProviderImplHelper,
lang::XTypeProvider, lang::XTypeProvider,
lang::XServiceInfo, lang::XServiceInfo,
com::sun::star::ucb::XContentProvider ); com::sun::star::ucb::XContentProvider );
//=========================================================================
//
// XTypeProvider methods.
//
//=========================================================================
XTYPEPROVIDER_IMPL_3( ContentProviderImplHelper, XTYPEPROVIDER_IMPL_3( ContentProviderImplHelper,
lang::XTypeProvider, lang::XTypeProvider,
lang::XServiceInfo, lang::XServiceInfo,
com::sun::star::ucb::XContentProvider ); com::sun::star::ucb::XContentProvider );
//=========================================================================
//
// XServiceInfo methods.
//
//=========================================================================
// virtual // virtual
sal_Bool SAL_CALL ContentProviderImplHelper::supportsService( sal_Bool SAL_CALL ContentProviderImplHelper::supportsService(
const OUString& ServiceName ) const OUString& ServiceName )
throw( uno::RuntimeException ) throw( uno::RuntimeException )
{ {
uno::Sequence< OUString > aSNL = getSupportedServiceNames(); return cppu::supportsService(this, ServiceName);
const OUString* pArray = aSNL.getConstArray();
for ( sal_Int32 i = 0; i < aSNL.getLength(); i++ )
{
if ( pArray[ i ] == ServiceName )
return sal_True;
}
return sal_False;
} }
//=========================================================================
//
// XContentProvider methods.
//
//=========================================================================
// virtual // virtual
sal_Int32 SAL_CALL ContentProviderImplHelper::compareContentIds( sal_Int32 SAL_CALL ContentProviderImplHelper::compareContentIds(
const uno::Reference< com::sun::star::ucb::XContentIdentifier >& Id1, const uno::Reference< com::sun::star::ucb::XContentIdentifier >& Id1,
...@@ -180,12 +121,6 @@ sal_Int32 SAL_CALL ContentProviderImplHelper::compareContentIds( ...@@ -180,12 +121,6 @@ sal_Int32 SAL_CALL ContentProviderImplHelper::compareContentIds(
return aURL1.compareTo( aURL2 ); return aURL1.compareTo( aURL2 );
} }
//=========================================================================
//
// Non-interface methods
//
//=========================================================================
void ContentProviderImplHelper::cleanupRegisteredContents() void ContentProviderImplHelper::cleanupRegisteredContents()
{ {
osl::MutexGuard aGuard( m_aMutex ); osl::MutexGuard aGuard( m_aMutex );
...@@ -208,8 +143,6 @@ void ContentProviderImplHelper::cleanupRegisteredContents() ...@@ -208,8 +143,6 @@ void ContentProviderImplHelper::cleanupRegisteredContents()
} }
} }
//=========================================================================
void ContentProviderImplHelper::removeContent( ContentImplHelper* pContent ) void ContentProviderImplHelper::removeContent( ContentImplHelper* pContent )
{ {
osl::MutexGuard aGuard( m_aMutex ); osl::MutexGuard aGuard( m_aMutex );
...@@ -225,7 +158,6 @@ void ContentProviderImplHelper::removeContent( ContentImplHelper* pContent ) ...@@ -225,7 +158,6 @@ void ContentProviderImplHelper::removeContent( ContentImplHelper* pContent )
m_pImpl->m_aContents.erase( it ); m_pImpl->m_aContents.erase( it );
} }
//=========================================================================
rtl::Reference< ContentImplHelper > rtl::Reference< ContentImplHelper >
ContentProviderImplHelper::queryExistingContent( ContentProviderImplHelper::queryExistingContent(
const uno::Reference< com::sun::star::ucb::XContentIdentifier >& const uno::Reference< com::sun::star::ucb::XContentIdentifier >&
...@@ -234,7 +166,6 @@ ContentProviderImplHelper::queryExistingContent( ...@@ -234,7 +166,6 @@ ContentProviderImplHelper::queryExistingContent(
return queryExistingContent( Identifier->getContentIdentifier() ); return queryExistingContent( Identifier->getContentIdentifier() );
} }
//=========================================================================
rtl::Reference< ContentImplHelper > rtl::Reference< ContentImplHelper >
ContentProviderImplHelper::queryExistingContent( const OUString& rURL ) ContentProviderImplHelper::queryExistingContent( const OUString& rURL )
{ {
...@@ -258,7 +189,6 @@ ContentProviderImplHelper::queryExistingContent( const OUString& rURL ) ...@@ -258,7 +189,6 @@ ContentProviderImplHelper::queryExistingContent( const OUString& rURL )
return rtl::Reference< ContentImplHelper >(); return rtl::Reference< ContentImplHelper >();
} }
//=========================================================================
void ContentProviderImplHelper::queryExistingContents( void ContentProviderImplHelper::queryExistingContents(
ContentRefList& rContents ) ContentRefList& rContents )
{ {
...@@ -284,7 +214,6 @@ void ContentProviderImplHelper::queryExistingContents( ...@@ -284,7 +214,6 @@ void ContentProviderImplHelper::queryExistingContents(
} }
} }
//=========================================================================
void ContentProviderImplHelper::registerNewContent( void ContentProviderImplHelper::registerNewContent(
const uno::Reference< ucb::XContent > & xContent ) const uno::Reference< ucb::XContent > & xContent )
{ {
...@@ -303,7 +232,6 @@ void ContentProviderImplHelper::registerNewContent( ...@@ -303,7 +232,6 @@ void ContentProviderImplHelper::registerNewContent(
} }
} }
//=========================================================================
uno::Reference< com::sun::star::ucb::XPropertySetRegistry > uno::Reference< com::sun::star::ucb::XPropertySetRegistry >
ContentProviderImplHelper::getAdditionalPropertySetRegistry() ContentProviderImplHelper::getAdditionalPropertySetRegistry()
{ {
...@@ -328,8 +256,6 @@ ContentProviderImplHelper::getAdditionalPropertySetRegistry() ...@@ -328,8 +256,6 @@ ContentProviderImplHelper::getAdditionalPropertySetRegistry()
return m_pImpl->m_xPropertySetRegistry; return m_pImpl->m_xPropertySetRegistry;
} }
//=========================================================================
uno::Reference< com::sun::star::ucb::XPersistentPropertySet > uno::Reference< com::sun::star::ucb::XPersistentPropertySet >
ContentProviderImplHelper::getAdditionalPropertySet( ContentProviderImplHelper::getAdditionalPropertySet(
const OUString& rKey, sal_Bool bCreate ) const OUString& rKey, sal_Bool bCreate )
...@@ -348,7 +274,6 @@ ContentProviderImplHelper::getAdditionalPropertySet( ...@@ -348,7 +274,6 @@ ContentProviderImplHelper::getAdditionalPropertySet(
return uno::Reference< com::sun::star::ucb::XPersistentPropertySet >(); return uno::Reference< com::sun::star::ucb::XPersistentPropertySet >();
} }
//=========================================================================
sal_Bool ContentProviderImplHelper::renameAdditionalPropertySet( sal_Bool ContentProviderImplHelper::renameAdditionalPropertySet(
const OUString& rOldKey, const OUString& rOldKey,
const OUString& rNewKey, const OUString& rNewKey,
...@@ -433,7 +358,6 @@ sal_Bool ContentProviderImplHelper::renameAdditionalPropertySet( ...@@ -433,7 +358,6 @@ sal_Bool ContentProviderImplHelper::renameAdditionalPropertySet(
return sal_True; return sal_True;
} }
//=========================================================================
sal_Bool ContentProviderImplHelper::copyAdditionalPropertySet( sal_Bool ContentProviderImplHelper::copyAdditionalPropertySet(
const OUString& rSourceKey, const OUString& rSourceKey,
const OUString& rTargetKey, const OUString& rTargetKey,
...@@ -575,7 +499,6 @@ sal_Bool ContentProviderImplHelper::copyAdditionalPropertySet( ...@@ -575,7 +499,6 @@ sal_Bool ContentProviderImplHelper::copyAdditionalPropertySet(
return sal_True; return sal_True;
} }
//=========================================================================
sal_Bool ContentProviderImplHelper::removeAdditionalPropertySet( sal_Bool ContentProviderImplHelper::removeAdditionalPropertySet(
const OUString& rKey, sal_Bool bRecursive ) const OUString& rKey, sal_Bool bRecursive )
{ {
......
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