LibreOffice Module sw (master) 1
|
#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>
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... | |
OUString GetUndoComment | ( | SwUndoId | eId | ) |
Definition at line 261 of file undobj.cxx.
References ACCEPT_REDLINE, AUTOCORRECT, AUTOFORMAT, BOOKMARK_RENAME, CHAINE, CHANGE_PAGEDESC, CHANGE_THEME, CHARFMT_CREATE, CHARFMT_DELETE, CHARFMT_RENAME, CHGFTN, CHGSECTION, CLEARTOXRANGE, COL_DELETE, COMPAREDOC, CONFLICT, COPY, CPYTBL, CREATE_PAGEDESC, DEC_LEFTMARGIN, DELBOOKMARK, DELETE, DELETE_BOOKMARKS, DELETE_FIELDS, DELETE_FORM_FIELDS, DELETE_PAGEDESC, DELETE_SECTIONS, DELGRF, DELLAYFMT, DELNUM, DELSECTION, DONTEXPAND, DRAWDELETE, DRAWGROUP, DRAWUNDO, DRAWUNGROUP, EMPTY, END, FIELD, FLYFRMFMT_DECORATIVE, 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, INSERT_PAGE_NUMBER, 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, UNCHAIN, UPDATE_BOOKMARK, UPDATE_BOOKMARKS, UPDATE_FIELD, UPDATE_FIELDS, UPDATE_FORM_FIELD, UPDATE_FORM_FIELDS, and UPDATE_SECTIONS.
Referenced by sw::UndoManager::EndUndo(), SwUndo::GetComment(), and sw::UndoManager::StartUndo().
|
static |
Definition at line 1598 of file undobj.cxx.
References SwNode::EndOfSectionNode(), SwPosition::GetContentIndex(), SwPosition::GetContentNode(), SwNodeIndex::GetNode(), SwPosition::GetNode(), SwNodes::GoPrevious(), and SwContentNode::Len().
Referenced by IsAtEndOfSection2(), and IsDestroyFrameAnchoredAtChar().
|
static |
passed start / end position could be on section start / end node
Definition at line 1621 of file undobj.cxx.
References SwPosition::GetNode(), IsAtEndOfSection(), and SwNode::IsEndNode().
Referenced by IsDestroyFrameAnchoredAtChar(), and IsSelectFrameAnchoredAtPara().
|
static |
Definition at line 1609 of file undobj.cxx.
References SwPosition::GetContentIndex(), SwPosition::GetNode(), SwPosition::GetNodes(), SwNodes::GoNext(), and SwNode::StartOfSectionNode().
Referenced by IsAtStartOfSection2(), and IsDestroyFrameAnchoredAtChar().
|
static |
Definition at line 1627 of file undobj.cxx.
References SwPosition::GetNode(), IsAtStartOfSection(), and SwNode::IsStartNode().
Referenced by IsDestroyFrameAnchoredAtChar(), and IsSelectFrameAnchoredAtPara().
bool IsDestroyFrameAnchoredAtChar | ( | SwPosition const & | rAnchorPos, |
SwPosition const & | rStart, | ||
SwPosition const & | rEnd, | ||
DelContentType const | nDelContentType | ||
) |
will DelContentIndex destroy a frame anchored at character at rAnchorPos?
Definition at line 1647 of file undobj.cxx.
References CheckNoCntnt, ExcludeFlyAtStartEnd, SwPosition::GetContentIndex(), SwPosition::GetDoc(), SwPosition::GetNode(), SwNode::GetTextNode(), IsAtEndOfSection(), IsAtEndOfSection2(), IsAtStartOfSection(), IsAtStartOfSection2(), SwDoc::IsInWriterfilterImport(), IsNotBackspaceHeuristic(), SwTextNode::Len(), and WriterfilterHack.
Referenced by SwRootFrame::CalcFrameRects(), sw::DocumentContentOperationsManager::CopyFlyInFlyImpl(), SwUndoSaveContent::DelContentIndex(), DelFlyInRange(), SwAccessibleFrameBase::GetSelectedState(), SwAccessibleMap::InvalidateShapeInParaSelection(), sw::IsEmptyRange(), IsFlySelectedByCursor(), IsShown(), and SaveFlyInRange().
bool IsFlySelectedByCursor | ( | SwDoc const & | rDoc, |
SwPosition const & | rStart, | ||
SwPosition const & | rEnd | ||
) |
check at-char and at-para flys in rDoc
Definition at line 1730 of file undobj.cxx.
References SwFormatAnchor::GetAnchorId(), SwFormatAnchor::GetContentAnchor(), SwDoc::GetSpzFrameFormats(), IsDestroyFrameAnchoredAtChar(), and IsSelectFrameAnchoredAtPara().
Referenced by SwUndoDelete::CanGrouping(), sw::DocumentContentOperationsManager::DeleteRangeImplImpl(), SwEditShell::DeleteSel(), and SwCursorShell::HasSelection().
|
static |
Definition at line 1633 of file undobj.cxx.
References SwPosition::GetContentIndex(), SwPosition::GetNode(), SwPosition::GetNodeIndex(), SwNode::GetTextNode(), and SwTextNode::Len().
Referenced by IsDestroyFrameAnchoredAtChar(), and IsSelectFrameAnchoredAtPara().
bool IsSelectFrameAnchoredAtPara | ( | SwPosition const & | rAnchorPos, |
SwPosition const & | rStart, | ||
SwPosition const & | rEnd, | ||
DelContentType const | nDelContentType | ||
) |
is a fly anchored at paragraph at rAnchorPos selected?
Definition at line 1688 of file undobj.cxx.
References CheckNoCntnt, ExcludeFlyAtStartEnd, SwPosition::GetContentIndex(), SwPosition::GetDoc(), SwPosition::GetNode(), SwNode::GetTextNode(), IsAtEndOfSection2(), IsAtStartOfSection2(), SwDoc::IsInWriterfilterImport(), IsNotBackspaceHeuristic(), SwTextNode::Len(), and WriterfilterHack.
Referenced by SwRootFrame::CalcFrameRects(), sw::DocumentContentOperationsManager::CopyFlyInFlyImpl(), SwUndoSaveContent::DelContentIndex(), DelFlyInRange(), SwAccessibleFrameBase::GetSelectedState(), SwAccessibleMap::InvalidateShapeInParaSelection(), IsFlySelectedByCursor(), IsShown(), and SaveFlyInRange().
OUString ShortenString | ( | const OUString & | rStr, |
sal_Int32 | nLength, | ||
std::u16string_view | aFillStr | ||
) |
Shortens a string to a maximum length.
rStr | the string to be shortened |
nLength | the maximum length for rStr |
aFillStr | string 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:
Definition at line 1579 of file undobj.cxx.
References nLength.
Referenced by SwUndoInsertLabel::CreateRewriter(), SwRangeRedline::GetDescr(), SwDoc::GetPaMDescr(), SwUndoDelete::GetRewriter(), SwUndoInsert::GetRewriter(), SwUndoOverwrite::GetRewriter(), SwUndoRedlineDelete::GetRewriter(), and MakeUndoReplaceRewriter().