LibreOffice Module vcl (master) 1
|
#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 () | |
TransferableDataHelper & | operator= (const TransferableDataHelper &rDataHelper) |
TransferableDataHelper & | operator= (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 DataFlavorExVector & | GetDataFlavorExVector () 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) const |
bool | GetString (const css::datatransfer::DataFlavor &rFlavor, OUString &rStr) const |
bool | GetBitmapEx (SotClipboardFormatId nFormat, BitmapEx &rBmp) const |
bool | GetBitmapEx (const css::datatransfer::DataFlavor &rFlavor, BitmapEx &rBmp) const |
bool | GetGDIMetaFile (SotClipboardFormatId nFormat, GDIMetaFile &rMtf, size_t nMaxActions=0) const |
Return as GDI metafile. More... | |
bool | GetGDIMetaFile (const css::datatransfer::DataFlavor &rFlavor, GDIMetaFile &rMtf) const |
bool | GetGraphic (SotClipboardFormatId nFormat, Graphic &rGraphic) const |
bool | GetGraphic (const css::datatransfer::DataFlavor &rFlavor, Graphic &rGraphic) const |
bool | GetImageMap (SotClipboardFormatId nFormat, ImageMap &rIMap) const |
bool | GetImageMap (const css::datatransfer::DataFlavor &rFlavor, ImageMap &rImap) const |
bool | GetTransferableObjectDescriptor (SotClipboardFormatId nFormat, TransferableObjectDescriptor &rDesc) |
bool | GetTransferableObjectDescriptor (TransferableObjectDescriptor &rDesc) |
bool | GetINetBookmark (SotClipboardFormatId nFormat, INetBookmark &rBmk) const |
bool | GetINetBookmark (const css::datatransfer::DataFlavor &rFlavor, INetBookmark &rBmk) const |
bool | GetINetImage (SotClipboardFormatId nFormat, INetImage &rINtImg) const |
bool | GetINetImage (const css::datatransfer::DataFlavor &rFlavor, INetImage &rINtImg) const |
bool | GetFileList (SotClipboardFormatId nFormat, FileList &rFileList) const |
bool | GetFileList (FileList &rFileList) const |
css::uno::Sequence< sal_Int8 > | GetSequence (SotClipboardFormatId nFormat, const OUString &rDestDoc) const |
css::uno::Sequence< sal_Int8 > | GetSequence (const css::datatransfer::DataFlavor &rFlavor, const OUString &rDestDoc) const |
bool | GetSotStorageStream (SotClipboardFormatId nFormat, tools::SvRef< SotTempStream > &rStreamRef) const |
bool | GetSotStorageStream (const css::datatransfer::DataFlavor &rFlavor, tools::SvRef< SotTempStream > &rStreamRef) const |
css::uno::Reference< css::io::XInputStream > | GetInputStream (SotClipboardFormatId nFormat, const OUString &rDestDoc) const |
css::uno::Reference< css::io::XInputStream > | GetInputStream (const css::datatransfer::DataFlavor &rFlavor, const OUString &rDestDoc) const |
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 | CreateFromPrimarySelection () |
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< TransferableObjectDescriptor > | mxObjDesc |
std::unique_ptr< TransferableDataHelper_Impl > | mxImpl |
Friends | |
class | DropTargetHelper |
Definition at line 270 of file transfer.hxx.
TransferableDataHelper::TransferableDataHelper | ( | ) |
Definition at line 1083 of file transfer.cxx.
Referenced by CreateFromClipboard(), and CreateFromPrimarySelection().
TransferableDataHelper::TransferableDataHelper | ( | const TransferableDataHelper & | rDataHelper | ) |
Definition at line 1097 of file transfer.cxx.
|
noexcept |
Definition at line 1106 of file transfer.cxx.
TransferableDataHelper::TransferableDataHelper | ( | const css::uno::Reference< css::datatransfer::XTransferable > & | rxTransferable | ) |
TransferableDataHelper::~TransferableDataHelper | ( | ) |
Definition at line 1158 of file transfer.cxx.
References maFormats, mxImpl, mxObjDesc, and StopClipboardListening().
|
static |
Definition at line 2097 of file transfer.cxx.
References mxClipboard, and TransferableDataHelper().
Referenced by CreateFromSystemClipboard().
|
static |
Definition at line 2134 of file transfer.cxx.
References GetSystemPrimarySelection(), mxClipboard, and TransferableDataHelper().
|
static |
Definition at line 2122 of file transfer.cxx.
References CreateFromClipboard(), DBG_ASSERT, and vcl::Window::GetClipboard().
|
static |
Definition at line 1168 of file transfer.cxx.
References SotExchange::GetFormatDataFlavor(), DataFlavorEx::mnSotId, SotExchange::RegisterFormat(), and u.
Referenced by InitFormats().
css::uno::Any TransferableDataHelper::GetAny | ( | const css::datatransfer::DataFlavor & | rFlavor, |
const OUString & | rDestDoc | ||
) | const |
References GetString().
Any TransferableDataHelper::GetAny | ( | SotClipboardFormatId | nFormat, |
const OUString & | rDestDoc | ||
) | const |
Definition at line 1357 of file transfer.cxx.
References Any, GetAny(), and SotExchange::GetFormatDataFlavor().
Referenced by GetAny().
bool TransferableDataHelper::GetBitmapEx | ( | const css::datatransfer::DataFlavor & | rFlavor, |
BitmapEx & | rBmp | ||
) | const |
bool TransferableDataHelper::GetBitmapEx | ( | SotClipboardFormatId | nFormat, |
BitmapEx & | rBmp | ||
) | const |
Definition at line 1476 of file transfer.cxx.
References GetBitmapEx(), and SotExchange::GetFormatDataFlavor().
Referenced by GetBitmapEx(), and GetGraphic().
|
inline |
Definition at line 307 of file transfer.hxx.
bool TransferableDataHelper::GetFileList | ( | FileList & | rFileList | ) | const |
Definition at line 1975 of file transfer.cxx.
References FileList::AppendFile(), ERRCODE_NONE, SvStream::GetError(), GetFormat(), GetFormatCount(), GetFormatDataFlavor(), GetSotStorageStream(), i, and ReadFileList().
bool TransferableDataHelper::GetFileList | ( | SotClipboardFormatId | nFormat, |
FileList & | rFileList | ||
) | const |
Definition at line 1967 of file transfer.cxx.
References GetFileList(), and SotExchange::GetFormatDataFlavor().
Referenced by GetFileList().
SotClipboardFormatId TransferableDataHelper::GetFormat | ( | sal_uInt32 | nFormat | ) | const |
Definition at line 1312 of file transfer.cxx.
References DBG_ASSERT, maFormats, and mxImpl.
Referenced by GetFileList().
sal_uInt32 TransferableDataHelper::GetFormatCount | ( | ) | const |
Definition at line 1306 of file transfer.cxx.
References maFormats, and mxImpl.
Referenced by GetFileList().
DataFlavor TransferableDataHelper::GetFormatDataFlavor | ( | sal_uInt32 | nFormat | ) | const |
Definition at line 1319 of file transfer.cxx.
References DBG_ASSERT, maFormats, and mxImpl.
Referenced by GetFileList().
bool TransferableDataHelper::GetGDIMetaFile | ( | const css::datatransfer::DataFlavor & | rFlavor, |
GDIMetaFile & | rMtf | ||
) | const |
bool TransferableDataHelper::GetGDIMetaFile | ( | SotClipboardFormatId | nFormat, |
GDIMetaFile & | rMtf, | ||
size_t | nMaxActions = 0 |
||
) | const |
Return as GDI metafile.
nMaxAction | Allows 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 1608 of file transfer.cxx.
References GDIMetaFile::GetActionSize(), SotExchange::GetFormatDataFlavor(), and GetGDIMetaFile().
Referenced by GetGDIMetaFile(), and GetGraphic().
bool TransferableDataHelper::GetGraphic | ( | const css::datatransfer::DataFlavor & | rFlavor, |
Graphic & | rGraphic | ||
) | const |
Definition at line 1683 of file transfer.cxx.
References ERRCODE_NONE, GetBitmapEx(), SotExchange::GetFormatDataFlavor(), GetGDIMetaFile(), GetSotStorageStream(), GraphicConverter::Import(), IsEqual(), and TypeSerializer::readGraphic().
bool TransferableDataHelper::GetGraphic | ( | SotClipboardFormatId | nFormat, |
Graphic & | rGraphic | ||
) | const |
Definition at line 1662 of file transfer.cxx.
References SotExchange::GetFormatDataFlavor(), and GetGraphic().
Referenced by GetGraphic().
bool TransferableDataHelper::GetImageMap | ( | const css::datatransfer::DataFlavor & | rFlavor, |
ImageMap & | rImap | ||
) | const |
Definition at line 1761 of file transfer.cxx.
References ERRCODE_NONE, GetSotStorageStream(), and ImageMap::Read().
bool TransferableDataHelper::GetImageMap | ( | SotClipboardFormatId | nFormat, |
ImageMap & | rIMap | ||
) | const |
Definition at line 1754 of file transfer.cxx.
References SotExchange::GetFormatDataFlavor(), and GetImageMap().
Referenced by GetImageMap().
bool TransferableDataHelper::GetINetBookmark | ( | const css::datatransfer::DataFlavor & | rFlavor, |
INetBookmark & | rBmk | ||
) | const |
Definition at line 1797 of file transfer.cxx.
References aSeq, aURL, utl::UcbStreamHelper::CreateStream(), SotExchange::GetFormat(), SotExchange::GetFormatDataFlavor(), GetSequence(), GetString(), HasFormat(), INetURLObject::NONE, SAL_INFO, and u.
bool TransferableDataHelper::GetINetBookmark | ( | SotClipboardFormatId | nFormat, |
INetBookmark & | rBmk | ||
) | const |
Definition at line 1790 of file transfer.cxx.
References SotExchange::GetFormatDataFlavor(), and GetINetBookmark().
Referenced by GetINetBookmark().
bool TransferableDataHelper::GetINetImage | ( | const css::datatransfer::DataFlavor & | rFlavor, |
INetImage & | rINtImg | ||
) | const |
Definition at line 1954 of file transfer.cxx.
References SotExchange::GetFormat(), GetSotStorageStream(), and INetImage::Read().
bool TransferableDataHelper::GetINetImage | ( | SotClipboardFormatId | nFormat, |
INetImage & | rINtImg | ||
) | const |
Definition at line 1946 of file transfer.cxx.
References SotExchange::GetFormatDataFlavor(), and GetINetImage().
Referenced by GetINetImage().
css::uno::Reference< css::io::XInputStream > TransferableDataHelper::GetInputStream | ( | const css::datatransfer::DataFlavor & | rFlavor, |
const OUString & | rDestDoc | ||
) | const |
Reference< XInputStream > TransferableDataHelper::GetInputStream | ( | SotClipboardFormatId | nFormat, |
const OUString & | rDestDoc | ||
) | const |
Definition at line 2049 of file transfer.cxx.
References SotExchange::GetFormatDataFlavor(), and GetInputStream().
Referenced by GetInputStream().
css::uno::Sequence< sal_Int8 > TransferableDataHelper::GetSequence | ( | const css::datatransfer::DataFlavor & | rFlavor, |
const OUString & | rDestDoc | ||
) | const |
Sequence< sal_Int8 > TransferableDataHelper::GetSequence | ( | SotClipboardFormatId | nFormat, |
const OUString & | rDestDoc | ||
) | const |
Definition at line 2008 of file transfer.cxx.
References SotExchange::GetFormatDataFlavor(), and GetSequence().
Referenced by GetINetBookmark(), and GetSequence().
bool TransferableDataHelper::GetSotStorageStream | ( | const css::datatransfer::DataFlavor & | rFlavor, |
tools::SvRef< SotTempStream > & | rStreamRef | ||
) | const |
bool TransferableDataHelper::GetSotStorageStream | ( | SotClipboardFormatId | nFormat, |
tools::SvRef< SotTempStream > & | rStreamRef | ||
) | const |
Definition at line 2028 of file transfer.cxx.
References SotExchange::GetFormatDataFlavor(), and GetSotStorageStream().
Referenced by GetFileList(), GetGraphic(), GetImageMap(), GetINetImage(), and GetSotStorageStream().
bool TransferableDataHelper::GetString | ( | const css::datatransfer::DataFlavor & | rFlavor, |
OUString & | rStr | ||
) | const |
bool TransferableDataHelper::GetString | ( | SotClipboardFormatId | nFormat, |
OUString & | rStr | ||
) | const |
Definition at line 1434 of file transfer.cxx.
References SotExchange::GetFormatDataFlavor(), and GetString().
Referenced by GetINetBookmark(), and GetString().
|
inline |
Definition at line 296 of file transfer.hxx.
bool TransferableDataHelper::GetTransferableObjectDescriptor | ( | SotClipboardFormatId | nFormat, |
TransferableObjectDescriptor & | rDesc | ||
) |
Definition at line 1776 of file transfer.cxx.
References SotExchange::GetFormatDataFlavor(), and GetTransferableObjectDescriptor().
Referenced by GetTransferableObjectDescriptor().
bool TransferableDataHelper::GetTransferableObjectDescriptor | ( | TransferableObjectDescriptor & | rDesc | ) |
Definition at line 1783 of file transfer.cxx.
References mxObjDesc.
Reference< XTransferable > TransferableDataHelper::GetXTransferable | ( | ) | const |
Definition at line 1333 of file transfer.cxx.
References mxTransfer.
bool TransferableDataHelper::HasFormat | ( | const css::datatransfer::DataFlavor & | rFlavor | ) | const |
References GetFormat().
bool TransferableDataHelper::HasFormat | ( | SotClipboardFormatId | nFormat | ) | const |
Definition at line 1287 of file transfer.cxx.
References maFormats, and mxImpl.
Referenced by GetINetBookmark().
|
private |
Definition at line 1263 of file transfer.cxx.
References FillDataFlavorExVector(), ImplSetParameterString(), maFormats, mxImpl, mxObjDesc, and mxTransfer.
Referenced by Rebind().
|
static |
Definition at line 2161 of file transfer.cxx.
References u.
Referenced by GetGraphic(), TransferableHelper::getTransferData2(), and TransferableHelper::isDataFlavorSupported().
TransferableDataHelper & TransferableDataHelper::operator= | ( | const TransferableDataHelper & | rDataHelper | ) |
Definition at line 1115 of file transfer.cxx.
References maFormats, mxClipboard, mxImpl, mxObjDesc, mxTransfer, StartClipboardListening(), and StopClipboardListening().
TransferableDataHelper & TransferableDataHelper::operator= | ( | TransferableDataHelper && | rDataHelper | ) |
Definition at line 1138 of file transfer.cxx.
References maFormats, mxClipboard, mxImpl, mxObjDesc, mxTransfer, StartClipboardListening(), and StopClipboardListening().
void TransferableDataHelper::Rebind | ( | const css::uno::Reference< css::datatransfer::XTransferable > & | _rxNewData | ) |
Definition at line 2069 of file transfer.cxx.
References InitFormats(), and mxTransfer.
bool TransferableDataHelper::StartClipboardListening | ( | ) |
Definition at line 2075 of file transfer.cxx.
References mxClipboard, mxImpl, and StopClipboardListening().
Referenced by operator=().
void TransferableDataHelper::StopClipboardListening | ( | ) |
Definition at line 2086 of file transfer.cxx.
References mxImpl.
Referenced by operator=(), StartClipboardListening(), and ~TransferableDataHelper().
|
friend |
Definition at line 272 of file transfer.hxx.
|
private |
Definition at line 276 of file transfer.hxx.
Referenced by GetFormat(), GetFormatCount(), GetFormatDataFlavor(), HasFormat(), InitFormats(), operator=(), and ~TransferableDataHelper().
|
private |
Definition at line 275 of file transfer.hxx.
Referenced by CreateFromClipboard(), CreateFromPrimarySelection(), operator=(), and StartClipboardListening().
|
private |
Definition at line 278 of file transfer.hxx.
Referenced by GetFormat(), GetFormatCount(), GetFormatDataFlavor(), HasFormat(), InitFormats(), operator=(), StartClipboardListening(), StopClipboardListening(), and ~TransferableDataHelper().
|
private |
Definition at line 277 of file transfer.hxx.
Referenced by GetTransferableObjectDescriptor(), InitFormats(), operator=(), and ~TransferableDataHelper().
|
private |
Definition at line 274 of file transfer.hxx.
Referenced by GetXTransferable(), InitFormats(), operator=(), and Rebind().