LibreOffice Module sc (master) 1
|
#include <transobj.hxx>
Public Member Functions | |
ScTransferObj (const std::shared_ptr< ScDocument > &pClipDoc, TransferableObjectDescriptor aDesc) | |
virtual | ~ScTransferObj () 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 |
virtual sal_Bool SAL_CALL | isComplex () override |
ScDocument * | GetDocument () const |
const ScRange & | GetRange () const |
SCROW | GetNonFilteredRows () const |
SCCOL | GetDragHandleX () const |
SCROW | GetDragHandleY () const |
bool | WasSourceCursorInSelection () const |
SCCOL | GetSourceCursorX () const |
SCROW | GetSourceCursorY () const |
SCTAB | GetVisibleTab () const |
ScDragSrc | GetDragSourceFlags () const |
bool | HasFilteredRows () const |
bool | GetUseInApi () const |
ScDocShell * | GetSourceDocShell () |
ScDocument * | GetSourceDocument () |
ScMarkData | GetSourceMarkData () const |
void | SetDrawPersist (const SfxObjectShellRef &rRef) |
void | SetDragHandlePos (SCCOL nX, SCROW nY) |
void | SetSourceCursorPos (SCCOL nX, SCROW nY) |
void | SetVisibleTab (SCTAB nNew) |
void | SetDragSource (ScDocShell *pSourceShell, const ScMarkData &rMark) |
void | SetDragSourceFlags (ScDragSrc nFlags) |
void | SetDragWasInternal () |
SC_DLLPUBLIC void | SetUseInApi (bool bSet) |
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 SC_DLLPUBLIC ScTransferObj * | GetOwnClipboard (const css::uno::Reference< css::datatransfer::XTransferable2 > &) |
static SfxObjectShell * | SetDrawClipDoc (bool bAnyOle, const std::shared_ptr< ScDocument > &={}) |
Static Public Member Functions inherited from TransferableHelper | |
static void | ClearPrimarySelection () |
Private Member Functions | |
void | InitDocShell (bool bLimitToPageSize) |
Static Private Member Functions | |
static void | StripRefs (ScDocument &rDoc, SCCOL nStartX, SCROW nStartY, SCCOL nEndX, SCROW nEndY, ScDocument &rDestDoc) |
static void | PaintToDev (OutputDevice *pDev, ScDocument &rDoc, double nPrintFactor, const ScRange &rBlock) |
static void | GetAreaSize (const ScDocument &rDoc, SCTAB nTab1, SCTAB nTab2, SCROW &nRow, SCCOL &nCol) |
Private Attributes | |
std::shared_ptr< ScDocument > | m_pDoc |
ScRange | m_aBlock |
SCROW | m_nNonFiltered |
TransferableObjectDescriptor | m_aObjDesc |
SfxObjectShellRef | m_aDocShellRef |
SfxObjectShellRef | m_aDrawPersistRef |
rtl::Reference< ScCellRangesBase > | m_xDragSourceRanges |
SCCOL | m_nDragHandleX |
SCROW | m_nDragHandleY |
SCCOL | m_nSourceCursorX |
SCROW | m_nSourceCursorY |
SCTAB | m_nVisibleTab |
ScDragSrc | m_nDragSourceFlags |
bool | m_bDragWasInternal |
bool | m_bUsedForLink |
bool | m_bHasFiltered |
bool | m_bUseInApi |
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 40 of file transobj.hxx.
ScTransferObj::ScTransferObj | ( | const std::shared_ptr< ScDocument > & | pClipDoc, |
TransferableObjectDescriptor | aDesc | ||
) |
Definition at line 114 of file transobj.cxx.
References GetAreaSize(), tools::Rectangle::GetSize(), i, m_aBlock, m_aObjDesc, m_bHasFiltered, m_nNonFiltered, m_nVisibleTab, m_pDoc, TransferableObjectDescriptor::maSize, TransferableHelper::PrepareOLE(), and Undefined.
|
overridevirtual |
Definition at line 179 of file transobj.cxx.
References tools::SvRef< typename T >::clear(), ScTabViewShell::GetActiveViewShell(), ScModule::GetDragData(), comphelper::LibreOfficeKit::isActive(), m_aDocShellRef, m_aDrawPersistRef, m_pDoc, ScDragData::pCellTransfer, ScModule::ResetDragObject(), and SC_MOD.
|
overridevirtual |
Reimplemented from TransferDataContainer.
Definition at line 204 of file transobj.cxx.
References TransferableHelper::AddFormat(), ScRange::aEnd, ScRange::aStart, and m_aBlock.
|
overridevirtual |
Reimplemented from TransferDataContainer.
Definition at line 553 of file transobj.cxx.
References ALL, ScDocFunc::DeleteContents(), DND_ACTION_MOVE, TransferDataContainer::DragFinished(), ScDocShell::GetDocFunc(), ScModule::GetDragData(), GetSourceDocShell(), GetSourceMarkData(), m_bDragWasInternal, m_nDragSourceFlags, m_xDragSourceRanges, Navigator, OBJECTS, ScDragData::pCellTransfer, ScModule::ResetDragObject(), and SC_MOD.
|
staticprivate |
Definition at line 79 of file transobj.cxx.
References ScDocument::GetPrintArea().
Referenced by ScTransferObj().
|
overridevirtual |
Reimplemented from TransferDataContainer.
Definition at line 278 of file transobj.cxx.
References ScRange::aEnd, ASPECT_CONTENT, ScRange::aStart, CELLTYPE_EDIT, ScAddress::Col(), SfxObjectShell::DoDraw(), ScImportExport::ExportString(), tools::SvRef< typename T >::get(), ScRefCellValue::getEditText(), SotExchange::GetFormat(), SfxObjectShell::GetMapUnit(), ScPatternAttr::GetNumberFormat(), tools::Rectangle::GetSize(), ScCellFormat::GetString(), ScRefCellValue::getType(), SfxObjectShell::GetVisArea(), TransferableHelper::HasFormat(), InitDocShell(), ScImportExport::IsFormatSupported(), lcl_reduceBlock(), m_aBlock, m_aDocShellRef, m_aObjDesc, m_bUsedForLink, m_pDoc, ScExportTextOptions::mbAddQuotes, ScExportTextOptions::mcSeparatorConvertTo, ScExportTextOptions::meNewlineConversion, ScExportTextOptions::None, PaintToDev(), GDIMetaFile::Record(), ScAddress::Row(), SCTRANS_TYPE_EDIT_BIN, SCTRANS_TYPE_EDIT_ODF_TEXT_FLAT, SCTRANS_TYPE_EDIT_RTF, SCTRANS_TYPE_EMBOBJ, SCTRANS_TYPE_IMPEX, TransferableHelper::SetBitmapEx(), ScImportExport::SetExportTextOptions(), ScImportExport::SetFormulas(), TransferableHelper::SetGDIMetaFile(), ScImportExport::SetIncludeFiltered(), TransferableHelper::SetObject(), GDIMetaFile::SetPrefMapMode(), GDIMetaFile::SetPrefSize(), TransferableHelper::SetString(), ScEditEngineDefaulter::SetTextCurrentDefaults(), TransferableHelper::SetTransferableObjectDescriptor(), GDIMetaFile::Stop(), ScAddress::Tab(), ScExportTextOptions::ToSpace, VOPT_FORMULAS, and GDIMetaFile::WindStart().
|
inline |
Definition at line 82 of file transobj.hxx.
Referenced by ScGridWindow::DropTransferObj(), ScCellShell::ExecuteEdit(), ScModule::GetClipDoc(), ooo::vba::excel::implnPasteSpecial(), ScClipUtil::PasteFromClipboard(), ScViewFunc::PasteFromSystem(), ScUndoPaste::Repeat(), ScViewData::SelectionForbidsPaste(), and ScGridWindow::UpdateCopySourceOverlay().
|
inline |
Definition at line 85 of file transobj.hxx.
Referenced by ScGridWindow::AcceptPrivateDrop().
|
inline |
Definition at line 86 of file transobj.hxx.
Referenced by ScGridWindow::AcceptPrivateDrop().
|
inline |
Definition at line 91 of file transobj.hxx.
Referenced by ScTabControl::AcceptDrop(), ScGridWindow::AcceptPrivateDrop(), ScGridWindow::DropTransferObj(), and ScTabControl::ExecuteDrop().
|
inline |
Definition at line 84 of file transobj.hxx.
Referenced by ScGridWindow::AcceptPrivateDrop(), and ScGridWindow::DropTransferObj().
|
static |
Definition at line 199 of file transobj.cxx.
Referenced by ScCellShell::ExecuteEdit(), ScModule::GetClipDoc(), ooo::vba::excel::implnCopy(), ooo::vba::excel::implnCut(), ooo::vba::excel::implnPasteSpecial(), ScVbaRange::Insert(), lcl_IsCellPastePossible(), ScClipUtil::PasteFromClipboard(), ScViewFunc::PasteFromSystem(), ScUndoPaste::Repeat(), ScViewData::SelectionForbidsPaste(), and ScGridWindow::UpdateCopySourceOverlay().
|
inline |
Definition at line 83 of file transobj.hxx.
Referenced by ScGridWindow::AcceptDrop(), ScGridWindow::AcceptPrivateDrop(), and ScGridWindow::DropTransferObj().
|
inline |
Definition at line 88 of file transobj.hxx.
Referenced by ScGridWindow::DropTransferObj().
|
inline |
Definition at line 89 of file transobj.hxx.
Referenced by ScGridWindow::DropTransferObj().
ScDocShell * ScTransferObj::GetSourceDocShell | ( | ) |
Definition at line 636 of file transobj.cxx.
References m_xDragSourceRanges.
Referenced by DragFinished(), ScGridWindow::DropTransferObj(), and GetSourceDocument().
ScDocument * ScTransferObj::GetSourceDocument | ( | ) |
Definition at line 628 of file transobj.cxx.
References ScDocShell::GetDocument(), and GetSourceDocShell().
Referenced by ScTabControl::AcceptDrop(), ScGridWindow::AcceptPrivateDrop(), ScGridWindow::DropTransferObj(), and ScTabControl::ExecuteDrop().
ScMarkData ScTransferObj::GetSourceMarkData | ( | ) | const |
Definition at line 644 of file transobj.cxx.
References m_pDoc, m_xDragSourceRanges, and ScMarkData::MarkFromRangeList().
Referenced by DragFinished(), and ScGridWindow::DropTransferObj().
|
inline |
Definition at line 93 of file transobj.hxx.
Referenced by ScVbaRange::Insert().
|
inline |
Definition at line 90 of file transobj.hxx.
Referenced by ScGridWindow::DropTransferObj(), ScTabControl::ExecuteDrop(), and ScClipUtil::PasteFromClipboard().
|
inline |
Definition at line 92 of file transobj.hxx.
Referenced by ScGridWindow::AcceptPrivateDrop(), and ScGridWindow::DropTransferObj().
|
private |
get while copying sizes
SetDocumentModified?
Definition at line 660 of file transobj.cxx.
References ScRange::aEnd, ALL, ScRange::aStart, ATTR_PAGE_SIZE(), ScAddress::Col(), o3tl::convert(), ScDocument::CopyFromClip(), ScDocument::CopyStdStylesFrom(), ScStyleSheetPool::CopyStyleFrom(), SfxObjectShell::DoInitNew(), ScDocument::ExtendMerge(), SfxStyleSheetBasePool::Find(), SfxItemSet::Get(), ScDocument::GetColWidth(), ScDocShell::GetDocument(), SfxStyleSheetBase::GetItemSet(), SvxPaperInfo::GetPaperSize(), ScDocument::GetRowHeight(), ScDocument::GetSheetLimits(), ScDocument::GetStyleSheetPool(), Size::Height(), tools::SvRef< typename T >::is(), ScDocument::IsChartListenerCollectionNeedsUpdate(), m_aBlock, m_aDocShellRef, m_pDoc, ScDocShell::MakeDrawLayer(), o3tl::mm100, PAPER_A4, ScDocument::RenameTab(), ScAddress::Row(), ScMarkData::SelectTable(), ScDocument::SetColWidth(), ScViewData::SetCurX(), ScViewData::SetCurY(), ScDocument::SetDocOptions(), Size::setHeight(), ScDocument::SetLayoutRTL(), ScDocument::SetManualHeight(), ScDocument::SetRowHeight(), ScViewData::SetScreen(), ScDocument::SetViewOptions(), ScDocShell::SetVisArea(), Size::setWidth(), ScDocument::ShowCol(), ScDocument::ShowRow(), StripRefs(), ScAddress::Tab(), o3tl::twip, ScDocument::UpdateChartListenerCollection(), ScDocShell::UpdateOle(), and Size::Width().
Referenced by GetData().
|
overridevirtual |
Reimplemented from TransferableHelper.
Definition at line 544 of file transobj.cxx.
References ScRange::aEnd, ScRange::aStart, ScAddress::Col(), lcl_reduceBlock(), m_aBlock, m_pDoc, ScAddress::Row(), and ScAddress::Tab().
|
staticprivate |
use size from clip area?
Definition at line 100 of file transobj.cxx.
References ScRange::aEnd, ScRange::aStart, ScAddress::Col(), ScPrintFunc::DrawToDev(), OutputDevice::GetOutputSize(), ScAddress::Row(), ScViewData::SetScreen(), ScViewData::SetTabNo(), and ScAddress::Tab().
Referenced by GetData().
Definition at line 577 of file transobj.cxx.
References m_nDragHandleX, and m_nDragHandleY.
void ScTransferObj::SetDragSource | ( | ScDocShell * | pSourceShell, |
const ScMarkData & | rMark | ||
) |
Definition at line 606 of file transobj.cxx.
References ScMarkData::FillRangeListWithMarks(), and m_xDragSourceRanges.
void ScTransferObj::SetDragSourceFlags | ( | ScDragSrc | nFlags | ) |
Definition at line 613 of file transobj.cxx.
References m_nDragSourceFlags.
void ScTransferObj::SetDragWasInternal | ( | ) |
Definition at line 618 of file transobj.cxx.
References m_bDragWasInternal.
Referenced by ScGridWindow::DropTransferObj(), and ScTabControl::ExecuteDrop().
|
static |
Definition at line 810 of file transobj.cxx.
References tools::SvRef< typename T >::clear(), tools::SvRef< typename T >::get(), and ScGlobal::xDrawClipDocShellRef.
Referenced by ScViewFunc::CopyToClipSingleRange(), ScDrawView::CopyToTransferable(), ScViewFunc::CopyToTransferable(), and ScDrawView::DoCopy().
void ScTransferObj::SetDrawPersist | ( | const SfxObjectShellRef & | rRef | ) |
Definition at line 601 of file transobj.cxx.
References m_aDrawPersistRef.
Definition at line 583 of file transobj.cxx.
References m_nSourceCursorX, and m_nSourceCursorY.
void ScTransferObj::SetUseInApi | ( | bool | bSet | ) |
Definition at line 623 of file transobj.cxx.
References m_bUseInApi.
Referenced by ooo::vba::excel::implnCopy(), and ooo::vba::excel::implnCut().
void ScTransferObj::SetVisibleTab | ( | SCTAB | nNew | ) |
Definition at line 596 of file transobj.cxx.
References m_nVisibleTab.
|
staticprivate |
Definition at line 824 of file transobj.cxx.
References ScRange::aEnd, ScDocument::ApplyAttr(), ScRange::aStart, aStr, ATTR_HOR_JUSTIFY(), CELLTYPE_FORMULA, ScAddress::Col(), EditEngine::CreateTextObject(), ScCellIterator::first(), ScDocument::GetAttr(), ScDocument::GetEditEngine(), ScFormulaCell::GetErrCode(), ScGlobal::GetErrorString(), ScCellIterator::getFormulaCell(), ScDetectiveRefIter::GetNextRef(), ScCellIterator::GetPos(), ScFormulaCell::GetString(), svl::SharedString::getString(), ScDocument::GetTableCount(), ScCellIterator::getType(), ScFormulaCell::GetValue(), ScDocument::HasTable(), ScFormulaCell::IsMultilineResult(), ScFormulaCell::IsValue(), ScCellIterator::next(), ScAddress::Row(), ScDocument::SetEditText(), ScDocument::SetString(), ScEditEngineDefaulter::SetTextCurrentDefaults(), ScSetStringParam::setTextInput(), ScDocument::SetValue(), and ScAddress::Tab().
Referenced by InitDocShell().
bool ScTransferObj::WasSourceCursorInSelection | ( | ) | const |
Definition at line 589 of file transobj.cxx.
References ScRange::aEnd, ScRange::aStart, ScAddress::Col(), m_aBlock, m_nSourceCursorX, m_nSourceCursorY, and ScAddress::Row().
Referenced by ScGridWindow::DropTransferObj().
|
overridevirtual |
Reimplemented from TransferableHelper.
Definition at line 452 of file transobj.cxx.
References tools::SvRef< typename T >::clear(), EditEngine::CreateTransferable(), SfxObjectShell::DoSaveCompleted(), SfxObjectShell::DoSaveObjectAs(), ERRCODE_NONE, ScImportExport::ExportStream(), SotExchange::GetFormat(), EditEngine::GetParagraphCount(), TransferableDataHelper::GetSotStorageStream(), comphelper::OStorageHelper::GetStorageFromStream(), utl::TempFileFast::GetStream(), EditEngine::GetTextLen(), SCTRANS_TYPE_EDIT_BIN, SCTRANS_TYPE_EDIT_ODF_TEXT_FLAT, SCTRANS_TYPE_EDIT_RTF, SCTRANS_TYPE_EMBOBJ, SCTRANS_TYPE_IMPEX, SfxObjectShell::SetupStorage(), SOFFICE_FILEFORMAT_CURRENT, and EditEngine::Write().
|
private |
Definition at line 44 of file transobj.hxx.
Referenced by AddSupportedFormats(), GetData(), InitDocShell(), isComplex(), ScTransferObj(), and WasSourceCursorInSelection().
|
private |
Definition at line 47 of file transobj.hxx.
Referenced by GetData(), InitDocShell(), and ~ScTransferObj().
|
private |
Definition at line 48 of file transobj.hxx.
Referenced by SetDrawPersist(), and ~ScTransferObj().
|
private |
Definition at line 46 of file transobj.hxx.
Referenced by GetData(), and ScTransferObj().
|
private |
Definition at line 56 of file transobj.hxx.
Referenced by DragFinished(), and SetDragWasInternal().
|
private |
Definition at line 58 of file transobj.hxx.
Referenced by ScTransferObj().
|
private |
Definition at line 57 of file transobj.hxx.
Referenced by GetData().
|
private |
Definition at line 59 of file transobj.hxx.
Referenced by SetUseInApi().
|
private |
Definition at line 50 of file transobj.hxx.
Referenced by SetDragHandlePos().
|
private |
Definition at line 51 of file transobj.hxx.
Referenced by SetDragHandlePos().
|
private |
Definition at line 55 of file transobj.hxx.
Referenced by DragFinished(), and SetDragSourceFlags().
|
private |
Definition at line 45 of file transobj.hxx.
Referenced by ScTransferObj().
|
private |
Definition at line 52 of file transobj.hxx.
Referenced by SetSourceCursorPos(), and WasSourceCursorInSelection().
|
private |
Definition at line 53 of file transobj.hxx.
Referenced by SetSourceCursorPos(), and WasSourceCursorInSelection().
|
private |
Definition at line 54 of file transobj.hxx.
Referenced by ScTransferObj(), and SetVisibleTab().
|
private |
Definition at line 43 of file transobj.hxx.
Referenced by GetData(), GetSourceMarkData(), InitDocShell(), isComplex(), ScTransferObj(), and ~ScTransferObj().
|
private |
Definition at line 49 of file transobj.hxx.
Referenced by DragFinished(), GetSourceDocShell(), GetSourceMarkData(), and SetDragSource().