LibreOffice Module sw (master) 1
|
#include <undobj.hxx>
Public Member Functions | |
virtual void | UndoImpl (::sw::UndoRedoContext &)=0 |
virtual void | RedoImpl (::sw::UndoRedoContext &)=0 |
SwUndo (SwUndoId const nId, const SwDoc *pDoc) | |
virtual | ~SwUndo () override |
SwUndoId | GetId () const |
virtual OUString | GetComment () const override |
Returns textual comment for this undo object. More... | |
ViewShellId | GetViewShellId () const override |
See SfxUndoAction::GetViewShellId(). More... | |
RedlineFlags | GetRedlineFlags () const |
void | SetRedlineFlags (RedlineFlags eMode) |
bool | IsDelBox () const |
void | IgnoreRepeat () |
![]() | |
SfxUndoAction () | |
virtual | ~SfxUndoAction () COVERITY_NOEXCEPT_FALSE |
virtual void | Undo () |
virtual void | UndoWithContext (SfxUndoContext &i_context) |
virtual void | Redo () |
virtual void | RedoWithContext (SfxUndoContext &i_context) |
virtual void | Repeat (SfxRepeatTarget &) |
virtual bool | CanRepeat (SfxRepeatTarget &) const |
virtual bool | Merge (SfxUndoAction *pNextAction) |
virtual OUString | GetComment () const |
virtual OUString | GetRepeatComment (SfxRepeatTarget &) const |
virtual ViewShellId | GetViewShellId () const |
const DateTime & | GetDateTime () const |
virtual void | dumpAsXml (xmlTextWriterPtr pWriter) const |
Static Public Member Functions | |
static bool | FillSaveData (const SwPaM &rRange, SwRedlineSaveDatas &rSData, bool bDelRange=true, bool bCopyNext=true) |
static bool | FillSaveDataForFormat (const SwPaM &, SwRedlineSaveDatas &) |
static void | SetSaveData (SwDoc &rDoc, SwRedlineSaveDatas &rSData) |
static bool | HasHiddenRedlines (const SwRedlineSaveDatas &rSData) |
Protected Member Functions | |
virtual SwRewriter | GetRewriter () const |
Returns the rewriter for this object. More... | |
virtual void | RepeatImpl (::sw::RepeatContext &) |
Static Protected Member Functions | |
static void | RemoveIdxFromSection (SwDoc &, SwNodeOffset nSttIdx, const SwNodeOffset *pEndIdx=nullptr) |
static void | RemoveIdxFromRange (SwPaM &rPam, bool bMoveNext) |
static void | RemoveIdxRel (SwNodeOffset, const SwPosition &) |
static bool | CanRedlineGroup (SwRedlineSaveDatas &rCurr, const SwRedlineSaveDatas &rCheck, bool bCurrIsEnd) |
Protected Attributes | |
bool | m_bCacheComment |
std::optional< OUString > | maComment |
Private Member Functions | |
virtual void | Undo () override |
virtual void | Redo () override |
virtual void | UndoWithContext (SfxUndoContext &) override |
virtual void | RedoWithContext (SfxUndoContext &) override |
virtual void | Repeat (SfxRepeatTarget &) override |
virtual bool | CanRepeat (SfxRepeatTarget &) const override |
Static Private Member Functions | |
static ViewShellId | CreateViewShellId (const SwDoc *pDoc) |
Try to obtain the view shell ID of the current view. More... | |
Private Attributes | |
SwUndoId const | m_nId |
RedlineFlags | m_nOrigRedlineFlags |
ViewShellId | m_nViewShellId |
bool | m_isRepeatIgnored |
for multi-selection, only repeat 1st selection More... | |
Definition at line 52 of file undobj.hxx.
Definition at line 161 of file undobj.cxx.
References nId.
|
overridevirtual |
Definition at line 188 of file undobj.cxx.
|
staticprotected |
Definition at line 1506 of file undobj.cxx.
References SwRedlineData::CanCombine(), SwRedlineSaveData::GetMvSttIdx(), SwUndRng::m_nEndContent, SwUndRng::m_nSttContent, SwUndRng::m_nSttNode, n, rSet, and SwRedlineSaveDatas::size().
Referenced by SwUndoRedlineDelete::CanGrouping(), SwUndoDelete::CanGrouping(), and SwUndoOverwrite::CanGrouping().
|
overrideprivatevirtual |
Reimplemented from SfxUndoAction.
Definition at line 259 of file undobj.cxx.
References GetId(), REPEAT_END, and REPEAT_START.
|
staticprivate |
Try to obtain the view shell ID of the current view.
Definition at line 169 of file undobj.cxx.
References SwDoc::GetDocShell().
|
static |
Definition at line 1413 of file undobj.cxx.
References Before, Behind, SwRedlineSaveDatas::clear(), CollideEnd, CollideStart, ComparePosition(), IDocumentRedlineAccess::DeleteRedline(), SwRedlineSaveDatas::empty(), SwPaM::End(), SwPaM::GetDoc(), SwDoc::getIDocumentRedlineAccess(), IDocumentRedlineAccess::GetRedline(), IDocumentRedlineAccess::GetRedlineTable(), n, SwRedlineSaveDatas::push_back(), SwRedlineTable::size(), and SwPaM::Start().
Referenced by SwUndoDelete::CanGrouping(), SwUndoOverwrite::CanGrouping(), SwUndoDelete::RedoImpl(), SwUndoRedline::RedoImpl(), SwUndoSaveSection::SaveSection(), SwUndoCompDoc::SwUndoCompDoc(), SwUndoDelete::SwUndoDelete(), SwUndoInsSection::SwUndoInsSection(), SwUndoOverwrite::SwUndoOverwrite(), and SwUndoRedline::SwUndoRedline().
|
static |
Definition at line 1448 of file undobj.cxx.
References Before, Behind, SwRedlineSaveDatas::clear(), CollideEnd, CollideStart, ComparePosition(), SwRedlineSaveDatas::empty(), SwPaM::End(), SwPaM::GetDoc(), SwDoc::getIDocumentRedlineAccess(), IDocumentRedlineAccess::GetRedline(), IDocumentRedlineAccess::GetRedlineTable(), SwRangeRedline::GetType(), n, SwRedlineSaveDatas::push_back(), SwRedlineTable::size(), and SwPaM::Start().
Referenced by SwUndoAttr::SaveRedlineData().
|
overridevirtual |
Returns textual comment for this undo object.
The textual comment is created from the resource string corresponding to this object's ID. The rewriter of this object is applied to the resource string to get the final comment.
Reimplemented from SfxUndoAction.
Reimplemented in SwUndoInsLayFormat, and SwSdrUndo.
Definition at line 662 of file undobj.cxx.
References SwRewriter::Apply(), GetId(), GetRewriter(), GetUndoComment(), m_bCacheComment, and maComment.
Referenced by SwUndoInsLayFormat::GetComment(), and lcl_dbg_out().
|
inline |
Definition at line 101 of file undobj.hxx.
References m_nId.
Referenced by CanRepeat(), GetComment(), SwUndoInsNum::GetRewriter(), IsDelBox(), lcl_dbg_out(), SwUndoMoveLeftMargin::RedoImpl(), SwUndoFlyStrAttr::RedoImpl(), SwUndoMoveNum::RedoImpl(), SwUndoTableNdsChg::RedoImpl(), SwUndoMoveLeftMargin::RepeatImpl(), SwUndoMoveNum::RepeatImpl(), SwUndoFlyStrAttr::UndoImpl(), and SwUndoMoveNum::UndoImpl().
|
inline |
Definition at line 119 of file undobj.hxx.
References m_nOrigRedlineFlags.
Referenced by sw::UndoManager::AddUndoAction(), SwUndoInsert::CanGrouping(), SwUndoInserts::RedoImpl(), SwUndoAttr::RedoImpl(), SwUndoInsert::RedoImpl(), SwUndoCompDoc::RedoImpl(), SwUndoInsSection::RedoImpl(), SwUndoSplitNode::RedoImpl(), SwUndoInsTable::RedoImpl(), SwUndoTableCpyTable::RedoImpl(), SwUndoInserts::UndoImpl(), SwUndoAttr::UndoImpl(), SwUndoInsert::UndoImpl(), SwUndoCompDoc::UndoImpl(), SwUndoInsSection::UndoImpl(), SwUndoSplitNode::UndoImpl(), SwUndoInsTable::UndoImpl(), and SwUndoTableCpyTable::UndoImpl().
|
protectedvirtual |
Returns the rewriter for this object.
Reimplemented in SwUndoDelLayFormat, SwUndoFormatCreate, SwUndoFormatDelete, SwUndoRenameFormat, SwUndoNumruleCreate, SwUndoNumruleDelete, SwUndoNumruleRename, SwUndoPageDesc, SwUndoPageDescCreate, SwUndoPageDescDelete, SwUndoFormatAttr, SwUndoBookmark, SwUndoRenameBookmark, SwUndoFormatColl, SwUndoSetFlyFormat, SwUndoDelete, SwUndoFlyStrAttr, SwUndoInsert, SwUndoReplace, SwUndoInsertLabel, SwUndoInsNum, SwUndoOverwrite, SwUndoRedlineDelete, SwUndoInsTable, SwUndoTableStyleMake, SwUndoTableStyleDelete, and SwUndoTableStyleUpdate.
Definition at line 696 of file undobj.cxx.
Referenced by GetComment().
|
overridevirtual |
See SfxUndoAction::GetViewShellId().
Reimplemented from SfxUndoAction.
Definition at line 691 of file undobj.cxx.
References m_nViewShellId.
|
static |
Definition at line 1498 of file undobj.cxx.
References n, and SwRedlineSaveDatas::size().
Referenced by SwUndoRedline::SwUndoRedline().
|
inline |
Definition at line 130 of file undobj.hxx.
References m_isRepeatIgnored.
Referenced by sw::UndoManager::AddUndoAction().
bool SwUndo::IsDelBox | ( | ) | const |
Definition at line 182 of file undobj.cxx.
References COL_DELETE, GetId(), ROW_DELETE, and TABLE_DELBOX.
Referenced by DeleteBox_(), SwUndoTableNdsChg::SaveNewBoxes(), SwUndoTableNdsChg::SaveSection(), and SwUndoTableNdsChg::UndoImpl().
|
overrideprivatevirtual |
Reimplemented from SfxUndoAction.
Definition at line 224 of file undobj.cxx.
|
pure virtual |
Implemented in SwUndoFieldFromDoc, SwUndoFieldFromAPI, SwUndoInserts, SwUndoInsLayFormat, SwUndoDelLayFormat, SwUndoParagraphSigning, SwUndoFormatCreate, SwUndoFormatDelete, SwUndoRenameFormat, SwUndoNumruleCreate, SwUndoNumruleDelete, SwUndoNumruleRename, SwUndoPageDesc, SwUndoPageDescCreate, SwUndoPageDescDelete, SwUndoTOXChange, SwUndoAttr, SwUndoResetAttr, SwUndoFormatAttr, SwUndoFormatResetAttr, SwUndoDontExpandFormat, SwUndoMoveLeftMargin, SwUndoDefaultAttr, SwUndoChangeFootNote, SwUndoFootNoteInfo, SwUndoEndNoteInfo, SwUndoInsBookmark, SwUndoDeleteBookmark, SwUndoRenameBookmark, SwUndoInsNoTextFieldmark, SwUndoDelNoTextFieldmark, SwUndoInsTextFieldmark, SwUndoDelTextFieldmark, SwUndoFormatColl, SwUndoSetFlyFormat, SwUndoOutlineLeftRight, SwUndoOutlineEdit, SwUndoDelete, SwSdrUndo, SwUndoDrawGroup, SwUndoDrawUnGroup, SwUndoDrawUnGroupConnectToLayout, SwUndoDrawDelete, SwUndoFlyStrAttr, SwUndoInsert, SwUndoReplace, SwUndoReRead, SwUndoInsertLabel, SwUndoInsNum, SwUndoDelNum, SwUndoMoveNum, SwUndoNumUpDown, SwUndoNumOrNoNum, SwUndoNumRuleStart, SwUndoOverwrite, SwUndoTransliterate, SwUndoRedline, SwUndoCompDoc, SwUndoInsSection, SwUndoUpdateIndex, SwUndoSort, SwUndoSplitNode, SwUndoMove, SwUndoInsTable, SwUndoTextToTable, SwUndoTableToText, SwUndoAttrTable, SwUndoTableAutoFormat, SwUndoTableNdsChg, SwUndoTableMerge, SwUndoTableNumFormat, SwUndoTableCpyTable, SwUndoCpyTable, SwUndoSplitTable, SwUndoMergeTable, SwUndoTableHeadline, SwUndoTableStyleMake, SwUndoTableStyleDelete, SwUndoTableStyleUpdate, and SwUndoDelSection.
Referenced by RedoWithContext().
|
overrideprivatevirtual |
|
staticprotected |
Definition at line 126 of file undobj.cxx.
References SwIndex::Assign(), SwDoc::CorrAbs(), SwPaM::End(), SwPaM::Exchange(), fnMoveBackward, fnMoveForward, SwPaM::GetDoc(), SwNodes::GetEndOfPostIts(), SwPaM::GetMark(), SwDoc::GetNodes(), SwPaM::GetPoint(), SwPaM::Move(), SwPosition::nContent, and SwPosition::nNode.
Referenced by SwUndoSort::RedoImpl(), SwUndoMove::RedoImpl(), SwUndoTextToTable::RedoImpl(), SwUndoInsert::UndoImpl(), SwUndoSort::UndoImpl(), and SwUndoMove::UndoImpl().
|
staticprotected |
Definition at line 116 of file undobj.cxx.
References SwDoc::CorrAbs(), SwNode::EndOfSectionIndex(), SwNodes::GetEndOfPostIts(), SwNodeIndex::GetNode(), and SwDoc::GetNodes().
Referenced by SwUndoDelLayFormat::RedoForRollback(), SwUndoDelLayFormat::RedoImpl(), SwUndoSort::RedoImpl(), SwUndoAttr::RemoveIdx(), SwUndoInsSection::UndoImpl(), SwUndoSort::UndoImpl(), SwUndoInsTable::UndoImpl(), and SwUndoTextToTable::UndoImpl().
|
staticprotected |
Definition at line 153 of file undobj.cxx.
References SwNodeIndex::GetNode(), SwNode::GetNodes(), SwPosition::nNode, and PaMCorrRel().
Referenced by SwUndoInsSection::Join(), SwUndoMove::RedoImpl(), SwUndoInserts::UndoImpl(), SwUndoSplitNode::UndoImpl(), SwUndoMove::UndoImpl(), and SwUndoTextToTable::UndoImpl().
|
overrideprivatevirtual |
Reimplemented from SfxUndoAction.
Definition at line 247 of file undobj.cxx.
References m_isRepeatIgnored, and RepeatImpl().
|
protectedvirtual |
Reimplemented in SwUndoFieldFromDoc, SwUndoFieldFromAPI, SwUndoInserts, SwUndoInsLayFormat, SwUndoParagraphSigning, SwUndoPageDescCreate, SwUndoPageDescDelete, SwUndoTOXChange, SwUndoAttr, SwUndoResetAttr, SwUndoFormatAttr, SwUndoDontExpandFormat, SwUndoMoveLeftMargin, SwUndoChangeFootNote, SwUndoFormatColl, SwUndoOutlineLeftRight, SwUndoOutlineEdit, SwUndoDelete, SwUndoInsert, SwUndoInsertLabel, SwUndoInsNum, SwUndoDelNum, SwUndoMoveNum, SwUndoNumUpDown, SwUndoNumOrNoNum, SwUndoNumRuleStart, SwUndoOverwrite, SwUndoTransliterate, SwUndoRedlineSort, SwUndoAcceptRedline, SwUndoRejectRedline, SwUndoInsSection, SwUndoSort, SwUndoSplitNode, SwUndoInsTable, SwUndoTextToTable, SwUndoTableToText, SwUndoSplitTable, SwUndoMergeTable, and SwUndoTableHeadline.
Definition at line 267 of file undobj.cxx.
Referenced by Repeat().
|
inline |
Definition at line 120 of file undobj.hxx.
References eMode, and m_nOrigRedlineFlags.
Referenced by sw::UndoManager::AddUndoAction(), SwUndoInsert::Init(), SwUndoAttr::SaveRedlineData(), SwUndoCompDoc::SwUndoCompDoc(), SwUndoInserts::SwUndoInserts(), SwUndoInsSection::SwUndoInsSection(), SwUndoInsTable::SwUndoInsTable(), SwUndoRedline::SwUndoRedline(), and SwUndoSplitNode::SwUndoSplitNode().
|
static |
Definition at line 1478 of file undobj.cxx.
References SwRedlineSaveDatas::empty(), SwNodes::GetEndOfContent(), SwDoc::getIDocumentRedlineAccess(), SwDoc::GetNodes(), IDocumentRedlineAccess::GetRedlineFlags(), IDocumentRedlineAccess::GetRedlineTable(), Ignore, n, On, IDocumentRedlineAccess::SetRedlineFlags_intern(), SwRedlineTable::size(), and SwRedlineSaveDatas::size().
Referenced by SwUndoSaveSection::RestoreSection(), SwUndoAttr::UndoImpl(), SwUndoDelete::UndoImpl(), SwUndoOverwrite::UndoImpl(), SwUndoRedline::UndoImpl(), SwUndoCompDoc::UndoImpl(), and SwUndoInsSection::UndoImpl().
|
overrideprivatevirtual |
Reimplemented from SfxUndoAction.
Definition at line 219 of file undobj.cxx.
|
pure virtual |
Implemented in SwUndoFieldFromDoc, SwUndoFieldFromAPI, SwUndoInserts, SwUndoInsLayFormat, SwUndoDelLayFormat, SwUndoParagraphSigning, SwUndoFormatCreate, SwUndoFormatDelete, SwUndoRenameFormat, SwUndoNumruleCreate, SwUndoNumruleDelete, SwUndoNumruleRename, SwUndoPageDesc, SwUndoPageDescCreate, SwUndoPageDescDelete, SwUndoTOXChange, SwUndoAttr, SwUndoResetAttr, SwUndoFormatAttr, SwUndoFormatResetAttr, SwUndoDontExpandFormat, SwUndoMoveLeftMargin, SwUndoDefaultAttr, SwUndoChangeFootNote, SwUndoFootNoteInfo, SwUndoEndNoteInfo, SwUndoInsBookmark, SwUndoDeleteBookmark, SwUndoRenameBookmark, SwUndoInsNoTextFieldmark, SwUndoDelNoTextFieldmark, SwUndoInsTextFieldmark, SwUndoDelTextFieldmark, SwUndoFormatColl, SwUndoSetFlyFormat, SwUndoOutlineLeftRight, SwUndoOutlineEdit, SwUndoDelete, SwSdrUndo, SwUndoDrawGroup, SwUndoDrawUnGroup, SwUndoDrawUnGroupConnectToLayout, SwUndoDrawDelete, SwUndoFlyStrAttr, SwUndoInsert, SwUndoReplace, SwUndoReRead, SwUndoInsertLabel, SwUndoInsNum, SwUndoDelNum, SwUndoMoveNum, SwUndoNumUpDown, SwUndoNumOrNoNum, SwUndoNumRuleStart, SwUndoOverwrite, SwUndoTransliterate, SwUndoRedline, SwUndoCompDoc, SwUndoInsSection, SwUndoUpdateIndex, SwUndoSort, SwUndoSplitNode, SwUndoMove, SwUndoInsTable, SwUndoTextToTable, SwUndoTableToText, SwUndoAttrTable, SwUndoTableAutoFormat, SwUndoTableNdsChg, SwUndoTableMerge, SwUndoTableNumFormat, SwUndoTableCpyTable, SwUndoCpyTable, SwUndoSplitTable, SwUndoMergeTable, SwUndoTableHeadline, SwUndoTableStyleMake, SwUndoTableStyleDelete, SwUndoTableStyleUpdate, and SwUndoDelSection.
Referenced by UndoWithContext().
|
overrideprivatevirtual |
|
protected |
Definition at line 61 of file undobj.hxx.
Referenced by GetComment(), SwUndoInsert::Init(), SwUndoDelete::SwUndoDelete(), SwUndoOverwrite::SwUndoOverwrite(), and SwUndoRedlineDelete::SwUndoRedlineDelete().
|
private |
for multi-selection, only repeat 1st selection
Definition at line 58 of file undobj.hxx.
Referenced by IgnoreRepeat(), and Repeat().
|
private |
Definition at line 55 of file undobj.hxx.
Referenced by GetId().
|
private |
Definition at line 56 of file undobj.hxx.
Referenced by GetRedlineFlags(), and SetRedlineFlags().
|
private |
Definition at line 57 of file undobj.hxx.
Referenced by GetViewShellId().
|
mutableprotected |
Definition at line 62 of file undobj.hxx.
Referenced by GetComment(), and SwUndoInsLayFormat::GetComment().