LibreOffice Module sw (master) 1
|
#include <UndoSection.hxx>
Public Member Functions | |
SwUndoInsSection (SwPaM const &, SwSectionData const &, SfxItemSet const *pSet, std::tuple< SwTOXBase const *, sw::RedlineMode, sw::FieldmarkMode, sw::ParagraphBreakMode > const *pTOXBase) | |
virtual | ~SwUndoInsSection () override |
virtual void | UndoImpl (::sw::UndoRedoContext &) override |
virtual void | RedoImpl (::sw::UndoRedoContext &) override |
virtual void | RepeatImpl (::sw::RepeatContext &) override |
void | SetSectNdPos (SwNodeOffset const nPos) |
void | SaveSplitNode (SwTextNode *const pTextNd, bool const bAtStart) |
void | SetUpdateFootnoteFlag (bool const bFlag) |
Public Member Functions inherited from SwUndo | |
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 |
Private Member Functions | |
void | Join (SwDoc &rDoc, SwNodeOffset nNode) |
Private Member Functions inherited from SwUndRng | |
SwUndRng () | |
SwUndRng (const SwPaM &) | |
void | SetValues (const SwPaM &rPam) |
void | SetPaM (SwPaM &, bool bCorrToContent=false) const |
SwPaM & | AddUndoRedoPaM (::sw::UndoRedoContext &, bool const bCorrToContent=false) const |
Private Attributes | |
const std::unique_ptr< SwSectionData > | m_pSectionData |
std::optional< std::tuple< std::unique_ptr< SwTOXBase >, sw::RedlineMode, sw::FieldmarkMode, sw::ParagraphBreakMode > > | m_xTOXBase |
const std::unique_ptr< SfxItemSet > | m_pAttrSet |
set iff section is TOX More... | |
std::unique_ptr< SwHistory > | m_pHistory |
std::unique_ptr< SwRedlineData > | m_pRedlData |
std::unique_ptr< SwRedlineSaveDatas > | m_pRedlineSaveData |
SwNodeOffset | m_nSectionNodePos |
bool | m_bSplitAtStart: 1 |
bool | m_bSplitAtEnd: 1 |
bool | m_bUpdateFootnote: 1 |
Private Attributes inherited from SwUndRng | |
SwNodeOffset | m_nSttNode |
SwNodeOffset | m_nEndNode |
sal_Int32 | m_nSttContent |
sal_Int32 | m_nEndContent |
Additional Inherited Members | |
Static Public Member Functions inherited from SwUndo | |
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 inherited from SwUndo | |
virtual SwRewriter | GetRewriter () const |
Returns the rewriter for this object. More... | |
virtual void | RepeatImpl (::sw::RepeatContext &) |
Static Protected Member Functions inherited from SwUndo | |
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 inherited from SwUndo | |
bool | m_bCacheComment |
std::optional< OUString > | maComment |
Definition at line 41 of file UndoSection.hxx.
SwUndoInsSection::SwUndoInsSection | ( | SwPaM const & | rPam, |
SwSectionData const & | rNewData, | ||
SfxItemSet const * | pSet, | ||
std::tuple< SwTOXBase const *, sw::RedlineMode, sw::FieldmarkMode, sw::ParagraphBreakMode > const * | pTOXBase | ||
) |
Definition at line 77 of file unsect.cxx.
References aBreakSetRange, Count, SfxItemSet::Count(), SwUndo::FillSaveData(), SwDoc::GetAttrPool(), SwPosition::GetContentIndex(), SwNode::GetContentNode(), SwPaM::GetDoc(), SwDoc::getIDocumentRedlineAccess(), SwNode::GetIndex(), SwPosition::GetNode(), SwPaM::GetPoint(), SwContentNode::GetpSwAttrSet(), IDocumentRedlineAccess::GetRedlineAuthor(), IDocumentRedlineAccess::GetRedlineFlags(), SwPaM::HasMark(), SwContentNode::HasSwAttrSet(), INSSECTION, IDocumentRedlineAccess::IsRedlineOn(), SwContentNode::Len(), m_pHistory, m_pRedlData, m_pRedlineSaveData, m_xTOXBase, SfxItemSet::Put(), and SwUndo::SetRedlineFlags().
|
overridevirtual |
Definition at line 125 of file unsect.cxx.
|
private |
Definition at line 280 of file unsect.cxx.
References SwNodeIndex::GetNode(), SwDoc::GetNodes(), SwTextNode::GetText(), SwNode::GetTextNode(), SwTextNode::JoinNext(), SwTextNode::Len(), m_pHistory, SwUndo::RemoveIdxRel(), and SwTextNode::RstTextAttr().
Referenced by UndoImpl().
|
overridevirtual |
Implements SwUndo.
Definition at line 180 of file unsect.cxx.
References SwUndRng::AddUndoRedoPaM(), IDocumentRedlineAccess::AppendRedline(), SwRedlineTable::empty(), SwNode::EndOfSectionNode(), SwDoc::GetAllLayouts(), sw::UndoRedoContext::GetDoc(), SwDoc::GetEditShell(), SwRootFrame::GetFieldmarkMode(), SwDoc::getIDocumentRedlineAccess(), SwDoc::GetNodes(), SwRootFrame::GetParagraphBreakMode(), SwPaM::GetPoint(), SwUndo::GetRedlineFlags(), IDocumentRedlineAccess::GetRedlineFlags(), IDocumentRedlineAccess::GetRedlineTable(), sw::Hidden, Ignore, SwDoc::InsertSwSection(), SwDoc::InsertTableOf(), IDocumentRedlineAccess::IsRedlineOn(), m_nSectionNodePos, m_pAttrSet, m_pHistory, m_pRedlData, m_pSectionData, m_xTOXBase, p, SwRootFrame::SetFieldmarkMode(), SwRootFrame::SetHideRedlines(), IDocumentRedlineAccess::SetRedlineFlags_intern(), sw::Shown, and IDocumentRedlineAccess::SplitRedline().
|
overridevirtual |
Reimplemented from SwUndo.
Definition at line 264 of file unsect.cxx.
References IDocumentLayoutAccess::GetCurrentLayout(), sw::RepeatContext::GetDoc(), SwDoc::getIDocumentLayoutAccess(), SwPaM::GetPoint(), sw::RepeatContext::GetRepeatPaM(), SwDoc::InsertSwSection(), SwDoc::InsertTableOf(), m_pAttrSet, m_pSectionData, and m_xTOXBase.
void SwUndoInsSection::SaveSplitNode | ( | SwTextNode *const | pTextNd, |
bool const | bAtStart | ||
) |
Definition at line 298 of file unsect.cxx.
References SwNode::GetIndex(), SwTextNode::GetpSwpHints(), SwTextNode::GetText(), m_bSplitAtEnd, m_bSplitAtStart, and m_pHistory.
Referenced by SwDoc::InsertSwSection().
|
inline |
Definition at line 68 of file UndoSection.hxx.
References m_nSectionNodePos, and nPos.
Referenced by SwDoc::InsertSwSection().
|
inline |
Definition at line 70 of file UndoSection.hxx.
References m_bUpdateFootnote.
Referenced by SwDoc::InsertSwSection().
|
overridevirtual |
Implements SwUndo.
Definition at line 129 of file unsect.cxx.
References SwUndRng::AddUndoRedoPaM(), COMPLETE_STRING, SwNodes::Delete(), IDocumentRedlineAccess::DeleteRedline(), SwDoc::DelSectionFormat(), SwNode::EndOfSectionIndex(), sw::UndoRedoContext::GetDoc(), SwDoc::GetFootnoteIdxs(), SwSection::GetFormat(), SwDoc::getIDocumentRedlineAccess(), SwNodeIndex::GetIndex(), SwNodeIndex::GetNode(), SwDoc::GetNodes(), SwUndo::GetRedlineFlags(), SwSectionNode::GetSection(), IDocumentRedlineAccess::IsRedlineOn(), Join(), m_bSplitAtEnd, m_bSplitAtStart, m_bUpdateFootnote, SwUndRng::m_nEndContent, SwUndRng::m_nEndNode, m_nSectionNodePos, SwUndRng::m_nSttContent, SwUndRng::m_nSttNode, m_pHistory, m_pRedlineSaveData, SwUndo::RemoveIdxFromSection(), SwUndo::SetSaveData(), and SwFootnoteIdxs::UpdateFootnote().
|
private |
Definition at line 52 of file UndoSection.hxx.
Referenced by SaveSplitNode(), and UndoImpl().
|
private |
Definition at line 51 of file UndoSection.hxx.
Referenced by SaveSplitNode(), and UndoImpl().
|
private |
Definition at line 53 of file UndoSection.hxx.
Referenced by SetUpdateFootnoteFlag(), and UndoImpl().
|
private |
Definition at line 50 of file UndoSection.hxx.
Referenced by RedoImpl(), SetSectNdPos(), and UndoImpl().
|
private |
set iff section is TOX
Definition at line 46 of file UndoSection.hxx.
Referenced by RedoImpl(), and RepeatImpl().
|
private |
Definition at line 47 of file UndoSection.hxx.
Referenced by Join(), RedoImpl(), SaveSplitNode(), SwUndoInsSection(), and UndoImpl().
|
private |
Definition at line 48 of file UndoSection.hxx.
Referenced by RedoImpl(), and SwUndoInsSection().
|
private |
Definition at line 49 of file UndoSection.hxx.
Referenced by SwUndoInsSection(), and UndoImpl().
|
private |
Definition at line 44 of file UndoSection.hxx.
Referenced by RedoImpl(), and RepeatImpl().
|
private |
Definition at line 45 of file UndoSection.hxx.
Referenced by RedoImpl(), RepeatImpl(), and SwUndoInsSection().