LibreOffice Module sw (master) 1
Functions
undobj.cxx File Reference
#include <libxml/xmlwriter.h>
#include <IShellCursorSupplier.hxx>
#include <txtftn.hxx>
#include <fmtanchr.hxx>
#include <ftnidx.hxx>
#include <frmfmt.hxx>
#include <doc.hxx>
#include <UndoManager.hxx>
#include <IDocumentRedlineAccess.hxx>
#include <docary.hxx>
#include <swcrsr.hxx>
#include <swundo.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
#include <UndoCore.hxx>
#include <rolbck.hxx>
#include <ndnotxt.hxx>
#include <IMark.hxx>
#include <mvsave.hxx>
#include <redline.hxx>
#include <crossrefbookmark.hxx>
#include <strings.hrc>
#include <docsh.hxx>
#include <view.hxx>
#include <frameformats.hxx>
#include <o3tl/deleter.hxx>
#include <sal/log.hxx>
Include dependency graph for undobj.cxx:

Go to the source code of this file.

Functions

OUString GetUndoComment (SwUndoId eId)
 
OUString ShortenString (const OUString &rStr, sal_Int32 nLength, std::u16string_view aFillStr)
 Shortens a string to a maximum length. More...
 
static bool IsAtEndOfSection (SwPosition const &rAnchorPos)
 
static bool IsAtStartOfSection (SwPosition const &rAnchorPos)
 
static bool IsAtEndOfSection2 (SwPosition const &rPos)
 passed start / end position could be on section start / end node More...
 
static bool IsAtStartOfSection2 (SwPosition const &rPos)
 
static bool IsNotBackspaceHeuristic (SwPosition const &rStart, SwPosition const &rEnd)
 
bool IsDestroyFrameAnchoredAtChar (SwPosition const &rAnchorPos, SwPosition const &rStart, SwPosition const &rEnd, DelContentType const nDelContentType)
 will DelContentIndex destroy a frame anchored at character at rAnchorPos? More...
 
bool IsSelectFrameAnchoredAtPara (SwPosition const &rAnchorPos, SwPosition const &rStart, SwPosition const &rEnd, DelContentType const nDelContentType)
 is a fly anchored at paragraph at rAnchorPos selected? More...
 
bool IsFlySelectedByCursor (SwDoc const &rDoc, SwPosition const &rStart, SwPosition const &rEnd)
 check at-char and at-para flys in rDoc More...
 

Function Documentation

◆ GetUndoComment()

OUString GetUndoComment ( SwUndoId  eId)

Definition at line 261 of file undobj.cxx.

References ACCEPT_REDLINE, AUTOCORRECT, AUTOFORMAT, BOOKMARK_RENAME, CHAINE, CHANGE_PAGEDESC, CHARFMT_CREATE, CHARFMT_DELETE, CHARFMT_RENAME, CHGFTN, CHGSECTION, CLEARTOXRANGE, COL_DELETE, COMPAREDOC, CONFLICT, COPY, CPYTBL, CREATE_PAGEDESC, DEC_LEFTMARGIN, DELBOOKMARK, DELETE, DELETE_PAGEDESC, DELGRF, DELLAYFMT, DELNUM, DELSECTION, DONTEXPAND, DRAWDELETE, DRAWGROUP, DRAWUNDO, DRAWUNGROUP, EMPTY, END, FIELD, FLYFRMFMT_DESCRIPTION, FLYFRMFMT_TITLE, FRMFMT_CREATE, FRMFMT_DELETE, FRMFMT_RENAME, FTNINFO, HEADER_FOOTER, INC_LEFTMARGIN, INDEX_ENTRY_DELETE, INDEX_ENTRY_INSERT, INS_FROM_SHADOWCRSR, INSATTR, INSBOOKMARK, INSDOKUMENT, INSDRAWFMT, INSERT, INSERT_FORM_FIELD, INSERTLABEL, INSFMTATTR, INSGLOSSARY, INSLAYFMT, INSNUM, INSSECTION, INSTABLE, INSTOX, MERGE_TABLE, MOVE, MOVENUM, NUMDOWN, NUMORNONUM, NUMRULE_CREATE, NUMRULE_DELETE, NUMRULE_RENAME, NUMUP, OUTLINE_EDIT, OUTLINE_LR, OUTLINE_UD, OVERWRITE, PARA_SIGN_ADD, PASTE_CLIPBOARD, REDLINE, REJECT_REDLINE, RENAME_PAGEDESC, REPLACE, REREAD, RESETATTR, ROW_DELETE, SAL_INFO, SETDEFTATTR, SETFLYFRMFMT, SETFMTCOLL, SETNUMRULESTART, SETRUBYATTR, SORT_TBL, SORT_TXT, SPLIT_TABLE, SPLITNODE, START, SwResId(), TABLE_ATTR, TABLE_AUTOFMT, TABLE_DELBOX, TABLE_INSCOL, TABLE_INSROW, TABLE_MERGE, TABLE_SPLIT, TABLEHEADLINE, TABLETOTEXT, TBLCPYTBL, TBLNUMFMT, TBLSTYLE_CREATE, TBLSTYLE_DELETE, TBLSTYLE_UPDATE, TEXTTOTABLE, TOXCHANGE, TRANSLITERATE, TXTFMTCOL_CREATE, TXTFMTCOL_DELETE, TXTFMTCOL_RENAME, TYPING, UI_DELETE_INVISIBLECNTNT, UI_DELETE_PAGE_BREAK, UI_DRAG_AND_COPY, UI_DRAG_AND_MOVE, UI_INSERT_CHART, UI_INSERT_COLUMN_BREAK, UI_INSERT_ENVELOPE, UI_INSERT_FOOTNOTE, UI_INSERT_PAGE_BREAK, UI_INSERT_URLBTN, UI_INSERT_URLTXT, UI_REPLACE, UI_REPLACE_STYLE, UI_TABLE_DELETE, UI_TEXT_CORRECTION, and UNCHAIN.

Referenced by sw::UndoManager::EndUndo(), SwUndo::GetComment(), and sw::UndoManager::StartUndo().

◆ IsAtEndOfSection()

static bool IsAtEndOfSection ( SwPosition const &  rAnchorPos)
static

◆ IsAtEndOfSection2()

static bool IsAtEndOfSection2 ( SwPosition const &  rPos)
static

passed start / end position could be on section start / end node

Definition at line 1579 of file undobj.cxx.

References SwPosition::GetNode(), IsAtEndOfSection(), and SwNode::IsEndNode().

Referenced by IsDestroyFrameAnchoredAtChar(), and IsSelectFrameAnchoredAtPara().

◆ IsAtStartOfSection()

static bool IsAtStartOfSection ( SwPosition const &  rAnchorPos)
static

◆ IsAtStartOfSection2()

static bool IsAtStartOfSection2 ( SwPosition const &  rPos)
static

◆ IsDestroyFrameAnchoredAtChar()

bool IsDestroyFrameAnchoredAtChar ( SwPosition const &  rAnchorPos,
SwPosition const &  rStart,
SwPosition const &  rEnd,
DelContentType const  nDelContentType 
)

◆ IsFlySelectedByCursor()

bool IsFlySelectedByCursor ( SwDoc const &  rDoc,
SwPosition const &  rStart,
SwPosition const &  rEnd 
)

◆ IsNotBackspaceHeuristic()

static bool IsNotBackspaceHeuristic ( SwPosition const &  rStart,
SwPosition const &  rEnd 
)
static

◆ IsSelectFrameAnchoredAtPara()

bool IsSelectFrameAnchoredAtPara ( SwPosition const &  rAnchorPos,
SwPosition const &  rStart,
SwPosition const &  rEnd,
DelContentType const  nDelContentType 
)

◆ ShortenString()

OUString ShortenString ( const OUString &  rStr,
sal_Int32  nLength,
std::u16string_view  aFillStr 
)

Shortens a string to a maximum length.

Parameters
rStrthe string to be shortened
nLengththe maximum length for rStr
aFillStrstring to replace cut out characters with

If rStr has less than nLength characters it will be returned unaltered.

If rStr has more than nLength characters the following algorithm generates the shortened string:

frontLength = (nLength - length(aFillStr)) / 2
rearLength = nLength - length(aFillStr) - frontLength
shortenedString = concat(<first frontLength characters of rStr,
                         aFillStr,
                         <last rearLength characters of rStr>)

Preconditions:

  • nLength - length(aFillStr) >= 2
Returns
the shortened string

Definition at line 1537 of file undobj.cxx.

References nLength.

Referenced by SwUndoInsertLabel::CreateRewriter(), SwRangeRedline::GetDescr(), SwDoc::GetPaMDescr(), SwUndoDelete::GetRewriter(), SwUndoInsert::GetRewriter(), SwUndoOverwrite::GetRewriter(), SwUndoRedlineDelete::GetRewriter(), and MakeUndoReplaceRewriter().