26#include <osl/diagnose.h>
30#include <document.hxx>
37#include <stlsheet.hxx>
67 SCTAB nNewCount, std::unique_ptr<
SCTAB[]> pNewTabs, std::unique_ptr<
SCTAB[]> pNewScenarios,
69 bool bNewPartOfPaste ) :
73 pTabs(
std::move(pNewTabs) ),
74 pScenarios(
std::move(pNewScenarios) ),
76 bPartOfPaste( bNewPartOfPaste )
110 if (
auto pWrapper =
dynamic_cast<ScUndoWrapper*
>( pNextAction) )
113 if (
dynamic_cast<const ScUndoPaste*
>( pWrappedAction) )
119 pWrapper->ForgetWrappedUndo();
289 bColsAffected, bRowsAffected,
347 SCTAB nNewCount, std::unique_ptr<
SCTAB[]> pNewTabs, std::unique_ptr<
SCTAB[]> pNewScenarios,
352 pTabs(
std::move(pNewTabs) ),
353 pScenarios(
std::move(pNewScenarios) ),
378 return ScResId( STR_UNDO_DELETECELLS );
482 aMarkData, aPattern );
560 bColsAffected, bRowsAffected,
630 pViewTarget->GetViewShell()->DeleteCells(
eCmd );
641 bool bNewRows,
bool bNeedsRefresh,
SCTAB nNewTab,
642 std::vector<sc::ColRowSpan>&& rSpans,
646 mbRefresh(bNeedsRefresh),
648 maSpans(
std::move(rSpans))
659 return ScResId( STR_UNDO_DELETECELLS );
686 rDoc.
ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow,
nTab,
true );
711 std::vector<sc::ColRowSpan>::const_reverse_iterator ri =
maSpans.rbegin(), riEnd =
maSpans.rend();
712 for (; ri != riEnd; ++ri)
743 for (
const auto& rSpan :
maSpans)
753 for (
const auto& rSpan :
maSpans)
785 std::vector<sc::ColRowSpan>::const_reverse_iterator ri =
maSpans.rbegin(), riEnd =
maSpans.rend();
786 for (; ri != riEnd; ++ri)
820 , pUndoDoc(
std::move(pNewUndoDoc))
821 , aExtendedRange(aRange)
832 return ScResId( STR_UNDO_CUT );
848 sal_uInt16 nExtFlags = 0;
860 pUndoDoc->CopyToDocument(aCopyRange, nUndoFlags,
false, rDoc);
907 pViewTarget->GetViewShell()->CutToClip();
919 std::unique_ptr<ScRefUndoData> pRefData,
923 pUndoDoc(
std::move(pNewUndoDoc) ),
924 pRedoDoc(
std::move(pNewRedoDoc) ),
926 pRefUndoData(
std::move(pRefData) ),
927 bRedoFilled( bRedoIsFilled )
948 return ScResId( STR_UNDO_PASTE );
973 if ( bCreateRedoData )
989 bool bPaintAll =
false;
998 bool bColInfo =
true;
999 bool bRowInfo =
true;
1005 if (!bColInfo && !bRowInfo)
1024 sal_uInt16 nExtFlags = 0;
1044 pRedoDoc->UndoToDocument(aRange, nUndoFlags,
false, rDoc);
1047 if (rTab >= nTabCount)
1050 if (rTab == nFirstSelected)
1055 pRedoDoc->CopyToDocument(aRange, nUndoFlags,
false, rDoc);
1062 pWorkRefData->
DoUndo( &rDoc,
true );
1078 if (rTab >= nTabCount)
1082 pUndoDoc->UndoToDocument(aRange, nUndoFlags,
false, rDoc);
1100 bool bColsAffected =
false;
1101 bool bRowsAffected =
false;
1103 for (
size_t i = 0,
n = aDrawRanges.
size();
i <
n; ++
i)
1105 ScRange& rDrawRange = aDrawRanges[
i];
1125 bColsAffected =
true;
1131 bRowsAffected =
true;
1154 if (bColsAffected || bRowsAffected)
1157 bColsAffected, bRowsAffected,
1158 true ,
true ,
true ,
1159 true , aDrawRanges[0].aStart.Tab());
1209 ScMoveUndo( pNewDocShell,
std::move(pUndoDocument), nullptr ),
1210 mnPaintExtFlags( 0 ),
1211 aSrcRange( rRange ),
1213 bKeepScenarioFlags( bScenario )
1220 bool bIncludeFiltered =
bCut;
1221 if ( !bIncludeFiltered )
1227 if ( nPastedCount == 0 )
1229 aDestEnd.
SetRow( aNewDestPos.
Row() + nPastedCount - 1 );
1343 pRefUndoDoc->CopyToDocument(aRange, nUndoFlags,
false, rDoc);
1381 pName->UpdateReference(aCxt);
1384 for (
SCTAB nTab = 0; nTab < nTabCount; ++nTab)
1389 pName->UpdateReference(aCxt, nTab);
1456 sal_uInt16 nExtFlags = 0;
1466 bool bIncludeFiltered =
bCut;
1476 if ( !bIncludeFiltered && pClipDoc->HasClipFilteredRows() )
1484 nEndCol, nEndRow, nTab,
true );
1486 nEndCol, nEndRow, nTab ), 0 );
1515 , xUndoDoc(
std::move(pNewUndoDoc))
1516 , xRedoDoc(
std::move(pNewRedoDoc))
1522 return ScResId( STR_UNDO_LISTNAMES );
1555 pTabViewTarget->GetViewShell()->InsertNameList();
1566 mpUndoDoc(
std::move(pUndoDoc)),
1567 mpRedoDoc(
std::move(pRedoDoc)),
1578 return ScResId( STR_UNDO_CONDFORMAT );
1616 mpUndoDoc(
std::move(pUndoDoc)),
1617 mpRedoDoc(
std::move(pRedoDoc)),
1628 return ScResId( STR_UNDO_CONDFORMAT_LIST );
1677 OUString aNewName ) :
1679 pUndoDoc(
std::move(pNewUndoDoc) ),
1697 return ScResId( STR_UNDO_USESCENARIO );
1716 bool bFrame =
false;
1718 SCTAB nEndTab = nTab;
1721 for (
SCTAB i = nTab+1;
i<=nEndTab;
i++)
1727 pUndoDoc->GetScenarioData(
i, aComment, aColor, nScenFlags );
1729 bool bActive =
pUndoDoc->IsActiveScenario(
i );
1777 OUString aTemp =
aName;
1778 pViewTarget->GetViewShell()->UseScenario(aTemp);
1799 pUndoDoc(
std::move(pNewUndoDoc) ),
1812 return ScResId( STR_UNDO_APPLYCELLSTYLE );
1825 sal_uInt16 nExtFlags = 0;
1831 ScRange aCopyRange = aWorkRange;
1843 OSL_FAIL(
"StyleSheet not found");
1883 OSL_FAIL(
"StyleSheet not found");
1899 pUndoDoc(
std::move(pNewUndoDoc) ),
1900 aFormula(
std::move( aForm ))
1911 return ScResId( STR_UNDO_ENTERMATRIX );
1971 pTabViewTarget->GetViewShell()->EnterMatrix(aTemp, rDoc.
GetGrammar());
1990 pUndoDoc(
std::move(pNewUndoDoc) ),
1991 bIsIncrement( bIncrement )
2034 pViewTarget->GetViewShell()->ChangeIndent(
bIsIncrement );
2046 pUndoDoc(
std::move(pNewUndoDoc) ),
2047 nTransliterationType(
nType )
2057 return ScResId( STR_UNDO_TRANSLITERATE );
2101 pUndoDoc(
std::move(pNewUndoDoc) )
2103 OSL_ENSURE( pW,
"ScUndoClearItems: Which-Pointer is Null" );
2119 return ScResId( STR_UNDO_DELETECONTENTS );
2163 pUndoDoc(
std::move(pNewUndoDoc) )
2173 return ScResId( STR_UNDO_REMOVEBREAKS );
2224 pUndoDoc(
std::move(pNewUndoDoc) )
2232 pUndoDoc(
std::move(pNewUndoDoc) )
2242 return ScResId( STR_UNDO_REMERGE );
2267 for (
const auto& rTab : rOption.maTabs)
2269 OSL_ENSURE(
pUndoDoc,
"NULL pUndoDoc!");
2273 ScRange aRange = rOption.getSingleRange(rTab);
2277 bool bDidPaint =
false;
2281 bDidPaint = pViewShell->
AdjustRowHeight(rOption.mnStartRow, rOption.mnEndRow,
true);
2303 for (
const SCTAB nTab : rOption.maTabs)
2306 ScRange aRange = rOption.getSingleRange(nTab);
2312 rOption.mnEndCol, rOption.mnEndRow, nTab,
2316 rOption.mnEndCol, rOption.mnEndRow, nTab,
2323 bool bDidPaint =
false;
2327 bDidPaint = pViewShell->
AdjustRowHeight(rOption.mnStartRow, rOption.mnEndRow,
true);
2340 pViewTarget->GetViewShell()->RemoveMerge();
2359 if ( !rRanges.
empty() )
2361 aTotal = rRanges[ 0 ];
2364 ScRange const & rRange = rRanges[
i ];
2380 , xUndoDoc(
std::move(pNewUndoDoc))
2389 return ScResId( STR_UNDO_SELATTRLINES );
2413 ScRange const & rRange = (*xRanges)[
i];
size_t SCSIZE
size_t typedef to be able to find places where code was changed from USHORT to size_t and is used to ...
SfxApplication * SfxGetpApp()
void IncTab(SCTAB nDelta=1)
void IncCol(SCCOL nDelta=1)
void IncRow(SCROW nDelta=1)
std::unique_ptr< SdrUndoAction > pDrawUndo
SC_DLLPUBLIC void AppendInsert(const ScRange &rRange, bool bEndOfList=false)
SC_DLLPUBLIC void AppendMove(const ScRange &rFromRange, const ScRange &rToRange, ScDocument *pRefDoc)
void AppendContentRange(const ScRange &rRange, ScDocument *pRefDoc, sal_uLong &nStartAction, sal_uLong &nEndAction, ScChangeActionClipMode eMode=SC_CACM_NONE)
sal_uLong GetActionMax() const
SC_DLLPUBLIC void Undo(sal_uLong nStartAction, sal_uLong nEndAction, bool bMerge=false)
SC_DLLPUBLIC void AppendDeleteRange(const ScRange &, ScDocument *pRefDoc, SCTAB nDz, sal_uLong nRejectingInsert)
bool UnmergeCells(const ScRange &rRange, bool bRecord, ScUndoRemoveMerge *pUndoRemoveMerge)
void ClearItems(const ScMarkData &rMark, const sal_uInt16 *pWhich, bool bApi)
static weld::Window * GetActiveDialogParent()
void UseScenario(SCTAB nTab, const OUString &rName, bool bRecord=true)
const ScDocument & GetDocument() const
void UpdatePaintExt(sal_uInt16 &rExtFlags, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab)
void PostPaint(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart, sal_uInt16 nExtFlags=0)
bool AdjustRowHeight(SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
merge with docfunc
SC_DLLPUBLIC bool IsScenario(SCTAB nTab) const
SCROW CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
SC_DLLPUBLIC bool RemoveFlagsTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, ScMF nFlags)
ScSheetLimits & GetSheetLimits() const
SC_DLLPUBLIC void CopyFromClip(const ScRange &rDestRange, const ScMarkData &rMark, InsertDeleteFlags nInsFlag, ScDocument *pRefUndoDoc, ScDocument *pClipDoc, bool bResetCut=true, bool bAsLink=false, bool bIncludeFiltered=true, bool bSkipEmptyCells=false, const ScRangeList *pDestRanges=nullptr)
Paste data from a clipboard document into this document.
bool RefreshAutoFilter(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
void UpdatePageBreaks(SCTAB nTab, const ScRange *pUserArea=nullptr)
SC_DLLPUBLIC bool ExtendMerge(SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW &rEndRow, SCTAB nTab, bool bRefresh=false)
SC_DLLPUBLIC void InsertMatrixFormula(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, const OUString &rFormula, const ScTokenArray *p=nullptr, const formula::FormulaGrammar::Grammar=formula::FormulaGrammar::GRAM_DEFAULT)
void TransliterateText(const ScMarkData &rMultiMark, TransliterationFlags nType)
SC_DLLPUBLIC SCCOL MaxCol() const
SC_DLLPUBLIC void SetScenarioData(SCTAB nTab, const OUString &rComment, const Color &rColor, ScScenarioFlags nFlags)
SC_DLLPUBLIC bool SetOptimalHeight(sc::RowHeightContext &rCxt, SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bApi)
SC_DLLPUBLIC ScDocumentPool * GetPool()
SC_DLLPUBLIC void ApplyPatternAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScPatternAttr &rAttr)
SC_DLLPUBLIC SCROW MaxRow() const
void BroadcastCells(const ScRange &rRange, SfxHintId nHint, bool bBroadcastSingleBroadcasters=true)
SC_DLLPUBLIC void DeleteSelection(InsertDeleteFlags nDelFlag, const ScMarkData &rMark, bool bBroadcast=true)
SC_DLLPUBLIC void ApplySelectionStyle(const ScStyleSheet &rStyle, const ScMarkData &rMark)
SC_DLLPUBLIC void CopyToClip(const ScClipParam &rClipParam, ScDocument *pClipDoc, const ScMarkData *pMarks, bool bKeepScenarioFlags, bool bIncludeObjects)
void SetCondFormList(ScConditionalFormatList *pList, SCTAB nTab)
SC_DLLPUBLIC void DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, InsertDeleteFlags nDelFlag, bool bBroadcast=true, sc::ColumnSpanSet *pBroadcastSpans=nullptr)
void DeleteRow(SCCOL nStartCol, SCTAB nStartTab, SCCOL nEndCol, SCTAB nEndTab, SCROW nStartRow, SCSIZE nSize, ScDocument *pRefUndoDoc=nullptr, bool *pUndoOutline=nullptr, const ScMarkData *pTabMark=nullptr)
SC_DLLPUBLIC void SetDrawPageSize(SCTAB nTab)
SC_DLLPUBLIC bool HasAttrib(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, HasAttrFlags nMask) const
SC_DLLPUBLIC formula::FormulaGrammar::Grammar GetGrammar() const
void CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, InsertDeleteFlags nFlags, bool bMarked, ScDocument &rDestDoc, const ScMarkData *pMarks=nullptr, bool bColRowFlags=true)
SC_DLLPUBLIC void ApplyPatternArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScMarkData &rMark, const ScPatternAttr &rAttr, ScEditDataArray *pDataArray=nullptr, bool *const pIsChanged=nullptr)
void ClearSelectionItems(const sal_uInt16 *pWhich, const ScMarkData &rMark)
void ApplySelectionFrame(const ScMarkData &rMark, const SvxBoxItem &rLineOuter, const SvxBoxInfoItem *pLineInner)
void ChangeSelectionIndent(bool bIncrement, const ScMarkData &rMark)
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
void DeleteCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTAB nEndTab, SCCOL nStartCol, SCSIZE nSize, ScDocument *pRefUndoDoc=nullptr, bool *pUndoOutline=nullptr, const ScMarkData *pTabMark=nullptr)
SC_DLLPUBLIC ScConditionalFormatList * GetCondFormList(SCTAB nTab) const
SC_DLLPUBLIC ScRangeName * GetRangeName(SCTAB nTab) const
const ScValidationDataList * GetValidationList() const
SC_DLLPUBLIC void SetActiveScenario(SCTAB nTab, bool bActive)
SC_DLLPUBLIC void DeleteAreaTab(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, InsertDeleteFlags nDelFlag)
ScChangeTrack * GetChangeTrack() const
void ForgetNoteCaptions(const ScRangeList &rRanges, bool bPreserveData)
void RemoveManualBreaks(SCTAB nTab)
bool InsertCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTAB nEndTab, SCCOL nStartCol, SCSIZE nSize, ScDocument *pRefUndoDoc=nullptr, const ScMarkData *pTabMark=nullptr)
bool InsertRow(SCCOL nStartCol, SCTAB nStartTab, SCCOL nEndCol, SCTAB nEndTab, SCROW nStartRow, SCSIZE nSize, ScDocument *pRefUndoDoc=nullptr, const ScMarkData *pTabMark=nullptr)
SC_DLLPUBLIC SCTAB GetTableCount() const
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
const ScRange & GetMultiMarkArea() const
void SelectTable(SCTAB nTab, bool bNew)
SCTAB GetFirstSelected() const
void SelectOneTable(SCTAB nTab)
bool IsMultiMarked() const
void SetMarkArea(const ScRange &rRange)
void MarkFromRangeList(const ScRangeList &rList, bool bReset)
std::unique_ptr< SdrUndoAction > pDrawUndo
ScDocumentUniquePtr pRefUndoDoc
ScRangeList maBlockRanges
std::unique_ptr< SdrUndoAction > mpDrawUndo
SfxItemSet & GetItemSet()
void Join(const ScRange &, bool bIsInList=false)
void DoUndo(ScDocument *pDoc, bool bUndoRefFirst)
virtual bool Merge(SfxUndoAction *pNextAction) override
void BroadcastChanges(const ScRange &rRange)
static void ShowTable(SCTAB nTab)
bool SetViewMarkData(const ScMarkData &rMarkData)
static void notifyAllViewsSheetGeomInvalidation(const SfxViewShell *pForViewShell, bool bColumns, bool bRows, bool bSizes, bool bHidden, bool bFiltered, bool bGroups, SCTAB nCurrentTabIndex)
Emits a LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY for all views whose current tab is equal to nCurrentTa...
static css::uno::Reference< css::datatransfer::XTransferable2 > GetClipData(vcl::Window *pWin)
static void notifyAllViewsHeaderInvalidation(const SfxViewShell *pForViewShell, HeaderType eHeaderType, SCTAB nCurrentTabIndex)
Emits a LOK_CALLBACK_INVALIDATE_HEADER for all views whose current tab is equal to nCurrentTabIndex.
static ScTabViewShell * GetActiveViewShell()
void UpdatePageBreakData(bool bForcePaint=false)
void DoneBlockMode(bool bContinue=false)
void MarkRange(const ScRange &rRange, bool bSetCursor=true, bool bContinue=false)
ScViewData & GetViewData()
SC_DLLPUBLIC void CellContentChanged()
void InitOwnBlockMode(const ScRange &rMarkRange)
SC_DLLPUBLIC void SetTabNo(SCTAB nTab, bool bNew=false, bool bExtendSelection=false, bool bSameTabButMoved=false)
ScDocument * GetDocument() const
static SC_DLLPUBLIC ScTransferObj * GetOwnClipboard(const css::uno::Reference< css::datatransfer::XTransferable2 > &)
virtual void Repeat(SfxRepeatTarget &rTarget) override
virtual OUString GetComment() const override
std::unique_ptr< ScRangeList > xRanges
virtual void Redo() override
ScUndoBorder(ScDocShell *pNewDocShell, const ScRangeList &rRangeList, ScDocumentUniquePtr pNewUndoDoc, const SvxBoxItem &rNewOuter, const SvxBoxInfoItem &rNewInner)
std::unique_ptr< SvxBoxInfoItem > xInner
ScDocumentUniquePtr xUndoDoc
virtual void Undo() override
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
std::unique_ptr< SvxBoxItem > xOuter
std::unique_ptr< sal_uInt16[]> pWhich
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
virtual ~ScUndoClearItems() override
ScDocumentUniquePtr pUndoDoc
ScUndoClearItems(ScDocShell *pNewDocShell, const ScMarkData &rMark, ScDocumentUniquePtr pNewUndoDoc, const sal_uInt16 *pW)
virtual OUString GetComment() const override
virtual void Undo() override
virtual void Repeat(SfxRepeatTarget &rTarget) override
virtual void Redo() override
virtual void Repeat(SfxRepeatTarget &rTarget) override
ScDocumentUniquePtr pUndoDoc
virtual ~ScUndoCut() override
virtual void Undo() override
virtual OUString GetComment() const override
sal_uLong nStartChangeAction
sal_uLong nEndChangeAction
void DoChange(const bool bUndo)
ScUndoCut(ScDocShell *pNewDocShell, const ScRange &aRange, const ScAddress &aOldEnd, const ScMarkData &rMark, ScDocumentUniquePtr pNewUndoDoc)
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
virtual void Redo() override
virtual ~ScUndoDeleteCells() override
std::unique_ptr< SCTAB[]> pTabs
virtual void Repeat(SfxRepeatTarget &rTarget) override
virtual void Undo() override
void DoChange(const bool bUndo)
virtual OUString GetComment() const override
ScUndoDeleteCells(ScDocShell *pNewDocShell, const ScRange &rRange, SCTAB nNewCount, std::unique_ptr< SCTAB[]> pNewTabs, std::unique_ptr< SCTAB[]> pNewScenarios, DelCellCmd eNewCmd, ScDocumentUniquePtr pUndoDocument, std::unique_ptr< ScRefUndoData > pRefData)
virtual void Redo() override
std::unique_ptr< SCTAB[]> pScenarios
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
sal_uLong nStartChangeAction
sal_uLong nEndChangeAction
sal_uLong nEndChangeAction
sal_uLong nStartChangeAction
virtual void Redo() override
ScUndoDeleteMulti(ScDocShell *pNewDocShell, bool bNewRows, bool bNeedsRefresh, SCTAB nNewTab, std::vector< sc::ColRowSpan > &&rSpans, ScDocumentUniquePtr pUndoDocument, std::unique_ptr< ScRefUndoData > pRefData)
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
virtual void Undo() override
virtual ~ScUndoDeleteMulti() override
virtual OUString GetComment() const override
virtual void Repeat(SfxRepeatTarget &rTarget) override
std::vector< sc::ColRowSpan > maSpans
virtual void Undo() override
ScRangeList maPaintRanges
sal_uLong nEndChangeAction
virtual void Redo() override
ScUndoDragDrop(ScDocShell *pNewDocShell, const ScRange &rRange, const ScAddress &aNewDestPos, bool bNewCut, ScDocumentUniquePtr pUndoDocument, bool bScenario)
sal_uInt16 mnPaintExtFlags
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
sal_uLong nStartChangeAction
virtual ~ScUndoDragDrop() override
virtual void Repeat(SfxRepeatTarget &rTarget) override
void DoUndo(ScRange aRange)
virtual OUString GetComment() const override
void PaintArea(ScRange aRange, sal_uInt16 nExtFlags) const
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
sal_uLong nStartChangeAction
virtual void Redo() override
virtual void Repeat(SfxRepeatTarget &rTarget) override
ScDocumentUniquePtr pUndoDoc
ScUndoEnterMatrix(ScDocShell *pNewDocShell, const ScRange &rArea, ScDocumentUniquePtr pNewUndoDoc, OUString aForm)
virtual OUString GetComment() const override
virtual void Undo() override
sal_uLong nEndChangeAction
virtual ~ScUndoEnterMatrix() override
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
ScDocumentUniquePtr pUndoDoc
virtual ~ScUndoIndent() override
virtual void Undo() override
virtual void Redo() override
virtual void Repeat(SfxRepeatTarget &rTarget) override
virtual OUString GetComment() const override
ScUndoIndent(ScDocShell *pNewDocShell, const ScMarkData &rMark, ScDocumentUniquePtr pNewUndoDoc, bool bIncrement)
std::unique_ptr< SCTAB[]> pScenarios
virtual bool Merge(SfxUndoAction *pNextAction) override
virtual void Repeat(SfxRepeatTarget &rTarget) override
void DoChange(const bool bUndo)
sal_uLong nEndChangeAction
ScUndoInsertCells(ScDocShell *pNewDocShell, const ScRange &rRange, SCTAB nNewCount, std::unique_ptr< SCTAB[]> pNewTabs, std::unique_ptr< SCTAB[]> pNewScenarios, InsCellCmd eNewCmd, ScDocumentUniquePtr pUndoDocument, std::unique_ptr< ScRefUndoData > pRefData, bool bNewPartOfPaste)
virtual ~ScUndoInsertCells() override
std::unique_ptr< SfxUndoAction > pPasteUndo
virtual OUString GetComment() const override
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
virtual void Undo() override
virtual void Redo() override
std::unique_ptr< SCTAB[]> pTabs
virtual void Undo() override
virtual void Repeat(SfxRepeatTarget &rTarget) override
ScUndoListNames(ScDocShell *pNewDocShell, const ScRange &rRange, ScDocumentUniquePtr pNewUndoDoc, ScDocumentUniquePtr pNewRedoDoc)
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
ScDocumentUniquePtr xUndoDoc
virtual OUString GetComment() const override
ScDocumentUniquePtr xRedoDoc
virtual void Redo() override
void DoChange(ScDocument *pSrcDoc) const
ScDocumentUniquePtr pRedoDoc
sal_uLong nStartChangeAction
virtual void Repeat(SfxRepeatTarget &rTarget) override
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
sal_uLong nEndChangeAction
virtual void Redo() override
ScUndoPasteOptions aPasteOptions
ScDocumentUniquePtr pUndoDoc
std::unique_ptr< ScRefUndoData > pRefRedoData
ScUndoPaste(ScDocShell *pNewDocShell, const ScRangeList &rRanges, const ScMarkData &rMark, ScDocumentUniquePtr pNewUndoDoc, ScDocumentUniquePtr pNewRedoDoc, InsertDeleteFlags nNewFlags, std::unique_ptr< ScRefUndoData > pRefData, bool bRedoIsFilled=true, const ScUndoPasteOptions *pOptions=nullptr)
virtual ~ScUndoPaste() override
virtual OUString GetComment() const override
virtual void Undo() override
void DoChange(bool bUndo)
std::unique_ptr< ScRefUndoData > pRefUndoData
ScDocumentUniquePtr pUndoDoc
virtual OUString GetComment() const override
ScUndoRemoveBreaks(ScDocShell *pNewDocShell, SCTAB nNewTab, ScDocumentUniquePtr pNewUndoDoc)
virtual ~ScUndoRemoveBreaks() override
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
virtual void Repeat(SfxRepeatTarget &rTarget) override
virtual void Redo() override
virtual void Undo() override
ScUndoRemoveMerge(ScDocShell *pNewDocShell, const ScCellMergeOption &rOption, ScDocumentUniquePtr pNewUndoDoc)
virtual void Undo() override
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
ScDocumentUniquePtr pUndoDoc
std::vector< ScCellMergeOption > maOptions
virtual OUString GetComment() const override
virtual void Redo() override
virtual void Repeat(SfxRepeatTarget &rTarget) override
void AddCellMergeOption(const ScCellMergeOption &rOption)
virtual ~ScUndoRemoveMerge() override
ScDocument * GetUndoDoc()
virtual ~ScUndoSelectionStyle() override
virtual void Undo() override
virtual void Repeat(SfxRepeatTarget &rTarget) override
virtual OUString GetComment() const override
ScUndoSelectionStyle(ScDocShell *pNewDocShell, const ScMarkData &rMark, const ScRange &rRange, OUString aName, ScDocumentUniquePtr pNewUndoDoc)
virtual void Redo() override
void DoChange(const bool bUndo)
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
ScDocumentUniquePtr pUndoDoc
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
virtual OUString GetComment() const override
virtual void Undo() override
TransliterationFlags nTransliterationType
virtual void Repeat(SfxRepeatTarget &rTarget) override
virtual ~ScUndoTransliterate() override
ScDocumentUniquePtr pUndoDoc
virtual void Redo() override
ScUndoTransliterate(ScDocShell *pNewDocShell, const ScMarkData &rMark, ScDocumentUniquePtr pNewUndoDoc, TransliterationFlags nType)
virtual ~ScUndoUseScenario() override
virtual void Redo() override
virtual void Undo() override
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
virtual OUString GetComment() const override
ScUndoUseScenario(ScDocShell *pNewDocShell, const ScMarkData &rMark, const ScArea &rDestArea, ScDocumentUniquePtr pNewUndoDoc, OUString aNewName)
ScDocumentUniquePtr pUndoDoc
virtual void Repeat(SfxRepeatTarget &rTarget) override
static void PaintMore(ScDocShell *pDocShell, const ScRange &rRange)
void UpdateReference(sc::RefUpdateContext &rCxt)
ScDocFunc & GetDocFunc() const
ScMarkData & GetMarkData()
const Fraction & GetZoomY() const
ScDocument & GetDocument() const
ScGridWindow * GetActiveWin()
ScTabViewShell * GetViewShell() const
const Fraction & GetZoomX() const
void RemoveManualBreaks()
void SetStyleSheetToMarked(const SfxStyleSheet *pStyleSheet)
bool AdjustBlockHeight(bool bPaint=true, ScMarkData *pMarkData=nullptr)
void OnLOKInsertDeleteColumn(SCCOL nStartCol, tools::Long nOffset)
void OnLOKInsertDeleteRow(SCROW nStartRow, tools::Long nOffset)
SC_DLLPUBLIC bool PasteFromClip(InsertDeleteFlags nFlags, ScDocument *pClipDoc, ScPasteFunc nFunction=ScPasteFunc::NONE, bool bSkipEmptyCells=false, bool bTranspose=false, bool bAsLink=false, InsCellCmd eMoveMode=INS_NONE, InsertDeleteFlags nUndoExtraFlags=InsertDeleteFlags::NONE, bool bAllowDialogs=false)
bool AdjustRowHeight(SCROW nStartRow, SCROW nEndRow, bool bApi)
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
SfxViewShell * GetViewShell() const
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
std::unique_ptr< ScDocument, o3tl::default_delete< ScDocument > > ScDocumentUniquePtr
@ NOTE
Strings (and string results if InsertDeleteFlags::FORMULA is not set).
@ NOCAPTIONS
Sparklines in a cell.
@ ATTRIB
Internal use only (d&d undo): do not delete caption objects of cell notes.
constexpr OUStringLiteral aData
OUString ScResId(TranslateId aId)
constexpr TypedWhichId< ScMergeAttr > ATTR_MERGE(144)
This struct stores general clipboard parameters associated with a ScDocument instance created in clip...
Context for reference update during shifting, moving or copying of cell ranges.
SCROW mnRowDelta
Amount and direction of movement in the row direction.
UpdateRefMode meMode
update mode - insert/delete, copy, or move.
SCCOL mnColDelta
Amount and direction of movement in the column direction.
SCTAB mnTabDelta
Amount and direction of movement in the sheet direction.
ScRange maRange
Range of cells that are about to be moved for insert/delete/move modes.
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
static ScRange lcl_TotalRange(const ScRangeList &rRanges)
set only border, for ScRangeList (StarOne)
static ScRange lcl_GetMultiMarkRange(const ScMarkData &rMark)
void RedoSdrUndoAction(SdrUndoAction *pUndoAction)
void EnableDrawAdjust(ScDocument *pDoc, bool bEnable)