LibreOffice Module sw (master) 1
|
#include <UndoDelete.hxx>
Public Member Functions | |
SwUndoDelete (SwPaM &, SwDeleteFlags flags, bool bFullPara=false, bool bCalledByTableCpy=false) | |
virtual | ~SwUndoDelete () override |
virtual void | UndoImpl (::sw::UndoRedoContext &) override |
virtual void | RedoImpl (::sw::UndoRedoContext &) override |
virtual void | RepeatImpl (::sw::RepeatContext &) override |
virtual SwRewriter | GetRewriter () const override |
Returns rewriter for this undo object. More... | |
bool | CanGrouping (SwDoc &, const SwPaM &) |
void | SetTableDelLastNd () |
void | SetPgBrkFlags (bool bPageBreak, bool bPageDesc) |
void | SetTableName (const OUString &rName) |
bool | IsDelFullPara () const |
void | dumpAsXml (xmlTextWriterPtr pWriter) const override |
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 | |
bool | SaveContent (const SwPosition *pStt, const SwPosition *pEnd, SwTextNode *pSttTextNd, SwTextNode *pEndTextNd) |
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 Member Functions inherited from SwUndoSaveContent | |
SwUndoSaveContent () | |
virtual | ~SwUndoSaveContent () COVERITY_NOEXCEPT_FALSE |
virtual void | dumpAsXml (xmlTextWriterPtr pWriter) const |
void | DelContentIndex (const SwPosition &pMark, const SwPosition &pPoint, DelContentType nDelContentType=DelContentType::AllMask) |
Private Attributes | |
std::optional< SwNodeIndex > | m_oMvStt |
std::optional< OUString > | m_aSttStr |
std::optional< OUString > | m_aEndStr |
std::unique_ptr< SwRedlineSaveDatas > | m_pRedlSaveData |
std::shared_ptr< ::sfx2::MetadatableUndo > | m_pMetadataUndoStart |
std::shared_ptr< ::sfx2::MetadatableUndo > | m_pMetadataUndoEnd |
OUString | m_sTableName |
SwNodeOffset | m_nNode |
SwNodeOffset | m_nNdDiff |
SwNodeOffset | m_nSectDiff |
SwNodeOffset | m_nReplaceDummy |
sal_uInt16 | m_nSetPos |
bool | m_bGroup: 1 |
bool | m_bBackSp: 1 |
bool | m_bJoinNext: 1 |
bool | m_bTableDelLastNd: 1 |
bool | m_bDelFullPara: 1 |
bool | m_bResetPgDesc: 1 |
bool | m_bResetPgBrk: 1 |
bool | m_bFromTableCopy: 1 |
SwDeleteFlags | m_DeleteFlags |
Private Attributes inherited from SwUndRng | |
SwNodeOffset | m_nSttNode |
SwNodeOffset | m_nEndNode |
sal_Int32 | m_nSttContent |
sal_Int32 | m_nEndContent |
Private Attributes inherited from SwUndoSaveContent | |
std::unique_ptr< SwHistory > | m_pHistory |
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) |
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 |
Static Private Member Functions inherited from SwUndoSaveContent | |
static void | MoveToUndoNds (SwPaM &rPam, SwNodeIndex *pNodeIdx, SwNodeOffset *pEndNdIdx=nullptr) |
static void | MoveFromUndoNds (SwDoc &rDoc, SwNodeOffset nNodeIdx, SwPosition &rInsPos, const SwNodeOffset *pEndNdIdx=nullptr, bool bForceCreateFrames=false) |
static bool | MovePtBackward (SwPaM &rPam) |
static void | MovePtForward (SwPaM &rPam, bool bMvBkwrd) |
Definition at line 38 of file UndoDelete.hxx.
SwUndoDelete::SwUndoDelete | ( | SwPaM & | rPam, |
SwDeleteFlags | flags, | ||
bool | bFullPara = false , |
||
bool | bCalledByTableCpy = false |
||
) |
Definition at line 175 of file undel.cxx.
References SwPosition::Adjust(), SwNodeRange::aEnd, AllMask, ArtificialSelection, SwNodeRange::aStart, CheckNoCntnt, SwNodes::Count(), DelBookmarks(), SwUndoSaveContent::DelContentIndex(), DELETE, SwPaM::DeleteMark(), DelFullParaMoveFrames(), SwRedlineTable::empty(), SwNode::EndOfSectionIndex(), SwPaM::Exchange(), SwUndo::FillSaveData(), fnMoveForward, SwPaM::GetDoc(), SwNodes::GetEndOfContent(), SwDoc::getIDocumentContentOperations(), SwDoc::getIDocumentRedlineAccess(), SwDoc::GetIDocumentUndoRedo(), SwNodeIndex::GetIndex(), SwNode::GetIndex(), SwPaM::GetMark(), SwNodeIndex::GetNode(), SwPosition::GetNodeIndex(), SwDoc::GetNodes(), SwPaM::GetPoint(), IDocumentRedlineAccess::GetRedlineTable(), SwDoc::GetSpzFrameFormats(), SwTextNode::GetText(), SwTextNode::GetTextColl(), SwNode::GetTextNode(), SwDoc::GetUndoManager(), sw::UndoManager::GetUndoNodes(), GoInNode(), SwPaM::HasMark(), SwNode::IsContentNode(), IDocumentRedlineAccess::IsIgnoreRedline(), SwNode::IsSectionNode(), lcl_MakeAutoFrames(), m_bBackSp, SwUndo::m_bCacheComment, m_bDelFullPara, m_bFromTableCopy, m_bJoinNext, m_DeleteFlags, SwUndRng::m_nEndContent, SwUndRng::m_nEndNode, m_nNdDiff, m_nNode, m_nReplaceDummy, m_nSectDiff, m_nSetPos, SwUndRng::m_nSttContent, SwUndRng::m_nSttNode, m_oMvStt, SwUndoSaveContent::m_pHistory, m_pRedlSaveData, SwPaM::Move(), SwNodes::MoveNodes(), Replace, RES_BREAK(), RES_PAGEDESC(), SaveContent(), IDocumentContentOperations::SplitNode(), start, SwPaM::StartEnd(), SwNode::StartOfSectionNode(), and Text.
|
overridevirtual |
Definition at line 599 of file undel.cxx.
References m_nNode, m_oMvStt, and m_pRedlSaveData.
Definition at line 518 of file undel.cxx.
References SwUndo::CanRedlineGroup(), CH_TXTATR_BREAKWORD, CH_TXTATR_INWORD, IDocumentRedlineAccess::DeleteRedline(), SwTextNode::EraseText(), SwUndo::FillSaveData(), GetAppCharClass(), SwDoc::getIDocumentRedlineAccess(), SwTextNode::GetText(), SwNode::GetTextNode(), IsFlySelectedByCursor(), CharClass::isLetterNumeric(), m_aEndStr, m_aSttStr, m_bBackSp, m_bGroup, SwUndRng::m_nEndContent, SwUndRng::m_nEndNode, SwUndRng::m_nSttContent, SwUndRng::m_nSttNode, m_pRedlSaveData, and SwPaM::StartEnd().
Referenced by sw::DocumentContentOperationsManager::DeleteRangeImplImpl().
|
overridevirtual |
Reimplemented from SwUndoSaveContent.
Definition at line 1328 of file undel.cxx.
References SfxUndoAction::dumpAsXml(), and SwUndoSaveContent::dumpAsXml().
|
overridevirtual |
Returns rewriter for this undo object.
The rewriter consists of the following rule:
$1 -> '<deleted text>'
<deleted text> is shortened to nUndoStringLength characters.
Reimplemented from SwUndo.
Definition at line 758 of file undel.cxx.
References SwRewriter::AddRule(), SwRewriter::Apply(), aStr, DenoteSpecialCharacters(), SwRewriter::GetPlaceHolder(), lcl_RewriterFromHistory(), m_aEndStr, m_aSttStr, m_nNode, SwUndoSaveContent::m_pHistory, m_sTableName, nUndoStringLength, ShortenString(), SwResId(), UndoArg1, UndoArg2, and UndoArg3.
|
inline |
Definition at line 105 of file UndoDelete.hxx.
References m_bDelFullPara.
Referenced by SwUndoTableCpyTable::UndoImpl().
|
overridevirtual |
Implements SwUndo.
Definition at line 1157 of file undel.cxx.
References SwUndRng::AddUndoRedoPaM(), SwPosition::Adjust(), AllMask, ArtificialSelection, CheckNoCntnt, DelBookmarks(), SwUndoSaveContent::DelContentIndex(), SwNodes::Delete(), IDocumentContentOperations::DeleteAndJoin(), SwPaM::DeleteMark(), SwTableNode::DelFrames(), IDocumentContentOperations::DelFullPara(), DelFullParaMoveFrames(), SwPaM::End(), SwNode::EndOfSectionIndex(), SwNode::EndOfSectionNode(), SwPaM::Exchange(), SwUndo::FillSaveData(), fnMoveBackward, fnMoveForward, SwPaM::GetDoc(), SwTable::GetFrameFormat(), SwDoc::getIDocumentContentOperations(), SwDoc::getIDocumentStylePoolAccess(), SwFormat::GetItemIfSet(), SwPaM::GetMark(), SwNodeIndex::GetNode(), SwPosition::GetNode(), SwDoc::GetNodes(), SwPaM::GetPoint(), SwTableNode::GetTable(), SwNode::GetTableNode(), IDocumentStylePoolAccess::GetTextCollFromPool(), GoInNode(), SwPaM::HasMark(), m_aEndStr, m_aSttStr, m_bDelFullPara, m_bJoinNext, m_bTableDelLastNd, m_DeleteFlags, SwUndRng::m_nEndNode, m_nSetPos, SwUndRng::m_nSttNode, SwUndoSaveContent::m_pHistory, m_pRedlSaveData, SwNodes::MakeTextNode(), SwHistory::Move(), SwPaM::Move(), PaMCorrAbs(), Replace, RES_BREAK(), RES_PAGEDESC(), RES_POOLCOLL_STANDARD, SwContentNode::SetAttr(), SwUndRng::SetPaM(), and SwPaM::Start().
|
overridevirtual |
Reimplemented from SwUndo.
Definition at line 1301 of file undel.cxx.
References IDocumentContentOperations::DeleteAndJoin(), IDocumentContentOperations::DelFullPara(), fnMoveForward, SwPaM::GetDoc(), SwDoc::getIDocumentContentOperations(), SwDoc::GetIDocumentUndoRedo(), sw::RepeatContext::GetRepeatPaM(), GoInContent(), SwPaM::HasMark(), sw::RepeatContext::m_bDeleteRepeated, m_bDelFullPara, SwPaM::Move(), and SwPaM::SetMark().
|
private |
Definition at line 439 of file undel.cxx.
References SwpHints::DeRegister(), SwTextNode::EraseText(), SwPosition::GetContentIndex(), SwPosition::GetNodeIndex(), SwContentNode::GetpSwAttrSet(), SwTextNode::GetpSwpHints(), SwTextNode::GetText(), SwContentNode::HasSwAttrSet(), SwTextNode::Len(), m_aEndStr, m_aSttStr, SwUndRng::m_nEndNode, SwUndRng::m_nSttContent, SwUndRng::m_nSttNode, SwUndoSaveContent::m_pHistory, m_pMetadataUndoEnd, and m_pMetadataUndoStart.
Referenced by SwUndoDelete().
|
inline |
Definition at line 99 of file UndoDelete.hxx.
References m_bResetPgBrk, and m_bResetPgDesc.
|
inline |
Definition at line 96 of file UndoDelete.hxx.
References m_bTableDelLastNd.
void SwUndoDelete::SetTableName | ( | const OUString & | rName | ) |
Definition at line 1323 of file undel.cxx.
References m_sTableName.
|
overridevirtual |
Implements SwUndo.
Definition at line 838 of file undel.cxx.
References SwUndRng::AddUndoRedoPaM(), SwPosition::Adjust(), SwPosition::Assign(), SwTextNode::ClearSwpHintsArr(), SwNodes::Copy_(), Count, SwNodes::Delete(), IDocumentContentOperations::DelFullPara(), end, FindFirstAndNextNode(), SwIterator< TElementType, TSource, eMode >::First(), SwPosition::GetContentIndex(), SwNode::GetContentNode(), SwDoc::GetDfltTextFormatColl(), sw::UndoRedoContext::GetDoc(), SwTable::GetFrameFormat(), SwDoc::getIDocumentContentOperations(), SwNode::GetIndex(), SwNodeIndex::GetNode(), SwPosition::GetNode(), SwPosition::GetNodeIndex(), SwDoc::GetNodes(), SwNodeIndex::GetNodes(), SwTextNode::GetpSwpHints(), SwDoc::GetSpzFrameFormats(), SwTableNode::GetTable(), SwNode::GetTextNode(), SwDoc::GetUndoManager(), sw::UndoManager::GetUndoNodes(), SwContentNode::HasSwAttrSet(), SwTextNode::InsertText(), SwNode::IsContentNode(), SwNode::IsSectionNode(), SwNode::IsTableNode(), SwNode::IsTextNode(), lcl_MakeAutoFrames(), lcl_ReAnchorAtContentFlyFrames(), m_aEndStr, m_aSttStr, m_bBackSp, m_bDelFullPara, m_bFromTableCopy, m_bJoinNext, m_bResetPgBrk, m_bResetPgDesc, m_bTableDelLastNd, SwUndRng::m_nEndNode, m_nNdDiff, m_nNode, m_nReplaceDummy, m_nSectDiff, m_nSetPos, SwUndRng::m_nSttContent, SwUndRng::m_nSttNode, m_oMvStt, SwUndoSaveContent::m_pHistory, m_pMetadataUndoEnd, m_pMetadataUndoStart, m_pRedlSaveData, MakeFrames(), SwNodes::MakeTextNode(), SwHistory::Move(), SwNodes::MoveNodes(), SwIterator< TElementType, TSource, eMode >::Next(), NOHINTEXPAND, sw::RecreateStartTextFrames(), RES_BREAK(), RES_PAGEDESC(), SwTextNode::ResetAllAttr(), SwFormat::ResetFormatAttr(), SwPosition::SetContent(), SwTextNode::SetInSwUndo(), SwUndo::SetSaveData(), IDocumentContentOperations::SplitNode(), and start.
|
private |
Definition at line 44 of file UndoDelete.hxx.
Referenced by CanGrouping(), GetRewriter(), RedoImpl(), SaveContent(), and UndoImpl().
|
private |
Definition at line 44 of file UndoDelete.hxx.
Referenced by CanGrouping(), GetRewriter(), RedoImpl(), SaveContent(), and UndoImpl().
|
private |
Definition at line 58 of file UndoDelete.hxx.
Referenced by CanGrouping(), SwUndoDelete(), and UndoImpl().
|
private |
Definition at line 61 of file UndoDelete.hxx.
Referenced by IsDelFullPara(), RedoImpl(), RepeatImpl(), SwUndoDelete(), and UndoImpl().
|
private |
Definition at line 64 of file UndoDelete.hxx.
Referenced by SwUndoDelete(), and UndoImpl().
|
private |
Definition at line 57 of file UndoDelete.hxx.
Referenced by CanGrouping().
|
private |
Definition at line 59 of file UndoDelete.hxx.
Referenced by RedoImpl(), SwUndoDelete(), and UndoImpl().
|
private |
Definition at line 63 of file UndoDelete.hxx.
Referenced by SetPgBrkFlags(), and UndoImpl().
|
private |
Definition at line 62 of file UndoDelete.hxx.
Referenced by SetPgBrkFlags(), and UndoImpl().
|
private |
Definition at line 60 of file UndoDelete.hxx.
Referenced by RedoImpl(), SetTableDelLastNd(), and UndoImpl().
|
private |
Definition at line 65 of file UndoDelete.hxx.
Referenced by RedoImpl(), and SwUndoDelete().
|
private |
Definition at line 52 of file UndoDelete.hxx.
Referenced by SwUndoDelete(), and UndoImpl().
|
private |
Definition at line 51 of file UndoDelete.hxx.
Referenced by GetRewriter(), SwUndoDelete(), UndoImpl(), and ~SwUndoDelete().
|
private |
Definition at line 54 of file UndoDelete.hxx.
Referenced by SwUndoDelete(), and UndoImpl().
|
private |
Definition at line 53 of file UndoDelete.hxx.
Referenced by SwUndoDelete(), and UndoImpl().
|
private |
Definition at line 55 of file UndoDelete.hxx.
Referenced by RedoImpl(), SwUndoDelete(), and UndoImpl().
|
private |
Definition at line 43 of file UndoDelete.hxx.
Referenced by SwUndoDelete(), UndoImpl(), and ~SwUndoDelete().
|
private |
Definition at line 47 of file UndoDelete.hxx.
Referenced by SaveContent(), and UndoImpl().
|
private |
Definition at line 46 of file UndoDelete.hxx.
Referenced by SaveContent(), and UndoImpl().
|
private |
Definition at line 45 of file UndoDelete.hxx.
Referenced by CanGrouping(), RedoImpl(), SwUndoDelete(), UndoImpl(), and ~SwUndoDelete().
|
private |
Definition at line 49 of file UndoDelete.hxx.
Referenced by GetRewriter(), and SetTableName().