LibreOffice Module sw (master) 1
|
#include <UndoOverwrite.hxx>
Public Member Functions | |
SwUndoOverwrite (SwDoc &, SwPosition &, sal_Unicode cIns) | |
virtual | ~SwUndoOverwrite () 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 the rewriter of this undo object. More... | |
bool | CanGrouping (SwDoc &, SwPosition &, sal_Unicode cIns) |
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 Attributes | |
OUString | m_aDelStr |
OUString | m_aInsStr |
std::unique_ptr< SwRedlineSaveDatas > | m_pRedlSaveData |
SwNodeOffset | m_nStartNode |
sal_Int32 | m_nStartContent |
bool | m_bInsChar: 1 |
bool | m_bGroup: 1 |
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 |
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) |
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 34 of file UndoOverwrite.hxx.
SwUndoOverwrite::SwUndoOverwrite | ( | SwDoc & | rDoc, |
SwPosition & | rPos, | ||
sal_Unicode | cIns | ||
) |
Definition at line 43 of file unovwr.cxx.
References SwPosition::AdjustContent(), IDocumentRedlineAccess::DeleteRedline(), SwRedlineTable::empty(), EMPTYEXPAND, SwTextNode::EraseText(), SwUndo::FillSaveData(), SwPosition::GetContentIndex(), SwPosition::GetContentNode(), SwDoc::getIDocumentRedlineAccess(), SwPosition::GetNode(), SwPosition::GetNodeIndex(), SwTextNode::GetpSwpHints(), IDocumentRedlineAccess::GetRedlineTable(), SwTextNode::GetText(), SwNode::GetTextNode(), SwTextNode::InsertText(), SwNode::IsIgnoreDontExpand(), IDocumentRedlineAccess::IsIgnoreRedline(), m_aDelStr, m_aInsStr, SwUndo::m_bCacheComment, m_bInsChar, m_nStartContent, m_nStartNode, SwUndoSaveContent::m_pHistory, m_pRedlSaveData, OVERWRITE, and SwNode::SetIgnoreDontExpand().
|
overridevirtual |
Definition at line 99 of file unovwr.cxx.
bool SwUndoOverwrite::CanGrouping | ( | SwDoc & | rDoc, |
SwPosition & | rPos, | ||
sal_Unicode | cIns | ||
) |
Definition at line 103 of file unovwr.cxx.
References SwPosition::AdjustContent(), SwUndo::CanRedlineGroup(), CH_TXTATR_BREAKWORD, CH_TXTATR_INWORD, IDocumentRedlineAccess::DeleteRedline(), EMPTYEXPAND, SwTextNode::EraseText(), SwUndo::FillSaveData(), GetAppCharClass(), SwPosition::GetContentIndex(), SwPosition::GetContentNode(), SwDoc::getIDocumentRedlineAccess(), SwPosition::GetNode(), SwPosition::GetNodeIndex(), SwTextNode::GetText(), SwNode::GetTextNode(), SwTextNode::InsertText(), SwNode::IsIgnoreDontExpand(), CharClass::isLetterNumeric(), m_aDelStr, m_aInsStr, m_bGroup, m_bInsChar, m_nStartContent, m_nStartNode, m_pRedlSaveData, and SwNode::SetIgnoreDontExpand().
Referenced by sw::DocumentContentOperationsManager::Overwrite().
|
overridevirtual |
Returns the rewriter of this undo object.
The rewriter contains the following rule:
$1 -> '<overwritten text>'
<overwritten text> is shortened to nUndoStringLength characters.
Reimplemented from SwUndo.
Definition at line 312 of file unovwr.cxx.
References SwRewriter::AddRule(), m_aInsStr, nUndoStringLength, ShortenString(), SwResId(), and UndoArg1.
|
overridevirtual |
Implements SwUndo.
Definition at line 261 of file unovwr.cxx.
References SwPosition::AdjustContent(), SwPosition::Assign(), sw::IShellCursorSupplier::CreateNewShellCursor(), SwPaM::DeleteMark(), IDocumentRedlineAccess::DeleteRedline(), EMPTYEXPAND, SwTextNode::EraseText(), SwPosition::GetContentIndex(), sw::UndoRedoContext::GetCursorSupplier(), sw::UndoRedoContext::GetDoc(), SwDoc::getIDocumentRedlineAccess(), SwPaM::GetMark(), SwPaM::GetPoint(), SwPaM::GetPointNode(), SwNode::GetTextNode(), SwTextNode::InsertText(), SwNode::IsIgnoreDontExpand(), m_aDelStr, m_aInsStr, m_nStartContent, m_nStartNode, SwUndoSaveContent::m_pHistory, m_pRedlSaveData, n, SwPosition::SetContent(), SwNode::SetIgnoreDontExpand(), and SwPaM::SetMark().
|
overridevirtual |
Reimplemented from SwUndo.
Definition at line 245 of file unovwr.cxx.
References sw::RepeatContext::GetDoc(), SwDoc::getIDocumentContentOperations(), SwDoc::GetIDocumentUndoRedo(), sw::RepeatContext::GetRepeatPaM(), SwPaM::HasMark(), m_aInsStr, n, and IDocumentContentOperations::Overwrite().
|
overridevirtual |
Implements SwUndo.
Definition at line 179 of file unovwr.cxx.
References SwPosition::AdjustContent(), SwPosition::Assign(), SwAutoCorrExceptWord::CheckChar(), SwTextNode::ClearSwpHintsArr(), sw::IShellCursorSupplier::CreateNewShellCursor(), SwPaM::DeleteMark(), SwTextNode::EraseText(), SwDoc::GetAutoCorrExceptWord(), SwPosition::GetContentIndex(), sw::UndoRedoContext::GetCursorSupplier(), sw::UndoRedoContext::GetDoc(), SwPaM::GetMark(), SwPaM::GetPoint(), SwPaM::GetPointNode(), SwTextNode::GetpSwpHints(), SwNode::GetTextNode(), SwTextNode::InsertText(), SwNode::IsIgnoreDontExpand(), m_aDelStr, m_aInsStr, m_nStartContent, m_nStartNode, SwUndoSaveContent::m_pHistory, m_pRedlSaveData, n, SwDoc::SetAutoCorrExceptWord(), SwPosition::SetContent(), SwNode::SetIgnoreDontExpand(), SwPaM::SetMark(), and SwUndo::SetSaveData().
|
private |
Definition at line 36 of file UndoOverwrite.hxx.
Referenced by CanGrouping(), RedoImpl(), SwUndoOverwrite(), and UndoImpl().
|
private |
Definition at line 36 of file UndoOverwrite.hxx.
Referenced by CanGrouping(), GetRewriter(), RedoImpl(), RepeatImpl(), SwUndoOverwrite(), and UndoImpl().
|
private |
Definition at line 41 of file UndoOverwrite.hxx.
Referenced by CanGrouping().
|
private |
Definition at line 40 of file UndoOverwrite.hxx.
Referenced by CanGrouping(), and SwUndoOverwrite().
|
private |
Definition at line 39 of file UndoOverwrite.hxx.
Referenced by CanGrouping(), RedoImpl(), SwUndoOverwrite(), and UndoImpl().
|
private |
Definition at line 38 of file UndoOverwrite.hxx.
Referenced by CanGrouping(), RedoImpl(), SwUndoOverwrite(), and UndoImpl().
|
private |
Definition at line 37 of file UndoOverwrite.hxx.
Referenced by CanGrouping(), RedoImpl(), SwUndoOverwrite(), and UndoImpl().