LibreOffice Module sd (master) 1
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
SdTransferable Class Reference

#include <sdxfer.hxx>

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

Classes

class  UserData
 User data objects can be used to store information temporarily at the transferable. More...
 

Public Member Functions

 SdTransferable (SdDrawDocument *pSrcDoc, ::sd::View *pWorkView, bool bInitOnGetData)
 
virtual ~SdTransferable () override
 
void SetDocShell (const SfxObjectShellRef &rRef)
 
const SfxObjectShellRefGetDocShell () const
 
void SetWorkDocument (const SdDrawDocument *pWorkDoc)
 
const SdDrawDocumentGetWorkDocument () const
 
void SetView (const ::sd::View *pView)
 
const ::sd::ViewGetView () const
 
void SetObjectDescriptor (std::unique_ptr< TransferableObjectDescriptor > pObjDesc)
 
void SetStartPos (const Point &rStartPos)
 
const PointGetStartPos () const
 
void SetInternalMove (bool bSet)
 
bool IsInternalMove () const
 
bool HasSourceDoc (const SdDrawDocument *pDoc) const
 
void SetPageBookmarks (std::vector< OUString > &&rPageBookmarks, bool bPersistent)
 
bool IsPageTransferable () const
 
bool HasPageBookmarks () const
 
const std::vector< OUString > & GetPageBookmarks () const
 
::sd::DrawDocShellGetPageDocShell () const
 
bool SetTableRTF (SdDrawDocument *)
 
virtual void Notify (SfxBroadcaster &rBC, const SfxHint &rHint) override
 
virtual void DragFinished (sal_Int8 nDropAction) override
 
SdDrawDocumentGetSourceDoc () const
 
void AddUserData (const std::shared_ptr< UserData > &rpData)
 Add a user data object. More...
 
sal_Int32 GetUserDataCount () const
 Return the number of user data objects. More...
 
std::shared_ptr< UserDataGetUserData (const sal_Int32 nIndex) const
 Return the specified user data object. More...
 
- Public Member Functions inherited from TransferDataContainer
 TransferDataContainer ()
 
virtual ~TransferDataContainer () override
 
void CopyINetBookmark (const INetBookmark &rBkmk)
 
void CopyString (const OUString &rStr)
 
void CopyString (SotClipboardFormatId nFmt, const OUString &rStr)
 
void CopyByteString (SotClipboardFormatId nFormatId, const OString &rStr)
 
void CopyAnyData (SotClipboardFormatId nFormatId, const char *pData, sal_uLong nLen)
 
bool HasAnyData () const
 
void StartDrag (vcl::Window *pWindow, sal_Int8 nDragSourceActions, const Link< sal_Int8, void > &rCallback)
 
virtual void DragFinished (sal_Int8 nDropAction) override
 
void StartDrag (vcl::Window *pWindow, sal_Int8 nDragSourceActions)
 
- Public Member Functions inherited from TransferableHelper
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)
 
- Public Member Functions inherited from SfxListener
 SfxListener ()
 
 SfxListener (const SfxListener &rCopy)
 
virtual ~SfxListener () COVERITY_NOEXCEPT_FALSE
 
void StartListening (SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
 
void EndListening (SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
 
void EndListeningAll ()
 
bool IsListening (SfxBroadcaster &rBroadcaster) const
 
sal_uInt16 GetBroadcasterCount () const
 
SfxBroadcasterGetBroadcasterJOE (sal_uInt16 nNo) const
 
virtual void Notify (SfxBroadcaster &rBC, const SfxHint &rHint)
 
void RemoveBroadcaster_Impl (SfxBroadcaster &rBC)
 
virtual bool IsSdrView () const
 

Static Public Member Functions

static SdTransferablegetImplementation (const css::uno::Reference< css::uno::XInterface > &rxData) noexcept
 
- Static Public Member Functions inherited from TransferableHelper
static void ClearPrimarySelection ()
 

Protected Member Functions

virtual void AddSupportedFormats () override
 
virtual bool GetData (const css::datatransfer::DataFlavor &rFlavor, const OUString &rDestDoc) override
 
virtual bool WriteObject (tools::SvRef< SotTempStream > &rxOStm, void *pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor &rFlavor) override
 
virtual void ObjectReleased () override final
 
- Protected Member Functions inherited from TransferableHelper
 ~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

 SdTransferable (const SdTransferable &)=delete
 
SdTransferableoperator= (const SdTransferable &)=delete
 
void CreateObjectReplacement (SdrObject *pObj)
 
void CreateData ()
 

Private Attributes

SfxObjectShellRef maDocShellRef
 
::sd::DrawDocShellmpPageDocShell
 
std::vector< OUString > maPageBookmarks
 
std::unique_ptr< TransferableDataHelpermpOLEDataHelper
 
std::unique_ptr< TransferableObjectDescriptormpObjDesc
 
const ::sd::ViewmpSdView
 
::sd::ViewmpSdViewIntern
 
SdDrawDocumentmpSdDrawDocument
 
SdDrawDocumentmpSdDrawDocumentIntern
 
SdDrawDocumentmpSourceDoc
 
VclPtr< VirtualDevicempVDev
 
std::optional< INetBookmarkmoBookmark
 
std::optional< GraphicmoGraphic
 
std::unique_ptr< ImageMapmpImageMap
 
::tools::Rectangle maVisArea
 
Point maStartPos
 
bool mbInternalMove: 1
 
bool mbOwnDocument: 1
 
bool mbOwnView: 1
 
bool mbLateInit: 1
 
bool mbPageTransferable: 1
 
bool mbPageTransferablePersistent: 1
 
::std::vector< std::shared_ptr< UserData > > maUserData
 

Detailed Description

Definition at line 40 of file sdxfer.hxx.

Constructor & Destructor Documentation

◆ SdTransferable() [1/2]

SdTransferable::SdTransferable ( SdDrawDocument pSrcDoc,
::sd::View pWorkView,
bool  bInitOnGetData 
)

Definition at line 78 of file sdxfer.cxx.

References CreateData(), mbLateInit, mpSourceDoc, and SfxListener::StartListening().

◆ ~SdTransferable()

SdTransferable::~SdTransferable ( )
overridevirtual

◆ SdTransferable() [2/2]

SdTransferable::SdTransferable ( const SdTransferable )
privatedelete

Member Function Documentation

◆ AddSupportedFormats()

void SdTransferable::AddSupportedFormats ( )
overrideprotectedvirtual

◆ AddUserData()

void SdTransferable::AddUserData ( const std::shared_ptr< UserData > &  rpData)

Add a user data object.

When it was added before (and not removed) then this call is ignored.

Definition at line 706 of file sdxfer.cxx.

References maUserData.

Referenced by sd::slidesorter::controller::DragAndDropContext::DragAndDropContext().

◆ CreateData()

void SdTransferable::CreateData ( )
private

◆ CreateObjectReplacement()

void SdTransferable::CreateObjectReplacement ( SdrObject pObj)
private

◆ DragFinished()

void SdTransferable::DragFinished ( sal_Int8  nDropAction)
overridevirtual

Reimplemented from TransferDataContainer.

Reimplemented in SdPageObjsTLV::SdPageObjsTransferable.

Definition at line 636 of file sdxfer.cxx.

References DragFinished(), and mpSdView.

Referenced by SdPageObjsTLV::SdPageObjsTransferable::DragFinished(), and DragFinished().

◆ GetData()

bool SdTransferable::GetData ( const css::datatransfer::DataFlavor &  rFlavor,
const OUString &  rDestDoc 
)
overrideprotectedvirtual

◆ GetDocShell()

const SfxObjectShellRef & SdTransferable::GetDocShell ( ) const
inline

◆ getImplementation()

SdTransferable * SdTransferable::getImplementation ( const css::uno::Reference< css::uno::XInterface > &  rxData)
staticnoexcept

Definition at line 724 of file sdxfer.cxx.

Referenced by sd::View::InsertData().

◆ GetPageBookmarks()

const std::vector< OUString > & SdTransferable::GetPageBookmarks ( ) const
inline

◆ GetPageDocShell()

::sd::DrawDocShell * SdTransferable::GetPageDocShell ( ) const
inline

◆ GetSourceDoc()

SdDrawDocument * SdTransferable::GetSourceDoc ( ) const
inline

◆ GetStartPos()

const Point & SdTransferable::GetStartPos ( ) const
inline

◆ GetUserData()

std::shared_ptr< SdTransferable::UserData > SdTransferable::GetUserData ( const sal_Int32  nIndex) const

Return the specified user data object.

When the index is not valid, ie not in the range [0,count) then an empty pointer is returned.

Definition at line 716 of file sdxfer.cxx.

References o3tl::make_unsigned(), maUserData, and nIndex.

Referenced by sd::slidesorter::controller::TransferableData::GetFromTransferable().

◆ GetUserDataCount()

sal_Int32 SdTransferable::GetUserDataCount ( ) const

Return the number of user data objects.

Definition at line 711 of file sdxfer.cxx.

References maUserData.

Referenced by sd::slidesorter::controller::TransferableData::GetFromTransferable().

◆ GetView()

const ::sd::View * SdTransferable::GetView ( ) const
inline

◆ GetWorkDocument()

const SdDrawDocument * SdTransferable::GetWorkDocument ( ) const
inline

Definition at line 51 of file sdxfer.hxx.

Referenced by sd::View::InsertData().

◆ HasPageBookmarks()

bool SdTransferable::HasPageBookmarks ( ) const
inline

◆ HasSourceDoc()

bool SdTransferable::HasSourceDoc ( const SdDrawDocument pDoc) const
inline

◆ IsInternalMove()

bool SdTransferable::IsInternalMove ( ) const
inline

Definition at line 62 of file sdxfer.hxx.

Referenced by sd::View::DragFinished().

◆ IsPageTransferable()

bool SdTransferable::IsPageTransferable ( ) const
inline

◆ Notify()

void SdTransferable::Notify ( SfxBroadcaster rBC,
const SfxHint rHint 
)
overridevirtual

Reimplemented from SfxListener.

Definition at line 729 of file sdxfer.cxx.

References SfxListener::EndListening(), SfxHint::GetId(), SdrHint::GetKind(), mpSdView, mpSdViewIntern, and mpSourceDoc.

◆ ObjectReleased()

void SdTransferable::ObjectReleased ( )
finaloverrideprotectedvirtual

Reimplemented from TransferableHelper.

Definition at line 642 of file sdxfer.cxx.

References SdModule::pTransferClip, SdModule::pTransferDrag, SdModule::pTransferSelection, and SD_MOD.

Referenced by ~SdTransferable().

◆ operator=()

SdTransferable & SdTransferable::operator= ( const SdTransferable )
privatedelete

◆ SetDocShell()

void SdTransferable::SetDocShell ( const SfxObjectShellRef rRef)
inline

Definition at line 47 of file sdxfer.hxx.

Referenced by SdDrawDocument::AllocSdDrawDocument().

◆ SetInternalMove()

void SdTransferable::SetInternalMove ( bool  bSet)
inline

Definition at line 61 of file sdxfer.hxx.

Referenced by sd::View::DragFinished(), and sd::View::InsertData().

◆ SetObjectDescriptor()

void SdTransferable::SetObjectDescriptor ( std::unique_ptr< TransferableObjectDescriptor pObjDesc)

Definition at line 658 of file sdxfer.cxx.

References mpObjDesc, and TransferableHelper::PrepareOLE().

Referenced by SdPageObjsTLV::AddShapeToTransferable().

◆ SetPageBookmarks()

void SdTransferable::SetPageBookmarks ( std::vector< OUString > &&  rPageBookmarks,
bool  bPersistent 
)

◆ SetStartPos()

void SdTransferable::SetStartPos ( const Point rStartPos)
inline

Definition at line 58 of file sdxfer.hxx.

Referenced by SdPageObjsTLV::AddShapeToTransferable().

◆ SetTableRTF()

bool SdTransferable::SetTableRTF ( SdDrawDocument pModel)

◆ SetView()

void SdTransferable::SetView ( const ::sd::View pView)

◆ SetWorkDocument()

void SdTransferable::SetWorkDocument ( const SdDrawDocument pWorkDoc)
inline

◆ WriteObject()

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

Member Data Documentation

◆ maDocShellRef

SfxObjectShellRef SdTransferable::maDocShellRef
private

Definition at line 113 of file sdxfer.hxx.

Referenced by CreateData(), GetData(), and ~SdTransferable().

◆ maPageBookmarks

std::vector<OUString> SdTransferable::maPageBookmarks
private

Definition at line 115 of file sdxfer.hxx.

Referenced by SetPageBookmarks().

◆ maStartPos

Point SdTransferable::maStartPos
private

Definition at line 128 of file sdxfer.hxx.

◆ maUserData

::std::vector<std::shared_ptr<UserData> > SdTransferable::maUserData
private

Definition at line 135 of file sdxfer.hxx.

Referenced by AddUserData(), GetUserData(), GetUserDataCount(), and ~SdTransferable().

◆ maVisArea

::tools::Rectangle SdTransferable::maVisArea
private

Definition at line 127 of file sdxfer.hxx.

Referenced by CreateData(), and GetData().

◆ mbInternalMove

bool SdTransferable::mbInternalMove
private

Definition at line 129 of file sdxfer.hxx.

◆ mbLateInit

bool SdTransferable::mbLateInit
private

Definition at line 132 of file sdxfer.hxx.

Referenced by AddSupportedFormats(), and SdTransferable().

◆ mbOwnDocument

bool SdTransferable::mbOwnDocument
private

Definition at line 130 of file sdxfer.hxx.

Referenced by CreateData(), GetData(), and ~SdTransferable().

◆ mbOwnView

bool SdTransferable::mbOwnView
private

Definition at line 131 of file sdxfer.hxx.

Referenced by CreateData(), and ~SdTransferable().

◆ mbPageTransferable

bool SdTransferable::mbPageTransferable
private

Definition at line 133 of file sdxfer.hxx.

Referenced by AddSupportedFormats(), and SetPageBookmarks().

◆ mbPageTransferablePersistent

bool SdTransferable::mbPageTransferablePersistent
private

Definition at line 134 of file sdxfer.hxx.

Referenced by AddSupportedFormats(), and SetPageBookmarks().

◆ moBookmark

std::optional<INetBookmark> SdTransferable::moBookmark
private

Definition at line 124 of file sdxfer.hxx.

Referenced by AddSupportedFormats(), CreateObjectReplacement(), GetData(), and ~SdTransferable().

◆ moGraphic

std::optional<Graphic> SdTransferable::moGraphic
private

Definition at line 125 of file sdxfer.hxx.

Referenced by AddSupportedFormats(), CreateObjectReplacement(), GetData(), and ~SdTransferable().

◆ mpImageMap

std::unique_ptr<ImageMap> SdTransferable::mpImageMap
private

Definition at line 126 of file sdxfer.hxx.

Referenced by AddSupportedFormats(), CreateObjectReplacement(), GetData(), and ~SdTransferable().

◆ mpObjDesc

std::unique_ptr<TransferableObjectDescriptor> SdTransferable::mpObjDesc
private

Definition at line 117 of file sdxfer.hxx.

Referenced by AddSupportedFormats(), GetData(), SetObjectDescriptor(), and ~SdTransferable().

◆ mpOLEDataHelper

std::unique_ptr<TransferableDataHelper> SdTransferable::mpOLEDataHelper
private

Definition at line 116 of file sdxfer.hxx.

Referenced by AddSupportedFormats(), CreateObjectReplacement(), GetData(), and ~SdTransferable().

◆ mpPageDocShell

::sd::DrawDocShell* SdTransferable::mpPageDocShell
private

Definition at line 114 of file sdxfer.hxx.

Referenced by SetPageBookmarks().

◆ mpSdDrawDocument

SdDrawDocument* SdTransferable::mpSdDrawDocument
private

Definition at line 120 of file sdxfer.hxx.

Referenced by AddSupportedFormats(), CreateData(), GetData(), and SetPageBookmarks().

◆ mpSdDrawDocumentIntern

SdDrawDocument* SdTransferable::mpSdDrawDocumentIntern
private

Definition at line 121 of file sdxfer.hxx.

Referenced by CreateData(), GetData(), and ~SdTransferable().

◆ mpSdView

const ::sd::View* SdTransferable::mpSdView
private

Definition at line 118 of file sdxfer.hxx.

Referenced by CreateData(), DragFinished(), Notify(), SetView(), and ~SdTransferable().

◆ mpSdViewIntern

::sd::View* SdTransferable::mpSdViewIntern
private

Definition at line 119 of file sdxfer.hxx.

Referenced by CreateData(), GetData(), Notify(), SetPageBookmarks(), and ~SdTransferable().

◆ mpSourceDoc

SdDrawDocument* SdTransferable::mpSourceDoc
private

◆ mpVDev

VclPtr<VirtualDevice> SdTransferable::mpVDev
private

Definition at line 123 of file sdxfer.hxx.

Referenced by CreateData(), and ~SdTransferable().


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