LibreOffice Module sc (master) 1
|
#include <drwtrans.hxx>
Public Member Functions | |
ScDrawTransferObj (std::unique_ptr< SdrModel > pClipModel, ScDocShell *pContainerShell, TransferableObjectDescriptor aDesc) | |
virtual | ~ScDrawTransferObj () override |
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 | DragFinished (sal_Int8 nDropAction) override |
SdrModel * | GetModel () const |
void | SetDrawPersist (const SfxObjectShellRef &rRef) |
void | SetDragSource (const ScDrawView *pView) |
void | SetDragSourceObj (SdrObject &rObj, SCTAB nTab) |
void | SetDragSourceFlags (ScDragSrc nFlags) |
void | SetDragWasInternal () |
const OUString & | GetShellID () const |
SdrView * | GetDragSourceView () |
ScDragSrc | GetDragSourceFlags () const |
const ScRangeListVector & | GetProtectedChartRangesVector () const |
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) |
Static Public Member Functions | |
static ScDrawTransferObj * | GetOwnClipboard (const css::uno::Reference< css::datatransfer::XTransferable2 > &) |
Static Public Member Functions inherited from TransferableHelper | |
static void | ClearPrimarySelection () |
Private Member Functions | |
void | InitDocShell () |
SdrOle2Obj * | GetSingleObject () |
void | CreateOLEData () |
Private Attributes | |
std::unique_ptr< SdrModel > | m_pModel |
TransferableDataHelper | m_aOleData |
TransferableObjectDescriptor | m_aObjDesc |
SfxObjectShellRef | m_aDocShellRef |
SfxObjectShellRef | m_aDrawPersistRef |
Size | m_aSrcSize |
std::optional< INetBookmark > | m_oBookmark |
bool | m_bGraphic |
bool | m_bGrIsBit |
bool | m_bOleObj |
std::unique_ptr< SdrView > | m_pDragSourceView |
ScDragSrc | m_nDragSourceFlags |
bool | m_bDragWasInternal |
ScRangeListVector | m_aProtectedChartRangesVector |
OUString | maShellID |
Additional Inherited Members | |
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 |
Definition at line 37 of file drwtrans.hxx.
ScDrawTransferObj::ScDrawTransferObj | ( | std::unique_ptr< SdrModel > | pClipModel, |
ScDocShell * | pContainerShell, | ||
TransferableObjectDescriptor | aDesc | ||
) |
Definition at line 72 of file drwtrans.cxx.
References aLabel, ScChartHelper::FillProtectedChartRangesVector(), SvEmbedTransferHelper::FillTransferableObjectDescriptor(), SdrMarkView::GetAllMarkedRect(), SdrOle2Obj::GetAspect(), ScDocShell::GetDocument(), SdrOle2Obj::GetGraphic(), SfxObjectShell::GetMedium(), SdrPaintView::GetModel(), SdrObject::GetObjInventor(), SdrOle2Obj::GetObjRef(), SdrModel::GetPage(), GetSingleObject(), tools::Rectangle::GetSize(), SdrUnoObj::GetUnoControlModel(), SfxMedium::GetURLObject(), m_aObjDesc, m_aProtectedChartRangesVector, m_aSrcSize, m_bGraphic, m_bGrIsBit, m_bOleObj, m_oBookmark, m_pModel, SdrMarkView::MarkAllObj(), TransferableObjectDescriptor::maSize, SdrObjListIter::Next(), INetURLObject::NONE, pObject, TransferableHelper::PrepareOLE(), SdrObjEditView::ShowSdrPage(), INetURLObject::smartRel2Abs(), and Undefined.
|
overridevirtual |
Definition at line 214 of file drwtrans.cxx.
References tools::SvRef< typename T >::clear(), ScModule::GetDragData(), m_aDocShellRef, m_aDrawPersistRef, m_aOleData, m_oBookmark, m_pDragSourceView, m_pModel, ScDragData::pDrawTransfer, ScModule::ResetDragObject(), and SC_MOD.
|
overridevirtual |
Reimplemented from TransferDataContainer.
Definition at line 270 of file drwtrans.cxx.
References TransferableHelper::AddFormat(), CreateOLEData(), TransferableDataHelper::GetDataFlavorExVector(), TransferableDataHelper::GetTransferable(), lcl_HasOnlyControls(), m_aOleData, m_bGraphic, m_bGrIsBit, m_bOleObj, m_oBookmark, and m_pModel.
|
private |
Definition at line 653 of file drwtrans.cxx.
References SdrOle2Obj::GetAspect(), SdrOle2Obj::GetGraphic(), SdrOle2Obj::GetObjRef(), GetSingleObject(), TransferableDataHelper::GetTransferable(), m_aOleData, and maShellID.
Referenced by AddSupportedFormats(), and GetData().
|
overridevirtual |
Reimplemented from TransferDataContainer.
Definition at line 561 of file drwtrans.cxx.
References DND_ACTION_MOVE, TransferDataContainer::DragFinished(), ScModule::GetDragData(), m_bDragWasInternal, m_nDragSourceFlags, m_pDragSourceView, Navigator, ScDragData::pDrawTransfer, ScModule::ResetDragObject(), and SC_MOD.
|
overridevirtual |
Reimplemented from TransferDataContainer.
Definition at line 339 of file drwtrans.cxx.
References SdrExchangeView::CreateMarkedObjModel(), CreateOLEData(), tools::SvRef< typename T >::get(), TransferableDataHelper::GetAny(), SotExchange::GetFormat(), SdrGrafObj::GetGraphic(), SdrExchangeView::GetMarkedObjBitmapEx(), SdrExchangeView::GetMarkedObjMetaFile(), SdrPaintView::GetModel(), SdrOle2Obj::GetObjRef(), SdrModel::GetPage(), GetSingleObject(), TransferableDataHelper::GetTransferable(), TransferableHelper::HasFormat(), TransferableDataHelper::HasFormat(), InitDocShell(), m_aDocShellRef, m_aObjDesc, m_aOleData, m_bOleObj, m_oBookmark, m_pModel, SdrMarkView::MarkAllObj(), SdrObjListIter::Next(), pObject, SCDRAWTRANS_TYPE_DOCUMENT, SCDRAWTRANS_TYPE_DRAWMODEL, SCDRAWTRANS_TYPE_EMBOBJ, TransferableHelper::SetAny(), TransferableHelper::SetBitmapEx(), TransferableHelper::SetGDIMetaFile(), TransferableHelper::SetGraphic(), TransferableHelper::SetINetBookmark(), TransferableHelper::SetObject(), TransferableHelper::SetTransferableObjectDescriptor(), and SdrObjEditView::ShowSdrPage().
|
inline |
Definition at line 89 of file drwtrans.hxx.
References m_nDragSourceFlags.
Referenced by ScGridWindow::ExecuteDrop().
|
inline |
Definition at line 88 of file drwtrans.hxx.
References m_pDragSourceView.
Referenced by ScGridWindow::AcceptDrop(), and ScViewFunc::PasteDraw().
|
inline |
Definition at line 78 of file drwtrans.hxx.
References m_pModel.
Referenced by ScGridWindow::ExecuteDrop(), and ScViewFunc::PasteDraw().
|
static |
Definition at line 235 of file drwtrans.cxx.
Referenced by ScCellShell::ExecuteEdit(), ScCellShell::GetPossibleClipboardFormats(), lcl_IsCellPastePossible(), ScViewFunc::PasteDraw(), and ScViewFunc::PasteFromSystem().
|
inline |
Definition at line 93 of file drwtrans.hxx.
References m_aProtectedChartRangesVector.
Referenced by ScViewFunc::PasteDraw().
const OUString & ScDrawTransferObj::GetShellID | ( | ) | const |
Definition at line 630 of file drwtrans.cxx.
References maShellID.
Referenced by ScViewFunc::PasteDraw().
|
private |
Definition at line 635 of file drwtrans.cxx.
References m_pModel, SdrObjListIter::Next(), and pObject.
Referenced by CreateOLEData(), GetData(), and ScDrawTransferObj().
|
private |
Definition at line 675 of file drwtrans.cxx.
References ScStyleSheetPool::CopyStyleFrom(), SfxObjectShell::DoInitNew(), ScDocShell::GetDocument(), ScDocument::GetDrawLayer(), SdrPaintView::GetModel(), SdrModel::GetPage(), ScDocument::GetStyleSheetPool(), ScDocument::GetViewOptions(), Size::Height(), ScDocument::InitDrawLayer(), tools::SvRef< typename T >::is(), m_aDocShellRef, m_aSrcSize, m_pModel, SdrObjListIter::Next(), SdrExchangeView::Paste(), pObject, SC_LAYER_CONTROLS(), SC_LAYER_FRONT(), ScResId(), ScViewData::SetCurX(), ScViewData::SetCurY(), ScViewOptions::SetOption(), ScViewData::SetScreen(), ScViewData::SetTabNo(), ScDocument::SetViewOptions(), ScDocShell::SetVisArea(), SdrObjEditView::ShowSdrPage(), ScDocShell::UpdateOle(), VOPT_GRID, and Size::Width().
Referenced by GetData().
void ScDrawTransferObj::SetDragSource | ( | const ScDrawView * | pView | ) |
add as listener with document, delete pDragSourceView if document gone
Definition at line 602 of file drwtrans.cxx.
References SdrPaintView::getSdrModelFromSdrView(), ScDrawView::GetTab(), lcl_InitMarks(), and m_pDragSourceView.
void ScDrawTransferObj::SetDragSourceFlags | ( | ScDragSrc | nFlags | ) |
Definition at line 620 of file drwtrans.cxx.
References m_nDragSourceFlags.
add as listener with document, delete pDragSourceView if document gone
Definition at line 610 of file drwtrans.cxx.
References SdrObject::getSdrModelFromSdrObject(), and m_pDragSourceView.
void ScDrawTransferObj::SetDragWasInternal | ( | ) |
Definition at line 625 of file drwtrans.cxx.
References m_bDragWasInternal.
Referenced by ScGridWindow::ExecuteDrop().
void ScDrawTransferObj::SetDrawPersist | ( | const SfxObjectShellRef & | rRef | ) |
Definition at line 580 of file drwtrans.cxx.
References m_aDrawPersistRef.
|
overridevirtual |
Reimplemented from TransferableHelper.
Definition at line 428 of file drwtrans.cxx.
References a, aSeq, SdrModel::BurnInStyleSheetAttributes(), tools::SvRef< typename T >::clear(), comphelper::OStorageHelper::CopyInputToOutput(), SfxObjectShell::DoSaveCompleted(), SfxObjectShell::DoSaveObjectAs(), EE_CHAR_FONTHEIGHT(), ERRCODE_NONE, SfxItemPool::GetDefaultItem(), SvxFontHeightItem::GetHeight(), SdrModel::GetItemPool(), SdrModel::GetMasterPageCount(), SdrObject::GetMergedItem(), SdrModel::GetPage(), SdrModel::GetPageCount(), comphelper::OStorageHelper::GetStorageFromStream(), utl::TempFileFast::GetStream(), SdrObjListIter::IsMore(), SdrObjListIter::Next(), SCDRAWTRANS_TYPE_DOCUMENT, SCDRAWTRANS_TYPE_DRAWMODEL, SCDRAWTRANS_TYPE_EMBOBJ, SdrObject::SetMergedItem(), SfxObjectShell::SetupStorage(), SOFFICE_FILEFORMAT_CURRENT, and SvxDrawingLayerExport().
|
private |
Definition at line 43 of file drwtrans.hxx.
Referenced by GetData(), InitDocShell(), and ~ScDrawTransferObj().
|
private |
Definition at line 44 of file drwtrans.hxx.
Referenced by SetDrawPersist(), and ~ScDrawTransferObj().
|
private |
Definition at line 42 of file drwtrans.hxx.
Referenced by GetData(), and ScDrawTransferObj().
|
private |
Definition at line 41 of file drwtrans.hxx.
Referenced by AddSupportedFormats(), CreateOLEData(), GetData(), and ~ScDrawTransferObj().
|
private |
Definition at line 58 of file drwtrans.hxx.
Referenced by GetProtectedChartRangesVector(), and ScDrawTransferObj().
|
private |
Definition at line 47 of file drwtrans.hxx.
Referenced by InitDocShell(), and ScDrawTransferObj().
|
private |
Definition at line 56 of file drwtrans.hxx.
Referenced by DragFinished(), and SetDragWasInternal().
|
private |
Definition at line 49 of file drwtrans.hxx.
Referenced by AddSupportedFormats(), and ScDrawTransferObj().
|
private |
Definition at line 50 of file drwtrans.hxx.
Referenced by AddSupportedFormats(), and ScDrawTransferObj().
|
private |
Definition at line 51 of file drwtrans.hxx.
Referenced by AddSupportedFormats(), GetData(), and ScDrawTransferObj().
|
private |
Definition at line 55 of file drwtrans.hxx.
Referenced by DragFinished(), GetDragSourceFlags(), and SetDragSourceFlags().
|
private |
Definition at line 48 of file drwtrans.hxx.
Referenced by AddSupportedFormats(), GetData(), ScDrawTransferObj(), and ~ScDrawTransferObj().
|
private |
Definition at line 54 of file drwtrans.hxx.
Referenced by DragFinished(), GetDragSourceView(), SetDragSource(), SetDragSourceObj(), and ~ScDrawTransferObj().
|
private |
Definition at line 40 of file drwtrans.hxx.
Referenced by AddSupportedFormats(), GetData(), GetModel(), GetSingleObject(), InitDocShell(), ScDrawTransferObj(), and ~ScDrawTransferObj().
|
private |
Definition at line 60 of file drwtrans.hxx.
Referenced by CreateOLEData(), and GetShellID().