12#include <document.hxx>
16#include <tokenarray.hxx>
35 return mpSet->getBlockPosition(nTab, nCol);
40 bool bAsLink,
bool bSkipEmptyCells) :
42 mnDestCol1(-1), mnDestCol2(-1),
43 mnDestRow1(-1), mnDestRow2(-1),
44 mnTabStart(-1), mnTabEnd(-1),
46 mpRefUndoDoc(pRefUndoDoc), mpClipDoc(pClipDoc),
48 mpCondFormatList(nullptr),
49 mbAsLink(bAsLink), mbSkipEmptyCells(bSkipEmptyCells),
50 mbTableProtected(false)
120 for (
SCCOL nCol = nCol1; nCol <= nCol2; ++nCol)
138 virtual void execute(
const ScAddress& rPos,
SCROW nLength,
bool bVal )
override
155 auto pSet = std::make_shared<sc::ColumnBlockPositionSet>(
mrDestDoc);
159 StartListeningAction aAction(
mrDestDoc, aStartCxt, aEndCxt);
204 aArr.AddSingleReference(aRef);
224 bool bPaste =
isDateCell(rSrcCol, rSrcPos.
Row()) ? bDateTime : bNumeric;
244 if (pCode && pCode->
GetLen() == 1)
258 if (nErr != FormulaError::NONE)
269 rSrcCell.
set(pErrCell);
279 bool bPaste =
isDateCell(rSrcCol, rSrcPos.
Row()) ? bDateTime : bNumeric;
402 return (
nType == SvNumFormatType::DATE) || (
nType == SvNumFormatType::TIME) || (
nType == SvNumFormatType::DATETIME);
const SfxPoolItem & GetAttr(SCROW nRow, sal_uInt16 nWhich) const
const sc::CellTextAttr * GetCellTextAttr(SCROW nRow) const
ScClipParam & GetClipParam()
std::unique_ptr< EditTextObject > CreateSharedStringTextObject(const svl::SharedString &rSS)
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
void StartListeningFromClip(sc::StartListeningContext &rStartCxt, sc::EndListeningContext &rEndCxt, SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
Additional class containing cell annotation data.
ColumnBlockPosition * getBlockPosition(SCTAB nTab, SCCOL nCol)
std::unique_ptr< ColumnBlockPositionSet > mpSet
virtual ~ClipContextBase()
void executeAction(ScDocument &rDoc, Action &ac) const
void set(const ScDocument &rDoc, SCTAB nTab, SCCOL nCol, SCROW nRow, bool bVal)
void setSingleCellPattern(size_t nColOffset, const ScPatternAttr *pAttr)
void setSingleCellNote(size_t nColOffset, const ScPostIt *pNote)
void setDeleteFlag(InsertDeleteFlags nFlag)
void setSingleCellColumnSize(size_t nSize)
Set the column size of a "single cell" row, which is used when copying a single row of cells in a cli...
std::vector< const ScPatternAttr * > maSinglePatterns
ScDocument * mpRefUndoDoc
std::vector< sc::CellTextAttr > maSingleCellAttrs
void startListeningFormulas()
Have the formula cells in the recorded ranges start listening.
void setSingleSparkline(size_t nColOffset, std::shared_ptr< sc::Sparkline > const &pSparkline)
void setDestRange(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
CopyFromClipContext()=delete
virtual ~CopyFromClipContext() override
std::vector< std::shared_ptr< sc::Sparkline > > maSingleSparkline
sc::CellTextAttr & getSingleCellAttr(size_t nColOffset)
bool isCloneSparklines() const
InsertDeleteFlags getDeleteFlag() const
void setListeningFormulaSpans(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
Record a range of formula cells that need to start listening after the copy-from-clip is complete.
ScConditionalFormatList * getCondFormatList()
bool isCloneNotes() const
bool isSkipEmptyCells() const
Get the flag that indicates whether the "skip empty cells" paste option is selected.
ScCellValue & getSingleCell(size_t nColOffset)
sc::ColumnSpanSet maListeningFormulaSpans
Tracks modified formula group spans.
InsertDeleteFlags getInsertFlag() const
void setCondFormatList(ScConditionalFormatList *pCondFormatList)
InsertDeleteFlags mnDeleteFlag
std::shared_ptr< sc::Sparkline > const & getSingleSparkline(size_t nColOffset) const
InsertDeleteFlags mnInsertFlag
void setTabRange(SCTAB nStart, SCTAB nEnd)
std::vector< const ScPostIt * > maSingleNotes
const ScPatternAttr * getSingleCellPattern(size_t nColOffset) const
bool isDateCell(const ScColumn &rCol, SCROW nRow) const
void setSingleCell(const ScAddress &rSrcPos, const ScColumn &rSrcCol)
ScConditionalFormatList * mpCondFormatList
void setTableProtected(bool b)
bool isTableProtected() const
SCTAB getTabStart() const
Range getDestRange() const
const ScPostIt * getSingleCellNote(size_t nColOffset) const
ScDocument * getUndoDoc()
ScDocument * getClipDoc()
std::vector< ScCellValue > maSingleCells
bool isKeepScenarioFlags() const
virtual ~CopyToClipContext() override
CopyToClipContext(ScDocument &rDoc, bool bKeepScenarioFlags)
virtual ~CopyToDocContext() override
bool isStartListening() const
CopyToDocContext(ScDocument &rDoc)
void setStartListening(bool b)
MixDocContext(ScDocument &rDoc)
virtual ~MixDocContext() override
sc::StartListeningContext & mrStartCxt
sc::EndListeningContext & mrEndCxt
@ SPARKLINES
Sheet / outlining (grouping) information.
@ NOTE
Strings (and string results if InsertDeleteFlags::FORMULA is not set).
@ SPECIAL_BOOLEAN
Internal use only (copy from clip): do not delete existing cell contents when pasting notes.
@ STRING
Dates, times, datetime values.
@ ADDNOTES
Internal use only (undo etc.): do not copy/delete caption objects of cell notes.
@ DATETIME
Numeric values (and numeric results if InsertDeleteFlags::FORMULA is not set).
CAUTION! The following defines must be in the same namespace as the respective type.
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALUE_FORMAT(146)
Store arbitrary cell value of any kind.
void assign(const ScDocument &rDoc, const ScAddress &rPos)
Take cell value from specified position in specified document.
ScFormulaCell * getFormula() const
ScRange getWholeRange() const
Return a single range that encompasses all individual ranges.
Single reference (one address) into the sheet.
void InitAddress(const ScAddress &rAdr)
InitAddress: InitFlags and set address.
void SetFlag3D(bool bVal)
Store position data for column array storage.