LibreOffice Module vcl (master) 1
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
TransferableHelper Class Referenceabstract

#include <transfer.hxx>

Inheritance diagram for TransferableHelper:
[legend]
Collaboration diagram for TransferableHelper:
[legend]

Classes

class  TerminateListener
 

Public Member Functions

virtual css::uno::Any SAL_CALL getTransferData (const css::datatransfer::DataFlavor &rFlavor) override
 
virtual css::uno::Sequence< css::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors () override
 
virtual sal_Bool SAL_CALL isDataFlavorSupported (const css::datatransfer::DataFlavor &rFlavor) override
 
virtual css::uno::Any SAL_CALL getTransferData2 (const css::datatransfer::DataFlavor &rFlavor, const OUString &rDestDoc) override
 
virtual sal_Bool SAL_CALL isComplex () override
 
void PrepareOLE (const TransferableObjectDescriptor &rObjDesc)
 
void CopyToClipboard (const css::uno::Reference< css::datatransfer::clipboard::XClipboard > &rClipboard) const
 
void CopyToClipboard (vcl::Window *pWindow) const
 
void CopyToPrimarySelection () const
 
void StartDrag (vcl::Window *pWindow, sal_Int8 nDragSourceActions)
 

Static Public Member Functions

static void ClearPrimarySelection ()
 

Protected Member Functions

 ~TransferableHelper ()
 
const css::uno::Reference< css::datatransfer::clipboard::XClipboard > & getOwnClipboard () const
 
void implCallOwnLostOwnership (const css::uno::Reference< css::datatransfer::clipboard::XClipboard > &_rxClipboard, const css::uno::Reference< css::datatransfer::XTransferable > &_rxTrans)
 
void AddFormat (SotClipboardFormatId nFormat)
 
void AddFormat (const css::datatransfer::DataFlavor &rFlavor)
 
void RemoveFormat (SotClipboardFormatId nFormat)
 
void RemoveFormat (const css::datatransfer::DataFlavor &rFlavor)
 
bool HasFormat (SotClipboardFormatId nFormat)
 
void ClearFormats ()
 
bool SetAny (const css::uno::Any &rAny)
 
bool SetString (const OUString &rString)
 
bool SetBitmapEx (const BitmapEx &rBitmap, const css::datatransfer::DataFlavor &rFlavor)
 
bool SetGDIMetaFile (const GDIMetaFile &rMtf)
 
bool SetGraphic (const Graphic &rGraphic)
 
bool SetImageMap (const ImageMap &rIMap)
 
bool SetTransferableObjectDescriptor (const TransferableObjectDescriptor &rDesc)
 
bool SetINetBookmark (const INetBookmark &rBmk, const css::datatransfer::DataFlavor &rFlavor)
 
bool SetINetImage (const INetImage &rINtImg, const css::datatransfer::DataFlavor &rFlavor)
 
bool SetObject (void *pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor &rFlavor)
 
virtual void AddSupportedFormats ()=0
 
virtual bool GetData (const css::datatransfer::DataFlavor &rFlavor, const OUString &rDestDoc)=0
 
virtual bool WriteObject (tools::SvRef< SotTempStream > &rxOStm, void *pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor &rFlavor)
 
virtual void DragFinished (sal_Int8 nDropAction)
 
virtual void ObjectReleased ()
 
void CopyToSelection (const css::uno::Reference< css::datatransfer::clipboard::XClipboard > &rClipboard) const
 

Private Member Functions

virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 
virtual void SAL_CALL dragDropEnd (const css::datatransfer::dnd::DragSourceDropEvent &dsde) override
 
virtual void SAL_CALL dragEnter (const css::datatransfer::dnd::DragSourceDragEvent &dsde) override
 
virtual void SAL_CALL dragExit (const css::datatransfer::dnd::DragSourceEvent &dse) override
 
virtual void SAL_CALL dragOver (const css::datatransfer::dnd::DragSourceDragEvent &dsde) override
 
virtual void SAL_CALL dropActionChanged (const css::datatransfer::dnd::DragSourceDragEvent &dsde) override
 
virtual void SAL_CALL lostOwnership (const css::uno::Reference< css::datatransfer::clipboard::XClipboard > &xClipboard, const css::uno::Reference< css::datatransfer::XTransferable > &xTrans) override
 
VCL_DLLPRIVATE void ImplFlush ()
 

Private Attributes

css::uno::Any maAny
 
OUString maLastFormat
 
css::uno::Reference< css::datatransfer::clipboard::XClipboard > mxClipboard
 
css::uno::Reference< css::frame::XTerminateListener > mxTerminateListener
 
DataFlavorExVector maFormats
 
std::unique_ptr< TransferableObjectDescriptormxObjDesc
 

Friends

class TransferableHelper::TerminateListener
 

Detailed Description

Definition at line 130 of file transfer.hxx.

Constructor & Destructor Documentation

◆ ~TransferableHelper()

TransferableHelper::~TransferableHelper ( )
protected

Definition at line 266 of file transfer.cxx.

References comphelper::getProcessComponentContext(), and mxTerminateListener.

Member Function Documentation

◆ AddFormat() [1/2]

void TransferableHelper::AddFormat ( const css::datatransfer::DataFlavor &  rFlavor)
protected

◆ AddFormat() [2/2]

void TransferableHelper::AddFormat ( SotClipboardFormatId  nFormat)
protected

◆ AddSupportedFormats()

virtual void TransferableHelper::AddSupportedFormats ( )
protectedpure virtual

◆ ClearFormats()

void TransferableHelper::ClearFormats ( )
protected

Definition at line 619 of file transfer.cxx.

References maAny, and maFormats.

◆ ClearPrimarySelection()

void TransferableHelper::ClearPrimarySelection ( )
static

Definition at line 987 of file transfer.cxx.

References GetSystemPrimarySelection().

◆ CopyToClipboard() [1/2]

void TransferableHelper::CopyToClipboard ( const css::uno::Reference< css::datatransfer::clipboard::XClipboard > &  rClipboard) const

Referenced by CopyToClipboard().

◆ CopyToClipboard() [2/2]

void TransferableHelper::CopyToClipboard ( vcl::Window pWindow) const

Definition at line 911 of file transfer.cxx.

References CopyToClipboard(), DBG_ASSERT, and vcl::Window::GetClipboard().

◆ CopyToPrimarySelection()

void TransferableHelper::CopyToPrimarySelection ( ) const

Definition at line 941 of file transfer.cxx.

References CopyToSelection(), and GetSystemPrimarySelection().

◆ CopyToSelection()

void TransferableHelper::CopyToSelection ( const css::uno::Reference< css::datatransfer::clipboard::XClipboard > &  rClipboard) const
protected

Definition at line 922 of file transfer.cxx.

References mxTerminateListener.

Referenced by CopyToPrimarySelection().

◆ disposing()

void SAL_CALL TransferableHelper::disposing ( const css::lang::EventObject &  Source)
overrideprivatevirtual

Definition at line 469 of file transfer.cxx.

◆ dragDropEnd()

void SAL_CALL TransferableHelper::dragDropEnd ( const css::datatransfer::dnd::DragSourceDropEvent &  dsde)
overrideprivatevirtual

Definition at line 474 of file transfer.cxx.

References DragFinished(), and ObjectReleased().

◆ dragEnter()

void SAL_CALL TransferableHelper::dragEnter ( const css::datatransfer::dnd::DragSourceDragEvent &  dsde)
overrideprivatevirtual

Definition at line 489 of file transfer.cxx.

◆ dragExit()

void SAL_CALL TransferableHelper::dragExit ( const css::datatransfer::dnd::DragSourceEvent &  dse)
overrideprivatevirtual

Definition at line 494 of file transfer.cxx.

◆ DragFinished()

void TransferableHelper::DragFinished ( sal_Int8  nDropAction)
protectedvirtual

Reimplemented in TransferDataContainer.

Definition at line 871 of file transfer.cxx.

Referenced by dragDropEnd().

◆ dragOver()

void SAL_CALL TransferableHelper::dragOver ( const css::datatransfer::dnd::DragSourceDragEvent &  dsde)
overrideprivatevirtual

Definition at line 499 of file transfer.cxx.

◆ dropActionChanged()

void SAL_CALL TransferableHelper::dropActionChanged ( const css::datatransfer::dnd::DragSourceDragEvent &  dsde)
overrideprivatevirtual

Definition at line 504 of file transfer.cxx.

◆ GetData()

virtual bool TransferableHelper::GetData ( const css::datatransfer::DataFlavor &  rFlavor,
const OUString &  rDestDoc 
)
protectedpure virtual

Implemented in TransferDataContainer.

Referenced by getTransferData2().

◆ getOwnClipboard()

const css::uno::Reference< css::datatransfer::clipboard::XClipboard > & TransferableHelper::getOwnClipboard ( ) const
inlineprotected

Definition at line 178 of file transfer.hxx.

References mxClipboard.

◆ getTransferData()

Any SAL_CALL TransferableHelper::getTransferData ( const css::datatransfer::DataFlavor &  rFlavor)
overridevirtual

Definition at line 279 of file transfer.cxx.

References Any, and getTransferData2().

◆ getTransferData2()

Any SAL_CALL TransferableHelper::getTransferData2 ( const css::datatransfer::DataFlavor &  rFlavor,
const OUString &  rDestDoc 
)
overridevirtual

◆ getTransferDataFlavors()

Sequence< DataFlavor > SAL_CALL TransferableHelper::getTransferDataFlavors ( )
overridevirtual

Definition at line 405 of file transfer.cxx.

References AddSupportedFormats(), and maFormats.

◆ HasFormat()

bool TransferableHelper::HasFormat ( SotClipboardFormatId  nFormat)
protected

Definition at line 612 of file transfer.cxx.

References maFormats.

Referenced by PrepareOLE().

◆ implCallOwnLostOwnership()

void TransferableHelper::implCallOwnLostOwnership ( const css::uno::Reference< css::datatransfer::clipboard::XClipboard > &  _rxClipboard,
const css::uno::Reference< css::datatransfer::XTransferable > &  _rxTrans 
)
inlineprotected

Definition at line 211 of file transfer.hxx.

References lostOwnership().

◆ ImplFlush()

void TransferableHelper::ImplFlush ( )
private

Definition at line 509 of file transfer.cxx.

References mxClipboard.

◆ isComplex()

sal_Bool SAL_CALL TransferableHelper::isComplex ( )
overridevirtual

Definition at line 398 of file transfer.cxx.

◆ isDataFlavorSupported()

sal_Bool SAL_CALL TransferableHelper::isDataFlavorSupported ( const css::datatransfer::DataFlavor &  rFlavor)
overridevirtual

Definition at line 422 of file transfer.cxx.

References AddSupportedFormats(), TransferableDataHelper::IsEqual(), and maFormats.

◆ lostOwnership()

void SAL_CALL TransferableHelper::lostOwnership ( const css::uno::Reference< css::datatransfer::clipboard::XClipboard > &  xClipboard,
const css::uno::Reference< css::datatransfer::XTransferable > &  xTrans 
)
overrideprivatevirtual

Definition at line 447 of file transfer.cxx.

References mxTerminateListener, and ObjectReleased().

Referenced by implCallOwnLostOwnership().

◆ ObjectReleased()

void TransferableHelper::ObjectReleased ( )
protectedvirtual

Definition at line 876 of file transfer.cxx.

Referenced by dragDropEnd(), and lostOwnership().

◆ PrepareOLE()

void TransferableHelper::PrepareOLE ( const TransferableObjectDescriptor rObjDesc)

Definition at line 881 of file transfer.cxx.

References AddFormat(), HasFormat(), and mxObjDesc.

Referenced by SetTransferableObjectDescriptor().

◆ RemoveFormat() [1/2]

void TransferableHelper::RemoveFormat ( const css::datatransfer::DataFlavor &  rFlavor)
protected

◆ RemoveFormat() [2/2]

void TransferableHelper::RemoveFormat ( SotClipboardFormatId  nFormat)
protected

Definition at line 589 of file transfer.cxx.

References SotExchange::GetFormatDataFlavor(), and RemoveFormat().

Referenced by RemoveFormat().

◆ SetAny()

bool TransferableHelper::SetAny ( const css::uno::Any &  rAny)
protected

Definition at line 626 of file transfer.cxx.

References maAny.

Referenced by TransferDataContainer::GetData().

◆ SetBitmapEx()

bool TransferableHelper::SetBitmapEx ( const BitmapEx rBitmap,
const css::datatransfer::DataFlavor &  rFlavor 
)
protected

◆ SetGDIMetaFile()

bool TransferableHelper::SetGDIMetaFile ( const GDIMetaFile rMtf)
protected

◆ SetGraphic()

bool TransferableHelper::SetGraphic ( const Graphic rGraphic)
protected

◆ SetImageMap()

bool TransferableHelper::SetImageMap ( const ImageMap rIMap)
protected

◆ SetINetBookmark()

bool TransferableHelper::SetINetBookmark ( const INetBookmark rBmk,
const css::datatransfer::DataFlavor &  rFlavor 
)
protected

◆ SetINetImage()

bool TransferableHelper::SetINetImage ( const INetImage rINtImg,
const css::datatransfer::DataFlavor &  rFlavor 
)
protected

◆ SetObject()

bool TransferableHelper::SetObject ( void *  pUserObject,
sal_uInt32  nUserObjectId,
const css::datatransfer::DataFlavor &  rFlavor 
)
protected

◆ SetString()

bool TransferableHelper::SetString ( const OUString &  rString)
protected

Definition at line 633 of file transfer.cxx.

References maAny.

◆ SetTransferableObjectDescriptor()

bool TransferableHelper::SetTransferableObjectDescriptor ( const TransferableObjectDescriptor rDesc)
protected

◆ StartDrag()

void TransferableHelper::StartDrag ( vcl::Window pWindow,
sal_Int8  nDragSourceActions 
)

◆ WriteObject()

bool TransferableHelper::WriteObject ( tools::SvRef< SotTempStream > &  rxOStm,
void *  pUserObject,
sal_uInt32  nUserObjectId,
const css::datatransfer::DataFlavor &  rFlavor 
)
protectedvirtual

Definition at line 864 of file transfer.cxx.

Referenced by SetObject().

Friends And Related Function Documentation

◆ TransferableHelper::TerminateListener

Definition at line 163 of file transfer.hxx.

Member Data Documentation

◆ maAny

css::uno::Any TransferableHelper::maAny
private

◆ maFormats

DataFlavorExVector TransferableHelper::maFormats
private

◆ maLastFormat

OUString TransferableHelper::maLastFormat
private

Definition at line 168 of file transfer.hxx.

Referenced by getTransferData2().

◆ mxClipboard

css::uno::Reference< css::datatransfer::clipboard::XClipboard > TransferableHelper::mxClipboard
mutableprivate

Definition at line 169 of file transfer.hxx.

Referenced by getOwnClipboard(), and ImplFlush().

◆ mxObjDesc

std::unique_ptr<TransferableObjectDescriptor> TransferableHelper::mxObjDesc
private

Definition at line 172 of file transfer.hxx.

Referenced by PrepareOLE().

◆ mxTerminateListener

css::uno::Reference< css::frame::XTerminateListener > TransferableHelper::mxTerminateListener
private

Definition at line 170 of file transfer.hxx.

Referenced by CopyToSelection(), lostOwnership(), and ~TransferableHelper().


The documentation for this class was generated from the following files: