LibreOffice Module sw (master)  1
Classes | Functions
undobj.cxx File Reference
#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 <swundo.hxx>
#include <pam.hxx>
#include <pamtyp.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 <sal/log.hxx>
Include dependency graph for undobj.cxx:

Go to the source code of this file.

Classes

class  UndoRedoRedlineGuard
 

Functions

OUString GetUndoComment (SwUndoId eId)
 
OUString ShortenString (const OUString &rStr, sal_Int32 nLength, const OUString &rFillStr)
 Shortens a string to a maximum length. More...
 
static bool IsAtEndOfSection (SwPosition const &rAnchorPos)
 
static bool IsAtStartOfSection (SwPosition const &rAnchorPos)
 
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...
 

Function Documentation

OUString GetUndoComment ( SwUndoId  eId)

Definition at line 265 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_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().

static bool IsAtEndOfSection ( SwPosition const &  rAnchorPos)
static
static bool IsAtStartOfSection ( SwPosition const &  rAnchorPos)
static
bool IsDestroyFrameAnchoredAtChar ( SwPosition const &  rAnchorPos,
SwPosition const &  rStart,
SwPosition const &  rEnd,
DelContentType const  nDelContentType 
)
OUString ShortenString ( const OUString &  rStr,
sal_Int32  nLength,
const OUString &  rFillStr 
)

Shortens a string to a maximum length.

Parameters
rStrthe string to be shortened
nLengththe maximum length for rStr
rFillStrstring 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(rFillStr)) / 2
rearLength = nLength - length(rFillStr) - frontLength
shortenedString = concat(<first frontLength characters of rStr,
                         rFillStr,
                         <last rearLength characters of rStr>)

Preconditions:

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

Definition at line 1504 of file undobj.cxx.

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