20#include <libxml/xmlwriter.h>
28#include <UndoManager.hxx>
51 : m_nSttNode( 0 ), m_nEndNode( 0 ), m_nSttContent( 0 ), m_nEndContent( 0 )
87 else if( bCorrToContent )
102 else if( bCorrToContent )
112 SetPaM( rPaM, bCorrToContent );
163 , m_nViewShellId(CreateViewShellId(pDoc))
164 , m_isRepeatIgnored(false)
165 , m_bCacheComment(true)
175 if (
const SwView* pView = pDocShell->GetView())
176 nRet = pView->GetViewShellId();
194class UndoRedoRedlineGuard
198 : m_rRedlineAccess(rContext.GetDoc().getIDocumentRedlineAccess())
199 , m_eMode(m_rRedlineAccess.GetRedlineFlags())
204 m_rRedlineAccess.SetRedlineFlags( eTmpMode );
208 ~UndoRedoRedlineGuard()
210 m_rRedlineAccess.SetRedlineFlags(m_eMode);
234 const UndoRedoRedlineGuard aUndoRedoRedlineGuard(*pContext, *
this);
243 const UndoRedoRedlineGuard aUndoRedoRedlineGuard(*pContext, *
this);
255 assert(pRepeatContext);
283 pId = STR_DELETE_UNDO;
286 pId = STR_INSERT_UNDO;
292 pId = STR_SPLITNODE_UNDO;
295 pId = STR_INSATTR_UNDO;
298 pId = STR_SETFMTCOLL_UNDO;
301 pId = STR_RESET_ATTR_UNDO;
304 pId = STR_INSFMT_ATTR_UNDO;
307 pId = STR_INSERT_DOC_UNDO;
313 pId = STR_INSTABLE_UNDO;
316 pId = STR_TABLETOTEXT_UNDO;
319 pId = STR_TEXTTOTABLE_UNDO;
328 pId = STR_TABLEHEADLINE;
331 pId = STR_INSERTSECTION;
334 pId = STR_OUTLINE_LR;
337 pId = STR_OUTLINE_UD;
340 pId = STR_OUTLINE_EDIT;
352 pId = STR_INSERTDRAW;
355 pId = STR_NUMORNONUM;
358 pId = STR_INC_LEFTMARGIN;
361 pId = STR_DEC_LEFTMARGIN;
364 pId = STR_INSERTLABEL;
367 pId = STR_SETNUMRULESTART;
373 SAL_INFO(
"sw.core",
"Should NEVER be used/translated");
376 pId = STR_ACCEPT_REDLINE;
379 pId = STR_REJECT_REDLINE;
382 pId = STR_SPLIT_TABLE;
385 pId = STR_DONTEXPAND;
388 pId = STR_AUTOCORRECT;
391 pId = STR_MERGE_TABLE;
394 pId = STR_TRANSLITERATE;
397 pId = STR_PASTE_CLIPBOARD_UNDO;
400 pId = STR_TYPING_UNDO;
406 pId = STR_INSERT_GLOSSARY;
409 pId = STR_DELBOOKMARK;
412 pId = STR_INSBOOKMARK;
421 pId = STR_AUTOFORMAT;
427 pId = STR_DELETESECTION;
430 pId = STR_CHANGESECTION;
433 pId = STR_CHANGEDEFATTR;
445 pId = STR_DRAWUNGROUP;
448 pId = STR_DRAWDELETE;
457 pId = STR_TABLE_ATTR;
460 pId = STR_UNDO_TABLE_AUTOFMT;
463 pId = STR_UNDO_TABLE_INSCOL;
466 pId = STR_UNDO_TABLE_INSROW;
469 pId = STR_UNDO_TABLE_DELBOX;
472 pId = STR_UNDO_TABLE_SPLIT;
475 pId = STR_UNDO_TABLE_MERGE;
478 pId = STR_TABLE_NUMFORMAT;
481 pId = STR_INSERT_TOX;
484 pId = STR_CLEAR_TOX_RANGE;
487 pId = STR_TABLE_TBLCPYTBL;
490 pId = STR_TABLE_CPYTBL;
493 pId = STR_INS_FROM_SHADOWCRSR;
496 pId = STR_UNDO_CHAIN;
499 pId = STR_UNDO_UNCHAIN;
502 pId = STR_UNDO_FTNINFO;
505 pId = STR_UNDO_COMPAREDOC;
508 pId = STR_UNDO_SETFLYFRMFMT;
511 pId = STR_UNDO_SETRUBYATTR;
517 pId = STR_UNDO_PAGEDESC_CREATE;
520 pId = STR_UNDO_PAGEDESC;
523 pId = STR_UNDO_PAGEDESC_DELETE;
526 pId = STR_UNDO_HEADER_FOOTER;
529 pId = STR_UNDO_FIELD;
532 pId = STR_UNDO_TXTFMTCOL_CREATE;
535 pId = STR_UNDO_TXTFMTCOL_DELETE;
538 pId = STR_UNDO_TXTFMTCOL_RENAME;
541 pId = STR_UNDO_CHARFMT_CREATE;
544 pId = STR_UNDO_CHARFMT_DELETE;
547 pId = STR_UNDO_CHARFMT_RENAME;
550 pId = STR_UNDO_FRMFMT_CREATE;
553 pId = STR_UNDO_FRMFMT_DELETE;
556 pId = STR_UNDO_FRMFMT_RENAME;
559 pId = STR_UNDO_NUMRULE_CREATE;
562 pId = STR_UNDO_NUMRULE_DELETE;
565 pId = STR_UNDO_NUMRULE_RENAME;
568 pId = STR_UNDO_BOOKMARK_RENAME;
571 pId = STR_UNDO_INDEX_ENTRY_INSERT;
574 pId = STR_UNDO_INDEX_ENTRY_DELETE;
577 pId = STR_UNDO_COL_DELETE;
580 pId = STR_UNDO_ROW_DELETE;
583 pId = STR_UNDO_PAGEDESC_RENAME;
589 pId = STR_UNDO_FLYFRMFMT_TITLE;
592 pId = STR_UNDO_FLYFRMFMT_DESCRIPTION;
595 pId = STR_UNDO_TBLSTYLE_CREATE;
598 pId = STR_UNDO_TBLSTYLE_DELETE;
601 pId = STR_UNDO_TBLSTYLE_UPDATE;
604 pId = STR_REPLACE_UNDO;
607 pId = STR_INSERT_PAGE_BREAK_UNDO;
610 pId = STR_INSERT_COLUMN_BREAK_UNDO;
613 pId = STR_INSERT_ENV_UNDO;
616 pId = STR_DRAG_AND_COPY;
619 pId = STR_DRAG_AND_MOVE;
622 pId = STR_INSERT_CHART;
625 pId = STR_INSERT_FOOTNOTE;
628 pId = STR_INSERT_URLBTN;
631 pId = STR_INSERT_URLTXT;
634 pId = STR_DELETE_INVISIBLECNTNT;
637 pId = STR_REPLACE_STYLE;
640 pId = STR_DELETE_PAGE_BREAK;
643 pId = STR_TEXT_CORRECTION;
646 pId = STR_UNDO_TABLE_DELETE;
651 pId = STR_PARAGRAPH_SIGN_UNDO;
654 pId = STR_UNDO_INSERT_FORM_FIELD;
685 aResult = aRewriter.
Apply(aResult);
712 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"SwUndoSaveContent"));
713 (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"ptr"),
"%p",
this);
720 (void)xmlTextWriterEndElement(pWriter);
748 if( pCpyNd || pEndNdIdx )
763 aPos.
nNode = nTmpMvNode;
765 *pNodeIdx = aPos.
nNode;
770 const SwNodeOffset* pEndNdIdx,
bool const bForceCreateFrames)
779 SwPaM aPaM( rInsPos );
789 if (!pEndNdIdx && pTextNd)
869 const SwPosition *pStt = rMark < rPoint ? &rMark : &rPoint,
870 *pEnd = &rMark == pStt ? &rPoint : &rMark;
884 if( !rFootnoteArr.
empty() )
886 const SwNode* pFootnoteNd;
892 while(
nPos < rFootnoteArr.
size() && ( pFootnoteNd =
894 <= pEnd->nNode.GetIndex() )
896 const sal_Int32 nFootnoteSttIdx = pSrch->
GetStart();
898 ? (&pEnd->nNode.GetNode() == pFootnoteNd )
901 ( &pEnd->nNode.GetNode() == pFootnoteNd &&
902 nFootnoteSttIdx >= pEnd->nContent.
GetIndex() )) )
917 assert(pFootnoteHint);
918 SwIndex aIdx( pTextNd, nFootnoteSttIdx );
923 while(
nPos-- && ( pFootnoteNd = &( pSrch = rFootnoteArr[
nPos ] )->
926 const sal_Int32 nFootnoteSttIdx = pSrch->
GetStart();
930 ( &pEnd->nNode.GetNode() == pFootnoteNd &&
931 nFootnoteSttIdx >= pEnd->nContent.
GetIndex() )))
942 assert(pFootnoteHint);
943 SwIndex aIdx( pTextNd, nFootnoteSttIdx );
955 if( !rSpzArr.
empty() )
959 size_t n = rSpzArr.
size();
962 while(
n && !rSpzArr.
empty() )
964 pFormat = rSpzArr[--
n];
968 case RndStdIds::FLY_AS_CHAR:
972 pAPos->
nNode < pEnd->nNode )
973 : ( *pStt <= *pAPos && *pAPos < *pEnd )) )
987 case RndStdIds::FLY_AT_PARA:
999 m_pHistory->AddDeleteFly(*pFormat, nChainInsPos);
1005 & nDelContentType) &&
1026 case RndStdIds::FLY_AT_CHAR:
1034 *pAPos, *pStt, *pEnd, nDelContentType))
1036 m_pHistory->AddDeleteFly(*pFormat, nChainInsPos);
1043 if( *pStt <= *pAPos && *pAPos < *pEnd )
1059 case RndStdIds::FLY_AT_FLY:
1067 m_pHistory->AddDeleteFly(*pFormat, nChainInsPos);
1090 bool bSavePos =
false;
1091 bool bSaveOtherPos =
false;
1097 if ( pStt->
nNode <= pBkmk->GetMarkPos().nNode
1098 && pBkmk->GetMarkPos().nNode < pEnd->nNode )
1102 if ( pBkmk->IsExpanded()
1103 && pStt->
nNode <= pBkmk->GetOtherMarkPos().nNode
1104 && pBkmk->GetOtherMarkPos().nNode < pEnd->nNode )
1106 bSaveOtherPos =
true;
1120 bool bMaybe =
false;
1121 if ( *pStt <= pBkmk->GetMarkPos() && pBkmk->GetMarkPos() <= *pEnd )
1123 if ( pBkmk->GetMarkPos() == *pEnd
1124 || ( *pStt == pBkmk->GetMarkPos() && pBkmk->IsExpanded() ) )
1129 if( pBkmk->IsExpanded() &&
1130 *pStt <= pBkmk->GetOtherMarkPos() && pBkmk->GetOtherMarkPos() <= *pEnd )
1132 assert(!bSaveOtherPos);
1134 || (*pStt < pBkmk->GetOtherMarkPos() && pBkmk->GetOtherMarkPos() < *pEnd)
1143 bSaveOtherPos =
true;
1147 if ( !bSavePos && !bSaveOtherPos
1151 const bool bDifferentTextNodesAtMarkAndPoint =
1155 if ( bDifferentTextNodesAtMarkAndPoint )
1159 if( pStt->
nNode == pBkmk->GetMarkPos().nNode
1160 && pEnd->nContent.
GetIndex() != pEnd->nNode.GetNode().GetTextNode()->Len() )
1163 bSaveOtherPos =
false;
1167 else if( pEnd->nNode == pBkmk->GetMarkPos().nNode &&
1171 bSaveOtherPos =
false;
1178 const SwPosition& rAnnotationEndPos = pBkmk->GetMarkEnd();
1179 if ( *pStt < rAnnotationEndPos && rAnnotationEndPos <= *pEnd )
1182 bSaveOtherPos = pBkmk->IsExpanded();
1187 if ( bSavePos || bSaveOtherPos )
1193 m_pHistory->Add( *pBkmk, bSavePos, bSaveOtherPos );
1197 || !pBkmk->IsExpanded() ) )
1233 const SwNodeRange& rRange,
bool const bExpandNodes)
1269 if(
nullptr != pCNd )
1280 sal_uInt16 nSectType )
1372#if OSL_DEBUG_LEVEL > 0
1414 const SwPaM& rRange,
1426 for ( ;
n < rTable.
size(); ++
n )
1441 if( !rSData.
empty() && bDelRange )
1445 return !rSData.
empty();
1449 const SwPaM& rRange,
1458 for ( ;
n < rTable.
size(); ++
n )
1461 if ( RedlineType::Format == pRedl->
GetType() )
1474 return !rSData.
empty();
1484 for(
size_t n = rSData.
size();
n; )
1485 rSData[ --
n ].RedlineToDoc( aPam );
1487#if OSL_DEBUG_LEVEL > 0
1490 assert(rSData.
empty() || rSData[0].m_bRedlineMoved ||
1500 for(
size_t n = rSData.
size();
n; )
1501 if( rSData[ --
n ].GetMvSttIdx() )
1509 if( rCurr.
size() != rCheck.
size() )
1512 for(
size_t n = 0;
n < rCurr.
size(); ++
n )
1526 for(
size_t n = 0;
n < rCurr.
size(); ++
n )
1538OUString
ShortenString(
const OUString & rStr, sal_Int32 nLength,
const OUString & rFillStr)
1540 assert(
nLength - rFillStr.getLength() >= 2);
1542 if (rStr.getLength() <=
nLength)
1545 nLength -= rFillStr.getLength();
1550 const sal_Int32 nBackLen =
nLength - nFrontLen;
1552 return rStr.subView(0, nFrontLen)
1554 + rStr.subView(rStr.getLength() - nBackLen);
1562 assert(rAnchorPos.
nNode <= node);
1563 return node == rAnchorPos.
nNode
1575 assert(node <= rAnchorPos.
nNode);
1576 return node == rAnchorPos.
nNode && rAnchorPos.
nContent == 0;
1601 if (!pTextNode || rStart.
nContent != pTextNode->
Len())
1610 assert(rStart <= rEnd);
1622 return (rStart < rAnchorPos) && (rAnchorPos < rEnd);
1632 return ((rStart < rAnchorPos)
1633 || (rStart == rAnchorPos
1639 && ((rAnchorPos < rEnd)
1640 || (rAnchorPos == rEnd
1651 assert(rStart <= rEnd);
1697 case RndStdIds::FLY_AT_CHAR:
1698 case RndStdIds::FLY_AT_PARA:
1702 if (pAnchorPos !=
nullptr
1703 && ((rAnchor.
GetAnchorId() == RndStdIds::FLY_AT_CHAR)
struct _xmlTextWriter * xmlTextWriterPtr
Provides access to the marks of a document.
virtual sal_Int32 getAllMarksCount() const =0
returns the number of marks.
virtual std::unique_ptr< ILazyDeleter > deleteMark(const IDocumentMarkAccess::const_iterator_t &ppMark, bool isMoveNodes)=0
Deletes a mark.
virtual const_iterator_t getAllMarksBegin() const =0
returns a STL-like random access iterator to the begin of the sequence of marks.
@ CROSSREF_NUMITEM_BOOKMARK
@ CROSSREF_HEADING_BOOKMARK
static SW_DLLPUBLIC MarkType GetType(const ::sw::mark::IMark &rMark)
Returns the MarkType used to create the mark.
virtual bool DeleteRedline(const SwPaM &rPam, bool bSaveInUndo, RedlineType nDelType)=0
virtual void SetRedlineFlags_intern(RedlineFlags eMode)=0
Set a new redline mode.
virtual const SwRedlineTable & GetRedlineTable() const =0
virtual AppendResult AppendRedline(SwRangeRedline *pNewRedl, bool bCallDelete)=0
Append a new redline.
virtual const SwRangeRedline * GetRedline(const SwPosition &rPos, SwRedlineTable::size_type *pFndPos) const =0
virtual RedlineFlags GetRedlineFlags() const =0
Query the currently set redline mode.
void MakeStartIndex(SwIndex *pIdx)
virtual sal_Int32 Len() const
void CorrAbs(const SwNodeIndex &rOldNode, const SwPosition &rNewPos, const sal_Int32 nOffset=0, bool bMoveCursor=false)
IDocumentUndoRedo & GetIDocumentUndoRedo()
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
SwFootnoteIdxs & GetFootnoteIdxs()
IDocumentMarkAccess * getIDocumentMarkAccess()
const SwFrameFormats * GetSpzFrameFormats() const
SwDocShell * GetDocShell()
::sw::UndoManager & GetUndoManager()
bool IsInWriterfilterImport() const
bool Rollback(SwDoc *pDoc, sal_uInt16 nStart=0)
Marks a character position inside a document model node.
const SwIndexReg * GetIdxReg() const
SwIndex & Assign(SwIndexReg *, sal_Int32)
sal_Int32 GetIndex() const
Layout frame for SwNoTextNode, i.e. graphics and OLE nodes (including charts).
Marks a node in the document model.
SwNodeIndex & Assign(SwNodes const &rNds, SwNodeOffset)
const SwNodes & GetNodes() const
SwNodeOffset GetIndex() const
Base class of the Writer document model elements.
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwNodeOffset GetIndex() const
SwNodes & GetNodes()
Node is in which nodes-array/doc?
bool IsContentNode() const
const SwStartNode * StartOfSectionNode() const
SwNodeOffset EndOfSectionIndex() const
SwContentNode * GetContentNode()
SwNoTextNode * GetNoTextNode()
const SwEndNode * EndOfSectionNode() const
void MoveRange(SwPaM &, SwPosition &, SwNodes &rNodes)
move a range
SwNode & GetEndOfExtras() const
This is the last EndNode of a special section.
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
void Delete(const SwNodeIndex &rPos, SwNodeOffset nNodes=SwNodeOffset(1))
delete nodes
static SwStartNode * MakeEmptySection(const SwNodeIndex &rIdx, SwStartNodeType=SwNormalStartNode)
Create an empty section of Start- and EndNote.
static SwContentNode * GoPrevious(SwNodeIndex *)
SwContentNode * GoNext(SwNodeIndex *) const
bool MoveNodes(const SwNodeRange &, SwNodes &rNodes, const SwNodeIndex &, bool bNewFrames=true)
move the node pointer
SwNode & GetEndOfPostIts() const
A still empty section.
PaM is Point and Mark: a selection of the document model.
const SwPosition * GetMark() const
SwContentNode * GetContentNode(bool bPoint=true) const
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
SwNode & GetNode(bool bPoint=true) const
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
const SwPosition * End() const
const SwPosition * GetPoint() const
const SwPosition * Start() const
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
const OUString & GetComment(sal_uInt16 nPos=0) const
SwNodeIndex * GetContentIdx() const
void SetContentIdx(const SwNodeIndex *)
RedlineType GetType(sal_uInt16 nPos=0) const
friend class SwRangeRedline
bool CanCombine(const SwRedlineData &rCmp) const
sal_uInt16 m_nRedlineCount
void RedlineToDoc(SwPaM const &rPam)
SwRedlineSaveData(SwComparePosition eCmpPos, const SwPosition &rSttPos, const SwPosition &rEndPos, SwRangeRedline &rRedl, bool bCopyNext)
SwNodeIndex * GetMvSttIdx() const
void push_back(std::unique_ptr< SwRedlineSaveData > pNew)
vector_type::size_type size_type
OUString Apply(const OUString &rStr) const
Starts a section of nodes in the document model.
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
sal_Int32 GetStart() const
SwTextNode is a paragraph in the document model.
virtual sal_Int32 Len() const override
void EraseText(const SwIndex &rIdx, const sal_Int32 nCount=SAL_MAX_INT32, const SwInsertFlags nMode=SwInsertFlags::DEFAULT)
delete text content ATTENTION: must not be called with a range that overlaps the start of an attribut...
SwTextAttr * GetTextAttrForCharAt(const sal_Int32 nIndex, const sal_uInt16 nWhich=RES_TXTATR_END) const
get the text attribute at position nIndex which owns the dummy character CH_TXTATR_* at that position...
SwPaM & AddUndoRedoPaM(::sw::UndoRedoContext &, bool const bCorrToContent=false) const
void SetPaM(SwPaM &, bool bCorrToContent=false) const
void SetValues(const SwPaM &rPam)
static void MoveFromUndoNds(SwDoc &rDoc, SwNodeOffset nNodeIdx, SwPosition &rInsPos, const SwNodeOffset *pEndNdIdx=nullptr, bool bForceCreateFrames=false)
virtual ~SwUndoSaveContent() COVERITY_NOEXCEPT_FALSE
void DelContentIndex(const SwPosition &pMark, const SwPosition &pPoint, DelContentType nDelContentType=DelContentType::AllMask)
static void MoveToUndoNds(SwPaM &rPam, SwNodeIndex *pNodeIdx, SwNodeOffset *pEndNdIdx=nullptr)
std::unique_ptr< SwHistory > m_pHistory
static bool MovePtBackward(SwPaM &rPam)
static void MovePtForward(SwPaM &rPam, bool bMvBkwrd)
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
void SaveSection(const SwNodeIndex &rSttIdx)
const SwHistory * GetHistory() const
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
std::unique_ptr< SwRedlineSaveDatas > m_pRedlineSaveData
std::unique_ptr< SwNodeIndex > m_pMovedStart
void RestoreSection(SwDoc *pDoc, SwNodeIndex *pIdx, sal_uInt16 nSectType)
virtual SwRewriter GetRewriter() const
Returns the rewriter for this object.
std::optional< OUString > maComment
virtual void UndoImpl(::sw::UndoRedoContext &)=0
SwUndo(SwUndoId const nId, const SwDoc *pDoc)
virtual void Repeat(SfxRepeatTarget &) override
virtual void Redo() override
RedlineFlags GetRedlineFlags() const
ViewShellId GetViewShellId() const override
See SfxUndoAction::GetViewShellId().
virtual bool CanRepeat(SfxRepeatTarget &) const override
static bool FillSaveData(const SwPaM &rRange, SwRedlineSaveDatas &rSData, bool bDelRange=true, bool bCopyNext=true)
virtual OUString GetComment() const override
Returns textual comment for this undo object.
static void RemoveIdxRel(SwNodeOffset, const SwPosition &)
static void RemoveIdxFromRange(SwPaM &rPam, bool bMoveNext)
virtual void UndoWithContext(SfxUndoContext &) override
static bool HasHiddenRedlines(const SwRedlineSaveDatas &rSData)
static void SetSaveData(SwDoc &rDoc, SwRedlineSaveDatas &rSData)
static bool CanRedlineGroup(SwRedlineSaveDatas &rCurr, const SwRedlineSaveDatas &rCheck, bool bCurrIsEnd)
virtual void RepeatImpl(::sw::RepeatContext &)
static ViewShellId CreateViewShellId(const SwDoc *pDoc)
Try to obtain the view shell ID of the current view.
static bool FillSaveDataForFormat(const SwPaM &, SwRedlineSaveDatas &)
virtual void RedoImpl(::sw::UndoRedoContext &)=0
static void RemoveIdxFromSection(SwDoc &, SwNodeOffset nSttIdx, const SwNodeOffset *pEndIdx=nullptr)
virtual void Undo() override
bool m_isRepeatIgnored
for multi-selection, only repeat 1st selection
ViewShellId m_nViewShellId
virtual void RedoWithContext(SfxUndoContext &) override
virtual ~SwUndo() override
virtual SwCursor & CreateNewShellCursor()=0
SwNodes const & GetUndoNodes() const
IShellCursorSupplier & GetCursorSupplier()
#define suppress_fun_call_w_exception(expr)
void PaMCorrRel(const SwNodeIndex &rOldNode, const SwPosition &rNewPos, const sal_Int32 nOffset)
Sets all PaMs in OldNode to relative Pos.
#define SAL_INFO(area, stream)
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
constexpr SwNodeOffset NODE_OFFSET_MAX(SAL_MAX_INT32)
bool GoInContent(SwPaM &rPam, SwMoveFnCollection const &fnMove)
SwComparePosition ComparePosition(const T &rStt1, const T &rEnd1, const T &rStt2, const T &rEnd2)
@ OverlapBehind
Pos1 overlaps Pos2 at the end.
@ CollideEnd
Pos1 end touches at Pos2 start.
@ Behind
Pos1 behind Pos2.
@ OverlapBefore
Pos1 overlaps Pos2 at the beginning.
@ Outside
Pos2 completely contained in Pos1.
@ Before
Pos1 before Pos2.
@ Inside
Pos1 completely contained in Pos2.
@ CollideStart
Pos1 start touches at Pos2 end.
@ Equal
Pos1 is as large as Pos2.
SwMoveFnCollection const & fnMoveBackward
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
Marks a position in the document model.
SwDoc & GetDoc() const
Returns the document this position is in.
OUString SwResId(TranslateId aId)
constexpr sal_Int32 COMPLETE_STRING
@ UI_DELETE_INVISIBLECNTNT
bool IsSelectFrameAnchoredAtPara(SwPosition const &rAnchorPos, SwPosition const &rStart, SwPosition const &rEnd, DelContentType const nDelContentType)
is a fly anchored at paragraph at rAnchorPos selected?
static bool IsAtEndOfSection2(SwPosition const &rPos)
passed start / end position could be on section start / end node
static bool IsAtStartOfSection(SwPosition const &rAnchorPos)
static bool IsNotBackspaceHeuristic(SwPosition const &rStart, SwPosition const &rEnd)
bool IsFlySelectedByCursor(SwDoc const &rDoc, SwPosition const &rStart, SwPosition const &rEnd)
check at-char and at-para flys in rDoc
OUString ShortenString(const OUString &rStr, sal_Int32 nLength, const OUString &rFillStr)
Shortens a string to a maximum length.
static bool IsAtStartOfSection2(SwPosition const &rPos)
bool IsDestroyFrameAnchoredAtChar(SwPosition const &rAnchorPos, SwPosition const &rStart, SwPosition const &rEnd, DelContentType const nDelContentType)
will DelContentIndex destroy a frame anchored at character at rAnchorPos?
OUString GetUndoComment(SwUndoId eId)
static bool IsAtEndOfSection(SwPosition const &rAnchorPos)