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)
 
 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 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 268 of file transfer.hxx.

Constructor & Destructor Documentation

TransferableDataHelper::TransferableDataHelper ( )

Definition at line 1122 of file transfer.cxx.

Referenced by CreateFromSelection(), and CreateFromSystemClipboard().

TransferableDataHelper::TransferableDataHelper ( const TransferableDataHelper rDataHelper)

Definition at line 1136 of file transfer.cxx.

TransferableDataHelper::TransferableDataHelper ( TransferableDataHelper &&  rDataHelper)

Definition at line 1145 of file transfer.cxx.

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

Definition at line 1197 of file transfer.cxx.

References mxImpl, mxObjDesc, and StopClipboardListening().

Member Function Documentation

TransferableDataHelper TransferableDataHelper::CreateFromSelection ( vcl::Window pWindow)
static
TransferableDataHelper TransferableDataHelper::CreateFromSystemClipboard ( vcl::Window pWindow)
static
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 1396 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 1497 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 305 of file transfer.hxx.

References DropTargetHelper::maFormats.

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

Definition at line 1964 of file transfer.cxx.

References SotExchange::GetFormatDataFlavor().

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

Definition at line 1351 of file transfer.cxx.

References DBG_ASSERT, and mxImpl.

Referenced by GetFileList().

sal_uInt32 TransferableDataHelper::GetFormatCount ( ) const

Definition at line 1345 of file transfer.cxx.

References mxImpl.

Referenced by GetFileList().

DataFlavor TransferableDataHelper::GetFormatDataFlavor ( sal_uInt32  nFormat) const

Definition at line 1358 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 1621 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 1674 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 1765 of file transfer.cxx.

References SotExchange::GetFormatDataFlavor().

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

Definition at line 1772 of file transfer.cxx.

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

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

Definition at line 1801 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 1943 of file transfer.cxx.

References SotExchange::GetFormatDataFlavor().

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

Definition at line 1951 of file transfer.cxx.

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

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

Definition at line 2046 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 2005 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 2025 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 1455 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 294 of file transfer.hxx.

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

Definition at line 1787 of file transfer.cxx.

References SotExchange::GetFormatDataFlavor().

bool TransferableDataHelper::GetTransferableObjectDescriptor ( TransferableObjectDescriptor rDesc)

Definition at line 1794 of file transfer.cxx.

References mxObjDesc.

Reference< XTransferable > TransferableDataHelper::GetXTransferable ( ) const

Definition at line 1372 of file transfer.cxx.

References mxTransfer.

bool TransferableDataHelper::HasFormat ( SotClipboardFormatId  nFormat) const

Definition at line 1326 of file transfer.cxx.

References mxImpl.

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

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

Definition at line 1302 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 2066 of file transfer.cxx.

References InitFormats(), and mxTransfer.

Referenced by TransferableClipboardNotifier::changedContents().

bool TransferableDataHelper::StartClipboardListening ( )

Definition at line 2072 of file transfer.cxx.

References mxClipboard, mxImpl, and StopClipboardListening().

Referenced by operator=().

void TransferableDataHelper::StopClipboardListening ( )

Definition at line 2083 of file transfer.cxx.

References mxImpl.

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

Friends And Related Function Documentation

friend class DropTargetHelper
friend

Definition at line 270 of file transfer.hxx.

Member Data Documentation

DataFlavorExVector TransferableDataHelper::maFormats
private

Definition at line 274 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 272 of file transfer.hxx.

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


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