fdo#54938 Convert dtrans, remoteb., reportd., ucbhelper to cppu::supportsSer..
Change-Id: I42cf7dc139b79b715f3c330f9bca7d333de8bafc Reviewed-on: https://gerrit.libreoffice.org/7762 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
committed by
Stephan Bergmann
parent
a4835f66dd
commit
6ad41af76f
@@ -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()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------
|
|
||||||
/** 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(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 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 )
|
|||||||
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(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------
|
/** 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
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
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)
|
|||||||
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(
|
|||||||
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)
|
|||||||
// 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
|
|||||||
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)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@@ -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 @@
|
|||||||
#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)
|
|||||||
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)
|
|||||||
// 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
|
|||||||
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)
|
|||||||
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
|
|||||||
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*/,
|
|||||||
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 )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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
|
|||||||
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)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
// 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 @@
|
|||||||
* 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;
|
|||||||
|
|
||||||
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()
|
|||||||
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:
|
|||||||
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()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 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 )
|
|||||||
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;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -17,12 +17,6 @@
|
|||||||
* 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/ucb/ContentAction.hpp>
|
#include <com/sun/star/ucb/ContentAction.hpp>
|
||||||
#include <com/sun/star/ucb/CommandInfoChange.hpp>
|
#include <com/sun/star/ucb/CommandInfoChange.hpp>
|
||||||
@@ -30,26 +24,21 @@
|
|||||||
#include <com/sun/star/beans/PropertyAttribute.hpp>
|
#include <com/sun/star/beans/PropertyAttribute.hpp>
|
||||||
#include <com/sun/star/beans/PropertySetInfoChange.hpp>
|
#include <com/sun/star/beans/PropertySetInfoChange.hpp>
|
||||||
#include <cppuhelper/interfacecontainer.hxx>
|
#include <cppuhelper/interfacecontainer.hxx>
|
||||||
|
#include <cppuhelper/supportsservice.hxx>
|
||||||
|
#include <ucbhelper/contenthelper.hxx>
|
||||||
|
#include <ucbhelper/contentidentifier.hxx>
|
||||||
|
#include <ucbhelper/contentinfo.hxx>
|
||||||
|
#include <ucbhelper/providerhelper.hxx>
|
||||||
|
|
||||||
#include "osl/diagnose.h"
|
#include "osl/diagnose.h"
|
||||||
#include "osl/mutex.hxx"
|
#include "osl/mutex.hxx"
|
||||||
#include "rtl/ref.hxx"
|
#include "rtl/ref.hxx"
|
||||||
#include <ucbhelper/contentidentifier.hxx>
|
|
||||||
#include <ucbhelper/contenthelper.hxx>
|
|
||||||
#include <ucbhelper/providerhelper.hxx>
|
|
||||||
#include <ucbhelper/contentinfo.hxx>
|
|
||||||
|
|
||||||
using namespace com::sun::star;
|
using namespace com::sun::star;
|
||||||
|
|
||||||
namespace ucbhelper_impl
|
namespace ucbhelper_impl
|
||||||
{
|
{
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
//
|
|
||||||
// class PropertyEventSequence.
|
|
||||||
//
|
|
||||||
//=========================================================================
|
|
||||||
|
|
||||||
class PropertyEventSequence
|
class PropertyEventSequence
|
||||||
{
|
{
|
||||||
uno::Sequence< beans::PropertyChangeEvent > m_aSeq;
|
uno::Sequence< beans::PropertyChangeEvent > m_aSeq;
|
||||||
@@ -66,12 +55,6 @@ public:
|
|||||||
{ m_aSeq.realloc( m_nPos ); return m_aSeq; }
|
{ m_aSeq.realloc( m_nPos ); return m_aSeq; }
|
||||||
};
|
};
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
//
|
|
||||||
// PropertiesEventListenerMap.
|
|
||||||
//
|
|
||||||
//=========================================================================
|
|
||||||
|
|
||||||
typedef void* XPropertiesChangeListenerPtr; // -> Compiler problems!
|
typedef void* XPropertiesChangeListenerPtr; // -> Compiler problems!
|
||||||
|
|
||||||
struct equalPtr
|
struct equalPtr
|
||||||
@@ -100,24 +83,12 @@ typedef boost::unordered_map
|
|||||||
>
|
>
|
||||||
PropertiesEventListenerMap;
|
PropertiesEventListenerMap;
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
//
|
|
||||||
// PropertyChangeListenerContainer.
|
|
||||||
//
|
|
||||||
//=========================================================================
|
|
||||||
|
|
||||||
typedef cppu::OMultiTypeInterfaceContainerHelperVar
|
typedef cppu::OMultiTypeInterfaceContainerHelperVar
|
||||||
<
|
<
|
||||||
OUString,
|
OUString,
|
||||||
OUStringHash
|
OUStringHash
|
||||||
> PropertyChangeListeners;
|
> PropertyChangeListeners;
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
//
|
|
||||||
// struct ContentImplHelper_Impl
|
|
||||||
//
|
|
||||||
//=========================================================================
|
|
||||||
|
|
||||||
struct ContentImplHelper_Impl
|
struct ContentImplHelper_Impl
|
||||||
{
|
{
|
||||||
rtl::Reference< ::ucbhelper::PropertySetInfo > m_xPropSetInfo;
|
rtl::Reference< ::ucbhelper::PropertySetInfo > m_xPropSetInfo;
|
||||||
@@ -149,14 +120,6 @@ struct ContentImplHelper_Impl
|
|||||||
|
|
||||||
using namespace ucbhelper_impl;
|
using namespace ucbhelper_impl;
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
//=========================================================================
|
|
||||||
//
|
|
||||||
// ContentImplHelper Implementation.
|
|
||||||
//
|
|
||||||
//=========================================================================
|
|
||||||
//=========================================================================
|
|
||||||
|
|
||||||
namespace ucbhelper {
|
namespace ucbhelper {
|
||||||
|
|
||||||
ContentImplHelper::ContentImplHelper(
|
ContentImplHelper::ContentImplHelper(
|
||||||
@@ -172,19 +135,12 @@ ContentImplHelper::ContentImplHelper(
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
// virtual
|
// virtual
|
||||||
ContentImplHelper::~ContentImplHelper()
|
ContentImplHelper::~ContentImplHelper()
|
||||||
{
|
{
|
||||||
delete m_pImpl;
|
delete m_pImpl;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
//
|
|
||||||
// XInterface methods.
|
|
||||||
//
|
|
||||||
//=========================================================================
|
|
||||||
|
|
||||||
void SAL_CALL ContentImplHelper::acquire()
|
void SAL_CALL ContentImplHelper::acquire()
|
||||||
throw()
|
throw()
|
||||||
{
|
{
|
||||||
@@ -222,12 +178,6 @@ uno::Any SAL_CALL ContentImplHelper::queryInterface( const uno::Type & rType )
|
|||||||
return aRet.hasValue() ? aRet : cppu::OWeakObject::queryInterface( rType );
|
return aRet.hasValue() ? aRet : cppu::OWeakObject::queryInterface( rType );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
//
|
|
||||||
// XTypeProvider methods.
|
|
||||||
//
|
|
||||||
//=========================================================================
|
|
||||||
|
|
||||||
XTYPEPROVIDER_IMPL_10( ContentImplHelper,
|
XTYPEPROVIDER_IMPL_10( ContentImplHelper,
|
||||||
lang::XTypeProvider,
|
lang::XTypeProvider,
|
||||||
lang::XServiceInfo,
|
lang::XServiceInfo,
|
||||||
@@ -240,34 +190,14 @@ XTYPEPROVIDER_IMPL_10( ContentImplHelper,
|
|||||||
beans::XPropertySetInfoChangeNotifier,
|
beans::XPropertySetInfoChangeNotifier,
|
||||||
container::XChild );
|
container::XChild );
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
//
|
|
||||||
// XServiceInfo methods.
|
|
||||||
//
|
|
||||||
//=========================================================================
|
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
sal_Bool SAL_CALL ContentImplHelper::supportsService(
|
sal_Bool SAL_CALL ContentImplHelper::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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
//
|
|
||||||
// XComponent methods.
|
|
||||||
//
|
|
||||||
//=========================================================================
|
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
void SAL_CALL ContentImplHelper::dispose()
|
void SAL_CALL ContentImplHelper::dispose()
|
||||||
throw( uno::RuntimeException )
|
throw( uno::RuntimeException )
|
||||||
@@ -316,7 +246,6 @@ void SAL_CALL ContentImplHelper::dispose()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
// virtual
|
// virtual
|
||||||
void SAL_CALL ContentImplHelper::addEventListener(
|
void SAL_CALL ContentImplHelper::addEventListener(
|
||||||
const uno::Reference< lang::XEventListener >& Listener )
|
const uno::Reference< lang::XEventListener >& Listener )
|
||||||
@@ -331,7 +260,6 @@ void SAL_CALL ContentImplHelper::addEventListener(
|
|||||||
m_pImpl->m_pDisposeEventListeners->addInterface( Listener );
|
m_pImpl->m_pDisposeEventListeners->addInterface( Listener );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
// virtual
|
// virtual
|
||||||
void SAL_CALL ContentImplHelper::removeEventListener(
|
void SAL_CALL ContentImplHelper::removeEventListener(
|
||||||
const uno::Reference< lang::XEventListener >& Listener )
|
const uno::Reference< lang::XEventListener >& Listener )
|
||||||
@@ -343,12 +271,6 @@ void SAL_CALL ContentImplHelper::removeEventListener(
|
|||||||
m_pImpl->m_pDisposeEventListeners->removeInterface( Listener );
|
m_pImpl->m_pDisposeEventListeners->removeInterface( Listener );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
//
|
|
||||||
// XContent methods.
|
|
||||||
//
|
|
||||||
//=========================================================================
|
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
uno::Reference< com::sun::star::ucb::XContentIdentifier > SAL_CALL
|
uno::Reference< com::sun::star::ucb::XContentIdentifier > SAL_CALL
|
||||||
ContentImplHelper::getIdentifier()
|
ContentImplHelper::getIdentifier()
|
||||||
@@ -357,7 +279,6 @@ ContentImplHelper::getIdentifier()
|
|||||||
return m_xIdentifier;
|
return m_xIdentifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
// virtual
|
// virtual
|
||||||
void SAL_CALL ContentImplHelper::addContentEventListener(
|
void SAL_CALL ContentImplHelper::addContentEventListener(
|
||||||
const uno::Reference< com::sun::star::ucb::XContentEventListener >& Listener )
|
const uno::Reference< com::sun::star::ucb::XContentEventListener >& Listener )
|
||||||
@@ -372,7 +293,6 @@ void SAL_CALL ContentImplHelper::addContentEventListener(
|
|||||||
m_pImpl->m_pContentEventListeners->addInterface( Listener );
|
m_pImpl->m_pContentEventListeners->addInterface( Listener );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
// virtual
|
// virtual
|
||||||
void SAL_CALL ContentImplHelper::removeContentEventListener(
|
void SAL_CALL ContentImplHelper::removeContentEventListener(
|
||||||
const uno::Reference< com::sun::star::ucb::XContentEventListener >& Listener )
|
const uno::Reference< com::sun::star::ucb::XContentEventListener >& Listener )
|
||||||
@@ -384,12 +304,6 @@ void SAL_CALL ContentImplHelper::removeContentEventListener(
|
|||||||
m_pImpl->m_pContentEventListeners->removeInterface( Listener );
|
m_pImpl->m_pContentEventListeners->removeInterface( Listener );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
//
|
|
||||||
// XCommandProcessor methods.
|
|
||||||
//
|
|
||||||
//=========================================================================
|
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
sal_Int32 SAL_CALL ContentImplHelper::createCommandIdentifier()
|
sal_Int32 SAL_CALL ContentImplHelper::createCommandIdentifier()
|
||||||
throw( uno::RuntimeException )
|
throw( uno::RuntimeException )
|
||||||
@@ -400,12 +314,6 @@ sal_Int32 SAL_CALL ContentImplHelper::createCommandIdentifier()
|
|||||||
return ++m_nCommandId;
|
return ++m_nCommandId;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
//
|
|
||||||
// XPropertiesChangeNotifier methods.
|
|
||||||
//
|
|
||||||
//=========================================================================
|
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
void SAL_CALL ContentImplHelper::addPropertiesChangeListener(
|
void SAL_CALL ContentImplHelper::addPropertiesChangeListener(
|
||||||
const uno::Sequence< OUString >& PropertyNames,
|
const uno::Sequence< OUString >& PropertyNames,
|
||||||
@@ -439,7 +347,6 @@ void SAL_CALL ContentImplHelper::addPropertiesChangeListener(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
// virtual
|
// virtual
|
||||||
void SAL_CALL ContentImplHelper::removePropertiesChangeListener(
|
void SAL_CALL ContentImplHelper::removePropertiesChangeListener(
|
||||||
const uno::Sequence< OUString >& PropertyNames,
|
const uno::Sequence< OUString >& PropertyNames,
|
||||||
@@ -472,12 +379,6 @@ void SAL_CALL ContentImplHelper::removePropertiesChangeListener(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
//
|
|
||||||
// XCommandInfoChangeNotifier methods.
|
|
||||||
//
|
|
||||||
//=========================================================================
|
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
void SAL_CALL ContentImplHelper::addCommandInfoChangeListener(
|
void SAL_CALL ContentImplHelper::addCommandInfoChangeListener(
|
||||||
const uno::Reference< com::sun::star::ucb::XCommandInfoChangeListener >& Listener )
|
const uno::Reference< com::sun::star::ucb::XCommandInfoChangeListener >& Listener )
|
||||||
@@ -492,7 +393,6 @@ void SAL_CALL ContentImplHelper::addCommandInfoChangeListener(
|
|||||||
m_pImpl->m_pCommandChangeListeners->addInterface( Listener );
|
m_pImpl->m_pCommandChangeListeners->addInterface( Listener );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
// virtual
|
// virtual
|
||||||
void SAL_CALL ContentImplHelper::removeCommandInfoChangeListener(
|
void SAL_CALL ContentImplHelper::removeCommandInfoChangeListener(
|
||||||
const uno::Reference< com::sun::star::ucb::XCommandInfoChangeListener >& Listener )
|
const uno::Reference< com::sun::star::ucb::XCommandInfoChangeListener >& Listener )
|
||||||
@@ -504,12 +404,6 @@ void SAL_CALL ContentImplHelper::removeCommandInfoChangeListener(
|
|||||||
m_pImpl->m_pCommandChangeListeners->removeInterface( Listener );
|
m_pImpl->m_pCommandChangeListeners->removeInterface( Listener );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
//
|
|
||||||
// XPropertyContainer methods.
|
|
||||||
//
|
|
||||||
//=========================================================================
|
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
void SAL_CALL ContentImplHelper::addProperty(
|
void SAL_CALL ContentImplHelper::addProperty(
|
||||||
const OUString& Name,
|
const OUString& Name,
|
||||||
@@ -522,10 +416,8 @@ void SAL_CALL ContentImplHelper::addProperty(
|
|||||||
{
|
{
|
||||||
osl::MutexGuard aGuard( m_aMutex );
|
osl::MutexGuard aGuard( m_aMutex );
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Make sure a property with the requested name does not already
|
// Make sure a property with the requested name does not already
|
||||||
// exist in dynamic and static(!) properties.
|
// exist in dynamic and static(!) properties.
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
// @@@ Need real command environment here, but where to get it from?
|
// @@@ Need real command environment here, but where to get it from?
|
||||||
// XPropertyContainer interface should be replaced by
|
// XPropertyContainer interface should be replaced by
|
||||||
@@ -538,10 +430,7 @@ void SAL_CALL ContentImplHelper::addProperty(
|
|||||||
throw beans::PropertyExistException();
|
throw beans::PropertyExistException();
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Add a new dynamic property.
|
// Add a new dynamic property.
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
// Open/create persistent property set.
|
// Open/create persistent property set.
|
||||||
uno::Reference< com::sun::star::ucb::XPersistentPropertySet > xSet(
|
uno::Reference< com::sun::star::ucb::XPersistentPropertySet > xSet(
|
||||||
getAdditionalPropertySet( sal_True ) );
|
getAdditionalPropertySet( sal_True ) );
|
||||||
@@ -606,7 +495,6 @@ void SAL_CALL ContentImplHelper::addProperty(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
// virtual
|
// virtual
|
||||||
void SAL_CALL ContentImplHelper::removeProperty( const OUString& Name )
|
void SAL_CALL ContentImplHelper::removeProperty( const OUString& Name )
|
||||||
throw( beans::UnknownPropertyException,
|
throw( beans::UnknownPropertyException,
|
||||||
@@ -637,10 +525,7 @@ void SAL_CALL ContentImplHelper::removeProperty( const OUString& Name )
|
|||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Try to remove property from dynamic property set.
|
// Try to remove property from dynamic property set.
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
// Open persistent property set, if exists.
|
// Open persistent property set, if exists.
|
||||||
uno::Reference< com::sun::star::ucb::XPersistentPropertySet > xSet(
|
uno::Reference< com::sun::star::ucb::XPersistentPropertySet > xSet(
|
||||||
getAdditionalPropertySet( sal_False ) );
|
getAdditionalPropertySet( sal_False ) );
|
||||||
@@ -709,12 +594,6 @@ void SAL_CALL ContentImplHelper::removeProperty( const OUString& Name )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
//
|
|
||||||
// XPropertySetInfoChangeNotifier methods.
|
|
||||||
//
|
|
||||||
//=========================================================================
|
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
void SAL_CALL ContentImplHelper::addPropertySetInfoChangeListener(
|
void SAL_CALL ContentImplHelper::addPropertySetInfoChangeListener(
|
||||||
const uno::Reference< beans::XPropertySetInfoChangeListener >& Listener )
|
const uno::Reference< beans::XPropertySetInfoChangeListener >& Listener )
|
||||||
@@ -729,7 +608,6 @@ void SAL_CALL ContentImplHelper::addPropertySetInfoChangeListener(
|
|||||||
m_pImpl->m_pPropSetChangeListeners->addInterface( Listener );
|
m_pImpl->m_pPropSetChangeListeners->addInterface( Listener );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
// virtual
|
// virtual
|
||||||
void SAL_CALL ContentImplHelper::removePropertySetInfoChangeListener(
|
void SAL_CALL ContentImplHelper::removePropertySetInfoChangeListener(
|
||||||
const uno::Reference< beans::XPropertySetInfoChangeListener >& Listener )
|
const uno::Reference< beans::XPropertySetInfoChangeListener >& Listener )
|
||||||
@@ -741,12 +619,6 @@ void SAL_CALL ContentImplHelper::removePropertySetInfoChangeListener(
|
|||||||
m_pImpl->m_pPropSetChangeListeners->removeInterface( Listener );
|
m_pImpl->m_pPropSetChangeListeners->removeInterface( Listener );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
//
|
|
||||||
// XChild methods.
|
|
||||||
//
|
|
||||||
//=========================================================================
|
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
uno::Reference< uno::XInterface > SAL_CALL ContentImplHelper::getParent()
|
uno::Reference< uno::XInterface > SAL_CALL ContentImplHelper::getParent()
|
||||||
throw( uno::RuntimeException )
|
throw( uno::RuntimeException )
|
||||||
@@ -770,7 +642,6 @@ uno::Reference< uno::XInterface > SAL_CALL ContentImplHelper::getParent()
|
|||||||
return xParent;
|
return xParent;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
// virtual
|
// virtual
|
||||||
void SAL_CALL ContentImplHelper::setParent(
|
void SAL_CALL ContentImplHelper::setParent(
|
||||||
const uno::Reference< uno::XInterface >& )
|
const uno::Reference< uno::XInterface >& )
|
||||||
@@ -779,12 +650,6 @@ void SAL_CALL ContentImplHelper::setParent(
|
|||||||
throw lang::NoSupportException();
|
throw lang::NoSupportException();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
//
|
|
||||||
// Non-interface methods
|
|
||||||
//
|
|
||||||
//=========================================================================
|
|
||||||
|
|
||||||
uno::Reference< com::sun::star::ucb::XPersistentPropertySet >
|
uno::Reference< com::sun::star::ucb::XPersistentPropertySet >
|
||||||
ContentImplHelper::getAdditionalPropertySet( sal_Bool bCreate )
|
ContentImplHelper::getAdditionalPropertySet( sal_Bool bCreate )
|
||||||
{
|
{
|
||||||
@@ -793,7 +658,6 @@ ContentImplHelper::getAdditionalPropertySet( sal_Bool bCreate )
|
|||||||
m_xIdentifier->getContentIdentifier(), bCreate );
|
m_xIdentifier->getContentIdentifier(), bCreate );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
sal_Bool ContentImplHelper::renameAdditionalPropertySet(
|
sal_Bool ContentImplHelper::renameAdditionalPropertySet(
|
||||||
const OUString& rOldKey,
|
const OUString& rOldKey,
|
||||||
const OUString& rNewKey,
|
const OUString& rNewKey,
|
||||||
@@ -803,7 +667,6 @@ sal_Bool ContentImplHelper::renameAdditionalPropertySet(
|
|||||||
rOldKey, rNewKey, bRecursive );
|
rOldKey, rNewKey, bRecursive );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
sal_Bool ContentImplHelper::copyAdditionalPropertySet(
|
sal_Bool ContentImplHelper::copyAdditionalPropertySet(
|
||||||
const OUString& rSourceKey,
|
const OUString& rSourceKey,
|
||||||
const OUString& rTargetKey,
|
const OUString& rTargetKey,
|
||||||
@@ -813,14 +676,12 @@ sal_Bool ContentImplHelper::copyAdditionalPropertySet(
|
|||||||
rSourceKey, rTargetKey, bRecursive );
|
rSourceKey, rTargetKey, bRecursive );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
sal_Bool ContentImplHelper::removeAdditionalPropertySet( sal_Bool bRecursive )
|
sal_Bool ContentImplHelper::removeAdditionalPropertySet( sal_Bool bRecursive )
|
||||||
{
|
{
|
||||||
return m_xProvider->removeAdditionalPropertySet(
|
return m_xProvider->removeAdditionalPropertySet(
|
||||||
m_xIdentifier->getContentIdentifier(), bRecursive );
|
m_xIdentifier->getContentIdentifier(), bRecursive );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
void ContentImplHelper::notifyPropertiesChange(
|
void ContentImplHelper::notifyPropertiesChange(
|
||||||
const uno::Sequence< beans::PropertyChangeEvent >& evt ) const
|
const uno::Sequence< beans::PropertyChangeEvent >& evt ) const
|
||||||
{
|
{
|
||||||
@@ -906,7 +767,6 @@ void ContentImplHelper::notifyPropertiesChange(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
void ContentImplHelper::notifyPropertySetInfoChange(
|
void ContentImplHelper::notifyPropertySetInfoChange(
|
||||||
const beans::PropertySetInfoChangeEvent& evt ) const
|
const beans::PropertySetInfoChangeEvent& evt ) const
|
||||||
{
|
{
|
||||||
@@ -925,7 +785,6 @@ void ContentImplHelper::notifyPropertySetInfoChange(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
void ContentImplHelper::notifyContentEvent(
|
void ContentImplHelper::notifyContentEvent(
|
||||||
const com::sun::star::ucb::ContentEvent& evt ) const
|
const com::sun::star::ucb::ContentEvent& evt ) const
|
||||||
{
|
{
|
||||||
@@ -945,7 +804,6 @@ void ContentImplHelper::notifyContentEvent(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
void ContentImplHelper::inserted()
|
void ContentImplHelper::inserted()
|
||||||
{
|
{
|
||||||
// Content is not yet registered at provider.
|
// Content is not yet registered at provider.
|
||||||
@@ -968,7 +826,6 @@ void ContentImplHelper::inserted()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
void ContentImplHelper::deleted()
|
void ContentImplHelper::deleted()
|
||||||
{
|
{
|
||||||
uno::Reference< com::sun::star::ucb::XContent > xThis = this;
|
uno::Reference< com::sun::star::ucb::XContent > xThis = this;
|
||||||
@@ -998,7 +855,6 @@ void ContentImplHelper::deleted()
|
|||||||
m_xProvider->removeContent( this );
|
m_xProvider->removeContent( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
sal_Bool ContentImplHelper::exchange(
|
sal_Bool ContentImplHelper::exchange(
|
||||||
const uno::Reference< com::sun::star::ucb::XContentIdentifier >& rNewId )
|
const uno::Reference< com::sun::star::ucb::XContentIdentifier >& rNewId )
|
||||||
{
|
{
|
||||||
@@ -1036,7 +892,6 @@ sal_Bool ContentImplHelper::exchange(
|
|||||||
return sal_True;
|
return sal_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
uno::Reference< com::sun::star::ucb::XCommandInfo >
|
uno::Reference< com::sun::star::ucb::XCommandInfo >
|
||||||
ContentImplHelper::getCommandInfo(
|
ContentImplHelper::getCommandInfo(
|
||||||
const uno::Reference< com::sun::star::ucb::XCommandEnvironment > & xEnv,
|
const uno::Reference< com::sun::star::ucb::XCommandEnvironment > & xEnv,
|
||||||
@@ -1054,7 +909,6 @@ ContentImplHelper::getCommandInfo(
|
|||||||
m_pImpl->m_xCommandsInfo.get() );
|
m_pImpl->m_xCommandsInfo.get() );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
uno::Reference< beans::XPropertySetInfo >
|
uno::Reference< beans::XPropertySetInfo >
|
||||||
ContentImplHelper::getPropertySetInfo(
|
ContentImplHelper::getPropertySetInfo(
|
||||||
const uno::Reference< com::sun::star::ucb::XCommandEnvironment > & xEnv,
|
const uno::Reference< com::sun::star::ucb::XCommandEnvironment > & xEnv,
|
||||||
|
@@ -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
|
|||||||
>
|
>
|
||||||
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
|
|||||||
|
|
||||||
} // namespace ucbhelper_impl
|
} // namespace ucbhelper_impl
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
//=========================================================================
|
|
||||||
//
|
|
||||||
// ContentProviderImplHelper Implementation.
|
|
||||||
//
|
|
||||||
//=========================================================================
|
|
||||||
//=========================================================================
|
|
||||||
|
|
||||||
namespace ucbhelper {
|
namespace ucbhelper {
|
||||||
|
|
||||||
ContentProviderImplHelper::ContentProviderImplHelper(
|
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(
|
|||||||
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()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
|
|
||||||
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 )
|
|||||||
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(
|
|||||||
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 )
|
|||||||
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(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
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(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
uno::Reference< com::sun::star::ucb::XPropertySetRegistry >
|
uno::Reference< com::sun::star::ucb::XPropertySetRegistry >
|
||||||
ContentProviderImplHelper::getAdditionalPropertySetRegistry()
|
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(
|
|||||||
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(
|
|||||||
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(
|
|||||||
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 )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user