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) |
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_Int8 > | GetSequence (SotClipboardFormatId nFormat, const OUString &rDestDoc) |
css::uno::Sequence< sal_Int8 > | GetSequence (const css::datatransfer::DataFlavor &rFlavor, const OUString &rDestDoc) |
bool | GetSotStorageStream (SotClipboardFormatId nFormat, tools::SvRef< SotTempStream > &rStreamRef) |
bool | GetSotStorageStream (const css::datatransfer::DataFlavor &rFlavor, tools::SvRef< SotTempStream > &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< TransferableObjectDescriptor > | mxObjDesc |
std::unique_ptr< TransferableDataHelper_Impl > | mxImpl |
Friends | |
class | DropTargetHelper |
Definition at line 276 of file transfer.hxx.
TransferableDataHelper::TransferableDataHelper | ( | ) |
Definition at line 1143 of file transfer.cxx.
Referenced by CreateFromClipboard(), and CreateFromSelection().
TransferableDataHelper::TransferableDataHelper | ( | const TransferableDataHelper & | rDataHelper | ) |
Definition at line 1157 of file transfer.cxx.
|
noexcept |
Definition at line 1166 of file transfer.cxx.
TransferableDataHelper::TransferableDataHelper | ( | const css::uno::Reference< css::datatransfer::XTransferable > & | rxTransferable | ) |
TransferableDataHelper::~TransferableDataHelper | ( | ) |
Definition at line 1218 of file transfer.cxx.
References mxImpl, mxObjDesc, and StopClipboardListening().
|
static |
Definition at line 2143 of file transfer.cxx.
References mxClipboard, and TransferableDataHelper().
Referenced by CreateFromSystemClipboard().
|
static |
Definition at line 2181 of file transfer.cxx.
References DBG_ASSERT, vcl::Window::GetPrimarySelection(), mxClipboard, and TransferableDataHelper().
|
static |
Definition at line 2168 of file transfer.cxx.
References CreateFromClipboard(), DBG_ASSERT, and vcl::Window::GetClipboard().
|
static |
Definition at line 1228 of file transfer.cxx.
References SotExchange::GetFormatDataFlavor(), comphelper::getProcessComponentContext(), DataFlavorEx::mnSotId, and SotExchange::RegisterFormat().
Referenced by DropTargetHelper::ImplBeginDrag(), and InitFormats().
Any TransferableDataHelper::GetAny | ( | SotClipboardFormatId | nFormat, |
const OUString & | rDestDoc | ||
) | const |
Definition at line 1417 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 1536 of file transfer.cxx.
References SotExchange::GetFormatDataFlavor().
Referenced by GetGraphic().
bool TransferableDataHelper::GetBitmapEx | ( | const css::datatransfer::DataFlavor & | rFlavor, |
BitmapEx & | rBmp | ||
) |
|
inline |
Definition at line 313 of file transfer.hxx.
References DropTargetHelper::maFormats.
bool TransferableDataHelper::GetFileList | ( | SotClipboardFormatId | nFormat, |
FileList & | rFileList | ||
) |
Definition at line 2013 of file transfer.cxx.
References SotExchange::GetFormatDataFlavor().
bool TransferableDataHelper::GetFileList | ( | FileList & | rFileList | ) |
Definition at line 2021 of file transfer.cxx.
References FileList::AppendFile(), ERRCODE_NONE, SvStream::GetError(), GetFormat(), GetFormatCount(), GetFormatDataFlavor(), GetSotStorageStream(), i, and ReadFileList().
SotClipboardFormatId TransferableDataHelper::GetFormat | ( | sal_uInt32 | nFormat | ) | const |
Definition at line 1372 of file transfer.cxx.
References DBG_ASSERT, and mxImpl.
Referenced by GetFileList().
sal_uInt32 TransferableDataHelper::GetFormatCount | ( | ) | const |
DataFlavor TransferableDataHelper::GetFormatDataFlavor | ( | sal_uInt32 | nFormat | ) | const |
Definition at line 1379 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.
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 1669 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 1722 of file transfer.cxx.
References SotExchange::GetFormatDataFlavor().
bool TransferableDataHelper::GetGraphic | ( | const css::datatransfer::DataFlavor & | rFlavor, |
Graphic & | rGraphic | ||
) |
Definition at line 1743 of file transfer.cxx.
References ERRCODE_NONE, GetBitmapEx(), SotExchange::GetFormatDataFlavor(), GetGDIMetaFile(), GetSotStorageStream(), GraphicConverter::Import(), IsEqual(), and TypeSerializer::readGraphic().
bool TransferableDataHelper::GetImageMap | ( | SotClipboardFormatId | nFormat, |
ImageMap & | rIMap | ||
) |
Definition at line 1814 of file transfer.cxx.
References SotExchange::GetFormatDataFlavor().
bool TransferableDataHelper::GetImageMap | ( | const css::datatransfer::DataFlavor & | rFlavor, |
ImageMap & | rImap | ||
) |
Definition at line 1821 of file transfer.cxx.
References ERRCODE_NONE, GetSotStorageStream(), and ImageMap::Read().
bool TransferableDataHelper::GetINetBookmark | ( | SotClipboardFormatId | nFormat, |
INetBookmark & | rBmk | ||
) |
Definition at line 1850 of file transfer.cxx.
References SotExchange::GetFormatDataFlavor().
bool TransferableDataHelper::GetINetBookmark | ( | const css::datatransfer::DataFlavor & | rFlavor, |
INetBookmark & | rBmk | ||
) |
Definition at line 1857 of file transfer.cxx.
References aURL, utl::UcbStreamHelper::CreateStream(), equalsIgnoreAsciiCase(), SotExchange::GetFormat(), SotExchange::GetFormatDataFlavor(), GetSequence(), GetString(), HasFormat(), INetURLObject::NONE, and SAL_INFO.
bool TransferableDataHelper::GetINetImage | ( | SotClipboardFormatId | nFormat, |
INetImage & | rINtImg | ||
) |
Definition at line 1992 of file transfer.cxx.
References SotExchange::GetFormatDataFlavor().
bool TransferableDataHelper::GetINetImage | ( | const css::datatransfer::DataFlavor & | rFlavor, |
INetImage & | rINtImg | ||
) |
Definition at line 2000 of file transfer.cxx.
References SotExchange::GetFormat(), GetSotStorageStream(), and INetImage::Read().
Reference< XInputStream > TransferableDataHelper::GetInputStream | ( | SotClipboardFormatId | nFormat, |
const OUString & | rDestDoc | ||
) |
Definition at line 2095 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 2054 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< SotTempStream > & | rStreamRef | ||
) |
Definition at line 2074 of file transfer.cxx.
References SotExchange::GetFormatDataFlavor().
Referenced by GetFileList(), GetGraphic(), GetImageMap(), and GetINetImage().
bool TransferableDataHelper::GetSotStorageStream | ( | const css::datatransfer::DataFlavor & | rFlavor, |
tools::SvRef< SotTempStream > & | rStreamRef | ||
) |
bool TransferableDataHelper::GetString | ( | SotClipboardFormatId | nFormat, |
OUString & | rStr | ||
) |
Definition at line 1494 of file transfer.cxx.
References SotExchange::GetFormatDataFlavor().
Referenced by GetINetBookmark().
bool TransferableDataHelper::GetString | ( | const css::datatransfer::DataFlavor & | rFlavor, |
OUString & | rStr | ||
) |
|
inline |
Definition at line 302 of file transfer.hxx.
bool TransferableDataHelper::GetTransferableObjectDescriptor | ( | SotClipboardFormatId | nFormat, |
TransferableObjectDescriptor & | rDesc | ||
) |
Definition at line 1836 of file transfer.cxx.
References SotExchange::GetFormatDataFlavor().
bool TransferableDataHelper::GetTransferableObjectDescriptor | ( | TransferableObjectDescriptor & | rDesc | ) |
Definition at line 1843 of file transfer.cxx.
References mxObjDesc.
Reference< XTransferable > TransferableDataHelper::GetXTransferable | ( | ) | const |
Definition at line 1393 of file transfer.cxx.
References mxTransfer.
bool TransferableDataHelper::HasFormat | ( | SotClipboardFormatId | nFormat | ) | const |
Definition at line 1347 of file transfer.cxx.
Referenced by SvTreeListBox::ExecuteDrop(), and GetINetBookmark().
bool TransferableDataHelper::HasFormat | ( | const css::datatransfer::DataFlavor & | rFlavor | ) | const |
|
private |
Definition at line 1323 of file transfer.cxx.
References FillDataFlavorExVector(), ImplSetParameterString(), maFormats, mxImpl, mxObjDesc, and mxTransfer.
Referenced by Rebind().
|
static |
Definition at line 2214 of file transfer.cxx.
References comphelper::getProcessComponentContext().
Referenced by GetGraphic(), TransferableHelper::getTransferData2(), TransferableHelper::isDataFlavorSupported(), and TransferableHelper::SetString().
TransferableDataHelper & TransferableDataHelper::operator= | ( | const TransferableDataHelper & | rDataHelper | ) |
Definition at line 1175 of file transfer.cxx.
References maFormats, mxClipboard, mxImpl, mxObjDesc, mxTransfer, StartClipboardListening(), and StopClipboardListening().
TransferableDataHelper & TransferableDataHelper::operator= | ( | TransferableDataHelper && | rDataHelper | ) |
Definition at line 1198 of file transfer.cxx.
References mxClipboard, mxImpl, mxObjDesc, mxTransfer, StartClipboardListening(), and StopClipboardListening().
void TransferableDataHelper::Rebind | ( | const css::uno::Reference< css::datatransfer::XTransferable > & | _rxNewData | ) |
Definition at line 2115 of file transfer.cxx.
References InitFormats(), and mxTransfer.
bool TransferableDataHelper::StartClipboardListening | ( | ) |
Definition at line 2121 of file transfer.cxx.
References mxClipboard, mxImpl, and StopClipboardListening().
Referenced by operator=().
void TransferableDataHelper::StopClipboardListening | ( | ) |
Definition at line 2132 of file transfer.cxx.
References mxImpl.
Referenced by operator=(), StartClipboardListening(), and ~TransferableDataHelper().
|
friend |
Definition at line 278 of file transfer.hxx.
|
private |
Definition at line 282 of file transfer.hxx.
Referenced by InitFormats(), and operator=().
|
private |
Definition at line 281 of file transfer.hxx.
Referenced by CreateFromClipboard(), CreateFromSelection(), operator=(), and StartClipboardListening().
|
private |
Definition at line 284 of file transfer.hxx.
Referenced by GetFormat(), GetFormatCount(), GetFormatDataFlavor(), HasFormat(), InitFormats(), operator=(), StartClipboardListening(), StopClipboardListening(), and ~TransferableDataHelper().
|
private |
Definition at line 283 of file transfer.hxx.
Referenced by GetTransferableObjectDescriptor(), InitFormats(), operator=(), and ~TransferableDataHelper().
|
private |
Definition at line 280 of file transfer.hxx.
Referenced by GetXTransferable(), InitFormats(), operator=(), and Rebind().