LibreOffice Module sc (master) 1
|
#include <clipcontext.hxx>
Classes | |
struct | Range |
Public Member Functions | |
CopyFromClipContext ()=delete | |
CopyFromClipContext (ScDocument &rDoc, ScDocument *pRefUndoDoc, ScDocument *pClipDoc, InsertDeleteFlags nInsertFlag, bool bAsLink, bool bSkipAttrForEmptyCells) | |
virtual | ~CopyFromClipContext () override |
void | setTabRange (SCTAB nStart, SCTAB nEnd) |
SCTAB | getTabStart () const |
SCTAB | getTabEnd () const |
void | setDestRange (SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) |
Range | getDestRange () const |
ScDocument * | getUndoDoc () |
ScDocument * | getClipDoc () |
ScDocument * | getDestDoc () |
InsertDeleteFlags | getInsertFlag () const |
void | setDeleteFlag (InsertDeleteFlags nFlag) |
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. More... | |
void | startListeningFormulas () |
Have the formula cells in the recorded ranges start listening. More... | |
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 clip doc and pasting it into multiple rows by replicating it. More... | |
ScCellValue & | getSingleCell (size_t nColOffset) |
sc::CellTextAttr & | getSingleCellAttr (size_t nColOffset) |
void | setSingleCell (const ScAddress &rSrcPos, const ScColumn &rSrcCol) |
const ScPatternAttr * | getSingleCellPattern (size_t nColOffset) const |
void | setSingleCellPattern (size_t nColOffset, const ScPatternAttr *pAttr) |
const ScPostIt * | getSingleCellNote (size_t nColOffset) const |
void | setSingleCellNote (size_t nColOffset, const ScPostIt *pNote) |
std::shared_ptr< sc::Sparkline > const & | getSingleSparkline (size_t nColOffset) const |
void | setSingleSparkline (size_t nColOffset, std::shared_ptr< sc::Sparkline > const &pSparkline) |
void | setCondFormatList (ScConditionalFormatList *pCondFormatList) |
ScConditionalFormatList * | getCondFormatList () |
void | setTableProtected (bool b) |
bool | isTableProtected () const |
bool | isAsLink () const |
bool | isSkipEmptyCells () const |
Get the flag that indicates whether the "skip empty cells" paste option is selected. More... | |
bool | isCloneNotes () const |
bool | isCloneSparklines () const |
bool | isDateCell (const ScColumn &rCol, SCROW nRow) const |
Public Member Functions inherited from sc::ClipContextBase | |
ClipContextBase ()=delete | |
ClipContextBase (const ClipContextBase &)=delete | |
const ClipContextBase & | operator= (const ClipContextBase &)=delete |
ClipContextBase (ScDocument &rDoc) | |
virtual | ~ClipContextBase () |
ColumnBlockPosition * | getBlockPosition (SCTAB nTab, SCCOL nCol) |
ColumnBlockPositionSet * | getBlockPositionSet () |
Private Attributes | |
sc::ColumnSpanSet | maListeningFormulaSpans |
Tracks modified formula group spans. More... | |
SCCOL | mnDestCol1 |
SCCOL | mnDestCol2 |
SCROW | mnDestRow1 |
SCROW | mnDestRow2 |
SCTAB | mnTabStart |
SCTAB | mnTabEnd |
ScDocument & | mrDestDoc |
ScDocument * | mpRefUndoDoc |
ScDocument * | mpClipDoc |
InsertDeleteFlags | mnInsertFlag |
InsertDeleteFlags | mnDeleteFlag |
std::vector< ScCellValue > | maSingleCells |
std::vector< sc::CellTextAttr > | maSingleCellAttrs |
std::vector< const ScPatternAttr * > | maSinglePatterns |
std::vector< const ScPostIt * > | maSingleNotes |
std::vector< std::shared_ptr< sc::Sparkline > > | maSingleSparkline |
ScConditionalFormatList * | mpCondFormatList |
bool | mbAsLink:1 |
bool | mbSkipEmptyCells:1 |
bool | mbTableProtected:1 |
Definition at line 47 of file clipcontext.hxx.
|
delete |
sc::CopyFromClipContext::CopyFromClipContext | ( | ScDocument & | rDoc, |
ScDocument * | pRefUndoDoc, | ||
ScDocument * | pClipDoc, | ||
InsertDeleteFlags | nInsertFlag, | ||
bool | bAsLink, | ||
bool | bSkipAttrForEmptyCells | ||
) |
Definition at line 38 of file clipcontext.cxx.
References NONE.
|
overridevirtual |
Definition at line 54 of file clipcontext.cxx.
ScDocument * sc::CopyFromClipContext::getClipDoc | ( | ) |
Definition at line 97 of file clipcontext.cxx.
References mpClipDoc.
Referenced by ScDocument::CopyBlockFromClip(), ScDocument::CopyNonFilteredFromClip(), ScTable::CopyOneCellFromClip(), ScDocument::CopyOneCellFromClip(), ScColumn::CopyOneCellFromClip(), ScColumn::DeleteBeforeCopyFromClip(), ScDocument::DeleteBeforeCopyFromClip(), and ScTable::DeleteBeforeCopyFromClip().
ScConditionalFormatList * sc::CopyFromClipContext::getCondFormatList | ( | ) |
Definition at line 363 of file clipcontext.cxx.
References mpCondFormatList.
Referenced by ScColumn::DeleteBeforeCopyFromClip().
InsertDeleteFlags sc::CopyFromClipContext::getDeleteFlag | ( | ) | const |
Definition at line 112 of file clipcontext.cxx.
References mnDeleteFlag.
Referenced by ScColumn::DeleteBeforeCopyFromClip().
|
inline |
Definition at line 102 of file clipcontext.hxx.
References mrDestDoc.
CopyFromClipContext::Range sc::CopyFromClipContext::getDestRange | ( | ) | const |
Definition at line 82 of file clipcontext.cxx.
References sc::CopyFromClipContext::Range::mnCol1, sc::CopyFromClipContext::Range::mnCol2, mnDestCol1, mnDestCol2, mnDestRow1, mnDestRow2, sc::CopyFromClipContext::Range::mnRow1, and sc::CopyFromClipContext::Range::mnRow2.
Referenced by ScColumn::DeleteBeforeCopyFromClip(), and ScTable::DeleteBeforeCopyFromClip().
InsertDeleteFlags sc::CopyFromClipContext::getInsertFlag | ( | ) | const |
Definition at line 102 of file clipcontext.cxx.
References mnInsertFlag.
Referenced by ScDocument::CopyBlockFromClip(), ScTable::CopyFromClip(), ScColumn::CopyFromClip(), ScTable::CopyOneCellFromClip(), ScDocument::CopyOneCellFromClip(), ScColumn::CopyOneCellFromClip(), ScColumn::duplicateSparkline(), and setSingleCell().
ScCellValue & sc::CopyFromClipContext::getSingleCell | ( | size_t | nColOffset | ) |
Definition at line 172 of file clipcontext.cxx.
References maSingleCells.
Referenced by ScColumn::CopyOneCellFromClip(), and setSingleCell().
sc::CellTextAttr & sc::CopyFromClipContext::getSingleCellAttr | ( | size_t | nColOffset | ) |
Definition at line 178 of file clipcontext.cxx.
References maSingleCellAttrs.
Referenced by ScColumn::CopyOneCellFromClip(), and setSingleCell().
const ScPostIt * sc::CopyFromClipContext::getSingleCellNote | ( | size_t | nColOffset | ) | const |
Definition at line 334 of file clipcontext.cxx.
References maSingleNotes.
Referenced by ScColumn::CopyOneCellFromClip().
const ScPatternAttr * sc::CopyFromClipContext::getSingleCellPattern | ( | size_t | nColOffset | ) | const |
Definition at line 322 of file clipcontext.cxx.
References maSinglePatterns.
Referenced by ScColumn::CopyOneCellFromClip().
std::shared_ptr< sc::Sparkline > const & sc::CopyFromClipContext::getSingleSparkline | ( | size_t | nColOffset | ) | const |
Definition at line 346 of file clipcontext.cxx.
References maSingleSparkline.
Referenced by ScColumn::duplicateSparkline().
SCTAB sc::CopyFromClipContext::getTabEnd | ( | ) | const |
Definition at line 69 of file clipcontext.cxx.
References mnTabEnd.
Referenced by ScDocument::CopyBlockFromClip(), ScDocument::CopyFromClip(), ScDocument::CopyOneCellFromClip(), and ScDocument::DeleteBeforeCopyFromClip().
SCTAB sc::CopyFromClipContext::getTabStart | ( | ) | const |
Definition at line 64 of file clipcontext.cxx.
References mnTabStart.
Referenced by ScDocument::CopyBlockFromClip(), ScDocument::CopyFromClip(), ScDocument::CopyOneCellFromClip(), and ScDocument::DeleteBeforeCopyFromClip().
ScDocument * sc::CopyFromClipContext::getUndoDoc | ( | ) |
Definition at line 92 of file clipcontext.cxx.
References mpRefUndoDoc.
Referenced by ScDocument::CopyBlockFromClip(), and ScDocument::CopyOneCellFromClip().
bool sc::CopyFromClipContext::isAsLink | ( | ) | const |
Definition at line 378 of file clipcontext.cxx.
References mbAsLink.
Referenced by ScColumn::CopyFromClip().
bool sc::CopyFromClipContext::isCloneNotes | ( | ) | const |
Definition at line 388 of file clipcontext.cxx.
References ADDNOTES, mnInsertFlag, and NOTE.
bool sc::CopyFromClipContext::isCloneSparklines | ( | ) | const |
Definition at line 393 of file clipcontext.cxx.
References mnInsertFlag, and SPARKLINES.
Definition at line 398 of file clipcontext.cxx.
References ATTR_VALUE_FORMAT(), ScColumn::GetAttr(), ScDocument::GetFormatTable(), SvNumberFormatter::GetType(), mpClipDoc, and nType.
Referenced by setSingleCell().
bool sc::CopyFromClipContext::isSkipEmptyCells | ( | ) | const |
Get the flag that indicates whether the "skip empty cells" paste option is selected.
When this option is selected, empty cells in the clipboard document will not overwrite the corresponding non-empty cells in the destination range.
Definition at line 383 of file clipcontext.cxx.
References mbSkipEmptyCells.
Referenced by ScColumn::CopyFromClip(), ScColumn::CopyOneCellFromClip(), and ScColumn::DeleteBeforeCopyFromClip().
bool sc::CopyFromClipContext::isTableProtected | ( | ) | const |
Definition at line 373 of file clipcontext.cxx.
References mbTableProtected.
Referenced by ScColumn::DeleteBeforeCopyFromClip().
void sc::CopyFromClipContext::setCondFormatList | ( | ScConditionalFormatList * | pCondFormatList | ) |
Definition at line 358 of file clipcontext.cxx.
References mpCondFormatList.
Referenced by ScTable::DeleteBeforeCopyFromClip().
void sc::CopyFromClipContext::setDeleteFlag | ( | InsertDeleteFlags | nFlag | ) |
Definition at line 107 of file clipcontext.cxx.
References mnDeleteFlag.
Referenced by ScDocument::CopyFromClip().
Definition at line 74 of file clipcontext.cxx.
References mnDestCol1, mnDestCol2, mnDestRow1, and mnDestRow2.
Referenced by ScDocument::CopyFromClip().
void sc::CopyFromClipContext::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.
Definition at line 117 of file clipcontext.cxx.
References maListeningFormulaSpans, mrDestDoc, and sc::ColumnSpanSet::set().
Referenced by ScDocument::CopyFromClip(), and ScColumn::DeleteBeforeCopyFromClip().
Definition at line 184 of file clipcontext.cxx.
References aArr, ScCellValue::assign(), ScRange::aStart, aStr, CELLTYPE_EDIT, CELLTYPE_FORMULA, CELLTYPE_NONE, CELLTYPE_STRING, CELLTYPE_VALUE, ScCellValue::clear(), ScAddress::Col(), ScDocument::CreateSharedStringTextObject(), DATETIME, formula::FormulaTokenArray::FirstToken(), FORMULA, ScColumn::GetCellTextAttr(), ScDocument::GetClipParam(), ScFormulaCell::GetCode(), ScFormulaCell::GetErrCode(), ScCellValue::getFormula(), getInsertFlag(), formula::FormulaTokenArray::GetLen(), getSingleCell(), getSingleCellAttr(), ScFormulaCell::GetString(), ScCellValue::getType(), ScFormulaCell::GetValue(), ScClipParam::getWholeRange(), ScSingleRefData::InitAddress(), isDateCell(), ScFormulaCell::IsEmptyDisplayedAsString(), ScFormulaCell::IsMultilineResult(), ScFormulaCell::IsValue(), mbAsLink, mpClipDoc, mrDestDoc, NONE, ocFalse, ocTrue, p, ScAddress::Row(), ScCellValue::set(), ScFormulaCell::SetErrCode(), ScSingleRefData::SetFlag3D(), SPECIAL_BOOLEAN, STRING, and VALUE.
Referenced by ScDocument::CopyOneCellFromClip().
void sc::CopyFromClipContext::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 clip doc and pasting it into multiple rows by replicating it.
Definition at line 163 of file clipcontext.cxx.
References maSingleCellAttrs, maSingleCells, maSingleNotes, maSinglePatterns, and maSingleSparkline.
Referenced by ScDocument::CopyOneCellFromClip().
void sc::CopyFromClipContext::setSingleCellNote | ( | size_t | nColOffset, |
const ScPostIt * | pNote | ||
) |
Definition at line 340 of file clipcontext.cxx.
References maSingleNotes.
Referenced by ScDocument::CopyOneCellFromClip().
void sc::CopyFromClipContext::setSingleCellPattern | ( | size_t | nColOffset, |
const ScPatternAttr * | pAttr | ||
) |
Definition at line 328 of file clipcontext.cxx.
References maSinglePatterns.
Referenced by ScDocument::CopyOneCellFromClip().
void sc::CopyFromClipContext::setSingleSparkline | ( | size_t | nColOffset, |
std::shared_ptr< sc::Sparkline > const & | pSparkline | ||
) |
Definition at line 352 of file clipcontext.cxx.
References maSingleSparkline.
Referenced by ScDocument::CopyOneCellFromClip().
void sc::CopyFromClipContext::setTableProtected | ( | bool | b | ) |
Definition at line 368 of file clipcontext.cxx.
References mbTableProtected.
Referenced by ScTable::DeleteBeforeCopyFromClip().
Definition at line 58 of file clipcontext.cxx.
References mnTabEnd, and mnTabStart.
Referenced by ScDocument::CopyFromClip(), and ScDocument::CopyMultiRangeFromClip().
void sc::CopyFromClipContext::startListeningFormulas | ( | ) |
Have the formula cells in the recorded ranges start listening.
Definition at line 153 of file clipcontext.cxx.
References sc::ColumnSpanSet::executeAction(), maListeningFormulaSpans, and mrDestDoc.
Referenced by ScDocument::CopyFromClip().
|
private |
Tracks modified formula group spans.
Definition at line 50 of file clipcontext.hxx.
Referenced by setListeningFormulaSpans(), and startListeningFormulas().
|
private |
Definition at line 65 of file clipcontext.hxx.
Referenced by getSingleCellAttr(), and setSingleCellColumnSize().
|
private |
Definition at line 64 of file clipcontext.hxx.
Referenced by getSingleCell(), and setSingleCellColumnSize().
|
private |
Definition at line 67 of file clipcontext.hxx.
Referenced by getSingleCellNote(), setSingleCellColumnSize(), and setSingleCellNote().
|
private |
Definition at line 66 of file clipcontext.hxx.
Referenced by getSingleCellPattern(), setSingleCellColumnSize(), and setSingleCellPattern().
|
private |
Definition at line 68 of file clipcontext.hxx.
Referenced by getSingleSparkline(), setSingleCellColumnSize(), and setSingleSparkline().
|
private |
Definition at line 71 of file clipcontext.hxx.
Referenced by isAsLink(), and setSingleCell().
|
private |
Definition at line 72 of file clipcontext.hxx.
Referenced by isSkipEmptyCells().
|
private |
Definition at line 73 of file clipcontext.hxx.
Referenced by isTableProtected(), and setTableProtected().
|
private |
Definition at line 62 of file clipcontext.hxx.
Referenced by getDeleteFlag(), and setDeleteFlag().
|
private |
Definition at line 52 of file clipcontext.hxx.
Referenced by getDestRange(), and setDestRange().
|
private |
Definition at line 53 of file clipcontext.hxx.
Referenced by getDestRange(), and setDestRange().
|
private |
Definition at line 54 of file clipcontext.hxx.
Referenced by getDestRange(), and setDestRange().
|
private |
Definition at line 55 of file clipcontext.hxx.
Referenced by getDestRange(), and setDestRange().
|
private |
Definition at line 61 of file clipcontext.hxx.
Referenced by getInsertFlag(), isCloneNotes(), and isCloneSparklines().
|
private |
Definition at line 57 of file clipcontext.hxx.
Referenced by getTabEnd(), and setTabRange().
|
private |
Definition at line 56 of file clipcontext.hxx.
Referenced by getTabStart(), and setTabRange().
|
private |
Definition at line 60 of file clipcontext.hxx.
Referenced by getClipDoc(), isDateCell(), and setSingleCell().
|
private |
Definition at line 70 of file clipcontext.hxx.
Referenced by getCondFormatList(), and setCondFormatList().
|
private |
Definition at line 59 of file clipcontext.hxx.
Referenced by getUndoDoc().
|
private |
Definition at line 58 of file clipcontext.hxx.
Referenced by setListeningFormulaSpans(), setSingleCell(), and startListeningFormulas().