LibreOffice Module vcl (master)  1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
TransferableDataHelper Class Referencefinal

#include <transfer.hxx>

Public Member Functions

 TransferableDataHelper ()
 
 TransferableDataHelper (const TransferableDataHelper &rDataHelper)
 
 TransferableDataHelper (TransferableDataHelper &&rDataHelper) noexcept
 
 TransferableDataHelper (const css::uno::Reference< css::datatransfer::XTransferable > &rxTransferable)
 
 ~TransferableDataHelper ()
 
TransferableDataHelperoperator= (const TransferableDataHelper &rDataHelper)
 
TransferableDataHelperoperator= (TransferableDataHelper &&rDataHelper)
 
const css::uno::Reference< css::datatransfer::XTransferable > & GetTransferable () const
 
css::uno::Reference< css::datatransfer::XTransferable > GetXTransferable () const
 
bool HasFormat (SotClipboardFormatId nFormat) const
 
bool HasFormat (const css::datatransfer::DataFlavor &rFlavor) const
 
sal_uInt32 GetFormatCount () const
 
SotClipboardFormatId GetFormat (sal_uInt32 nFormat) const
 
css::datatransfer::DataFlavor GetFormatDataFlavor (sal_uInt32 nFormat) const
 
const DataFlavorExVectorGetDataFlavorExVector () const
 
bool StartClipboardListening ()
 
void StopClipboardListening ()
 
void Rebind (const css::uno::Reference< css::datatransfer::XTransferable > &_rxNewData)
 
css::uno::Any GetAny (SotClipboardFormatId nFormat, const OUString &rDestDoc) const
 
css::uno::Any GetAny (const css::datatransfer::DataFlavor &rFlavor, const OUString &rDestDoc) const
 
bool GetString (SotClipboardFormatId nFormat, OUString &rStr)
 
bool GetString (const css::datatransfer::DataFlavor &rFlavor, OUString &rStr)
 
bool GetBitmapEx (SotClipboardFormatId nFormat, BitmapEx &rBmp)
 
bool GetBitmapEx (const css::datatransfer::DataFlavor &rFlavor, BitmapEx &rBmp)
 
bool GetGDIMetaFile (SotClipboardFormatId nFormat, GDIMetaFile &rMtf, size_t nMaxActions=0)
 Return as GDI metafile. More...
 
bool GetGDIMetaFile (const css::datatransfer::DataFlavor &rFlavor, GDIMetaFile &rMtf)
 
bool GetGraphic (SotClipboardFormatId nFormat, Graphic &rGraphic)
 
bool GetGraphic (const css::datatransfer::DataFlavor &rFlavor, Graphic &rGraphic)
 
bool GetImageMap (SotClipboardFormatId nFormat, ImageMap &rIMap)
 
bool GetImageMap (const css::datatransfer::DataFlavor &rFlavor, ImageMap &rImap)
 
bool GetTransferableObjectDescriptor (SotClipboardFormatId nFormat, TransferableObjectDescriptor &rDesc)
 
bool GetTransferableObjectDescriptor (TransferableObjectDescriptor &rDesc)
 
bool GetINetBookmark (SotClipboardFormatId nFormat, INetBookmark &rBmk)
 
bool GetINetBookmark (const css::datatransfer::DataFlavor &rFlavor, INetBookmark &rBmk)
 
bool GetINetImage (SotClipboardFormatId nFormat, INetImage &rINtImg)
 
bool GetINetImage (const css::datatransfer::DataFlavor &rFlavor, INetImage &rINtImg)
 
bool GetFileList (SotClipboardFormatId nFormat, FileList &rFileList)
 
bool GetFileList (FileList &rFileList)
 
css::uno::Sequence< sal_Int8GetSequence (SotClipboardFormatId nFormat, const OUString &rDestDoc)
 
css::uno::Sequence< sal_Int8GetSequence (const css::datatransfer::DataFlavor &rFlavor, const OUString &rDestDoc)
 
bool GetSotStorageStream (SotClipboardFormatId nFormat, tools::SvRef< SotStorageStream > &rStreamRef)
 
bool GetSotStorageStream (const css::datatransfer::DataFlavor &rFlavor, tools::SvRef< SotStorageStream > &rStreamRef)
 
css::uno::Reference< css::io::XInputStream > GetInputStream (SotClipboardFormatId nFormat, const OUString &rDestDoc)
 
css::uno::Reference< css::io::XInputStream > GetInputStream (const css::datatransfer::DataFlavor &rFlavor, const OUString &rDestDoc)
 

Static Public Member Functions

static void FillDataFlavorExVector (const css::uno::Sequence< css::datatransfer::DataFlavor > &rDataFlavorSeq, DataFlavorExVector &rDataFlavorExVector)
 
static TransferableDataHelper CreateFromClipboard (const css::uno::Reference< css::datatransfer::clipboard::XClipboard > &rClipboard)
 
static TransferableDataHelper CreateFromSystemClipboard (vcl::Window *pWindow)
 
static TransferableDataHelper CreateFromSelection (vcl::Window *pWindow)
 
static bool IsEqual (const css::datatransfer::DataFlavor &rInternalFlavor, const css::datatransfer::DataFlavor &rRequestFlavor)
 

Private Member Functions

void InitFormats ()
 

Private Attributes

css::uno::Reference< css::datatransfer::XTransferable > mxTransfer
 
css::uno::Reference< css::datatransfer::clipboard::XClipboard > mxClipboard
 
DataFlavorExVector maFormats
 
std::unique_ptr< TransferableObjectDescriptormxObjDesc
 
std::unique_ptr< TransferableDataHelper_ImplmxImpl
 

Friends

class DropTargetHelper
 

Detailed Description

Definition at line 275 of file transfer.hxx.

Constructor & Destructor Documentation

TransferableDataHelper::TransferableDataHelper ( )

Definition at line 1140 of file transfer.cxx.

Referenced by CreateFromClipboard(), and CreateFromSelection().

TransferableDataHelper::TransferableDataHelper ( const TransferableDataHelper rDataHelper)

Definition at line 1154 of file transfer.cxx.

TransferableDataHelper::TransferableDataHelper ( TransferableDataHelper &&  rDataHelper)
noexcept

Definition at line 1163 of file transfer.cxx.

TransferableDataHelper::TransferableDataHelper ( const css::uno::Reference< css::datatransfer::XTransferable > &  rxTransferable)
TransferableDataHelper::~TransferableDataHelper ( )

Definition at line 1215 of file transfer.cxx.

References mxImpl, mxObjDesc, and StopClipboardListening().

Member Function Documentation

TransferableDataHelper TransferableDataHelper::CreateFromClipboard ( const css::uno::Reference< css::datatransfer::clipboard::XClipboard > &  rClipboard)
static

Definition at line 2139 of file transfer.cxx.

References mxClipboard, and TransferableDataHelper().

Referenced by CreateFromSystemClipboard().

TransferableDataHelper TransferableDataHelper::CreateFromSelection ( vcl::Window pWindow)
static
TransferableDataHelper TransferableDataHelper::CreateFromSystemClipboard ( vcl::Window pWindow)
static

Definition at line 2164 of file transfer.cxx.

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

void TransferableDataHelper::FillDataFlavorExVector ( const css::uno::Sequence< css::datatransfer::DataFlavor > &  rDataFlavorSeq,
DataFlavorExVector rDataFlavorExVector 
)
static
Any TransferableDataHelper::GetAny ( SotClipboardFormatId  nFormat,
const OUString &  rDestDoc 
) const

Definition at line 1414 of file transfer.cxx.

References Any, and SotExchange::GetFormatDataFlavor().

css::uno::Any TransferableDataHelper::GetAny ( const css::datatransfer::DataFlavor &  rFlavor,
const OUString &  rDestDoc 
) const
bool TransferableDataHelper::GetBitmapEx ( SotClipboardFormatId  nFormat,
BitmapEx rBmp 
)

Definition at line 1533 of file transfer.cxx.

References SotExchange::GetFormatDataFlavor().

Referenced by GetGraphic().

bool TransferableDataHelper::GetBitmapEx ( const css::datatransfer::DataFlavor &  rFlavor,
BitmapEx rBmp 
)
const DataFlavorExVector& TransferableDataHelper::GetDataFlavorExVector ( ) const
inline

Definition at line 312 of file transfer.hxx.

References DropTargetHelper::maFormats.

bool TransferableDataHelper::GetFileList ( SotClipboardFormatId  nFormat,
FileList rFileList 
)

Definition at line 2009 of file transfer.cxx.

References SotExchange::GetFormatDataFlavor().

bool TransferableDataHelper::GetFileList ( FileList rFileList)
SotClipboardFormatId TransferableDataHelper::GetFormat ( sal_uInt32  nFormat) const

Definition at line 1369 of file transfer.cxx.

References DBG_ASSERT, and mxImpl.

Referenced by GetFileList().

sal_uInt32 TransferableDataHelper::GetFormatCount ( ) const

Definition at line 1363 of file transfer.cxx.

References mxImpl.

Referenced by GetFileList().

DataFlavor TransferableDataHelper::GetFormatDataFlavor ( sal_uInt32  nFormat) const

Definition at line 1376 of file transfer.cxx.

References DBG_ASSERT, and mxImpl.

Referenced by GetFileList().

bool TransferableDataHelper::GetGDIMetaFile ( SotClipboardFormatId  nFormat,
GDIMetaFile rMtf,
size_t  nMaxActions = 0 
)

Return as GDI metafile.

Parameters
nMaxActionAllows you to limit the amount of actions; defaults to 0 which means no limit.

When you eg. Ctrl+a in Excel, you can get the entire sheet as metafile, with over 3 million (!) actions; which is just too large for any reasonable handling - and you need to set a limit.

Definition at line 1666 of file transfer.cxx.

References GDIMetaFile::GetActionSize(), and SotExchange::GetFormatDataFlavor().

Referenced by GetGraphic().

bool TransferableDataHelper::GetGDIMetaFile ( const css::datatransfer::DataFlavor &  rFlavor,
GDIMetaFile rMtf 
)
bool TransferableDataHelper::GetGraphic ( SotClipboardFormatId  nFormat,
Graphic rGraphic 
)

Definition at line 1719 of file transfer.cxx.

References SotExchange::GetFormatDataFlavor().

bool TransferableDataHelper::GetGraphic ( const css::datatransfer::DataFlavor &  rFlavor,
Graphic rGraphic 
)
bool TransferableDataHelper::GetImageMap ( SotClipboardFormatId  nFormat,
ImageMap rIMap 
)

Definition at line 1810 of file transfer.cxx.

References SotExchange::GetFormatDataFlavor().

bool TransferableDataHelper::GetImageMap ( const css::datatransfer::DataFlavor &  rFlavor,
ImageMap rImap 
)

Definition at line 1817 of file transfer.cxx.

References ERRCODE_NONE, GetSotStorageStream(), and ImageMap::Read().

bool TransferableDataHelper::GetINetBookmark ( SotClipboardFormatId  nFormat,
INetBookmark rBmk 
)

Definition at line 1846 of file transfer.cxx.

References SotExchange::GetFormatDataFlavor().

bool TransferableDataHelper::GetINetBookmark ( const css::datatransfer::DataFlavor &  rFlavor,
INetBookmark rBmk 
)
bool TransferableDataHelper::GetINetImage ( SotClipboardFormatId  nFormat,
INetImage rINtImg 
)

Definition at line 1988 of file transfer.cxx.

References SotExchange::GetFormatDataFlavor().

bool TransferableDataHelper::GetINetImage ( const css::datatransfer::DataFlavor &  rFlavor,
INetImage rINtImg 
)

Definition at line 1996 of file transfer.cxx.

References SotExchange::GetFormat(), GetSotStorageStream(), and INetImage::Read().

Reference< XInputStream > TransferableDataHelper::GetInputStream ( SotClipboardFormatId  nFormat,
const OUString &  rDestDoc 
)

Definition at line 2091 of file transfer.cxx.

References SotExchange::GetFormatDataFlavor().

css::uno::Reference<css::io::XInputStream> TransferableDataHelper::GetInputStream ( const css::datatransfer::DataFlavor &  rFlavor,
const OUString &  rDestDoc 
)
Sequence< sal_Int8 > TransferableDataHelper::GetSequence ( SotClipboardFormatId  nFormat,
const OUString &  rDestDoc 
)

Definition at line 2050 of file transfer.cxx.

References SotExchange::GetFormatDataFlavor().

Referenced by GetINetBookmark().

css::uno::Sequence<sal_Int8> TransferableDataHelper::GetSequence ( const css::datatransfer::DataFlavor &  rFlavor,
const OUString &  rDestDoc 
)
bool TransferableDataHelper::GetSotStorageStream ( SotClipboardFormatId  nFormat,
tools::SvRef< SotStorageStream > &  rStreamRef 
)

Definition at line 2070 of file transfer.cxx.

References SotExchange::GetFormatDataFlavor().

Referenced by GetFileList(), GetGraphic(), GetImageMap(), and GetINetImage().

bool TransferableDataHelper::GetSotStorageStream ( const css::datatransfer::DataFlavor &  rFlavor,
tools::SvRef< SotStorageStream > &  rStreamRef 
)
bool TransferableDataHelper::GetString ( SotClipboardFormatId  nFormat,
OUString &  rStr 
)

Definition at line 1491 of file transfer.cxx.

References SotExchange::GetFormatDataFlavor().

Referenced by GetINetBookmark().

bool TransferableDataHelper::GetString ( const css::datatransfer::DataFlavor &  rFlavor,
OUString &  rStr 
)
const css::uno::Reference< css::datatransfer::XTransferable >& TransferableDataHelper::GetTransferable ( ) const
inline

Definition at line 301 of file transfer.hxx.

bool TransferableDataHelper::GetTransferableObjectDescriptor ( SotClipboardFormatId  nFormat,
TransferableObjectDescriptor rDesc 
)

Definition at line 1832 of file transfer.cxx.

References SotExchange::GetFormatDataFlavor().

bool TransferableDataHelper::GetTransferableObjectDescriptor ( TransferableObjectDescriptor rDesc)

Definition at line 1839 of file transfer.cxx.

References mxObjDesc.

Reference< XTransferable > TransferableDataHelper::GetXTransferable ( ) const

Definition at line 1390 of file transfer.cxx.

References mxTransfer.

bool TransferableDataHelper::HasFormat ( SotClipboardFormatId  nFormat) const

Definition at line 1344 of file transfer.cxx.

References data, and mxImpl.

Referenced by SvTreeListBox::ExecuteDrop(), and GetINetBookmark().

bool TransferableDataHelper::HasFormat ( const css::datatransfer::DataFlavor &  rFlavor) const
void TransferableDataHelper::InitFormats ( )
private

Definition at line 1320 of file transfer.cxx.

References FillDataFlavorExVector(), ImplSetParameterString(), maFormats, mxImpl, mxObjDesc, and mxTransfer.

Referenced by Rebind().

bool TransferableDataHelper::IsEqual ( const css::datatransfer::DataFlavor &  rInternalFlavor,
const css::datatransfer::DataFlavor &  rRequestFlavor 
)
static
TransferableDataHelper & TransferableDataHelper::operator= ( const TransferableDataHelper rDataHelper)
TransferableDataHelper & TransferableDataHelper::operator= ( TransferableDataHelper &&  rDataHelper)
void TransferableDataHelper::Rebind ( const css::uno::Reference< css::datatransfer::XTransferable > &  _rxNewData)

Definition at line 2111 of file transfer.cxx.

References InitFormats(), and mxTransfer.

bool TransferableDataHelper::StartClipboardListening ( )

Definition at line 2117 of file transfer.cxx.

References mxClipboard, mxImpl, and StopClipboardListening().

Referenced by operator=().

void TransferableDataHelper::StopClipboardListening ( )

Definition at line 2128 of file transfer.cxx.

References mxImpl.

Referenced by operator=(), StartClipboardListening(), and ~TransferableDataHelper().

Friends And Related Function Documentation

friend class DropTargetHelper
friend

Definition at line 277 of file transfer.hxx.

Member Data Documentation

DataFlavorExVector TransferableDataHelper::maFormats
private

Definition at line 281 of file transfer.hxx.

Referenced by InitFormats(), and operator=().

css::uno::Reference< css::datatransfer::clipboard::XClipboard > TransferableDataHelper::mxClipboard
private
std::unique_ptr<TransferableDataHelper_Impl> TransferableDataHelper::mxImpl
private
std::unique_ptr<TransferableObjectDescriptor> TransferableDataHelper::mxObjDesc
private
css::uno::Reference< css::datatransfer::XTransferable > TransferableDataHelper::mxTransfer
private

Definition at line 279 of file transfer.hxx.

Referenced by GetXTransferable(), InitFormats(), operator=(), and Rebind().


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