LibreOffice Module vcl (master) 1
transfer.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#ifndef INCLUDED_VCL_TRANSFER_HXX
21#define INCLUDED_VCL_TRANSFER_HXX
22
23#include <vcl/dllapi.h>
24#include <tools/globname.hxx>
25#include <tools/gen.hxx>
26#include <tools/solar.h>
27#include <sot/formats.hxx>
28#include <sot/exchange.hxx>
30#include <com/sun/star/frame/XTerminateListener.hpp>
31#include <com/sun/star/lang/XServiceInfo.hpp>
32#include <com/sun/star/datatransfer/XTransferable2.hpp>
33#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
34#include <com/sun/star/datatransfer/clipboard/XClipboardOwner.hpp>
35#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp>
36#include <com/sun/star/datatransfer/dnd/XDragGestureListener.hpp>
37#include <com/sun/star/datatransfer/dnd/DropTargetDragEvent.hpp>
38#include <com/sun/star/datatransfer/dnd/DropTargetDropEvent.hpp>
39#include <com/sun/star/datatransfer/dnd/XDragSourceListener.hpp>
40#include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp>
41#include <com/sun/star/embed/Aspects.hpp>
42#include <memory>
43#include <mutex>
44#include <utility>
45
46namespace com::sun::star::datatransfer::dnd { class XDragGestureRecognizer; }
47namespace com::sun::star::io { class XInputStream; }
48namespace com::sun::star::datatransfer::dnd { class XDropTarget; }
49
50namespace tools { template <typename T> class SvRef; }
51template <typename Arg, typename Ret> class Link;
52
53class BitmapEx;
54class GDIMetaFile;
55class Graphic;
56class ImageMap;
57class INetBookmark;
58class INetImage;
59class FileList;
61class SotTempStream;
62namespace vcl { class Window; }
63
64// Drag&Drop defines
65
66#define DND_ACTION_NONE css::datatransfer::dnd::DNDConstants::ACTION_NONE
67#define DND_ACTION_COPY css::datatransfer::dnd::DNDConstants::ACTION_COPY
68#define DND_ACTION_MOVE css::datatransfer::dnd::DNDConstants::ACTION_MOVE
69#define DND_ACTION_COPYMOVE css::datatransfer::dnd::DNDConstants::ACTION_COPY_OR_MOVE
70#define DND_ACTION_LINK css::datatransfer::dnd::DNDConstants::ACTION_LINK
71
72#define DND_POINTER_NONE 0
73#define DND_IMAGE_NONE 0
74
76{
78 sal_uInt16 mnViewAspect;
81 OUString maTypeName;
82 OUString maDisplayName;
83
85 : mnViewAspect(css::embed::Aspects::MSOLE_CONTENT)
86 {}
87
89};
90
92{
94 const css::datatransfer::dnd::DropTargetDragEvent maDragEvent;
98
101 mbLeaving( false ),
102 mbDefault( false ) {}
103
105 const Point& rPosPixel,
106 css::datatransfer::dnd::DropTargetDragEvent aDragEvent ) :
107 maPosPixel( rPosPixel ),
108 maDragEvent(std::move( aDragEvent )),
109 mnAction( nAction ),
110 mbLeaving( false ),
111 mbDefault( false ) {}
112};
113
115{
117 const css::datatransfer::dnd::DropTargetDropEvent maDropEvent;
120
122 const Point& rPosPixel,
123 css::datatransfer::dnd::DropTargetDropEvent aDropEvent ) :
124 maPosPixel( rPosPixel ),
125 maDropEvent(std::move( aDropEvent )),
126 mnAction( nAction ),
127 mbDefault( false ) {}
128};
129
130class VCL_DLLPUBLIC TransferableHelper : public cppu::WeakImplHelper< css::datatransfer::XTransferable2,
131 css::datatransfer::clipboard::XClipboardOwner,
132 css::datatransfer::dnd::XDragSourceListener>
133{
134private:
135
136 // nested class to implement the XTerminateListener interface
137 class VCL_DLLPRIVATE TerminateListener final : public cppu::WeakImplHelper< css::frame::XTerminateListener, css::lang::XServiceInfo >
138 {
139 private:
140
142
143 private:
144
145 // XEventListener
146 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
147
148 // XTerminateListener
149 virtual void SAL_CALL queryTermination( const css::lang::EventObject& aEvent ) override;
150 virtual void SAL_CALL notifyTermination( const css::lang::EventObject& aEvent ) override;
151
152 // XServiceInfo
153 virtual OUString SAL_CALL getImplementationName() override;
154 virtual sal_Bool SAL_CALL supportsService( const OUString& sServiceName ) override;
155 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
156
157 public:
158
159 TerminateListener( TransferableHelper& rDropTargetHelper );
160 virtual ~TerminateListener() override;
161 };
162
164
165private:
166
167 css::uno::Any maAny;
168 OUString maLastFormat;
169 mutable css::uno::Reference< css::datatransfer::clipboard::XClipboard > mxClipboard;
170 css::uno::Reference< css::frame::XTerminateListener > mxTerminateListener;
172 std::unique_ptr<TransferableObjectDescriptor> mxObjDesc;
173
174protected:
176
177 const css::uno::Reference< css::datatransfer::clipboard::XClipboard >&
178 getOwnClipboard() const { return mxClipboard; }
179
180public:
181
182 // XTransferable
183 virtual css::uno::Any SAL_CALL getTransferData( const css::datatransfer::DataFlavor& rFlavor ) override;
184 virtual css::uno::Sequence< css::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors() override;
185 virtual sal_Bool SAL_CALL isDataFlavorSupported( const css::datatransfer::DataFlavor& rFlavor ) override;
186
187 // Transferable2
188 virtual css::uno::Any SAL_CALL getTransferData2(
189 const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override;
190 virtual sal_Bool SAL_CALL isComplex() override;
191
192private:
193
194 // XEventListener
195 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
196
197 // XDragSourceListener
198 virtual void SAL_CALL dragDropEnd( const css::datatransfer::dnd::DragSourceDropEvent& dsde ) override;
199 virtual void SAL_CALL dragEnter( const css::datatransfer::dnd::DragSourceDragEvent& dsde ) override;
200 virtual void SAL_CALL dragExit( const css::datatransfer::dnd::DragSourceEvent& dse ) override;
201 virtual void SAL_CALL dragOver( const css::datatransfer::dnd::DragSourceDragEvent& dsde ) override;
202 virtual void SAL_CALL dropActionChanged( const css::datatransfer::dnd::DragSourceDragEvent& dsde ) override;
203
204 // XClipboardOwner
205 virtual void SAL_CALL lostOwnership( const css::uno::Reference< css::datatransfer::clipboard::XClipboard >& xClipboard, const css::uno::Reference< css::datatransfer::XTransferable >& xTrans ) override;
206
207protected:
208 // derivees need to access lostOwnership in case hey override it
209 // on windows, changing the access rights to a method gives unresolved externals, so we introduce
210 // this impl-method here 'til the next incompatible update
212 const css::uno::Reference< css::datatransfer::clipboard::XClipboard >& _rxClipboard,
213 const css::uno::Reference< css::datatransfer::XTransferable >& _rxTrans
214 )
215 {
216 TransferableHelper::lostOwnership( _rxClipboard, _rxTrans );
217 }
218
219
220private:
221
223
224protected:
225
226 void AddFormat( SotClipboardFormatId nFormat );
227 void AddFormat( const css::datatransfer::DataFlavor& rFlavor );
228 void RemoveFormat( SotClipboardFormatId nFormat );
229 void RemoveFormat( const css::datatransfer::DataFlavor& rFlavor );
230 bool HasFormat( SotClipboardFormatId nFormat );
231 void ClearFormats();
232
233 bool SetAny( const css::uno::Any& rAny );
234 bool SetString( const OUString& rString );
235 bool SetBitmapEx( const BitmapEx& rBitmap, const css::datatransfer::DataFlavor& rFlavor );
236 bool SetGDIMetaFile( const GDIMetaFile& rMtf );
237 bool SetGraphic( const Graphic& rGraphic );
238 bool SetImageMap( const ImageMap& rIMap );
240 bool SetINetBookmark( const INetBookmark& rBmk, const css::datatransfer::DataFlavor& rFlavor );
241 bool SetINetImage( const INetImage& rINtImg, const css::datatransfer::DataFlavor& rFlavor );
242 bool SetObject( void* pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor& rFlavor );
243
244protected:
245
246 virtual void AddSupportedFormats() = 0;
247 virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) = 0;
248 virtual bool WriteObject( tools::SvRef<SotTempStream>& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor& rFlavor );
249 virtual void DragFinished( sal_Int8 nDropAction );
250 virtual void ObjectReleased();
251
252 void CopyToSelection(const css::uno::Reference<css::datatransfer::clipboard::XClipboard> &rClipboard) const;
253public:
254
255 void PrepareOLE( const TransferableObjectDescriptor& rObjDesc );
256
257 void CopyToClipboard(const css::uno::Reference<css::datatransfer::clipboard::XClipboard> &rClipboard) const;
258
259 // convenience versions of the above which extract the XClipboard from the pWindow
260 void CopyToClipboard( vcl::Window *pWindow ) const;
261 void CopyToPrimarySelection() const;
262
263 void StartDrag( vcl::Window* pWindow, sal_Int8 nDragSourceActions );
264
265 static void ClearPrimarySelection();
266};
267
269
271{
272 friend class DropTargetHelper;
273
274 css::uno::Reference< css::datatransfer::XTransferable > mxTransfer;
275 css::uno::Reference< css::datatransfer::clipboard::XClipboard > mxClipboard;
277 std::unique_ptr<TransferableObjectDescriptor> mxObjDesc;
278 std::unique_ptr<TransferableDataHelper_Impl> mxImpl;
279
280 void InitFormats();
281
282public:
283
284 static void FillDataFlavorExVector( const css::uno::Sequence< css::datatransfer::DataFlavor >& rDataFlavorSeq,
285 DataFlavorExVector& rDataFlavorExVector );
286
289 TransferableDataHelper( TransferableDataHelper&& rDataHelper ) noexcept;
290 TransferableDataHelper( const css::uno::Reference< css::datatransfer::XTransferable >& rxTransferable );
292
293 TransferableDataHelper& operator=( const TransferableDataHelper& rDataHelper );
294 TransferableDataHelper& operator=( TransferableDataHelper&& rDataHelper );
295
296 const css::uno::Reference< css::datatransfer::XTransferable >& GetTransferable() const { return mxTransfer; }
297 css::uno::Reference< css::datatransfer::XTransferable > GetXTransferable() const;
298
299 bool HasFormat( SotClipboardFormatId nFormat ) const;
300 bool HasFormat( const css::datatransfer::DataFlavor& rFlavor ) const;
301
302 sal_uInt32 GetFormatCount() const;
303
304 SotClipboardFormatId GetFormat( sal_uInt32 nFormat ) const;
305 css::datatransfer::DataFlavor GetFormatDataFlavor( sal_uInt32 nFormat ) const;
306
307 const DataFlavorExVector& GetDataFlavorExVector() const {return maFormats; }
308
309 bool StartClipboardListening( );
310 void StopClipboardListening( );
311
312 void Rebind( const css::uno::Reference< css::datatransfer::XTransferable >& _rxNewData );
313
314 css::uno::Any GetAny( SotClipboardFormatId nFormat, const OUString& rDestDoc ) const;
315 css::uno::Any GetAny( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) const;
316
317 bool GetString( SotClipboardFormatId nFormat, OUString& rStr ) const;
318 bool GetString( const css::datatransfer::DataFlavor& rFlavor, OUString& rStr ) const;
319
320 bool GetBitmapEx( SotClipboardFormatId nFormat, BitmapEx& rBmp ) const;
321 bool GetBitmapEx( const css::datatransfer::DataFlavor& rFlavor, BitmapEx& rBmp ) const;
322
331 bool GetGDIMetaFile( SotClipboardFormatId nFormat, GDIMetaFile& rMtf, size_t nMaxActions = 0 ) const;
332 bool GetGDIMetaFile( const css::datatransfer::DataFlavor& rFlavor, GDIMetaFile& rMtf ) const;
333
334 bool GetGraphic( SotClipboardFormatId nFormat, Graphic& rGraphic ) const;
335 bool GetGraphic( const css::datatransfer::DataFlavor& rFlavor, Graphic& rGraphic ) const;
336
337 bool GetImageMap( SotClipboardFormatId nFormat, ImageMap& rIMap ) const;
338 bool GetImageMap( const css::datatransfer::DataFlavor& rFlavor, ImageMap& rImap ) const;
339
340 bool GetTransferableObjectDescriptor( SotClipboardFormatId nFormat, TransferableObjectDescriptor& rDesc );
341 bool GetTransferableObjectDescriptor( TransferableObjectDescriptor& rDesc );
342
343 bool GetINetBookmark( SotClipboardFormatId nFormat, INetBookmark& rBmk ) const;
344 bool GetINetBookmark( const css::datatransfer::DataFlavor& rFlavor, INetBookmark& rBmk ) const;
345
346 bool GetINetImage( SotClipboardFormatId nFormat, INetImage& rINtImg ) const;
347 bool GetINetImage( const css::datatransfer::DataFlavor& rFlavor, INetImage& rINtImg ) const;
348
349 bool GetFileList( SotClipboardFormatId nFormat, FileList& rFileList ) const;
350 bool GetFileList( FileList& rFileList ) const;
351
352 css::uno::Sequence<sal_Int8> GetSequence( SotClipboardFormatId nFormat, const OUString& rDestDoc ) const;
353 css::uno::Sequence<sal_Int8> GetSequence( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) const;
354
355 bool GetSotStorageStream( SotClipboardFormatId nFormat, tools::SvRef<SotTempStream>& rStreamRef ) const;
356 bool GetSotStorageStream( const css::datatransfer::DataFlavor& rFlavor, tools::SvRef<SotTempStream>& rStreamRef ) const;
357
358 css::uno::Reference<css::io::XInputStream> GetInputStream( SotClipboardFormatId nFormat, const OUString& rDestDoc ) const;
359 css::uno::Reference<css::io::XInputStream> GetInputStream( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) const;
360
361 static TransferableDataHelper CreateFromClipboard(const css::uno::Reference<css::datatransfer::clipboard::XClipboard>& rClipboard);
362 static TransferableDataHelper CreateFromSystemClipboard( vcl::Window * pWindow );
363 static TransferableDataHelper CreateFromPrimarySelection();
364 static bool IsEqual( const css::datatransfer::DataFlavor& rInternalFlavor,
365 const css::datatransfer::DataFlavor& rRequestFlavor );
366};
367
368class VCL_DLLPUBLIC SAL_LOPLUGIN_ANNOTATE("crosscast") DragSourceHelper
369{
370private:
371
372 // nested class to implement the XDragGestureListener interface
373 class SAL_DLLPRIVATE DragGestureListener final : public cppu::WeakImplHelper< css::datatransfer::dnd::XDragGestureListener >
374 {
375 private:
376
377 DragSourceHelper& mrParent;
378
379 private:
380
381 // XEventListener
382 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
383
384 // XDragGestureListener
385 virtual void SAL_CALL dragGestureRecognized( const css::datatransfer::dnd::DragGestureEvent& rDGE ) override;
386
387 public:
388
389 DragGestureListener( DragSourceHelper& rDragSourceHelper );
390 virtual ~DragGestureListener() override;
391 };
392
393 friend class DragSourceHelper::DragGestureListener;
394
395private:
396 std::mutex maMutex;
397 css::uno::Reference< css::datatransfer::dnd::XDragGestureRecognizer > mxDragGestureRecognizer;
398
399 css::uno::Reference< css::datatransfer::dnd::XDragGestureListener > mxDragGestureListener;
400
401 DragSourceHelper& operator=( const DragSourceHelper& rDragSourceHelper ) = delete;
402 bool operator==( const DragSourceHelper& rDragSourceHelper ) const = delete;
403
404public:
405
406 // to be overridden by the application
407 virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
408
409 DragSourceHelper( vcl::Window* pWindow );
410 void dispose();
411 virtual ~DragSourceHelper();
412};
413
414class VCL_DLLPUBLIC SAL_LOPLUGIN_ANNOTATE("crosscast") DropTargetHelper
415{
416private:
417
418 // nested class to implement the XDropTargetListener interface
419 class SAL_DLLPRIVATE DropTargetListener final : public cppu::WeakImplHelper< css::datatransfer::dnd::XDropTargetListener >
420 {
421 private:
422
423 DropTargetHelper& mrParent;
424 std::unique_ptr<AcceptDropEvent> mpLastDragOverEvent;
425
426 // XEventListener
427 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
428
429 // XDropTargetListener
430 virtual void SAL_CALL drop( const css::datatransfer::dnd::DropTargetDropEvent& dtde ) override;
431 virtual void SAL_CALL dragEnter( const css::datatransfer::dnd::DropTargetDragEnterEvent& dtdee ) override;
432 virtual void SAL_CALL dragExit( const css::datatransfer::dnd::DropTargetEvent& dte ) override;
433 virtual void SAL_CALL dragOver( const css::datatransfer::dnd::DropTargetDragEvent& dtde ) override;
434 virtual void SAL_CALL dropActionChanged( const css::datatransfer::dnd::DropTargetDragEvent& dtde ) override;
435
436 public:
437
438 DropTargetListener( DropTargetHelper& rDropTargetHelper );
439 virtual ~DropTargetListener() override;
440 };
441
442 friend class DropTargetHelper::DropTargetListener;
443
444private:
445 std::mutex maMutex;
446 css::uno::Reference< css::datatransfer::dnd::XDropTarget > mxDropTarget;
447
448 css::uno::Reference< css::datatransfer::dnd::XDropTargetListener > mxDropTargetListener;
449 DataFlavorExVector maFormats;
450
451 DropTargetHelper() = delete;
452 DropTargetHelper& operator=( const DropTargetHelper& rDropTargetHelper ) = delete;
453 bool operator==( const DropTargetHelper& rDropTargetHelper ) const = delete;
454
455 void ImplConstruct();
456
457 // called by our own implementation of XDropTargetListener (DropTargetListener instance)
458 void ImplBeginDrag( const css::uno::Sequence< css::datatransfer::DataFlavor >& rSupportedDataFlavors );
459 void ImplEndDrag();
460
461public:
462
463 // to be overridden by the application
464 virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
465 virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
466
467 DropTargetHelper( vcl::Window* pWindow );
468 DropTargetHelper( const css::uno::Reference< css::datatransfer::dnd::XDropTarget >& rxDropTarget );
469
470 void dispose();
471 virtual ~DropTargetHelper();
472
473 // typically called by the application in ::AcceptDrop and ::ExecuteDrop and (see above)
474 bool IsDropFormatSupported(SotClipboardFormatId nFormat) const;
475
476 const DataFlavorExVector& GetDataFlavorExVector() const {return maFormats; }
477
478};
479
481
483{
484 std::unique_ptr<TransferDataContainer_Impl> pImpl;
485
486 virtual void AddSupportedFormats() override;
487 virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override;
488
489public:
490
492 virtual ~TransferDataContainer() override;
493
494 void CopyINetBookmark( const INetBookmark& rBkmk );
495 void CopyString( const OUString& rStr );
496 void CopyString( SotClipboardFormatId nFmt, const OUString& rStr );
497
498 void CopyByteString( SotClipboardFormatId nFormatId, const OString& rStr );
499 void CopyAnyData( SotClipboardFormatId nFormatId, const char* pData, sal_uLong nLen );
500
501 bool HasAnyData() const;
502
504 void StartDrag( vcl::Window* pWindow, sal_Int8 nDragSourceActions,
505 const Link<sal_Int8,void>& rCallback );
506 virtual void DragFinished( sal_Int8 nDropAction ) override;
507};
508
509css::uno::Reference<css::datatransfer::clipboard::XClipboard> VCL_DLLPUBLIC GetSystemClipboard();
510css::uno::Reference<css::datatransfer::clipboard::XClipboard> VCL_DLLPUBLIC GetSystemPrimarySelection();
511
512#endif
513
514/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::mutex maMutex
BaseContainerNodeSharedPtr & mrParent
std::unique_ptr< TransferDataContainer_Impl > pImpl
Definition: transfer.hxx:484
bool GetGDIMetaFile(const css::datatransfer::DataFlavor &rFlavor, GDIMetaFile &rMtf) const
bool GetString(const css::datatransfer::DataFlavor &rFlavor, OUString &rStr) const
std::unique_ptr< TransferableObjectDescriptor > mxObjDesc
Definition: transfer.hxx:277
css::uno::Sequence< sal_Int8 > GetSequence(const css::datatransfer::DataFlavor &rFlavor, const OUString &rDestDoc) const
bool GetSotStorageStream(const css::datatransfer::DataFlavor &rFlavor, tools::SvRef< SotTempStream > &rStreamRef) const
css::uno::Reference< css::io::XInputStream > GetInputStream(const css::datatransfer::DataFlavor &rFlavor, const OUString &rDestDoc) const
css::uno::Reference< css::datatransfer::XTransferable > mxTransfer
Definition: transfer.hxx:274
TransferableDataHelper(const css::uno::Reference< css::datatransfer::XTransferable > &rxTransferable)
std::unique_ptr< TransferableDataHelper_Impl > mxImpl
Definition: transfer.hxx:278
const DataFlavorExVector & GetDataFlavorExVector() const
Definition: transfer.hxx:307
css::uno::Reference< css::datatransfer::clipboard::XClipboard > mxClipboard
Definition: transfer.hxx:275
const css::uno::Reference< css::datatransfer::XTransferable > & GetTransferable() const
Definition: transfer.hxx:296
css::uno::Any GetAny(const css::datatransfer::DataFlavor &rFlavor, const OUString &rDestDoc) const
DataFlavorExVector maFormats
Definition: transfer.hxx:276
bool GetBitmapEx(const css::datatransfer::DataFlavor &rFlavor, BitmapEx &rBmp) const
bool HasFormat(const css::datatransfer::DataFlavor &rFlavor) const
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
Definition: transfer.cxx:236
virtual css::uno::Sequence< css::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors() override
Definition: transfer.cxx:405
void StartDrag(vcl::Window *pWindow, sal_Int8 nDragSourceActions)
Definition: transfer.cxx:946
virtual css::uno::Any SAL_CALL getTransferData(const css::datatransfer::DataFlavor &rFlavor) override
Definition: transfer.cxx:279
bool SetGraphic(const Graphic &rGraphic)
Definition: transfer.cxx:697
virtual void SAL_CALL dragEnter(const css::datatransfer::dnd::DragSourceDragEvent &dsde) override
Definition: transfer.cxx:489
virtual sal_Bool SAL_CALL isDataFlavorSupported(const css::datatransfer::DataFlavor &rFlavor) override
Definition: transfer.cxx:422
void CopyToClipboard(const css::uno::Reference< css::datatransfer::clipboard::XClipboard > &rClipboard) const
bool SetTransferableObjectDescriptor(const TransferableObjectDescriptor &rDesc)
Definition: transfer.cxx:728
bool SetAny(const css::uno::Any &rAny)
Definition: transfer.cxx:626
virtual void SAL_CALL dragDropEnd(const css::datatransfer::dnd::DragSourceDropEvent &dsde) override
Definition: transfer.cxx:474
void CopyToSelection(const css::uno::Reference< css::datatransfer::clipboard::XClipboard > &rClipboard) const
Definition: transfer.cxx:922
bool SetObject(void *pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor &rFlavor)
Definition: transfer.cxx:834
void RemoveFormat(SotClipboardFormatId nFormat)
Definition: transfer.cxx:589
bool SetString(const OUString &rString)
Definition: transfer.cxx:633
virtual void SAL_CALL dragOver(const css::datatransfer::dnd::DragSourceDragEvent &dsde) override
Definition: transfer.cxx:499
const css::uno::Reference< css::datatransfer::clipboard::XClipboard > & getOwnClipboard() const
Definition: transfer.hxx:178
virtual bool WriteObject(tools::SvRef< SotTempStream > &rxOStm, void *pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor &rFlavor)
Definition: transfer.cxx:864
static void ClearPrimarySelection()
Definition: transfer.cxx:987
virtual css::uno::Any SAL_CALL getTransferData2(const css::datatransfer::DataFlavor &rFlavor, const OUString &rDestDoc) override
Definition: transfer.cxx:284
virtual void SAL_CALL dropActionChanged(const css::datatransfer::dnd::DragSourceDragEvent &dsde) override
Definition: transfer.cxx:504
virtual void DragFinished(sal_Int8 nDropAction)
Definition: transfer.cxx:871
void AddFormat(const css::datatransfer::DataFlavor &rFlavor)
void RemoveFormat(const css::datatransfer::DataFlavor &rFlavor)
VCL_DLLPRIVATE void ImplFlush()
Definition: transfer.cxx:509
bool SetINetImage(const INetImage &rINtImg, const css::datatransfer::DataFlavor &rFlavor)
Definition: transfer.cxx:820
void CopyToPrimarySelection() const
Definition: transfer.cxx:941
bool SetBitmapEx(const BitmapEx &rBitmap, const css::datatransfer::DataFlavor &rFlavor)
Definition: transfer.cxx:640
bool SetINetBookmark(const INetBookmark &rBmk, const css::datatransfer::DataFlavor &rFlavor)
Definition: transfer.cxx:741
bool HasFormat(SotClipboardFormatId nFormat)
Definition: transfer.cxx:612
void PrepareOLE(const TransferableObjectDescriptor &rObjDesc)
Definition: transfer.cxx:881
css::uno::Any maAny
Definition: transfer.hxx:167
void AddFormat(SotClipboardFormatId nFormat)
Definition: transfer.cxx:529
virtual bool GetData(const css::datatransfer::DataFlavor &rFlavor, const OUString &rDestDoc)=0
std::unique_ptr< TransferableObjectDescriptor > mxObjDesc
Definition: transfer.hxx:172
virtual void AddSupportedFormats()=0
virtual sal_Bool SAL_CALL isComplex() override
Definition: transfer.cxx:398
bool SetImageMap(const ImageMap &rIMap)
Definition: transfer.cxx:716
css::uno::Reference< css::frame::XTerminateListener > mxTerminateListener
Definition: transfer.hxx:170
OUString maLastFormat
Definition: transfer.hxx:168
virtual void SAL_CALL dragExit(const css::datatransfer::dnd::DragSourceEvent &dse) override
Definition: transfer.cxx:494
void implCallOwnLostOwnership(const css::uno::Reference< css::datatransfer::clipboard::XClipboard > &_rxClipboard, const css::uno::Reference< css::datatransfer::XTransferable > &_rxTrans)
Definition: transfer.hxx:211
virtual void ObjectReleased()
Definition: transfer.cxx:876
bool SetGDIMetaFile(const GDIMetaFile &rMtf)
Definition: transfer.cxx:682
css::uno::Reference< css::datatransfer::clipboard::XClipboard > mxClipboard
Definition: transfer.hxx:169
virtual void SAL_CALL lostOwnership(const css::uno::Reference< css::datatransfer::clipboard::XClipboard > &xClipboard, const css::uno::Reference< css::datatransfer::XTransferable > &xTrans) override
Definition: transfer.cxx:447
DataFlavorExVector maFormats
Definition: transfer.hxx:171
virtual SotClipboardFormatId GetFormat(const TransferableDataHelper &aHelper) override
#define VCL_DLLPRIVATE
Definition: dllapi.h:31
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
::std::vector< DataFlavorEx > DataFlavorExVector
SotClipboardFormatId
OUString GetString(int nId)
css::uno::Sequence< OUString > getSupportedServiceNames()
OUString getImplementationName()
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
void dispose()
BitmapEx GetBitmapEx(BitmapEx const &rBitmapEx, DrawModeFlags nDrawMode)
Definition: drawmode.cxx:242
sal_uIntPtr sal_uLong
sal_Int8 mnAction
Definition: transfer.hxx:95
AcceptDropEvent(sal_Int8 nAction, const Point &rPosPixel, css::datatransfer::dnd::DropTargetDragEvent aDragEvent)
Definition: transfer.hxx:104
const css::datatransfer::dnd::DropTargetDragEvent maDragEvent
Definition: transfer.hxx:94
Point maPosPixel
Definition: transfer.hxx:93
ExecuteDropEvent(sal_Int8 nAction, const Point &rPosPixel, css::datatransfer::dnd::DropTargetDropEvent aDropEvent)
Definition: transfer.hxx:121
const css::datatransfer::dnd::DropTargetDropEvent maDropEvent
Definition: transfer.hxx:117
sal_Int8 mnAction
Definition: transfer.hxx:118
VCL_DLLPUBLIC friend SvStream & WriteTransferableObjectDescriptor(SvStream &rOStm, const TransferableObjectDescriptor &rObjDesc)
Definition: transfer.cxx:86
css::uno::Reference< css::datatransfer::clipboard::XClipboard > VCL_DLLPUBLIC GetSystemClipboard()
Definition: transfer2.cxx:459
css::uno::Reference< css::datatransfer::clipboard::XClipboard > VCL_DLLPUBLIC GetSystemPrimarySelection()
Definition: transfer2.cxx:505
class VCL_DLLPUBLIC SAL_LOPLUGIN_ANNOTATE("crosscast") DragSourceHelper
Definition: transfer.hxx:368
#define DND_ACTION_NONE
Definition: transfer.hxx:66
unsigned char sal_Bool
signed char sal_Int8
bool operator==(const ItalicMatrix &a, const ItalicMatrix &b)
Definition: vclenum.hxx:175