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/awt/MouseButton.hpp>
|
||||
#include <com/sun/star/awt/MouseEvent.hpp>
|
||||
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <process.h>
|
||||
#include <memory>
|
||||
|
||||
@@ -68,7 +68,6 @@ DragSource::~DragSource()
|
||||
{
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
/** First start a new drag and drop thread if
|
||||
the last one has finished
|
||||
|
||||
@@ -135,10 +134,7 @@ void DragSource::StartDragImpl(
|
||||
}
|
||||
|
||||
// XInitialization
|
||||
|
||||
//----------------------------------------------------
|
||||
/** aArguments contains a machine id
|
||||
*/
|
||||
/** aArguments contains a machine id */
|
||||
void SAL_CALL DragSource::initialize( const Sequence< Any >& aArguments )
|
||||
throw(Exception, RuntimeException)
|
||||
{
|
||||
@@ -147,28 +143,21 @@ void SAL_CALL DragSource::initialize( const Sequence< Any >& aArguments )
|
||||
OSL_ASSERT( IsWindow( m_hAppWindow) );
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
/** XDragSource
|
||||
*/
|
||||
/** XDragSource */
|
||||
sal_Bool SAL_CALL DragSource::isDragImageSupported( )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
/**
|
||||
*/
|
||||
sal_Int32 SAL_CALL DragSource::getDefaultCursor( sal_Int8 /*dragAction*/ )
|
||||
throw( IllegalArgumentException, RuntimeException)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
/** Notifies the XDragSourceListener by
|
||||
calling dragDropEnd
|
||||
*/
|
||||
calling dragDropEnd */
|
||||
void SAL_CALL DragSource::startDrag(
|
||||
const DragGestureEvent& trigger,
|
||||
sal_Int8 sourceActions,
|
||||
@@ -206,9 +195,7 @@ void SAL_CALL DragSource::startDrag(
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
/**IDropTarget
|
||||
*/
|
||||
/** IDropTarget */
|
||||
HRESULT STDMETHODCALLTYPE DragSource::QueryInterface( REFIID riid, void **ppvObject)
|
||||
{
|
||||
if( !ppvObject)
|
||||
@@ -230,18 +217,12 @@ HRESULT STDMETHODCALLTYPE DragSource::QueryInterface( REFIID riid, void **ppvOb
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
/**
|
||||
*/
|
||||
ULONG STDMETHODCALLTYPE DragSource::AddRef( void)
|
||||
{
|
||||
acquire();
|
||||
return (ULONG) m_refCount;
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
/**
|
||||
*/
|
||||
ULONG STDMETHODCALLTYPE DragSource::Release( void)
|
||||
{
|
||||
ULONG ref= m_refCount;
|
||||
@@ -249,9 +230,7 @@ ULONG STDMETHODCALLTYPE DragSource::Release( void)
|
||||
return --ref;
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
/** IDropSource
|
||||
*/
|
||||
/** IDropSource */
|
||||
HRESULT STDMETHODCALLTYPE DragSource::QueryContinueDrag(
|
||||
/* [in] */ BOOL fEscapePressed,
|
||||
/* [in] */ DWORD grfKeyState)
|
||||
@@ -292,9 +271,6 @@ HRESULT STDMETHODCALLTYPE DragSource::QueryContinueDrag(
|
||||
return retVal;
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
/**
|
||||
*/
|
||||
HRESULT STDMETHODCALLTYPE DragSource::GiveFeedback(
|
||||
/* [in] */ DWORD
|
||||
#if defined DBG_CONSOLE_OUT
|
||||
@@ -317,9 +293,7 @@ OUString SAL_CALL DragSource::getImplementationName( ) throw (RuntimeException)
|
||||
// XServiceInfo
|
||||
sal_Bool SAL_CALL DragSource::supportsService( const OUString& ServiceName ) throw (RuntimeException)
|
||||
{
|
||||
if( ServiceName == DNDSOURCE_SERVICE_NAME )
|
||||
return sal_True;
|
||||
return sal_False;
|
||||
return cppu::supportsService(this, ServiceName);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
/** This function is called as extra thread from
|
||||
DragSource::executeDrag. The function
|
||||
carries out a drag and drop operation by calling
|
||||
DoDragDrop. The thread also notifies all
|
||||
XSourceListener.
|
||||
*/
|
||||
XSourceListener. */
|
||||
unsigned __stdcall DndOleSTAFunc(LPVOID pParams)
|
||||
{
|
||||
// The structure contains all arguments for DoDragDrop and other
|
||||
@@ -400,7 +372,4 @@ unsigned __stdcall DndOleSTAFunc(LPVOID pParams)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -19,7 +19,7 @@
|
||||
|
||||
#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp>
|
||||
#include <com/sun/star/datatransfer/XTransferable.hpp>
|
||||
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <stdio.h>
|
||||
#include "target.hxx"
|
||||
#include "idroptarget.hxx"
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "targetdropcontext.hxx"
|
||||
#include "targetdragcontext.hxx"
|
||||
#include <rtl/ustring.h>
|
||||
|
||||
using namespace cppu;
|
||||
using namespace osl;
|
||||
using namespace com::sun::star::datatransfer;
|
||||
@@ -238,9 +239,6 @@ DWORD WINAPI DndTargetOleSTAFunc(LPVOID pParams)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// XServiceInfo
|
||||
OUString SAL_CALL DropTarget::getImplementationName( ) throw (RuntimeException)
|
||||
{
|
||||
@@ -249,9 +247,7 @@ OUString SAL_CALL DropTarget::getImplementationName( ) throw (RuntimeException)
|
||||
// XServiceInfo
|
||||
sal_Bool SAL_CALL DropTarget::supportsService( const OUString& ServiceName ) throw (RuntimeException)
|
||||
{
|
||||
if( ServiceName == DNDTARGET_SERVICE_NAME )
|
||||
return sal_True;
|
||||
return sal_False;
|
||||
return cppu::supportsService(this, ServiceName);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
// XDropTarget ----------------------------------------------------------------
|
||||
// XDropTarget
|
||||
void SAL_CALL DropTarget::addDropTargetListener( const Reference< XDropTargetListener >& dtl )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@@ -286,7 +281,6 @@ void SAL_CALL DropTarget::setActive( sal_Bool _b ) throw(RuntimeException)
|
||||
m_bActive= _b;
|
||||
}
|
||||
|
||||
|
||||
sal_Int8 SAL_CALL DropTarget::getDefaultActions( ) throw(RuntimeException)
|
||||
{
|
||||
return m_nDefaultActions;
|
||||
@@ -298,7 +292,6 @@ void SAL_CALL DropTarget::setDefaultActions( sal_Int8 actions ) throw(RuntimeExc
|
||||
m_nDefaultActions= actions;
|
||||
}
|
||||
|
||||
|
||||
HRESULT DropTarget::DragEnter( IDataObject *pDataObj,
|
||||
DWORD grfKeyState,
|
||||
POINTL pt,
|
||||
@@ -490,8 +483,6 @@ HRESULT DropTarget::Drop( IDataObject * /*pDataObj*/,
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void DropTarget::fire_drop( const DropTargetDropEvent& dte)
|
||||
{
|
||||
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
|
||||
// XDropTargetDropContext implementaion. When the listener calls on that interface
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
// DropTarget fires events to XDropTargetListeners. The event object can contains an
|
||||
// XDropTargetDragContext implementaion. When the listener calls on that interface
|
||||
// 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
|
||||
// key modifiers ( CTRL, SHIFT, ALT, Right Mouse Button). The result
|
||||
// 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 .
|
||||
*/
|
||||
|
||||
#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 <com/sun/star/lang/XServiceInfo.hpp>
|
||||
#include <com/sun/star/lang/XComponent.hpp>
|
||||
#include <com/sun/star/registry/XRegistryKey.hpp>
|
||||
#include <com/sun/star/connection/XConnector.hpp>
|
||||
#include <com/sun/star/lang/XServiceInfo.hpp>
|
||||
#include <com/sun/star/bridge/BridgeFactory.hpp>
|
||||
#include <com/sun/star/bridge/XBridgeFactory.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 osl;
|
||||
@@ -47,7 +48,7 @@ using namespace com::sun::star::registry;
|
||||
|
||||
namespace unourl_resolver
|
||||
{
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Sequence< OUString > resolver_getSupportedServiceNames()
|
||||
{
|
||||
Sequence< OUString > seqNames(1);
|
||||
@@ -60,7 +61,6 @@ OUString resolver_getImplementationName()
|
||||
return OUString(IMPLNAME);
|
||||
}
|
||||
|
||||
//==================================================================================================
|
||||
class ResolverImpl : public WeakImplHelper2< XServiceInfo, XUnoUrlResolver >
|
||||
{
|
||||
Reference< XMultiComponentFactory > _xSMgr;
|
||||
@@ -80,37 +80,26 @@ public:
|
||||
throw (NoConnectException, ConnectionSetupException, RuntimeException);
|
||||
};
|
||||
|
||||
//##################################################################################################
|
||||
|
||||
//__________________________________________________________________________________________________
|
||||
ResolverImpl::ResolverImpl( const Reference< XComponentContext > & xCtx )
|
||||
: _xSMgr( xCtx->getServiceManager() )
|
||||
, _xCtx( xCtx )
|
||||
{}
|
||||
//__________________________________________________________________________________________________
|
||||
|
||||
ResolverImpl::~ResolverImpl() {}
|
||||
|
||||
// XServiceInfo
|
||||
//__________________________________________________________________________________________________
|
||||
OUString ResolverImpl::getImplementationName()
|
||||
throw(::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
return resolver_getImplementationName();
|
||||
}
|
||||
//__________________________________________________________________________________________________
|
||||
|
||||
sal_Bool ResolverImpl::supportsService( const OUString & rServiceName )
|
||||
throw(::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
const Sequence< OUString > & rSNL = getSupportedServiceNames();
|
||||
const OUString * pArray = rSNL.getConstArray();
|
||||
for ( sal_Int32 nPos = rSNL.getLength(); nPos--; )
|
||||
{
|
||||
if (pArray[nPos] == rServiceName)
|
||||
return sal_True;
|
||||
return cppu::supportsService(this, rServiceName);
|
||||
}
|
||||
return sal_False;
|
||||
}
|
||||
//__________________________________________________________________________________________________
|
||||
|
||||
Sequence< OUString > ResolverImpl::getSupportedServiceNames()
|
||||
throw(::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
@@ -118,7 +107,6 @@ Sequence< OUString > ResolverImpl::getSupportedServiceNames()
|
||||
}
|
||||
|
||||
// XUnoUrlResolver
|
||||
//__________________________________________________________________________________________________
|
||||
Reference< XInterface > ResolverImpl::resolve( const OUString & rUnoUrl )
|
||||
throw (NoConnectException, ConnectionSetupException, RuntimeException)
|
||||
{
|
||||
@@ -161,13 +149,11 @@ Reference< XInterface > ResolverImpl::resolve( const OUString & rUnoUrl )
|
||||
return xRet;
|
||||
}
|
||||
|
||||
//==================================================================================================
|
||||
static Reference< XInterface > SAL_CALL ResolverImpl_create( const Reference< XComponentContext > & xCtx )
|
||||
{
|
||||
return Reference< XInterface >( *new ResolverImpl( xCtx ) );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
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 .
|
||||
*/
|
||||
|
||||
/**************************************************************************
|
||||
TODO
|
||||
**************************************************************************
|
||||
|
||||
*************************************************************************/
|
||||
|
||||
#include <boost/unordered_map.hpp>
|
||||
#include <com/sun/star/ucb/ContentAction.hpp>
|
||||
#include <com/sun/star/ucb/CommandInfoChange.hpp>
|
||||
@@ -30,26 +24,21 @@
|
||||
#include <com/sun/star/beans/PropertyAttribute.hpp>
|
||||
#include <com/sun/star/beans/PropertySetInfoChange.hpp>
|
||||
#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/mutex.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;
|
||||
|
||||
namespace ucbhelper_impl
|
||||
{
|
||||
|
||||
//=========================================================================
|
||||
//
|
||||
// class PropertyEventSequence.
|
||||
//
|
||||
//=========================================================================
|
||||
|
||||
class PropertyEventSequence
|
||||
{
|
||||
uno::Sequence< beans::PropertyChangeEvent > m_aSeq;
|
||||
@@ -66,12 +55,6 @@ public:
|
||||
{ m_aSeq.realloc( m_nPos ); return m_aSeq; }
|
||||
};
|
||||
|
||||
//=========================================================================
|
||||
//
|
||||
// PropertiesEventListenerMap.
|
||||
//
|
||||
//=========================================================================
|
||||
|
||||
typedef void* XPropertiesChangeListenerPtr; // -> Compiler problems!
|
||||
|
||||
struct equalPtr
|
||||
@@ -100,24 +83,12 @@ typedef boost::unordered_map
|
||||
>
|
||||
PropertiesEventListenerMap;
|
||||
|
||||
//=========================================================================
|
||||
//
|
||||
// PropertyChangeListenerContainer.
|
||||
//
|
||||
//=========================================================================
|
||||
|
||||
typedef cppu::OMultiTypeInterfaceContainerHelperVar
|
||||
<
|
||||
OUString,
|
||||
OUStringHash
|
||||
> PropertyChangeListeners;
|
||||
|
||||
//=========================================================================
|
||||
//
|
||||
// struct ContentImplHelper_Impl
|
||||
//
|
||||
//=========================================================================
|
||||
|
||||
struct ContentImplHelper_Impl
|
||||
{
|
||||
rtl::Reference< ::ucbhelper::PropertySetInfo > m_xPropSetInfo;
|
||||
@@ -149,14 +120,6 @@ struct ContentImplHelper_Impl
|
||||
|
||||
using namespace ucbhelper_impl;
|
||||
|
||||
//=========================================================================
|
||||
//=========================================================================
|
||||
//
|
||||
// ContentImplHelper Implementation.
|
||||
//
|
||||
//=========================================================================
|
||||
//=========================================================================
|
||||
|
||||
namespace ucbhelper {
|
||||
|
||||
ContentImplHelper::ContentImplHelper(
|
||||
@@ -172,19 +135,12 @@ ContentImplHelper::ContentImplHelper(
|
||||
{
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
// virtual
|
||||
ContentImplHelper::~ContentImplHelper()
|
||||
{
|
||||
delete m_pImpl;
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
//
|
||||
// XInterface methods.
|
||||
//
|
||||
//=========================================================================
|
||||
|
||||
void SAL_CALL ContentImplHelper::acquire()
|
||||
throw()
|
||||
{
|
||||
@@ -222,12 +178,6 @@ uno::Any SAL_CALL ContentImplHelper::queryInterface( const uno::Type & rType )
|
||||
return aRet.hasValue() ? aRet : cppu::OWeakObject::queryInterface( rType );
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
//
|
||||
// XTypeProvider methods.
|
||||
//
|
||||
//=========================================================================
|
||||
|
||||
XTYPEPROVIDER_IMPL_10( ContentImplHelper,
|
||||
lang::XTypeProvider,
|
||||
lang::XServiceInfo,
|
||||
@@ -240,34 +190,14 @@ XTYPEPROVIDER_IMPL_10( ContentImplHelper,
|
||||
beans::XPropertySetInfoChangeNotifier,
|
||||
container::XChild );
|
||||
|
||||
//=========================================================================
|
||||
//
|
||||
// XServiceInfo methods.
|
||||
//
|
||||
//=========================================================================
|
||||
|
||||
// virtual
|
||||
sal_Bool SAL_CALL ContentImplHelper::supportsService(
|
||||
const OUString& ServiceName )
|
||||
throw( uno::RuntimeException )
|
||||
{
|
||||
uno::Sequence< OUString > aSNL = getSupportedServiceNames();
|
||||
const OUString* pArray = aSNL.getConstArray();
|
||||
for ( sal_Int32 i = 0; i < aSNL.getLength(); i++ )
|
||||
{
|
||||
if ( pArray[ i ] == ServiceName )
|
||||
return sal_True;
|
||||
return cppu::supportsService(this, ServiceName);
|
||||
}
|
||||
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
//
|
||||
// XComponent methods.
|
||||
//
|
||||
//=========================================================================
|
||||
|
||||
// virtual
|
||||
void SAL_CALL ContentImplHelper::dispose()
|
||||
throw( uno::RuntimeException )
|
||||
@@ -316,7 +246,6 @@ void SAL_CALL ContentImplHelper::dispose()
|
||||
}
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
// virtual
|
||||
void SAL_CALL ContentImplHelper::addEventListener(
|
||||
const uno::Reference< lang::XEventListener >& Listener )
|
||||
@@ -331,7 +260,6 @@ void SAL_CALL ContentImplHelper::addEventListener(
|
||||
m_pImpl->m_pDisposeEventListeners->addInterface( Listener );
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
// virtual
|
||||
void SAL_CALL ContentImplHelper::removeEventListener(
|
||||
const uno::Reference< lang::XEventListener >& Listener )
|
||||
@@ -343,12 +271,6 @@ void SAL_CALL ContentImplHelper::removeEventListener(
|
||||
m_pImpl->m_pDisposeEventListeners->removeInterface( Listener );
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
//
|
||||
// XContent methods.
|
||||
//
|
||||
//=========================================================================
|
||||
|
||||
// virtual
|
||||
uno::Reference< com::sun::star::ucb::XContentIdentifier > SAL_CALL
|
||||
ContentImplHelper::getIdentifier()
|
||||
@@ -357,7 +279,6 @@ ContentImplHelper::getIdentifier()
|
||||
return m_xIdentifier;
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
// virtual
|
||||
void SAL_CALL ContentImplHelper::addContentEventListener(
|
||||
const uno::Reference< com::sun::star::ucb::XContentEventListener >& Listener )
|
||||
@@ -372,7 +293,6 @@ void SAL_CALL ContentImplHelper::addContentEventListener(
|
||||
m_pImpl->m_pContentEventListeners->addInterface( Listener );
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
// virtual
|
||||
void SAL_CALL ContentImplHelper::removeContentEventListener(
|
||||
const uno::Reference< com::sun::star::ucb::XContentEventListener >& Listener )
|
||||
@@ -384,12 +304,6 @@ void SAL_CALL ContentImplHelper::removeContentEventListener(
|
||||
m_pImpl->m_pContentEventListeners->removeInterface( Listener );
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
//
|
||||
// XCommandProcessor methods.
|
||||
//
|
||||
//=========================================================================
|
||||
|
||||
// virtual
|
||||
sal_Int32 SAL_CALL ContentImplHelper::createCommandIdentifier()
|
||||
throw( uno::RuntimeException )
|
||||
@@ -400,12 +314,6 @@ sal_Int32 SAL_CALL ContentImplHelper::createCommandIdentifier()
|
||||
return ++m_nCommandId;
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
//
|
||||
// XPropertiesChangeNotifier methods.
|
||||
//
|
||||
//=========================================================================
|
||||
|
||||
// virtual
|
||||
void SAL_CALL ContentImplHelper::addPropertiesChangeListener(
|
||||
const uno::Sequence< OUString >& PropertyNames,
|
||||
@@ -439,7 +347,6 @@ void SAL_CALL ContentImplHelper::addPropertiesChangeListener(
|
||||
}
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
// virtual
|
||||
void SAL_CALL ContentImplHelper::removePropertiesChangeListener(
|
||||
const uno::Sequence< OUString >& PropertyNames,
|
||||
@@ -472,12 +379,6 @@ void SAL_CALL ContentImplHelper::removePropertiesChangeListener(
|
||||
}
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
//
|
||||
// XCommandInfoChangeNotifier methods.
|
||||
//
|
||||
//=========================================================================
|
||||
|
||||
// virtual
|
||||
void SAL_CALL ContentImplHelper::addCommandInfoChangeListener(
|
||||
const uno::Reference< com::sun::star::ucb::XCommandInfoChangeListener >& Listener )
|
||||
@@ -492,7 +393,6 @@ void SAL_CALL ContentImplHelper::addCommandInfoChangeListener(
|
||||
m_pImpl->m_pCommandChangeListeners->addInterface( Listener );
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
// virtual
|
||||
void SAL_CALL ContentImplHelper::removeCommandInfoChangeListener(
|
||||
const uno::Reference< com::sun::star::ucb::XCommandInfoChangeListener >& Listener )
|
||||
@@ -504,12 +404,6 @@ void SAL_CALL ContentImplHelper::removeCommandInfoChangeListener(
|
||||
m_pImpl->m_pCommandChangeListeners->removeInterface( Listener );
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
//
|
||||
// XPropertyContainer methods.
|
||||
//
|
||||
//=========================================================================
|
||||
|
||||
// virtual
|
||||
void SAL_CALL ContentImplHelper::addProperty(
|
||||
const OUString& Name,
|
||||
@@ -522,10 +416,8 @@ void SAL_CALL ContentImplHelper::addProperty(
|
||||
{
|
||||
osl::MutexGuard aGuard( m_aMutex );
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Make sure a property with the requested name does not already
|
||||
// exist in dynamic and static(!) properties.
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
// @@@ Need real command environment here, but where to get it from?
|
||||
// XPropertyContainer interface should be replaced by
|
||||
@@ -538,10 +430,7 @@ void SAL_CALL ContentImplHelper::addProperty(
|
||||
throw beans::PropertyExistException();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Add a new dynamic property.
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Open/create persistent property set.
|
||||
uno::Reference< com::sun::star::ucb::XPersistentPropertySet > xSet(
|
||||
getAdditionalPropertySet( sal_True ) );
|
||||
@@ -606,7 +495,6 @@ void SAL_CALL ContentImplHelper::addProperty(
|
||||
}
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
// virtual
|
||||
void SAL_CALL ContentImplHelper::removeProperty( const OUString& Name )
|
||||
throw( beans::UnknownPropertyException,
|
||||
@@ -637,10 +525,7 @@ void SAL_CALL ContentImplHelper::removeProperty( const OUString& Name )
|
||||
throw;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Try to remove property from dynamic property set.
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Open persistent property set, if exists.
|
||||
uno::Reference< com::sun::star::ucb::XPersistentPropertySet > xSet(
|
||||
getAdditionalPropertySet( sal_False ) );
|
||||
@@ -709,12 +594,6 @@ void SAL_CALL ContentImplHelper::removeProperty( const OUString& Name )
|
||||
}
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
//
|
||||
// XPropertySetInfoChangeNotifier methods.
|
||||
//
|
||||
//=========================================================================
|
||||
|
||||
// virtual
|
||||
void SAL_CALL ContentImplHelper::addPropertySetInfoChangeListener(
|
||||
const uno::Reference< beans::XPropertySetInfoChangeListener >& Listener )
|
||||
@@ -729,7 +608,6 @@ void SAL_CALL ContentImplHelper::addPropertySetInfoChangeListener(
|
||||
m_pImpl->m_pPropSetChangeListeners->addInterface( Listener );
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
// virtual
|
||||
void SAL_CALL ContentImplHelper::removePropertySetInfoChangeListener(
|
||||
const uno::Reference< beans::XPropertySetInfoChangeListener >& Listener )
|
||||
@@ -741,12 +619,6 @@ void SAL_CALL ContentImplHelper::removePropertySetInfoChangeListener(
|
||||
m_pImpl->m_pPropSetChangeListeners->removeInterface( Listener );
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
//
|
||||
// XChild methods.
|
||||
//
|
||||
//=========================================================================
|
||||
|
||||
// virtual
|
||||
uno::Reference< uno::XInterface > SAL_CALL ContentImplHelper::getParent()
|
||||
throw( uno::RuntimeException )
|
||||
@@ -770,7 +642,6 @@ uno::Reference< uno::XInterface > SAL_CALL ContentImplHelper::getParent()
|
||||
return xParent;
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
// virtual
|
||||
void SAL_CALL ContentImplHelper::setParent(
|
||||
const uno::Reference< uno::XInterface >& )
|
||||
@@ -779,12 +650,6 @@ void SAL_CALL ContentImplHelper::setParent(
|
||||
throw lang::NoSupportException();
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
//
|
||||
// Non-interface methods
|
||||
//
|
||||
//=========================================================================
|
||||
|
||||
uno::Reference< com::sun::star::ucb::XPersistentPropertySet >
|
||||
ContentImplHelper::getAdditionalPropertySet( sal_Bool bCreate )
|
||||
{
|
||||
@@ -793,7 +658,6 @@ ContentImplHelper::getAdditionalPropertySet( sal_Bool bCreate )
|
||||
m_xIdentifier->getContentIdentifier(), bCreate );
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
sal_Bool ContentImplHelper::renameAdditionalPropertySet(
|
||||
const OUString& rOldKey,
|
||||
const OUString& rNewKey,
|
||||
@@ -803,7 +667,6 @@ sal_Bool ContentImplHelper::renameAdditionalPropertySet(
|
||||
rOldKey, rNewKey, bRecursive );
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
sal_Bool ContentImplHelper::copyAdditionalPropertySet(
|
||||
const OUString& rSourceKey,
|
||||
const OUString& rTargetKey,
|
||||
@@ -813,14 +676,12 @@ sal_Bool ContentImplHelper::copyAdditionalPropertySet(
|
||||
rSourceKey, rTargetKey, bRecursive );
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
sal_Bool ContentImplHelper::removeAdditionalPropertySet( sal_Bool bRecursive )
|
||||
{
|
||||
return m_xProvider->removeAdditionalPropertySet(
|
||||
m_xIdentifier->getContentIdentifier(), bRecursive );
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
void ContentImplHelper::notifyPropertiesChange(
|
||||
const uno::Sequence< beans::PropertyChangeEvent >& evt ) const
|
||||
{
|
||||
@@ -906,7 +767,6 @@ void ContentImplHelper::notifyPropertiesChange(
|
||||
}
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
void ContentImplHelper::notifyPropertySetInfoChange(
|
||||
const beans::PropertySetInfoChangeEvent& evt ) const
|
||||
{
|
||||
@@ -925,7 +785,6 @@ void ContentImplHelper::notifyPropertySetInfoChange(
|
||||
}
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
void ContentImplHelper::notifyContentEvent(
|
||||
const com::sun::star::ucb::ContentEvent& evt ) const
|
||||
{
|
||||
@@ -945,7 +804,6 @@ void ContentImplHelper::notifyContentEvent(
|
||||
}
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
void ContentImplHelper::inserted()
|
||||
{
|
||||
// Content is not yet registered at provider.
|
||||
@@ -968,7 +826,6 @@ void ContentImplHelper::inserted()
|
||||
}
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
void ContentImplHelper::deleted()
|
||||
{
|
||||
uno::Reference< com::sun::star::ucb::XContent > xThis = this;
|
||||
@@ -998,7 +855,6 @@ void ContentImplHelper::deleted()
|
||||
m_xProvider->removeContent( this );
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
sal_Bool ContentImplHelper::exchange(
|
||||
const uno::Reference< com::sun::star::ucb::XContentIdentifier >& rNewId )
|
||||
{
|
||||
@@ -1036,7 +892,6 @@ sal_Bool ContentImplHelper::exchange(
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
uno::Reference< com::sun::star::ucb::XCommandInfo >
|
||||
ContentImplHelper::getCommandInfo(
|
||||
const uno::Reference< com::sun::star::ucb::XCommandEnvironment > & xEnv,
|
||||
@@ -1054,7 +909,6 @@ ContentImplHelper::getCommandInfo(
|
||||
m_pImpl->m_xCommandsInfo.get() );
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
uno::Reference< beans::XPropertySetInfo >
|
||||
ContentImplHelper::getPropertySetInfo(
|
||||
const uno::Reference< com::sun::star::ucb::XCommandEnvironment > & xEnv,
|
||||
|
@@ -17,39 +17,27 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
TODO
|
||||
**************************************************************************
|
||||
|
||||
*************************************************************************/
|
||||
|
||||
#include <boost/unordered_map.hpp>
|
||||
#include <com/sun/star/beans/XPropertyAccess.hpp>
|
||||
#include <com/sun/star/container/XNameAccess.hpp>
|
||||
#include <com/sun/star/container/XNamed.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/XPropertySetRegistryFactory.hpp>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <ucbhelper/contenthelper.hxx>
|
||||
#include <ucbhelper/contentidentifier.hxx>
|
||||
#include <ucbhelper/providerhelper.hxx>
|
||||
|
||||
#include "osl/diagnose.h"
|
||||
#include "osl/mutex.hxx"
|
||||
#include "cppuhelper/weakref.hxx"
|
||||
#include <ucbhelper/contentidentifier.hxx>
|
||||
#include <ucbhelper/providerhelper.hxx>
|
||||
#include <ucbhelper/contenthelper.hxx>
|
||||
|
||||
using namespace com::sun::star;
|
||||
|
||||
namespace ucbhelper_impl
|
||||
{
|
||||
|
||||
//=========================================================================
|
||||
//
|
||||
// Contents.
|
||||
//
|
||||
//=========================================================================
|
||||
|
||||
struct equalString
|
||||
{
|
||||
bool operator()(
|
||||
@@ -76,12 +64,6 @@ typedef boost::unordered_map
|
||||
>
|
||||
Contents;
|
||||
|
||||
//=========================================================================
|
||||
//
|
||||
// struct ContentProviderImplHelper_Impl.
|
||||
//
|
||||
//=========================================================================
|
||||
|
||||
struct ContentProviderImplHelper_Impl
|
||||
{
|
||||
uno::Reference< com::sun::star::ucb::XPropertySetRegistry >
|
||||
@@ -92,14 +74,6 @@ struct ContentProviderImplHelper_Impl
|
||||
|
||||
} // namespace ucbhelper_impl
|
||||
|
||||
//=========================================================================
|
||||
//=========================================================================
|
||||
//
|
||||
// ContentProviderImplHelper Implementation.
|
||||
//
|
||||
//=========================================================================
|
||||
//=========================================================================
|
||||
|
||||
namespace ucbhelper {
|
||||
|
||||
ContentProviderImplHelper::ContentProviderImplHelper(
|
||||
@@ -109,63 +83,30 @@ ContentProviderImplHelper::ContentProviderImplHelper(
|
||||
{
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
// virtual
|
||||
ContentProviderImplHelper::~ContentProviderImplHelper()
|
||||
{
|
||||
delete m_pImpl;
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
//
|
||||
// XInterface methods.
|
||||
//
|
||||
//=========================================================================
|
||||
|
||||
XINTERFACE_IMPL_3( ContentProviderImplHelper,
|
||||
lang::XTypeProvider,
|
||||
lang::XServiceInfo,
|
||||
com::sun::star::ucb::XContentProvider );
|
||||
|
||||
//=========================================================================
|
||||
//
|
||||
// XTypeProvider methods.
|
||||
//
|
||||
//=========================================================================
|
||||
|
||||
XTYPEPROVIDER_IMPL_3( ContentProviderImplHelper,
|
||||
lang::XTypeProvider,
|
||||
lang::XServiceInfo,
|
||||
com::sun::star::ucb::XContentProvider );
|
||||
|
||||
//=========================================================================
|
||||
//
|
||||
// XServiceInfo methods.
|
||||
//
|
||||
//=========================================================================
|
||||
|
||||
// virtual
|
||||
sal_Bool SAL_CALL ContentProviderImplHelper::supportsService(
|
||||
const OUString& ServiceName )
|
||||
throw( uno::RuntimeException )
|
||||
{
|
||||
uno::Sequence< OUString > aSNL = getSupportedServiceNames();
|
||||
const OUString* pArray = aSNL.getConstArray();
|
||||
for ( sal_Int32 i = 0; i < aSNL.getLength(); i++ )
|
||||
{
|
||||
if ( pArray[ i ] == ServiceName )
|
||||
return sal_True;
|
||||
return cppu::supportsService(this, ServiceName);
|
||||
}
|
||||
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
//
|
||||
// XContentProvider methods.
|
||||
//
|
||||
//=========================================================================
|
||||
|
||||
// virtual
|
||||
sal_Int32 SAL_CALL ContentProviderImplHelper::compareContentIds(
|
||||
const uno::Reference< com::sun::star::ucb::XContentIdentifier >& Id1,
|
||||
@@ -180,12 +121,6 @@ sal_Int32 SAL_CALL ContentProviderImplHelper::compareContentIds(
|
||||
return aURL1.compareTo( aURL2 );
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
//
|
||||
// Non-interface methods
|
||||
//
|
||||
//=========================================================================
|
||||
|
||||
void ContentProviderImplHelper::cleanupRegisteredContents()
|
||||
{
|
||||
osl::MutexGuard aGuard( m_aMutex );
|
||||
@@ -208,8 +143,6 @@ void ContentProviderImplHelper::cleanupRegisteredContents()
|
||||
}
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
|
||||
void ContentProviderImplHelper::removeContent( ContentImplHelper* pContent )
|
||||
{
|
||||
osl::MutexGuard aGuard( m_aMutex );
|
||||
@@ -225,7 +158,6 @@ void ContentProviderImplHelper::removeContent( ContentImplHelper* pContent )
|
||||
m_pImpl->m_aContents.erase( it );
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
rtl::Reference< ContentImplHelper >
|
||||
ContentProviderImplHelper::queryExistingContent(
|
||||
const uno::Reference< com::sun::star::ucb::XContentIdentifier >&
|
||||
@@ -234,7 +166,6 @@ ContentProviderImplHelper::queryExistingContent(
|
||||
return queryExistingContent( Identifier->getContentIdentifier() );
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
rtl::Reference< ContentImplHelper >
|
||||
ContentProviderImplHelper::queryExistingContent( const OUString& rURL )
|
||||
{
|
||||
@@ -258,7 +189,6 @@ ContentProviderImplHelper::queryExistingContent( const OUString& rURL )
|
||||
return rtl::Reference< ContentImplHelper >();
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
void ContentProviderImplHelper::queryExistingContents(
|
||||
ContentRefList& rContents )
|
||||
{
|
||||
@@ -284,7 +214,6 @@ void ContentProviderImplHelper::queryExistingContents(
|
||||
}
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
void ContentProviderImplHelper::registerNewContent(
|
||||
const uno::Reference< ucb::XContent > & xContent )
|
||||
{
|
||||
@@ -303,7 +232,6 @@ void ContentProviderImplHelper::registerNewContent(
|
||||
}
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
uno::Reference< com::sun::star::ucb::XPropertySetRegistry >
|
||||
ContentProviderImplHelper::getAdditionalPropertySetRegistry()
|
||||
{
|
||||
@@ -328,8 +256,6 @@ ContentProviderImplHelper::getAdditionalPropertySetRegistry()
|
||||
return m_pImpl->m_xPropertySetRegistry;
|
||||
}
|
||||
|
||||
|
||||
//=========================================================================
|
||||
uno::Reference< com::sun::star::ucb::XPersistentPropertySet >
|
||||
ContentProviderImplHelper::getAdditionalPropertySet(
|
||||
const OUString& rKey, sal_Bool bCreate )
|
||||
@@ -348,7 +274,6 @@ ContentProviderImplHelper::getAdditionalPropertySet(
|
||||
return uno::Reference< com::sun::star::ucb::XPersistentPropertySet >();
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
sal_Bool ContentProviderImplHelper::renameAdditionalPropertySet(
|
||||
const OUString& rOldKey,
|
||||
const OUString& rNewKey,
|
||||
@@ -433,7 +358,6 @@ sal_Bool ContentProviderImplHelper::renameAdditionalPropertySet(
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
sal_Bool ContentProviderImplHelper::copyAdditionalPropertySet(
|
||||
const OUString& rSourceKey,
|
||||
const OUString& rTargetKey,
|
||||
@@ -575,7 +499,6 @@ sal_Bool ContentProviderImplHelper::copyAdditionalPropertySet(
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
sal_Bool ContentProviderImplHelper::removeAdditionalPropertySet(
|
||||
const OUString& rKey, sal_Bool bRecursive )
|
||||
{
|
||||
|
Reference in New Issue
Block a user