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) |
![]() | |
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 bool | Merge (SfxUndoAction *pNextAction) |
virtual OUString | GetRepeatComment (SfxRepeatTarget &) 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 |
sal_uLong | m_nStartNode |
sal_Int32 | m_nStartContent |
bool | m_bInsChar: 1 |
bool | m_bGroup: 1 |
![]() | |
std::unique_ptr< SwHistory > | m_pHistory |
Additional Inherited Members | |
![]() | |
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) |
![]() | |
static void | RemoveIdxFromSection (SwDoc &, sal_uLong nSttIdx, const sal_uLong *pEndIdx=nullptr) |
static void | RemoveIdxFromRange (SwPaM &rPam, bool bMoveNext) |
static void | RemoveIdxRel (sal_uLong, const SwPosition &) |
static bool | CanRedlineGroup (SwRedlineSaveDatas &rCurr, const SwRedlineSaveDatas &rCheck, bool bCurrIsEnd) |
![]() | |
bool | m_bCacheComment |
std::optional< OUString > | maComment |
![]() | |
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 void | MoveToUndoNds (SwPaM &rPam, SwNodeIndex *pNodeIdx, sal_uLong *pEndNdIdx=nullptr) |
static void | MoveFromUndoNds (SwDoc &rDoc, sal_uLong nNodeIdx, SwPosition &rInsPos, const sal_uLong *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 41 of file unovwr.cxx.
References assert(), IDocumentRedlineAccess::DeleteRedline(), SwRedlineTable::empty(), EMPTYEXPAND, SwTextNode::EraseText(), SwUndo::FillSaveData(), SwDoc::getIDocumentRedlineAccess(), SwIndex::GetIndex(), SwNodeIndex::GetIndex(), SwNodeIndex::GetNode(), 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, SwPosition::nContent, SwPosition::nNode, OVERWRITE, and SwNode::SetIgnoreDontExpand().
|
overridevirtual |
Definition at line 98 of file unovwr.cxx.
bool SwUndoOverwrite::CanGrouping | ( | SwDoc & | rDoc, |
SwPosition & | rPos, | ||
sal_Unicode | cIns | ||
) |
Definition at line 102 of file unovwr.cxx.
References assert(), SwUndo::CanRedlineGroup(), CH_TXTATR_BREAKWORD, CH_TXTATR_INWORD, IDocumentRedlineAccess::DeleteRedline(), EMPTYEXPAND, SwTextNode::EraseText(), SwUndo::FillSaveData(), GetAppCharClass(), SwDoc::getIDocumentRedlineAccess(), SwIndex::GetIndex(), SwNodeIndex::GetNode(), SwTextNode::GetText(), SwNode::GetTextNode(), SwTextNode::InsertText(), SwNode::IsIgnoreDontExpand(), CharClass::isLetterNumeric(), m_aDelStr, m_aInsStr, m_bGroup, m_bInsChar, m_nStartContent, m_nStartNode, m_pRedlSaveData, SwPosition::nContent, SwPosition::nNode, SwNode::SetIgnoreDontExpand(), and void().
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 311 of file unovwr.cxx.
References SwRewriter::AddRule(), m_aInsStr, nUndoStringLength, ShortenString(), SwResId(), and UndoArg1.
|
overridevirtual |
Implements SwUndo.
Definition at line 260 of file unovwr.cxx.
References assert(), SwIndex::Assign(), sw::IShellCursorSupplier::CreateNewShellCursor(), SwPaM::DeleteMark(), IDocumentRedlineAccess::DeleteRedline(), EMPTYEXPAND, SwTextNode::EraseText(), sw::UndoRedoContext::GetCursorSupplier(), sw::UndoRedoContext::GetDoc(), SwDoc::getIDocumentRedlineAccess(), SwNode::GetTextNode(), SwTextNode::InsertText(), SwNode::IsIgnoreDontExpand(), m_aDelStr, m_aInsStr, m_nStartContent, m_nStartNode, SwUndoSaveContent::m_pHistory, m_pRedlSaveData, n, SwNode::SetIgnoreDontExpand(), SwIndex::SetMark(), and void().
|
overridevirtual |
Reimplemented from SwUndo.
Definition at line 244 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 178 of file unovwr.cxx.
References assert(), SwIndex::Assign(), SwAutoCorrExceptWord::CheckChar(), SwTextNode::ClearSwpHintsArr(), sw::IShellCursorSupplier::CreateNewShellCursor(), SwPaM::DeleteMark(), SwTextNode::EraseText(), SwDoc::GetAutoCorrExceptWord(), sw::UndoRedoContext::GetCursorSupplier(), sw::UndoRedoContext::GetDoc(), SwTextNode::GetpSwpHints(), SwNode::GetTextNode(), SwTextNode::InsertText(), SwNode::IsIgnoreDontExpand(), m_aDelStr, m_aInsStr, m_nStartContent, m_nStartNode, SwUndoSaveContent::m_pHistory, m_pRedlSaveData, n, SwDoc::SetAutoCorrExceptWord(), SwNode::SetIgnoreDontExpand(), SwUndo::SetSaveData(), and void().
|
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().