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 () |
Public Member Functions inherited from SfxUndoAction | |
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 53 of file undobj.hxx.
Definition at line 151 of file undobj.cxx.
References nId.
|
overridevirtual |
Definition at line 178 of file undobj.cxx.
|
staticprotected |
Definition at line 1547 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 249 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 159 of file undobj.cxx.
References SwDoc::GetDocShell().
|
static |
Definition at line 1455 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(), SwPaM::Start(), and SwPaM::StartEnd().
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 1489 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 694 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 102 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 120 of file undobj.hxx.
References m_nOrigRedlineFlags.
Referenced by sw::UndoManager::AddUndoAction(), SwUndoInsert::CanGrouping(), SwUndoAttr::redoAttribute(), SwUndoInserts::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, SwUndoFlyDecorative, SwUndoInsert, SwUndoReplace, SwUndoInsertLabel, SwUndoInsNum, SwUndoOverwrite, SwUndoRedlineDelete, SwUndoInsTable, SwUndoTableStyleMake, SwUndoTableStyleDelete, and SwUndoTableStyleUpdate.
Definition at line 728 of file undobj.cxx.
Referenced by GetComment().
|
overridevirtual |
See SfxUndoAction::GetViewShellId().
Reimplemented from SfxUndoAction.
Definition at line 723 of file undobj.cxx.
References m_nViewShellId.
|
static |
Definition at line 1539 of file undobj.cxx.
References n, and SwRedlineSaveDatas::size().
Referenced by SwUndoRedline::SwUndoRedline().
|
inline |
Definition at line 131 of file undobj.hxx.
References m_isRepeatIgnored.
Referenced by sw::UndoManager::AddUndoAction().
bool SwUndo::IsDelBox | ( | ) | const |
Definition at line 172 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 214 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, SwUndoFlyDecorative, 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 118 of file undobj.cxx.
References SwPosition::Assign(), SwDoc::CorrAbs(), SwPaM::End(), SwPaM::Exchange(), fnMoveBackward, fnMoveForward, SwPaM::GetDoc(), SwNodes::GetEndOfPostIts(), SwPaM::GetMark(), SwPosition::GetNode(), SwDoc::GetNodes(), SwPaM::GetPoint(), and SwPaM::Move().
Referenced by SwUndoSort::RedoImpl(), SwUndoMove::RedoImpl(), SwUndoTextToTable::RedoImpl(), SwUndoInsert::UndoImpl(), SwUndoSort::UndoImpl(), and SwUndoMove::UndoImpl().
|
staticprotected |
Definition at line 108 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 144 of file undobj.cxx.
References SwPosition::GetNode(), SwNode::GetNodes(), and PaMCorrRel().
Referenced by SwUndoInsSection::Join(), SwUndoMove::RedoImpl(), SwUndoInserts::UndoImpl(), SwUndoSplitNode::UndoImpl(), SwUndoMove::UndoImpl(), and SwUndoTextToTable::UndoImpl().
|
overrideprivatevirtual |
Reimplemented from SfxUndoAction.
Definition at line 237 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 257 of file undobj.cxx.
Referenced by Repeat().
|
inline |
Definition at line 121 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 1519 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 209 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, SwUndoFlyDecorative, 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 62 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 59 of file undobj.hxx.
Referenced by IgnoreRepeat(), and Repeat().
|
private |
Definition at line 56 of file undobj.hxx.
Referenced by GetId().
|
private |
Definition at line 57 of file undobj.hxx.
Referenced by GetRedlineFlags(), and SetRedlineFlags().
|
private |
Definition at line 58 of file undobj.hxx.
Referenced by GetViewShellId().
|
mutableprotected |
Definition at line 63 of file undobj.hxx.
Referenced by GetComment(), and SwUndoInsLayFormat::GetComment().