fdo#54938 Convert comphelper and vcl to cppu::supportsService
Change-Id: I391a7324bf92208fe632dac17874943343b1f65a Reviewed-on: https://gerrit.libreoffice.org/7757 Reviewed-by: Marcos Souza <marcos.souza.org@gmail.com> Tested-by: Marcos Souza <marcos.souza.org@gmail.com>
This commit is contained in:
parent
a7395942ae
commit
e17cf91032
@ -17,7 +17,6 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
|
||||
#include "comphelper_module.hxx"
|
||||
|
||||
#include <com/sun/star/ucb/XAnyCompareFactory.hpp>
|
||||
@ -27,21 +26,18 @@
|
||||
#include <com/sun/star/beans/PropertyValue.hpp>
|
||||
#include <cppuhelper/implbase3.hxx>
|
||||
#include <cppuhelper/implbase1.hxx>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <com/sun/star/lang/XServiceInfo.hpp>
|
||||
#include <com/sun/star/lang/XInitialization.hpp>
|
||||
#include <com/sun/star/lang/IllegalArgumentException.hpp>
|
||||
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
|
||||
#include <map>
|
||||
|
||||
|
||||
using namespace com::sun::star::uno;
|
||||
using namespace com::sun::star::ucb;
|
||||
using namespace com::sun::star::lang;
|
||||
using namespace com::sun::star::i18n;
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
||||
class AnyCompare : public ::cppu::WeakImplHelper1< XAnyCompare >
|
||||
{
|
||||
Reference< XCollator > m_rCollator;
|
||||
@ -57,8 +53,6 @@ public:
|
||||
virtual sal_Int16 SAL_CALL compare( const Any& any1, const Any& any2 ) throw(RuntimeException);
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
||||
class AnyCompareFactory : public cppu::WeakImplHelper3< XAnyCompareFactory, XInitialization, XServiceInfo >
|
||||
{
|
||||
Reference< XAnyCompare > m_rAnyCompare;
|
||||
@ -87,8 +81,6 @@ public:
|
||||
static Reference< XInterface > SAL_CALL Create( const Reference< XComponentContext >& );
|
||||
};
|
||||
|
||||
//===========================================================================================
|
||||
|
||||
sal_Int16 SAL_CALL AnyCompare::compare( const Any& any1, const Any& any2 ) throw(::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
sal_Int16 aResult = 0;
|
||||
@ -104,8 +96,6 @@ sal_Int16 SAL_CALL AnyCompare::compare( const Any& any1, const Any& any2 ) throw
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//===========================================================================================
|
||||
|
||||
Reference< XAnyCompare > SAL_CALL AnyCompareFactory::createAnyCompareByName( const OUString& aPropertyName ) throw(::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
// for now only OUString properties compare is implemented
|
||||
@ -127,7 +117,6 @@ void SAL_CALL AnyCompareFactory::initialize( const Sequence< Any >& aArguments )
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
OUString SAL_CALL AnyCompareFactory::getImplementationName( ) throw( RuntimeException )
|
||||
@ -142,8 +131,7 @@ OUString SAL_CALL AnyCompareFactory::getImplementationName_static( )
|
||||
|
||||
sal_Bool SAL_CALL AnyCompareFactory::supportsService( const OUString& ServiceName ) throw(RuntimeException)
|
||||
{
|
||||
OUString aServiceName( "com.sun.star.ucb.AnyCompareFactory" );
|
||||
return aServiceName == ServiceName;
|
||||
return cppu::supportsService(this, ServiceName);
|
||||
}
|
||||
|
||||
Sequence< OUString > SAL_CALL AnyCompareFactory::getSupportedServiceNames( ) throw(RuntimeException)
|
||||
|
@ -17,7 +17,6 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
|
||||
#include "comphelper_module.hxx"
|
||||
|
||||
#include <com/sun/star/container/XIndexContainer.hpp>
|
||||
@ -25,6 +24,7 @@
|
||||
#include <com/sun/star/beans/PropertyValue.hpp>
|
||||
#include <cppuhelper/implbase2.hxx>
|
||||
#include <com/sun/star/lang/XServiceInfo.hpp>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
|
||||
#include <vector>
|
||||
|
||||
@ -226,8 +226,7 @@ OUString SAL_CALL IndexedPropertyValuesContainer::getImplementationName_static(
|
||||
|
||||
sal_Bool SAL_CALL IndexedPropertyValuesContainer::supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
OUString aServiceName( "com.sun.star.document.IndexedPropertyValues" );
|
||||
return aServiceName == ServiceName;
|
||||
return cppu::supportsService(this, ServiceName);
|
||||
}
|
||||
|
||||
::com::sun::star::uno::Sequence< OUString > SAL_CALL IndexedPropertyValuesContainer::getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException)
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <com/sun/star/beans/PropertyValue.hpp>
|
||||
#include <cppuhelper/implbase2.hxx>
|
||||
#include <com/sun/star/lang/XServiceInfo.hpp>
|
||||
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <map>
|
||||
|
||||
|
||||
@ -197,8 +197,7 @@ OUString SAL_CALL NamedPropertyValuesContainer::getImplementationName_static( )
|
||||
|
||||
sal_Bool SAL_CALL NamedPropertyValuesContainer::supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
OUString aServiceName( "com.sun.star.document.NamedPropertyValues" );
|
||||
return aServiceName == ServiceName;
|
||||
return cppu::supportsService(this, ServiceName);
|
||||
}
|
||||
|
||||
::com::sun::star::uno::Sequence< OUString > SAL_CALL NamedPropertyValuesContainer::getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException)
|
||||
@ -206,7 +205,6 @@ sal_Bool SAL_CALL NamedPropertyValuesContainer::supportsService( const OUString&
|
||||
return getSupportedServiceNames_static();
|
||||
}
|
||||
|
||||
|
||||
::com::sun::star::uno::Sequence< OUString > SAL_CALL NamedPropertyValuesContainer::getSupportedServiceNames_static( )
|
||||
{
|
||||
const OUString aServiceName( "com.sun.star.document.NamedPropertyValues" );
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "rtl/ustring.hxx"
|
||||
|
||||
#include "comphelper/makesequence.hxx"
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
|
||||
#include "DragSource.hxx"
|
||||
#include "DragSourceContext.hxx"
|
||||
@ -69,7 +70,6 @@ Sequence<OUString> dragSource_getSupportedServiceNames()
|
||||
return makeSequence(OUString("com.sun.star.datatransfer.dnd.OleDragSource"));
|
||||
}
|
||||
|
||||
|
||||
@implementation DragSourceHelper;
|
||||
|
||||
-(DragSourceHelper*)initWithDragSource: (DragSource*) pds
|
||||
@ -84,25 +84,21 @@ Sequence<OUString> dragSource_getSupportedServiceNames()
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
-(void)mouseDown: (NSEvent*)theEvent
|
||||
{
|
||||
mDragSource->saveMouseEvent(theEvent);
|
||||
}
|
||||
|
||||
|
||||
-(void)mouseDragged: (NSEvent*)theEvent
|
||||
{
|
||||
mDragSource->saveMouseEvent(theEvent);
|
||||
}
|
||||
|
||||
|
||||
-(unsigned int)draggingSourceOperationMaskForLocal: (BOOL)isLocal
|
||||
{
|
||||
return mDragSource->getSupportedDragOperations(isLocal);
|
||||
}
|
||||
|
||||
|
||||
-(void)draggedImage:(NSImage*)anImage beganAt:(NSPoint)aPoint
|
||||
{
|
||||
(void)anImage;
|
||||
@ -116,7 +112,6 @@ Sequence<OUString> dragSource_getSupportedServiceNames()
|
||||
mDragSource->mXDragSrcListener->dragEnter(dsde);
|
||||
}
|
||||
|
||||
|
||||
-(void)draggedImage:(NSImage *)anImage endedAt:(NSPoint)aPoint operation:(NSDragOperation)operation
|
||||
{
|
||||
(void)anImage;
|
||||
@ -137,7 +132,6 @@ Sequence<OUString> dragSource_getSupportedServiceNames()
|
||||
mDragSource->mXDragSrcListener = uno::Reference<XDragSourceListener>();
|
||||
}
|
||||
|
||||
|
||||
-(void)draggedImage:(NSImage *)draggedImage movedTo:(NSPoint)screenPoint
|
||||
{
|
||||
(void)draggedImage;
|
||||
@ -153,7 +147,6 @@ Sequence<OUString> dragSource_getSupportedServiceNames()
|
||||
|
||||
@end
|
||||
|
||||
|
||||
DragSource::DragSource():
|
||||
WeakComponentImplHelper3<XDragSource, XInitialization, XServiceInfo>(m_aMutex),
|
||||
mView(NULL),
|
||||
@ -163,7 +156,6 @@ DragSource::DragSource():
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
DragSource::~DragSource()
|
||||
{
|
||||
if( mpFrame && AquaSalFrame::isAlive( mpFrame ) )
|
||||
@ -171,7 +163,6 @@ DragSource::~DragSource()
|
||||
[mDragSourceHelper release];
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL DragSource::initialize(const Sequence< Any >& aArguments)
|
||||
throw(Exception)
|
||||
{
|
||||
@ -217,25 +208,18 @@ void SAL_CALL DragSource::initialize(const Sequence< Any >& aArguments)
|
||||
[(id <MouseEventListener>)mView registerMouseEventListener: mDragSourceHelper];
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------
|
||||
// XDragSource
|
||||
//----------------------------------------------------
|
||||
|
||||
sal_Bool SAL_CALL DragSource::isDragImageSupported( )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
sal_Int32 SAL_CALL DragSource::getDefaultCursor( sal_Int8 /*dragAction*/ )
|
||||
throw( IllegalArgumentException, RuntimeException)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL DragSource::startDrag(const DragGestureEvent& trigger,
|
||||
sal_Int8 sourceActions,
|
||||
sal_Int32 /*cursor*/,
|
||||
@ -303,7 +287,6 @@ void SAL_CALL DragSource::startDrag(const DragGestureEvent& trigger,
|
||||
g_DropSuccess = false;
|
||||
}
|
||||
|
||||
|
||||
// In order to initiate a D&D operation we need to
|
||||
// provide the triggering mouse event which we get
|
||||
// from the SalFrameView that is associated with
|
||||
@ -318,7 +301,6 @@ void DragSource::saveMouseEvent(NSEvent* theEvent)
|
||||
mLastMouseEventBeforeStartDrag = theEvent;
|
||||
}
|
||||
|
||||
|
||||
/* isLocal indicates whether or not the DnD operation is OOo
|
||||
internal.
|
||||
*/
|
||||
@ -344,29 +326,19 @@ unsigned int DragSource::getSupportedDragOperations(bool isLocal) const
|
||||
return srcActions;
|
||||
}
|
||||
|
||||
|
||||
//################################
|
||||
// XServiceInfo
|
||||
//################################
|
||||
|
||||
OUString SAL_CALL DragSource::getImplementationName( ) throw (RuntimeException)
|
||||
{
|
||||
return dragSource_getImplementationName();
|
||||
}
|
||||
|
||||
|
||||
sal_Bool SAL_CALL DragSource::supportsService( const OUString& ServiceName ) throw (RuntimeException)
|
||||
{
|
||||
return ServiceName == "com.sun.star.datatransfer.dnd.OleDragSource";
|
||||
return cppu::supportsService(this, ServiceName);
|
||||
}
|
||||
|
||||
|
||||
Sequence< OUString > SAL_CALL DragSource::getSupportedServiceNames() throw (RuntimeException)
|
||||
{
|
||||
return dragSource_getSupportedServiceNames();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@ -20,25 +20,20 @@
|
||||
#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp>
|
||||
#include <com/sun/star/datatransfer/XTransferable.hpp>
|
||||
#include <com/sun/star/datatransfer/dnd/DropTargetDragEnterEvent.hpp>
|
||||
|
||||
#include "comphelper/makesequence.hxx"
|
||||
#include <cppuhelper/interfacecontainer.hxx>
|
||||
|
||||
#include "clipboard.hxx"
|
||||
#include "DropTarget.hxx"
|
||||
#include "DragActionConversion.hxx"
|
||||
|
||||
#include "DragSource.hxx"
|
||||
|
||||
#include <rtl/ustring.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <premac.h>
|
||||
#include <Carbon/Carbon.h>
|
||||
#include <postmac.h>
|
||||
|
||||
#include <osx/salframe.h>
|
||||
#include <osx/salframeview.h>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
|
||||
using namespace cppu;
|
||||
using namespace osl;
|
||||
@ -57,13 +52,11 @@ OUString dropTarget_getImplementationName()
|
||||
return OUString("com.sun.star.comp.datatransfer.dnd.OleDropTarget_V1");
|
||||
}
|
||||
|
||||
|
||||
Sequence<OUString> dropTarget_getSupportedServiceNames()
|
||||
{
|
||||
return makeSequence(OUString("com.sun.star.datatransfer.dnd.OleDropTarget"));
|
||||
}
|
||||
|
||||
|
||||
namespace /* private */
|
||||
{
|
||||
// Cocoa's coordinate system has its origin lower-left, VCL's
|
||||
@ -98,40 +91,33 @@ namespace /* private */
|
||||
return mDropTarget->draggingEntered(sender);
|
||||
}
|
||||
|
||||
|
||||
-(NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender
|
||||
{
|
||||
return mDropTarget->draggingUpdated(sender);
|
||||
}
|
||||
|
||||
|
||||
-(void)draggingExited:(id <NSDraggingInfo>)sender
|
||||
{
|
||||
mDropTarget->draggingExited(sender);
|
||||
}
|
||||
|
||||
|
||||
-(BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender
|
||||
{
|
||||
return mDropTarget->prepareForDragOperation(sender);
|
||||
}
|
||||
|
||||
|
||||
-(BOOL)performDragOperation:(id <NSDraggingInfo>)sender
|
||||
{
|
||||
return mDropTarget->performDragOperation(sender);
|
||||
}
|
||||
|
||||
|
||||
-(void)concludeDragOperation:(id <NSDraggingInfo>)sender
|
||||
{
|
||||
mDropTarget->concludeDragOperation(sender);
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
DropTarget::DropTarget() :
|
||||
WeakComponentImplHelper5<XInitialization, XDropTarget, XDropTargetDragContext, XDropTargetDropContext, XServiceInfo>(m_aMutex),
|
||||
mView(nil),
|
||||
@ -145,7 +131,6 @@ DropTarget::DropTarget() :
|
||||
mDataFlavorMapper = DataFlavorMapperPtr_t(new DataFlavorMapper());
|
||||
}
|
||||
|
||||
|
||||
DropTarget::~DropTarget()
|
||||
{
|
||||
if( AquaSalFrame::isAlive( mpFrame ) )
|
||||
@ -153,7 +138,6 @@ DropTarget::~DropTarget()
|
||||
[mDropTargetHelper release];
|
||||
}
|
||||
|
||||
|
||||
sal_Int8 DropTarget::determineDropAction(sal_Int8 dropActions, id sender) const
|
||||
{
|
||||
sal_Int8 dropAct = dropActions;
|
||||
@ -205,7 +189,6 @@ sal_Int8 DropTarget::determineDropAction(sal_Int8 dropActions, id sender) const
|
||||
return dropAct;
|
||||
}
|
||||
|
||||
|
||||
NSDragOperation DropTarget::draggingEntered(id sender)
|
||||
{
|
||||
// Initially when DnD will be started no modifier key can be pressed yet
|
||||
@ -249,7 +232,6 @@ NSDragOperation DropTarget::draggingEntered(id sender)
|
||||
return OfficeToSystemDragActions(mSelectedDropAction);
|
||||
}
|
||||
|
||||
|
||||
NSDragOperation DropTarget::draggingUpdated(id sender)
|
||||
{
|
||||
sal_Int8 currentDragSourceActions =
|
||||
@ -295,7 +277,6 @@ NSDragOperation DropTarget::draggingUpdated(id sender)
|
||||
return dragOp;
|
||||
}
|
||||
|
||||
|
||||
void DropTarget::draggingExited(id /*sender*/)
|
||||
{
|
||||
DropTargetEvent dte(static_cast<OWeakObject*>(this), 0);
|
||||
@ -305,13 +286,11 @@ void DropTarget::draggingExited(id /*sender*/)
|
||||
[[NSCursor arrowCursor] set];
|
||||
}
|
||||
|
||||
|
||||
BOOL DropTarget::prepareForDragOperation(id /*sender*/)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
BOOL DropTarget::performDragOperation(id sender)
|
||||
{
|
||||
bool bSuccess = false;
|
||||
@ -350,7 +329,6 @@ BOOL DropTarget::performDragOperation(id sender)
|
||||
return bSuccess;
|
||||
}
|
||||
|
||||
|
||||
void DropTarget::concludeDragOperation(id /*sender*/)
|
||||
{
|
||||
mDragSourceSupportedActions = DNDConstants::ACTION_NONE;
|
||||
@ -359,7 +337,6 @@ void DropTarget::concludeDragOperation(id /*sender*/)
|
||||
[[NSCursor arrowCursor] set];
|
||||
}
|
||||
|
||||
|
||||
// called from WeakComponentImplHelperX::dispose
|
||||
// WeakComponentImplHelper calls disposing before it destroys
|
||||
// itself.
|
||||
@ -367,7 +344,6 @@ void DropTarget::concludeDragOperation(id /*sender*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL DropTarget::initialize(const Sequence< Any >& aArguments)
|
||||
throw(Exception)
|
||||
{
|
||||
@ -400,74 +376,59 @@ void DropTarget::concludeDragOperation(id /*sender*/)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL DropTarget::addDropTargetListener(const uno::Reference<XDropTargetListener>& dtl)
|
||||
throw(RuntimeException)
|
||||
{
|
||||
rBHelper.addListener(::getCppuType(&dtl), dtl);
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL DropTarget::removeDropTargetListener(const uno::Reference<XDropTargetListener>& dtl)
|
||||
throw(RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener(::getCppuType(&dtl), dtl);
|
||||
}
|
||||
|
||||
|
||||
sal_Bool SAL_CALL DropTarget::isActive( ) throw(RuntimeException)
|
||||
{
|
||||
return mbActive;
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL DropTarget::setActive(sal_Bool active) throw(RuntimeException)
|
||||
{
|
||||
mbActive = active;
|
||||
}
|
||||
|
||||
|
||||
sal_Int8 SAL_CALL DropTarget::getDefaultActions() throw(RuntimeException)
|
||||
{
|
||||
return mDefaultActions;
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL DropTarget::setDefaultActions(sal_Int8 actions) throw(RuntimeException)
|
||||
{
|
||||
OSL_ENSURE( actions < 8, "No valid default actions");
|
||||
mDefaultActions= actions;
|
||||
}
|
||||
|
||||
|
||||
// XDropTargetDragContext
|
||||
|
||||
void SAL_CALL DropTarget::acceptDrag(sal_Int8 dragOperation) throw (RuntimeException)
|
||||
{
|
||||
mSelectedDropAction = dragOperation;
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL DropTarget::rejectDrag() throw (RuntimeException)
|
||||
{
|
||||
mSelectedDropAction = DNDConstants::ACTION_NONE;
|
||||
}
|
||||
|
||||
|
||||
//XDropTargetDropContext
|
||||
|
||||
void SAL_CALL DropTarget::acceptDrop(sal_Int8 dropOperation) throw( RuntimeException)
|
||||
{
|
||||
mSelectedDropAction = dropOperation;
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL DropTarget::rejectDrop() throw (RuntimeException)
|
||||
{
|
||||
mSelectedDropAction = DNDConstants::ACTION_NONE;
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL DropTarget::dropComplete(sal_Bool success) throw (RuntimeException)
|
||||
{
|
||||
// Reset the internal transferable used as shortcut in case this is
|
||||
@ -477,7 +438,6 @@ void DropTarget::concludeDragOperation(id /*sender*/)
|
||||
DragSource::g_DropSuccess = success;
|
||||
}
|
||||
|
||||
|
||||
void DropTarget::fire_drop( const DropTargetDropEvent& dte)
|
||||
{
|
||||
OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (uno::Reference<XDropTargetListener>* )0 ) );
|
||||
@ -494,7 +454,6 @@ void DropTarget::concludeDragOperation(id /*sender*/)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DropTarget::fire_dragEnter(const DropTargetDragEnterEvent& e)
|
||||
{
|
||||
OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (uno::Reference<XDropTargetListener>* )0 ) );
|
||||
@ -511,7 +470,6 @@ void DropTarget::concludeDragOperation(id /*sender*/)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DropTarget::fire_dragExit(const DropTargetEvent& dte)
|
||||
{
|
||||
OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (uno::Reference<XDropTargetListener>* )0 ) );
|
||||
@ -529,7 +487,6 @@ void DropTarget::concludeDragOperation(id /*sender*/)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DropTarget::fire_dragOver(const DropTargetDragEvent& dtde)
|
||||
{
|
||||
OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (uno::Reference<XDropTargetListener>* )0 ) );
|
||||
@ -546,7 +503,6 @@ void DropTarget::concludeDragOperation(id /*sender*/)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DropTarget::fire_dropActionChanged(const DropTargetDragEvent& dtde)
|
||||
{
|
||||
OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (uno::Reference<XDropTargetListener>* )0 ) );
|
||||
@ -563,21 +519,16 @@ void DropTarget::concludeDragOperation(id /*sender*/)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// XServiceInfo
|
||||
|
||||
OUString SAL_CALL DropTarget::getImplementationName() throw (RuntimeException)
|
||||
{
|
||||
return dropTarget_getImplementationName();
|
||||
}
|
||||
|
||||
|
||||
sal_Bool SAL_CALL DropTarget::supportsService( const OUString& ServiceName ) throw (RuntimeException)
|
||||
{
|
||||
return ServiceName == "com.sun.star.datatransfer.dnd.OleDropTarget";
|
||||
return cppu::supportsService(this, ServiceName);
|
||||
}
|
||||
|
||||
|
||||
Sequence< OUString > SAL_CALL DropTarget::getSupportedServiceNames( ) throw (RuntimeException)
|
||||
{
|
||||
return dropTarget_getSupportedServiceNames();
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <com/sun/star/datatransfer/MimeContentTypeFactory.hpp>
|
||||
#include "comphelper/makesequence.hxx"
|
||||
#include "comphelper/processfactory.hxx"
|
||||
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
using namespace com::sun::star::datatransfer;
|
||||
@ -68,7 +68,6 @@ using namespace comphelper;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
OUString clipboard_getImplementationName()
|
||||
{
|
||||
return OUString("com.sun.star.datatransfer.clipboard.AquaClipboard");
|
||||
@ -79,7 +78,6 @@ Sequence<OUString> clipboard_getSupportedServiceNames()
|
||||
return makeSequence(OUString("com.sun.star.datatransfer.clipboard.SystemClipboard"));
|
||||
}
|
||||
|
||||
|
||||
AquaClipboard::AquaClipboard(NSPasteboard* pasteboard, bool bUseSystemPasteboard) :
|
||||
WeakComponentImplHelper3<XSystemClipboard, XFlushableClipboard, XServiceInfo>(m_aMutex),
|
||||
mIsSystemPasteboard(bUseSystemPasteboard)
|
||||
@ -146,7 +144,6 @@ AquaClipboard::~AquaClipboard()
|
||||
[mPasteboard release];
|
||||
}
|
||||
|
||||
|
||||
Reference<XTransferable> SAL_CALL AquaClipboard::getContents() throw(RuntimeException)
|
||||
{
|
||||
MutexGuard aGuard(m_aMutex);
|
||||
@ -163,7 +160,6 @@ Reference<XTransferable> SAL_CALL AquaClipboard::getContents() throw(RuntimeExce
|
||||
mPasteboard));
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL AquaClipboard::setContents(const Reference<XTransferable>& xTransferable,
|
||||
const Reference<XClipboardOwner>& xClipboardOwner)
|
||||
throw( RuntimeException )
|
||||
@ -194,19 +190,16 @@ void SAL_CALL AquaClipboard::setContents(const Reference<XTransferable>& xTransf
|
||||
fireClipboardChangedEvent();
|
||||
}
|
||||
|
||||
|
||||
OUString SAL_CALL AquaClipboard::getName() throw( RuntimeException )
|
||||
{
|
||||
return OUString();
|
||||
}
|
||||
|
||||
|
||||
sal_Int8 SAL_CALL AquaClipboard::getRenderingCapabilities() throw( RuntimeException )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL AquaClipboard::addClipboardListener(const Reference< XClipboardListener >& listener)
|
||||
throw( RuntimeException )
|
||||
{
|
||||
@ -219,7 +212,6 @@ void SAL_CALL AquaClipboard::addClipboardListener(const Reference< XClipboardLis
|
||||
mClipboardListeners.push_back(listener);
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL AquaClipboard::removeClipboardListener(const Reference< XClipboardListener >& listener)
|
||||
throw( RuntimeException )
|
||||
{
|
||||
@ -232,7 +224,6 @@ void SAL_CALL AquaClipboard::removeClipboardListener(const Reference< XClipboard
|
||||
mClipboardListeners.remove(listener);
|
||||
}
|
||||
|
||||
|
||||
void AquaClipboard::applicationDidBecomeActive(NSNotification*)
|
||||
{
|
||||
ClearableMutexGuard aGuard(m_aMutex);
|
||||
@ -263,7 +254,6 @@ void AquaClipboard::applicationDidBecomeActive(NSNotification*)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void AquaClipboard::fireClipboardChangedEvent()
|
||||
{
|
||||
ClearableMutexGuard aGuard(m_aMutex);
|
||||
@ -289,7 +279,6 @@ void AquaClipboard::fireClipboardChangedEvent()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void AquaClipboard::fireLostClipboardOwnershipEvent(Reference<XClipboardOwner> oldOwner, Reference<XTransferable> oldContent)
|
||||
{
|
||||
BOOST_ASSERT(oldOwner.is());
|
||||
@ -298,7 +287,6 @@ void AquaClipboard::fireLostClipboardOwnershipEvent(Reference<XClipboardOwner> o
|
||||
catch(RuntimeException&) { }
|
||||
}
|
||||
|
||||
|
||||
void AquaClipboard::provideDataForType(NSPasteboard* sender, const NSString* type)
|
||||
{
|
||||
if( mXClipboardContent.is() )
|
||||
@ -314,11 +302,6 @@ void AquaClipboard::provideDataForType(NSPasteboard* sender, const NSString* typ
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------
|
||||
// XFlushableClipboard
|
||||
//------------------------------------------------
|
||||
|
||||
void SAL_CALL AquaClipboard::flushClipboard()
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@ -341,29 +324,21 @@ void SAL_CALL AquaClipboard::flushClipboard()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
NSPasteboard* AquaClipboard::getPasteboard() const
|
||||
{
|
||||
return mPasteboard;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// XServiceInfo
|
||||
//-------------------------------------------------
|
||||
|
||||
OUString SAL_CALL AquaClipboard::getImplementationName() throw( RuntimeException )
|
||||
{
|
||||
return clipboard_getImplementationName();
|
||||
}
|
||||
|
||||
|
||||
sal_Bool SAL_CALL AquaClipboard::supportsService( const OUString& /*ServiceName*/ ) throw( RuntimeException )
|
||||
{
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
|
||||
Sequence< OUString > SAL_CALL AquaClipboard::getSupportedServiceNames() throw( RuntimeException )
|
||||
{
|
||||
return clipboard_getSupportedServiceNames();
|
||||
|
Loading…
x
Reference in New Issue
Block a user