LibreOffice Module sw (master) 1
|
Typing one or more characters to a single paragraph. More...
#include <UndoInsert.hxx>
Public Member Functions | |
SwUndoInsert (const SwNode &rNode, sal_Int32 nContent, sal_Int32 nLen, const SwInsertFlags nInsertFlags, bool bWDelim=true) | |
SwUndoInsert (const SwNode &rNode) | |
virtual | ~SwUndoInsert () 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... | |
void | SetWithRsid () |
bool | IsIndependent (const SwUndoInsert &rOther) const |
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 | CanGrouping (sal_Unicode cIns) |
bool | CanGrouping (const SwPosition &rPos) |
void | Init (const SwNode &rNode) |
std::optional< OUString > | GetTextFromDoc () 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_oUndoNodeIndex |
start of Content in UndoNodes for Redo More... | |
std::optional< OUString > | maText |
std::optional< OUString > | maUndoText |
std::unique_ptr< SwRedlineData > | m_pRedlData |
SwNodeOffset | m_nNode |
sal_Int32 | m_nContent |
sal_Int32 | m_nLen |
bool | m_bIsWordDelim: 1 |
bool | m_bIsAppend: 1 |
bool | m_bWithRsid: 1 |
const SwInsertFlags | m_nInsertFlags |
SwDoc * | m_pDoc |
Private Attributes inherited from SwUndoSaveContent | |
std::unique_ptr< SwHistory > | m_pHistory |
Friends | |
class | ::sw::DocumentContentOperationsManager |
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) |
Typing one or more characters to a single paragraph.
Definition at line 42 of file UndoInsert.hxx.
SwUndoInsert::SwUndoInsert | ( | const SwNode & | rNode, |
sal_Int32 | nContent, | ||
sal_Int32 | nLen, | ||
const SwInsertFlags | nInsertFlags, | ||
bool | bWDelim = true |
||
) |
SwUndoInsert::SwUndoInsert | ( | const SwNode & | rNode | ) |
Definition at line 116 of file unins.cxx.
References EMPTYEXPAND, Init(), and SPLITNODE.
|
overridevirtual |
Definition at line 187 of file unins.cxx.
References SwNodes::Delete(), SwNodes::GetEndOfExtras(), SwNode::GetIndex(), m_oUndoNodeIndex, m_pRedlData, and maText.
|
private |
Definition at line 146 of file unins.cxx.
References SwRedlineTable::empty(), SwPosition::GetContentIndex(), SwPosition::GetContentNode(), SwNode::GetDoc(), SwDoc::getIDocumentRedlineAccess(), SwPosition::GetNode(), SwPosition::GetNodeIndex(), IDocumentRedlineAccess::GetRedlineAuthor(), SwUndo::GetRedlineFlags(), IDocumentRedlineAccess::GetRedlineFlags(), IDocumentRedlineAccess::GetRedlineTable(), m_nContent, m_nNode, m_pRedlData, and ShowMask.
|
private |
Definition at line 130 of file unins.cxx.
References GetAppCharClass(), m_bIsAppend, m_bIsWordDelim, m_nContent, m_nLen, and maUndoText.
Referenced by sw::DocumentContentOperationsManager::InsertString().
|
overridevirtual |
Returns rewriter for this undo object.
The returned rewriter has the following rule:
$1 -> '<inserted text>'
<inserted text> is shortened to a length of nUndoStringLength.
Reimplemented from SwUndo.
Definition at line 446 of file unins.cxx.
References SwRewriter::AddRule(), aStr, DenoteSpecialCharacters(), maText, maUndoText, nUndoStringLength, ShortenString(), SwResId(), and UndoArg1.
|
private |
Definition at line 61 of file unins.cxx.
References SwNode::GetContentNode(), SwNodeIndex::GetNode(), SwDoc::GetNodes(), SwTextNode::GetText(), SwNode::GetTextNode(), SwNode::IsTextNode(), m_nContent, m_nLen, m_nNode, m_pDoc, and nLength.
Referenced by Init(), and RedoImpl().
|
private |
Definition at line 87 of file unins.cxx.
References SwNode::GetDoc(), SwDoc::getIDocumentRedlineAccess(), IDocumentRedlineAccess::GetRedlineAuthor(), IDocumentRedlineAccess::GetRedlineFlags(), GetTextFromDoc(), IDocumentRedlineAccess::IsRedlineOn(), SwUndo::m_bCacheComment, m_pDoc, m_pRedlData, maUndoText, and SwUndo::SetRedlineFlags().
Referenced by SwUndoInsert().
bool SwUndoInsert::IsIndependent | ( | const SwUndoInsert & | rOther | ) | const |
|
overridevirtual |
Implements SwUndo.
Definition at line 287 of file unins.cxx.
References IDocumentRedlineAccess::AppendRedline(), IDocumentContentOperations::AppendTextNode(), SwPosition::Assign(), sw::IShellCursorSupplier::CreateNewShellCursor(), SwPaM::DeleteMark(), SwRedlineTable::empty(), SwPaM::Exchange(), fnMoveBackward, SwPosition::GetContentIndex(), SwNode::GetContentNode(), sw::UndoRedoContext::GetCursorSupplier(), sw::UndoRedoContext::GetDoc(), SwDoc::getIDocumentContentOperations(), SwDoc::getIDocumentRedlineAccess(), SwPaM::GetMark(), SwPosition::GetNode(), SwPosition::GetNodeIndex(), SwPaM::GetPoint(), SwUndo::GetRedlineFlags(), IDocumentRedlineAccess::GetRedlineFlags(), IDocumentRedlineAccess::GetRedlineTable(), GetTextFromDoc(), SwNode::GetTextNode(), Ignore, SwTextNode::InsertText(), IDocumentRedlineAccess::IsRedlineOn(), m_bIsAppend, m_bWithRsid, m_nContent, m_nInsertFlags, m_nLen, m_nNode, m_oUndoNodeIndex, m_pRedlData, maText, maUndoText, SwPaM::Move(), SwUndoSaveContent::MoveFromUndoNds(), SwUndoSaveContent::MovePtBackward(), SwUndoSaveContent::MovePtForward(), SwPosition::SetContent(), SwPaM::SetMark(), IDocumentRedlineAccess::SetRedlineFlags_intern(), IDocumentRedlineAccess::SplitRedline(), and SwDoc::UpdateRsid().
|
overridevirtual |
Reimplemented from SwUndo.
Definition at line 370 of file unins.cxx.
References aName, IDocumentContentOperations::AppendTextNode(), comphelper::EmbeddedObjectContainer::CreateUniqueObjectName(), fnMoveBackward, SwNode::GetContentNode(), sw::RepeatContext::GetDoc(), comphelper::EmbeddedObjectContainer::GetEmbeddedObject(), SwGrfNode::GetFileFilterNms(), SwGrfNode::GetGrf(), SwDoc::getIDocumentContentOperations(), SwDoc::GetIDocumentUndoRedo(), SwNodeIndex::GetNode(), SwDoc::GetNodes(), SwNode::GetNodeType(), SwOLEObj::GetOleRef(), SwPaM::GetPoint(), SwPaM::GetPointContentNode(), sw::RepeatContext::GetRepeatPaM(), SwTextNode::GetText(), SwNode::GetTextNode(), Grf, IDocumentContentOperations::InsertEmbObject(), IDocumentContentOperations::InsertGraphic(), IDocumentContentOperations::InsertString(), SwGrfNode::IsGrfLink(), m_bIsAppend, m_nContent, m_nLen, m_nNode, SwPaM::Move(), Ole, SwPaM::SetMark(), comphelper::EmbeddedObjectContainer::StoreEmbeddedObject(), and Text.
|
inline |
Definition at line 90 of file UndoInsert.hxx.
References m_bWithRsid.
Referenced by SwDoc::UpdateRsid().
|
overridevirtual |
Implements SwUndo.
Definition at line 204 of file unins.cxx.
References SwPosition::AdjustContent(), SwPosition::Assign(), sw::IShellCursorSupplier::CreateNewShellCursor(), SwTextNode::DeleteAttributes(), SwPaM::DeleteMark(), IDocumentRedlineAccess::DeleteRedline(), IDocumentContentOperations::DelFullPara(), SwTextNode::EraseText(), SwPaM::Exchange(), fnMoveBackward, SwPosition::GetContentIndex(), SwNode::GetContentNode(), sw::UndoRedoContext::GetCursorSupplier(), sw::UndoRedoContext::GetDoc(), SwNodes::GetEndOfContent(), SwDoc::getIDocumentContentOperations(), SwDoc::getIDocumentRedlineAccess(), SwPaM::GetMark(), SwNodeIndex::GetNode(), SwPosition::GetNodeIndex(), SwDoc::GetNodes(), SwPaM::GetPoint(), SwUndo::GetRedlineFlags(), SwTextNode::GetText(), SwNode::GetTextNode(), IDocumentRedlineAccess::IsRedlineOn(), m_bIsAppend, m_bWithRsid, m_nContent, m_nLen, m_nNode, m_oUndoNodeIndex, m_pDoc, maText, maUndoText, SwPaM::Move(), SwUndoSaveContent::MoveToUndoNds(), SwUndo::RemoveIdxFromRange(), RES_TXTATR_AUTOFMT(), RES_TXTATR_CHARFMT(), SwPosition::SetContent(), and SwPaM::SetMark().
|
friend |
Definition at line 57 of file UndoInsert.hxx.
|
private |
Definition at line 52 of file UndoInsert.hxx.
Referenced by CanGrouping(), RedoImpl(), RepeatImpl(), and UndoImpl().
|
private |
Definition at line 51 of file UndoInsert.hxx.
Referenced by CanGrouping().
|
private |
Definition at line 53 of file UndoInsert.hxx.
Referenced by RedoImpl(), SetWithRsid(), and UndoImpl().
|
private |
Definition at line 50 of file UndoInsert.hxx.
Referenced by CanGrouping(), GetTextFromDoc(), RedoImpl(), RepeatImpl(), and UndoImpl().
|
private |
Definition at line 55 of file UndoInsert.hxx.
Referenced by RedoImpl().
|
private |
Definition at line 50 of file UndoInsert.hxx.
Referenced by CanGrouping(), GetTextFromDoc(), RedoImpl(), RepeatImpl(), and UndoImpl().
|
private |
Definition at line 49 of file UndoInsert.hxx.
Referenced by CanGrouping(), GetTextFromDoc(), IsIndependent(), RedoImpl(), RepeatImpl(), and UndoImpl().
|
private |
start of Content in UndoNodes for Redo
Definition at line 45 of file UndoInsert.hxx.
Referenced by RedoImpl(), UndoImpl(), and ~SwUndoInsert().
|
private |
Definition at line 61 of file UndoInsert.hxx.
Referenced by GetTextFromDoc(), Init(), and UndoImpl().
|
private |
Definition at line 48 of file UndoInsert.hxx.
Referenced by CanGrouping(), Init(), RedoImpl(), and ~SwUndoInsert().
|
private |
Definition at line 46 of file UndoInsert.hxx.
Referenced by GetRewriter(), RedoImpl(), UndoImpl(), and ~SwUndoInsert().
|
private |
Definition at line 47 of file UndoInsert.hxx.
Referenced by CanGrouping(), GetRewriter(), Init(), RedoImpl(), and UndoImpl().