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 <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 <sal/log.hxx>
Go to the source code of this file.
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) |
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 271 of file undobj.cxx.
References ACCEPT_REDLINE, assert(), 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 |
Definition at line 1547 of file undobj.cxx.
References assert(), SwNode::EndOfSectionNode(), SwIndex::GetIdxReg(), SwNodeIndex::GetNode(), SwNodes::GoPrevious(), SwPosition::nContent, and SwPosition::nNode.
Referenced by IsAtEndOfSection2(), and IsDestroyFrameAnchoredAtChar().
|
static |
passed start / end position could be on section start / end node
Definition at line 1570 of file undobj.cxx.
References SwNodeIndex::GetNode(), IsAtEndOfSection(), SwNode::IsEndNode(), and SwPosition::nNode.
Referenced by IsDestroyFrameAnchoredAtChar(), and IsSelectFrameAnchoredAtPara().
|
static |
Definition at line 1558 of file undobj.cxx.
References assert(), SwNodeIndex::GetNode(), SwNodeIndex::GetNodes(), SwPosition::nContent, SwPosition::nNode, SwNode::StartOfSectionNode(), and void().
Referenced by IsAtStartOfSection2(), and IsDestroyFrameAnchoredAtChar().
|
static |
Definition at line 1576 of file undobj.cxx.
References SwNodeIndex::GetNode(), IsAtStartOfSection(), SwNode::IsStartNode(), and SwPosition::nNode.
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 1591 of file undobj.cxx.
References assert(), CheckNoCntnt, ExcludeFlyAtStartEnd, SwPosition::GetDoc(), SwNodeIndex::GetNode(), SwNode::GetTextNode(), IsAtEndOfSection(), IsAtEndOfSection2(), IsAtStartOfSection(), IsAtStartOfSection2(), SwDoc::IsInWriterfilterImport(), IsNotBackspaceHeuristic(), SwTextNode::Len(), SwPosition::nContent, SwPosition::nNode, 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 1674 of file undobj.cxx.
References SwDoc::GetSpzFrameFormats(), IsDestroyFrameAnchoredAtChar(), and IsSelectFrameAnchoredAtPara().
Referenced by SwUndoDelete::CanGrouping(), sw::DocumentContentOperationsManager::DeleteRangeImplImpl(), SwEditShell::DeleteSel(), and SwCursorShell::HasSelection().
|
static |
Definition at line 1582 of file undobj.cxx.
References SwNodeIndex::GetIndex(), SwNodeIndex::GetNode(), SwNode::GetTextNode(), SwTextNode::Len(), SwPosition::nContent, and SwPosition::nNode.
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 1632 of file undobj.cxx.
References assert(), CheckNoCntnt, ExcludeFlyAtStartEnd, SwPosition::GetDoc(), SwNodeIndex::GetNode(), SwNode::GetTextNode(), IsAtEndOfSection2(), IsAtStartOfSection2(), SwDoc::IsInWriterfilterImport(), IsNotBackspaceHeuristic(), SwTextNode::Len(), SwPosition::nContent, SwPosition::nNode, 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, | ||
const OUString & | rFillStr | ||
) |
Shortens a string to a maximum length.
rStr | the string to be shortened |
nLength | the maximum length for rStr |
rFillStr | 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(rFillStr)) / 2 rearLength = nLength - length(rFillStr) - frontLength shortenedString = concat(<first frontLength characters of rStr, rFillStr, <last rearLength characters of rStr>)
Preconditions:
Definition at line 1528 of file undobj.cxx.
References assert().
Referenced by SwUndoInsertLabel::CreateRewriter(), SwRangeRedline::GetDescr(), SwDoc::GetPaMDescr(), SwUndoOverwrite::GetRewriter(), SwUndoRedlineDelete::GetRewriter(), SwUndoInsert::GetRewriter(), SwUndoDelete::GetRewriter(), and MakeUndoReplaceRewriter().