summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-03-16 09:11:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-16 07:56:25 +0000
commit8ae9dcec653c4ad3eeb8c3e1fa9b1684e2bd64a2 (patch)
treed72e1a17603bb146cce0d02ffeec46acb57335c6 /sw
parent3b7d751ad4f950aae0641a75b2ea993025629c9d (diff)
convert SwUndoId to scoped enum
Change-Id: I782fdd53641c0d7c629265b6179de70aa54382f9 Reviewed-on: https://gerrit.libreoffice.org/35246 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/IDocumentUndoRedo.hxx12
-rw-r--r--sw/inc/SwUndoField.hxx2
-rw-r--r--sw/inc/editsh.hxx4
-rw-r--r--sw/inc/swundo.hxx282
-rw-r--r--sw/qa/extras/tiledrendering/tiledrendering.cxx4
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx4
-rw-r--r--sw/source/core/crsr/bookmrk.cxx8
-rw-r--r--sw/source/core/crsr/crstrvl.cxx4
-rw-r--r--sw/source/core/crsr/findattr.cxx4
-rw-r--r--sw/source/core/crsr/findcoll.cxx4
-rw-r--r--sw/source/core/crsr/findtxt.cxx4
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx12
-rw-r--r--sw/source/core/doc/DocumentRedlineManager.cxx18
-rw-r--r--sw/source/core/doc/dbgoutsw.cxx2
-rw-r--r--sw/source/core/doc/doc.cxx12
-rw-r--r--sw/source/core/doc/doccomp.cxx8
-rw-r--r--sw/source/core/doc/docdraw.cxx4
-rw-r--r--sw/source/core/doc/docfly.cxx16
-rw-r--r--sw/source/core/doc/docglos.cxx4
-rw-r--r--sw/source/core/doc/doclay.cxx4
-rw-r--r--sw/source/core/doc/docnew.cxx4
-rw-r--r--sw/source/core/doc/docnum.cxx18
-rw-r--r--sw/source/core/doc/docredln.cxx6
-rw-r--r--sw/source/core/doc/docruby.cxx4
-rw-r--r--sw/source/core/doc/docsort.cxx4
-rw-r--r--sw/source/core/doc/doctxm.cxx8
-rw-r--r--sw/source/core/doc/extinput.cxx4
-rw-r--r--sw/source/core/doc/tblrwcl.cxx20
-rw-r--r--sw/source/core/docnode/ndsect.cxx8
-rw-r--r--sw/source/core/docnode/ndtbl.cxx42
-rw-r--r--sw/source/core/draw/dflyobj.cxx4
-rw-r--r--sw/source/core/draw/dview.cxx4
-rw-r--r--sw/source/core/edit/acorrect.cxx4
-rw-r--r--sw/source/core/edit/autofmt.cxx8
-rw-r--r--sw/source/core/edit/edatmisc.cxx12
-rw-r--r--sw/source/core/edit/edattr.cxx4
-rw-r--r--sw/source/core/edit/eddel.cxx14
-rw-r--r--sw/source/core/edit/edfcol.cxx4
-rw-r--r--sw/source/core/edit/edfld.cxx4
-rw-r--r--sw/source/core/edit/edglbldc.cxx12
-rw-r--r--sw/source/core/edit/editsh.cxx16
-rw-r--r--sw/source/core/edit/edlingu.cxx4
-rw-r--r--sw/source/core/edit/ednumber.cxx28
-rw-r--r--sw/source/core/edit/edsect.cxx4
-rw-r--r--sw/source/core/edit/edtab.cxx20
-rw-r--r--sw/source/core/edit/edtox.cxx4
-rw-r--r--sw/source/core/edit/edundo.cxx12
-rw-r--r--sw/source/core/frmedt/fecopy.cxx8
-rw-r--r--sw/source/core/frmedt/fefly1.cxx8
-rw-r--r--sw/source/core/frmedt/feshview.cxx16
-rw-r--r--sw/source/core/frmedt/fetab.cxx8
-rw-r--r--sw/source/core/frmedt/fews.cxx2
-rw-r--r--sw/source/core/inc/UndoNumbering.hxx2
-rw-r--r--sw/source/core/layout/flycnt.cxx4
-rw-r--r--sw/source/core/undo/SwUndoField.cxx2
-rw-r--r--sw/source/core/undo/SwUndoFmt.cxx24
-rw-r--r--sw/source/core/undo/SwUndoPageDesc.cxx8
-rw-r--r--sw/source/core/undo/SwUndoTOXChange.cxx2
-rw-r--r--sw/source/core/undo/docundo.cxx50
-rw-r--r--sw/source/core/undo/unattr.cxx30
-rw-r--r--sw/source/core/undo/unbkmk.cxx6
-rw-r--r--sw/source/core/undo/undel.cxx2
-rw-r--r--sw/source/core/undo/undobj.cxx10
-rw-r--r--sw/source/core/undo/undobj1.cxx12
-rw-r--r--sw/source/core/undo/undoflystrattr.cxx12
-rw-r--r--sw/source/core/undo/undraw.cxx10
-rw-r--r--sw/source/core/undo/unfmco.cxx2
-rw-r--r--sw/source/core/undo/unins.cxx10
-rw-r--r--sw/source/core/undo/unmove.cxx4
-rw-r--r--sw/source/core/undo/unnum.cxx24
-rw-r--r--sw/source/core/undo/unoutl.cxx2
-rw-r--r--sw/source/core/undo/unovwr.cxx4
-rw-r--r--sw/source/core/undo/unredln.cxx26
-rw-r--r--sw/source/core/undo/unsect.cxx6
-rw-r--r--sw/source/core/undo/unsort.cxx4
-rw-r--r--sw/source/core/undo/unspnd.cxx2
-rw-r--r--sw/source/core/undo/untbl.cxx46
-rw-r--r--sw/source/core/undo/untblk.cxx4
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx8
-rw-r--r--sw/source/core/unocore/unodraw.cxx8
-rw-r--r--sw/source/core/unocore/unoframe.cxx12
-rw-r--r--sw/source/core/unocore/unoobj.cxx16
-rw-r--r--sw/source/core/unocore/unoobj2.cxx12
-rw-r--r--sw/source/core/unocore/unosect.cxx6
-rw-r--r--sw/source/core/unocore/unotbl.cxx8
-rw-r--r--sw/source/core/unocore/unotext.cxx24
-rw-r--r--sw/source/filter/basflt/shellio.cxx4
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx4
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx4
-rw-r--r--sw/source/ui/misc/insfnote.cxx4
-rw-r--r--sw/source/uibase/app/appenv.cxx4
-rw-r--r--sw/source/uibase/app/docst.cxx4
-rw-r--r--sw/source/uibase/app/docstyle.cxx4
-rw-r--r--sw/source/uibase/dochdl/gloshdl.cxx4
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx16
-rw-r--r--sw/source/uibase/docvw/PageBreakWin.cxx4
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx8
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx12
-rw-r--r--sw/source/uibase/index/toxmgr.cxx4
-rw-r--r--sw/source/uibase/lingu/hhcwrp.cxx8
-rw-r--r--sw/source/uibase/lingu/olmenu.cxx2
-rw-r--r--sw/source/uibase/misc/redlndlg.cxx2
-rw-r--r--sw/source/uibase/ribbar/drawbase.cxx2
-rw-r--r--sw/source/uibase/ribbar/inputwin.cxx4
-rw-r--r--sw/source/uibase/shells/annotsh.cxx12
-rw-r--r--sw/source/uibase/shells/basesh.cxx18
-rw-r--r--sw/source/uibase/shells/drawsh.cxx16
-rw-r--r--sw/source/uibase/shells/drwbassh.cxx4
-rw-r--r--sw/source/uibase/shells/grfsh.cxx12
-rw-r--r--sw/source/uibase/shells/tabsh.cxx14
-rw-r--r--sw/source/uibase/shells/textdrw.cxx4
-rw-r--r--sw/source/uibase/shells/textsh.cxx6
-rw-r--r--sw/source/uibase/shells/textsh1.cxx22
-rw-r--r--sw/source/uibase/shells/txtattr.cxx8
-rw-r--r--sw/source/uibase/table/tablemgr.cxx4
-rw-r--r--sw/source/uibase/uiview/formatclipboard.cxx4
-rw-r--r--sw/source/uibase/uiview/view2.cxx2
-rw-r--r--sw/source/uibase/uiview/viewling.cxx12
-rw-r--r--sw/source/uibase/uiview/viewsrch.cxx2
-rw-r--r--sw/source/uibase/utlui/content.cxx4
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx32
-rw-r--r--sw/source/uibase/wrtsh/wrtsh2.cxx10
122 files changed, 705 insertions, 707 deletions
diff --git a/sw/inc/IDocumentUndoRedo.hxx b/sw/inc/IDocumentUndoRedo.hxx
index 15a9156100b7..62e057131bd7 100644
--- a/sw/inc/IDocumentUndoRedo.hxx
+++ b/sw/inc/IDocumentUndoRedo.hxx
@@ -106,7 +106,7 @@ public:
@param pRewriter rewriter for comments @see SwUndo::GetComment
If the given nUndoId is equal to zero an undo object with ID
- UNDO_START will be generated.
+ SwUndoId::START will be generated.
@return the undo ID of the created object
*/
@@ -121,11 +121,11 @@ public:
@param nUndoId undo ID for the list action
@param pRewriter rewriter for comments @see SwUndo::GetComment
- If the given nUndoId is not UNDO_EMPTY or UNDO_END, the comment of
+ If the given nUndoId is not SwUndoId::EMPTY or SwUndoId::END, the comment of
the resulting list action will be set via the nUndoId, applying the
given pRewriter (if not 0). Otherwise the comment of the resulting
- list action is unchanged if it has an UndoId that is not UNDO_START
- set by StartUndo, and in case the UndoId is UNDO_START the comment
+ list action is unchanged if it has an UndoId that is not SwUndoId::START
+ set by StartUndo, and in case the UndoId is SwUndoId::START the comment
of the list action defaults to the comment of the last action
contained in the list action.
*/
@@ -184,13 +184,13 @@ public:
@param o_pStr if not 0, receives comment of last Undo action
if it is Repeat capable.
@return Id of last Undo action if it is Repeat capable,
- or UNDO_EMPTY if there is none or it is not Repeat capable.
+ or SwUndoId::EMPTY if there is none or it is not Repeat capable.
*/
virtual SwUndoId GetRepeatInfo(OUString *const o_pStr) const = 0;
/** Add new Undo action.
Takes over ownership of pUndo.
- @remark calls ClearRedo(), except for UNDO_START/UNDO_END.
+ @remark calls ClearRedo(), except for SwUndoId::START/SwUndoId::END.
@remark does nothing if !DoesUndo().
*/
virtual void AppendUndo(SwUndo *const pUndo) = 0;
diff --git a/sw/inc/SwUndoField.hxx b/sw/inc/SwUndoField.hxx
index a2c7589dd18c..50825408dd67 100644
--- a/sw/inc/SwUndoField.hxx
+++ b/sw/inc/SwUndoField.hxx
@@ -37,7 +37,7 @@ protected:
SwPosition GetPosition();
public:
- SwUndoField(const SwPosition & rPos, SwUndoId nId = UNDO_FIELD );
+ SwUndoField(const SwPosition & rPos, SwUndoId nId = SwUndoId::FIELD );
virtual ~SwUndoField() override;
};
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index cf8f91d96bc6..c352a647ab5e 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -556,10 +556,10 @@ public:
void DelAllUndoObj();
/// Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
- SwUndoId StartUndo( SwUndoId eUndoId = UNDO_EMPTY, const SwRewriter * pRewriter = nullptr );
+ SwUndoId StartUndo( SwUndoId eUndoId = SwUndoId::EMPTY, const SwRewriter * pRewriter = nullptr );
/// Closes parenthesis of nUndoId, not used by UI.
- SwUndoId EndUndo( SwUndoId eUndoId = UNDO_EMPTY, const SwRewriter * pRewriter = nullptr );
+ SwUndoId EndUndo( SwUndoId eUndoId = SwUndoId::EMPTY, const SwRewriter * pRewriter = nullptr );
bool GetLastUndoInfo(OUString *const o_pStr,
SwUndoId *const o_pId,
diff --git a/sw/inc/swundo.hxx b/sw/inc/swundo.hxx
index c87b5e57194b..5ddc3ca23c1d 100644
--- a/sw/inc/swundo.hxx
+++ b/sw/inc/swundo.hxx
@@ -16,8 +16,8 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SW_INC_SWUNDO_HXX
-#define INCLUDED_SW_INC_SWUNDO_HXX
+#ifndef INCLUDED_SW_INC_SWHXX
+#define INCLUDED_SW_INC_SWHXX
#include <vector>
@@ -26,153 +26,153 @@
typedef std::vector< OUString > SwUndoComments_t;
// The IDs for StdActions.
-enum SwUndoId
+enum class SwUndoId
{
- UNDO_EMPTY = 0,
- UNDO_STD_BEGIN = 1,
- UNDO_START = UNDO_STD_BEGIN, // 1
- UNDO_END, // 2
+ EMPTY = 0,
+ STD_BEGIN = 1,
+ START = STD_BEGIN, // 1
+ END, // 2
+
REPEAT_START, // All UndoIDs between REPEAT_START and
// REPEAT_END are Repeat-enabled !!
- UNDO_DELETE = REPEAT_START, // 3
- UNDO_INSERT, // 4
- UNDO_OVERWRITE, // 5
- UNDO_SPLITNODE, // 6
- UNDO_INSATTR, // 7
- UNDO_SETFMTCOLL, // 8
- UNDO_RESETATTR, // 9
- UNDO_INSFMTATTR, // 10
- UNDO_INSDOKUMENT, // 11
- UNDO_COPY, // 12
- UNDO_INSTABLE, // 13
- UNDO_TABLETOTEXT, // 14
- UNDO_TEXTTOTABLE, // 15
- UNDO_SORT_TXT, // 16
- UNDO_INSLAYFMT, // 17
- UNDO_TABLEHEADLINE, // 18
- UNDO_INSSECTION, // 19
- UNDO_OUTLINE_LR, // 20
- UNDO_OUTLINE_UD, // 21
- UNDO_INSNUM, // 22
- UNDO_NUMUP, // 23
- UNDO_MOVENUM, // 24
- UNDO_INSDRAWFMT, // 25
- UNDO_NUMORNONUM, // 26
- UNDO_INC_LEFTMARGIN, // 27
- UNDO_DEC_LEFTMARGIN, // 28
- UNDO_INSERTLABEL, // 29
- UNDO_SETNUMRULESTART, // 30
- UNDO_CHGFTN, // 31
- UNDO_REDLINE, // 32
- UNDO_ACCEPT_REDLINE, // 33
- UNDO_REJECT_REDLINE, // 34
- UNDO_SPLIT_TABLE, // 35
- UNDO_DONTEXPAND, // 36
- UNDO_AUTOCORRECT, // 37
- UNDO_MERGE_TABLE, // 38
- UNDO_TRANSLITERATE, // 39
-
- UNDO_PASTE_CLIPBOARD, // 40
- UNDO_TYPING, // 41
- UNDO_REPEAT_DUMMY_6, // 42
- UNDO_REPEAT_DUMMY_7, // 43
- UNDO_REPEAT_DUMMY_8, // 44
- UNDO_REPEAT_DUMMY_9, // 45
- REPEAT_END,
+ DELETE = REPEAT_START, // 3
+ INSERT, // 4
+ OVERWRITE, // 5
+ SPLITNODE, // 6
+ INSATTR, // 7
+ SETFMTCOLL, // 8
+ RESETATTR, // 9
+ INSFMTATTR, // 10
+ INSDOKUMENT, // 11
+ COPY, // 12
+ INSTABLE, // 13
+ TABLETOTEXT, // 14
+ TEXTTOTABLE, // 15
+ SORT_TXT, // 16
+ INSLAYFMT, // 17
+ TABLEHEADLINE, // 18
+ INSSECTION, // 19
+ OUTLINE_LR, // 20
+ OUTLINE_UD, // 21
+ INSNUM, // 22
+ NUMUP, // 23
+ MOVENUM, // 24
+ INSDRAWFMT, // 25
+ NUMORNONUM, // 26
+ INC_LEFTMARGIN, // 27
+ DEC_LEFTMARGIN, // 28
+ INSERTLABEL, // 29
+ SETNUMRULESTART, // 30
+ CHGFTN, // 31
+ REDLINE, // 32
+ ACCEPT_REDLINE, // 33
+ REJECT_REDLINE, // 34
+ SPLIT_TABLE, // 35
+ DONTEXPAND, // 36
+ AUTOCORRECT, // 37
+ MERGE_TABLE, // 38
+ TRANSLITERATE, // 39
+ PASTE_CLIPBOARD, // 40
+ TYPING, // 41
+ REPEAT_DUMMY_6, // 42
+ REPEAT_DUMMY_7, // 43
+ REPEAT_DUMMY_8, // 44
+ REPEAT_DUMMY_9, // 45
- UNDO_MOVE = REPEAT_END, // 46
- UNDO_INSGLOSSARY, // 47
- UNDO_DELBOOKMARK, // 48
- UNDO_INSBOOKMARK, // 49
- UNDO_SORT_TBL, // 50
- UNDO_DELLAYFMT, // 51
- UNDO_AUTOFORMAT, // 52
- UNDO_REPLACE, // 53
- UNDO_DELSECTION, // 54
- UNDO_CHGSECTION, // 55
- UNDO_CHGSECTIONPASSWD, // 56
- UNDO_SETDEFTATTR, // 57
- UNDO_DELNUM, // 58
- UNDO_DRAWUNDO, // 59
- UNDO_DRAWGROUP, // 60
- UNDO_DRAWUNGROUP, // 61
- UNDO_DRAWDELETE, // 62
- UNDO_REREAD, // 63
- UNDO_DELGRF, // 64
- UNDO_DELOLE, // 65
- UNDO_TABLE_ATTR, // 66
- UNDO_TABLE_AUTOFMT, // 67
- UNDO_TABLE_INSCOL, // 68
- UNDO_TABLE_INSROW, // 69
- UNDO_TABLE_DELBOX, // 70
- UNDO_TABLE_SPLIT, // 71
- UNDO_TABLE_MERGE, // 72
- UNDO_TBLNUMFMT, // 73
- UNDO_INSTOX, // 74
- UNDO_CLEARTOXRANGE, // 75
- UNDO_TBLCPYTBL, // 76
- UNDO_CPYTBL, // 77
- UNDO_INS_FROM_SHADOWCRSR, // 78
- UNDO_CHAINE, // 79
- UNDO_UNCHAIN, // 80
- UNDO_FTNINFO, // 81
- UNDO_ENDNOTEINFO, // 82
- UNDO_COMPAREDOC, // 83
- UNDO_SETFLYFRMFMT, // 84
- UNDO_SETRUBYATTR, // 85
+ REPEAT_END,
- UNDO_TMPAUTOCORR, // 86
- UNDO_TOXCHANGE, // 87
- UNDO_CREATE_PAGEDESC, // 88
- UNDO_CHANGE_PAGEDESC, // 89
- UNDO_DELETE_PAGEDESC, // 90
- UNDO_HEADER_FOOTER, // 91 #i7983#
- UNDO_FIELD, // 92
- UNDO_TXTFMTCOL_CREATE, // 93
- UNDO_TXTFMTCOL_DELETE, // 94
- UNDO_TXTFMTCOL_RENAME, // 95
- UNDO_CHARFMT_CREATE, // 96
- UNDO_CHARFMT_DELETE, // 97
- UNDO_CHARFMT_RENAME, // 98
- UNDO_FRMFMT_CREATE, // 99
- UNDO_FRMFMT_DELETE, // 100
- UNDO_FRMFMT_RENAME, // 101
- UNDO_NUMRULE_CREATE,// 102
- UNDO_NUMRULE_DELETE,// 103
- UNDO_NUMRULE_RENAME,// 104
- UNDO_BOOKMARK_RENAME, // 105
- UNDO_INDEX_ENTRY_INSERT, // 106
- UNDO_INDEX_ENTRY_DELETE, // 107
- UNDO_COL_DELETE, // 108
- UNDO_ROW_DELETE, // 109
- UNDO_RENAME_PAGEDESC, // 110
- UNDO_NUMDOWN, // 111
+ MOVE = REPEAT_END, // 46
+ INSGLOSSARY, // 47
+ DELBOOKMARK, // 48
+ INSBOOKMARK, // 49
+ SORT_TBL, // 50
+ DELLAYFMT, // 51
+ AUTOFORMAT, // 52
+ REPLACE, // 53
+ DELSECTION, // 54
+ CHGSECTION, // 55
+ CHGSECTIONPASSWD, // 56
+ SETDEFTATTR, // 57
+ DELNUM, // 58
+ DRAWUNDO, // 59
+ DRAWGROUP, // 60
+ DRAWUNGROUP, // 61
+ DRAWDELETE, // 62
+ REREAD, // 63
+ DELGRF, // 64
+ DELOLE, // 65
+ TABLE_ATTR, // 66
+ TABLE_AUTOFMT, // 67
+ TABLE_INSCOL, // 68
+ TABLE_INSROW, // 69
+ TABLE_DELBOX, // 70
+ TABLE_SPLIT, // 71
+ TABLE_MERGE, // 72
+ TBLNUMFMT, // 73
+ INSTOX, // 74
+ CLEARTOXRANGE, // 75
+ TBLCPYTBL, // 76
+ CPYTBL, // 77
+ INS_FROM_SHADOWCRSR, // 78
+ CHAINE, // 79
+ UNCHAIN, // 80
+ FTNINFO, // 81
+ ENDNOTEINFO, // 82
+ COMPAREDOC, // 83
+ SETFLYFRMFMT, // 84
+ SETRUBYATTR, // 85
+ TMPAUTOCORR, // 86
+ TOXCHANGE, // 87
+ CREATE_PAGEDESC, // 88
+ CHANGE_PAGEDESC, // 89
+ DELETE_PAGEDESC, // 90
+ HEADER_FOOTER, // 91 #i7983#
+ FIELD, // 92
+ TXTFMTCOL_CREATE, // 93
+ TXTFMTCOL_DELETE, // 94
+ TXTFMTCOL_RENAME, // 95
+ CHARFMT_CREATE, // 96
+ CHARFMT_DELETE, // 97
+ CHARFMT_RENAME, // 98
+ FRMFMT_CREATE, // 99
+ FRMFMT_DELETE, // 100
+ FRMFMT_RENAME, // 101
+ NUMRULE_CREATE, // 102
+ NUMRULE_DELETE, // 103
+ NUMRULE_RENAME, // 104
+ BOOKMARK_RENAME, // 105
+ INDEX_ENTRY_INSERT, // 106
+ INDEX_ENTRY_DELETE, // 107
+ COL_DELETE, // 108
+ ROW_DELETE, // 109
+ RENAME_PAGEDESC, // 110
+ NUMDOWN, // 111
// --> #i73249#
- UNDO_FLYFRMFMT_TITLE, // 112
- UNDO_FLYFRMFMT_DESCRIPTION, // 113
- UNDO_TBLSTYLE_CREATE, // 114
- UNDO_TBLSTYLE_DELETE, // 115
- UNDO_TBLSTYLE_UPDATE, // 116
- UNDO_STD_END= UNDO_TBLSTYLE_UPDATE,
+ FLYFRMFMT_TITLE, // 112
+ FLYFRMFMT_DESCRIPTION, // 113
+ TBLSTYLE_CREATE, // 114
+ TBLSTYLE_DELETE, // 115
+ TBLSTYLE_UPDATE, // 116
+ STD_END = TBLSTYLE_UPDATE,
// UI undo ID's...
- UNDO_UI_REPLACE = UNDO_STD_END + 1,
- UNDO_UI_INSERT_PAGE_BREAK,
- UNDO_UI_INSERT_COLUMN_BREAK,
- UNDO_UI_PLAY_MACRO,
- UNDO_UI_INSERT_ENVELOPE,
- UNDO_UI_DRAG_AND_COPY,
- UNDO_UI_DRAG_AND_MOVE,
- UNDO_UI_INSERT_CHART,
- UNDO_UI_INSERT_FOOTNOTE,
- UNDO_UI_INSERT_URLBTN,
- UNDO_UI_INSERT_URLTXT,
- UNDO_UI_DELETE_INVISIBLECNTNT,
- UNDO_UI_REPLACE_STYLE,
- UNDO_UI_DELETE_PAGE_BREAK,
- UNDO_UI_TEXT_CORRECTION,
- UNDO_UI_TABLE_DELETE,
- UNDO_CONFLICT
+ UI_REPLACE = STD_END + 1,
+ UI_INSERT_PAGE_BREAK,
+ UI_INSERT_COLUMN_BREAK,
+ UI_PLAY_MACRO,
+ UI_INSERT_ENVELOPE,
+ UI_DRAG_AND_COPY,
+ UI_DRAG_AND_MOVE,
+ UI_INSERT_CHART,
+ UI_INSERT_FOOTNOTE,
+ UI_INSERT_URLBTN,
+ UI_INSERT_URLTXT,
+ UI_DELETE_INVISIBLECNTNT,
+ UI_REPLACE_STYLE,
+ UI_DELETE_PAGE_BREAK,
+ UI_TEXT_CORRECTION,
+ UI_TABLE_DELETE,
+ CONFLICT
};
#endif
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 6fbcded9ff1f..a4275ff25d30 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -1647,7 +1647,7 @@ void SwTiledRenderingTest::testUndoRepairResult()
SfxLokHelper::setView(nView2);
comphelper::dispatchCommand(".uno:Undo", {}, xListener);
Scheduler::ProcessEventsToIdle();
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(UNDO_CONFLICT), pResult2->m_nDocRepair);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(SwUndoId::CONFLICT), pResult2->m_nDocRepair);
mxComponent->dispose();
mxComponent.clear();
@@ -1682,7 +1682,7 @@ void SwTiledRenderingTest::testRedoRepairResult()
SfxLokHelper::setView(nView2);
comphelper::dispatchCommand(".uno:Redo", {}, xListener);
Scheduler::ProcessEventsToIdle();
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(UNDO_CONFLICT), pResult2->m_nDocRepair);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(SwUndoId::CONFLICT), pResult2->m_nDocRepair);
mxComponent->dispose();
mxComponent.clear();
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index af266fac0f15..d906f3f56228 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -3214,14 +3214,14 @@ void SwUiWriterTest::testShapeAnchorUndo()
Rectangle aOrigLogicRect(pObject->GetLogicRect());
sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
- rUndoManager.StartUndo(UNDO_START, nullptr);
+ rUndoManager.StartUndo(SwUndoId::START, nullptr);
pWrtShell->SelectObj(Point(), 0, pObject);
pWrtShell->GetDrawView()->MoveMarkedObj(Size(100, 100));
pWrtShell->ChgAnchor(0, true);
- rUndoManager.EndUndo(UNDO_END, nullptr);
+ rUndoManager.EndUndo(SwUndoId::END, nullptr);
CPPUNIT_ASSERT(aOrigLogicRect != pObject->GetLogicRect());
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index b688a30c7240..ec13274d28d4 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -70,7 +70,7 @@ namespace
const sal_Unicode aStartMark,
const sal_Unicode aEndMark)
{
- io_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_UI_REPLACE, nullptr);
+ io_pDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::UI_REPLACE, nullptr);
SwPosition start = pField->GetMarkStart();
if (aEndMark != CH_TXT_ATR_FORMELEMENT)
@@ -91,7 +91,7 @@ namespace
++rEnd.nContent;
}
- io_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_UI_REPLACE, nullptr);
+ io_pDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::UI_REPLACE, nullptr);
};
void lcl_RemoveFieldMarks(Fieldmark* const pField,
@@ -99,7 +99,7 @@ namespace
const sal_Unicode aStartMark,
const sal_Unicode aEndMark)
{
- io_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_UI_REPLACE, nullptr);
+ io_pDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::UI_REPLACE, nullptr);
const SwPosition& rStart = pField->GetMarkStart();
SwTextNode const*const pStartTextNode = rStart.nNode.GetNode().GetTextNode();
@@ -128,7 +128,7 @@ namespace
--aEnd.Start()->nContent;
io_pDoc->getIDocumentContentOperations().DeleteRange(aEnd);
- io_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_UI_REPLACE, nullptr);
+ io_pDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::UI_REPLACE, nullptr);
};
}
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index d756d994a6d4..80d9823c2a09 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -1857,7 +1857,7 @@ bool SwCursorShell::SetShadowCursorPos( const Point& rPt, SwFillMode eFillMode )
StartAction();
SwContentNode* pCNd = aPos.nNode.GetNode().GetContentNode();
- SwUndoId nUndoId = UNDO_INS_FROM_SHADOWCRSR;
+ SwUndoId nUndoId = SwUndoId::INS_FROM_SHADOWCRSR;
// If only the paragraph attributes "Adjust" or "LRSpace" are set,
// then the following should not delete those again.
if( 0 == aFPos.nParaCnt + aFPos.nColumnCnt &&
@@ -1865,7 +1865,7 @@ bool SwCursorShell::SetShadowCursorPos( const Point& rPt, SwFillMode eFillMode )
( text::HoriOrientation::NONE != aFPos.eOrient &&
0 == aFPos.nTabCnt + aFPos.nSpaceCnt )) &&
pCNd && pCNd->Len() )
- nUndoId = UNDO_EMPTY;
+ nUndoId = SwUndoId::EMPTY;
GetDoc()->GetIDocumentUndoRedo().StartUndo( nUndoId, nullptr );
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index 09c0153a2cf4..bf0ec9142114 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -1235,7 +1235,7 @@ sal_uLong SwCursor::Find( const SfxItemSet& rSet, bool bNoCollections,
bool const bStartUndo = pDoc->GetIDocumentUndoRedo().DoesUndo() && bReplace;
if (bStartUndo)
{
- pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_REPLACE, nullptr );
+ pDoc->GetIDocumentUndoRedo().StartUndo( SwUndoId::REPLACE, nullptr );
}
SwFindParaAttr aSwFindParaAttr( rSet, bNoCollections, pSearchOpt,
@@ -1248,7 +1248,7 @@ sal_uLong SwCursor::Find( const SfxItemSet& rSet, bool bNoCollections,
if (bStartUndo)
{
- pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_REPLACE, nullptr );
+ pDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::REPLACE, nullptr );
}
return nRet;
diff --git a/sw/source/core/crsr/findcoll.cxx b/sw/source/core/crsr/findcoll.cxx
index b70b702c2e93..cfba274b6c94 100644
--- a/sw/source/core/crsr/findcoll.cxx
+++ b/sw/source/core/crsr/findcoll.cxx
@@ -80,7 +80,7 @@ sal_uLong SwCursor::Find( const SwTextFormatColl& rFormatColl, SwDocPositions nS
aRewriter.AddRule(UndoArg2, SW_RES(STR_YIELDS));
aRewriter.AddRule(UndoArg3, pReplFormatColl->GetName());
- pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_UI_REPLACE_STYLE,
+ pDoc->GetIDocumentUndoRedo().StartUndo( SwUndoId::UI_REPLACE_STYLE,
&aRewriter );
}
@@ -94,7 +94,7 @@ sal_uLong SwCursor::Find( const SwTextFormatColl& rFormatColl, SwDocPositions nS
if (bStartUndo)
{
- pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_END, nullptr);
+ pDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::END, nullptr);
}
return nRet;
}
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 91f477c64a21..1ffffa9532aa 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -723,7 +723,7 @@ sal_uLong SwCursor::Find( const i18nutil::SearchOptions2& rSearchOpt, bool bSear
bool const bStartUndo = pDoc->GetIDocumentUndoRedo().DoesUndo() && bReplace;
if (bStartUndo)
{
- pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_REPLACE, nullptr );
+ pDoc->GetIDocumentUndoRedo().StartUndo( SwUndoId::REPLACE, nullptr );
}
bool bSearchSel = 0 != (rSearchOpt.searchFlag & SearchFlags::REG_NOT_BEGINOFLINE);
@@ -739,7 +739,7 @@ sal_uLong SwCursor::Find( const i18nutil::SearchOptions2& rSearchOpt, bool bSear
{
SwRewriter rewriter(MakeUndoReplaceRewriter(
nRet, rSearchOpt.searchString, rSearchOpt.replaceString));
- pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_REPLACE, & rewriter );
+ pDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::REPLACE, & rewriter );
}
return nRet;
}
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index f935aa060a4f..a842102340cc 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -3559,8 +3559,8 @@ bool DocumentContentOperationsManager::DeleteAndJoinWithRedlineImpl( SwPaM & rPa
m_rDoc.getIDocumentRedlineAccess().SetRedlineFlags(
RedlineFlags::On | RedlineFlags::ShowInsert | RedlineFlags::ShowDelete );
- m_rDoc.GetIDocumentUndoRedo().StartUndo( UNDO_DELETE, nullptr );
- pUndo = new SwUndoRedlineDelete( rPam, UNDO_DELETE );
+ m_rDoc.GetIDocumentUndoRedo().StartUndo( SwUndoId::DELETE, nullptr );
+ pUndo = new SwUndoRedlineDelete( rPam, SwUndoId::DELETE );
m_rDoc.GetIDocumentUndoRedo().AppendUndo( pUndo );
}
@@ -3570,7 +3570,7 @@ bool DocumentContentOperationsManager::DeleteAndJoinWithRedlineImpl( SwPaM & rPa
if ( pUndo )
{
- m_rDoc.GetIDocumentUndoRedo().EndUndo( UNDO_EMPTY, nullptr );
+ m_rDoc.GetIDocumentUndoRedo().EndUndo( SwUndoId::EMPTY, nullptr );
// ??? why the hell is the AppendUndo not below the
// CanGrouping, so this hideous cleanup wouldn't be necessary?
// bah, this is redlining, probably changing this would break it...
@@ -3859,7 +3859,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt
m_rDoc.GetDocumentRedlineManager().checkRedlining(eOld);
if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
{
- m_rDoc.GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
+ m_rDoc.GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
// If any Redline will change (split!) the node
const ::sw::mark::IMark* pBkmk = m_rDoc.getIDocumentMarkAccess()->makeMark( aDelPam, OUString(), IDocumentMarkAccess::MarkType::UNO_BOOKMARK );
@@ -3942,7 +3942,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt
if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
{
SwUndo *const pUndoRD =
- new SwUndoRedlineDelete( aDelPam, UNDO_REPLACE );
+ new SwUndoRedlineDelete( aDelPam, SwUndoId::REPLACE );
m_rDoc.GetIDocumentUndoRedo().AppendUndo(pUndoRD);
}
m_rDoc.getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_DELETE, aDelPam ), true);
@@ -3951,7 +3951,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt
if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
{
*aDelPam.GetPoint() = *rPam.GetPoint();
- m_rDoc.GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr);
+ m_rDoc.GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
// If any Redline will change (split!) the node
const ::sw::mark::IMark* pBkmk = m_rDoc.getIDocumentMarkAccess()->makeMark( aDelPam, OUString(), IDocumentMarkAccess::MarkType::UNO_BOOKMARK );
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx
index 2069c3476132..9ca58a7c8974 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -1892,7 +1892,7 @@ bool DocumentRedlineManager::DeleteRedline( const SwPaM& rRange, bool bSaveInUnd
if (bSaveInUndo && m_rDoc.GetIDocumentUndoRedo().DoesUndo())
{
- SwUndoRedline* pUndo = new SwUndoRedline( UNDO_REDLINE, rRange );
+ SwUndoRedline* pUndo = new SwUndoRedline( SwUndoId::REDLINE, rRange );
if( pUndo->GetRedlSaveCount() )
{
m_rDoc.GetIDocumentUndoRedo().AppendUndo(pUndo);
@@ -2114,7 +2114,7 @@ bool DocumentRedlineManager::AcceptRedline( SwRedlineTable::size_type nPos, bool
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, pTmp->GetDescr());
- m_rDoc.GetIDocumentUndoRedo().StartUndo(UNDO_ACCEPT_REDLINE, &aRewriter);
+ m_rDoc.GetIDocumentUndoRedo().StartUndo(SwUndoId::ACCEPT_REDLINE, &aRewriter);
}
int nLoopCnt = 2;
@@ -2157,7 +2157,7 @@ bool DocumentRedlineManager::AcceptRedline( SwRedlineTable::size_type nPos, bool
if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
{
- m_rDoc.GetIDocumentUndoRedo().EndUndo(UNDO_END, nullptr);
+ m_rDoc.GetIDocumentUndoRedo().EndUndo(SwUndoId::END, nullptr);
}
}
return bRet;
@@ -2180,7 +2180,7 @@ bool DocumentRedlineManager::AcceptRedline( const SwPaM& rPam, bool bCallDelete
if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
{
- m_rDoc.GetIDocumentUndoRedo().StartUndo( UNDO_ACCEPT_REDLINE, nullptr );
+ m_rDoc.GetIDocumentUndoRedo().StartUndo( SwUndoId::ACCEPT_REDLINE, nullptr );
m_rDoc.GetIDocumentUndoRedo().AppendUndo( new SwUndoAcceptRedline( aPam ));
}
@@ -2204,7 +2204,7 @@ bool DocumentRedlineManager::AcceptRedline( const SwPaM& rPam, bool bCallDelete
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, aTmpStr);
- m_rDoc.GetIDocumentUndoRedo().EndUndo( UNDO_ACCEPT_REDLINE, &aRewriter );
+ m_rDoc.GetIDocumentUndoRedo().EndUndo( SwUndoId::ACCEPT_REDLINE, &aRewriter );
}
return nRet != 0;
@@ -2228,7 +2228,7 @@ bool DocumentRedlineManager::RejectRedline( SwRedlineTable::size_type nPos, bool
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, pTmp->GetDescr());
- m_rDoc.GetIDocumentUndoRedo().StartUndo(UNDO_REJECT_REDLINE, &aRewriter);
+ m_rDoc.GetIDocumentUndoRedo().StartUndo(SwUndoId::REJECT_REDLINE, &aRewriter);
}
int nLoopCnt = 2;
@@ -2271,7 +2271,7 @@ bool DocumentRedlineManager::RejectRedline( SwRedlineTable::size_type nPos, bool
if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
{
- m_rDoc.GetIDocumentUndoRedo().EndUndo(UNDO_END, nullptr);
+ m_rDoc.GetIDocumentUndoRedo().EndUndo(SwUndoId::END, nullptr);
}
}
return bRet;
@@ -2294,7 +2294,7 @@ bool DocumentRedlineManager::RejectRedline( const SwPaM& rPam, bool bCallDelete
if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
{
- m_rDoc.GetIDocumentUndoRedo().StartUndo( UNDO_REJECT_REDLINE, nullptr );
+ m_rDoc.GetIDocumentUndoRedo().StartUndo( SwUndoId::REJECT_REDLINE, nullptr );
m_rDoc.GetIDocumentUndoRedo().AppendUndo( new SwUndoRejectRedline(aPam) );
}
@@ -2318,7 +2318,7 @@ bool DocumentRedlineManager::RejectRedline( const SwPaM& rPam, bool bCallDelete
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, aTmpStr);
- m_rDoc.GetIDocumentUndoRedo().EndUndo( UNDO_REJECT_REDLINE, &aRewriter );
+ m_rDoc.GetIDocumentUndoRedo().EndUndo( SwUndoId::REJECT_REDLINE, &aRewriter );
}
return nRet != 0;
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index d4c95ac7936e..45fdaa220720 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -768,7 +768,7 @@ const char * dbg_out(SwNodes & rNodes)
static OUString lcl_dbg_out(const SwUndo & rUndo)
{
- return "[ " + OUString::number(rUndo.GetId())
+ return "[ " + OUString::number((int)rUndo.GetId())
+ ": " + rUndo.GetComment() + " ]";
}
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index eb51f110b016..2a2684862b29 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1313,7 +1313,7 @@ void SwDoc::Summary( SwDoc* pExtDoc, sal_uInt8 nLevel, sal_uInt8 nPara, bool bIm
bool SwDoc::RemoveInvisibleContent()
{
bool bRet = false;
- GetIDocumentUndoRedo().StartUndo( UNDO_UI_DELETE_INVISIBLECNTNT, nullptr );
+ GetIDocumentUndoRedo().StartUndo( SwUndoId::UI_DELETE_INVISIBLECNTNT, nullptr );
{
SwTextNode* pTextNd;
@@ -1474,7 +1474,7 @@ bool SwDoc::RemoveInvisibleContent()
if( bRet )
getIDocumentState().SetModified();
- GetIDocumentUndoRedo().EndUndo( UNDO_UI_DELETE_INVISIBLECNTNT, nullptr );
+ GetIDocumentUndoRedo().EndUndo( SwUndoId::UI_DELETE_INVISIBLECNTNT, nullptr );
return bRet;
}
@@ -1509,9 +1509,9 @@ bool SwDoc::HasInvisibleContent() const
bool SwDoc::RestoreInvisibleContent()
{
- SwUndoId nLastUndoId(UNDO_EMPTY);
+ SwUndoId nLastUndoId(SwUndoId::EMPTY);
if (GetIDocumentUndoRedo().GetLastUndoInfo(nullptr, & nLastUndoId)
- && (UNDO_UI_DELETE_INVISIBLECNTNT == nLastUndoId))
+ && (SwUndoId::UI_DELETE_INVISIBLECNTNT == nLastUndoId))
{
GetIDocumentUndoRedo().Undo();
GetIDocumentUndoRedo().ClearRedo();
@@ -1524,7 +1524,7 @@ bool SwDoc::ConvertFieldsToText()
{
bool bRet = false;
getIDocumentFieldsAccess().LockExpFields();
- GetIDocumentUndoRedo().StartUndo( UNDO_UI_REPLACE, nullptr );
+ GetIDocumentUndoRedo().StartUndo( SwUndoId::UI_REPLACE, nullptr );
const SwFieldTypes* pMyFieldTypes = getIDocumentFieldsAccess().GetFieldTypes();
const SwFieldTypes::size_type nCount = pMyFieldTypes->size();
@@ -1619,7 +1619,7 @@ bool SwDoc::ConvertFieldsToText()
if( bRet )
getIDocumentState().SetModified();
- GetIDocumentUndoRedo().EndUndo( UNDO_UI_REPLACE, nullptr );
+ GetIDocumentUndoRedo().EndUndo( SwUndoId::UI_REPLACE, nullptr );
getIDocumentFieldsAccess().UnlockExpFields();
return bRet;
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index 09bd3d0fd7ef..53606f2e5b28 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -1855,7 +1855,7 @@ long SwDoc::CompareDoc( const SwDoc& rDoc )
CmpOptions.nIgnoreLen = SW_MOD()->IsIgnorePieces() ? SW_MOD()->GetPieceLen() : 0;
}
- GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
+ GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
bool bDocWasModified = getIDocumentState().IsModified();
SwDoc& rSrcDoc = (SwDoc&)rDoc;
bool bSrcModified = rSrcDoc.getIDocumentState().IsModified();
@@ -1893,7 +1893,7 @@ long SwDoc::CompareDoc( const SwDoc& rDoc )
if( !bSrcModified )
rSrcDoc.getIDocumentState().ResetModified();
- GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr);
+ GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
return nRet;
}
@@ -2078,7 +2078,7 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
long nRet = 0;
- GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
+ GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
SwDoc& rSrcDoc = (SwDoc&)rDoc;
bool bSrcModified = rSrcDoc.getIDocumentState().IsModified();
@@ -2140,7 +2140,7 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::ShowInsert | RedlineFlags::ShowDelete);
- GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr);
+ GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
return nRet;
}
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index df94f1bab31c..a6c66c2b232a 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -394,7 +394,7 @@ bool SwDoc::DeleteSelection( SwDrawView& rDrawView )
const SdrMarkList &rMrkList = rDrawView.GetMarkedObjectList();
if( rMrkList.GetMarkCount() )
{
- GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
+ GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
bool bDelMarked = true;
if( 1 == rMrkList.GetMarkCount() )
@@ -476,7 +476,7 @@ bool SwDoc::DeleteSelection( SwDrawView& rDrawView )
}
getIDocumentState().SetModified();
- GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr);
+ GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
}
return bCallBase;
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index 6c1847bf0c3d..231c1785d518 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -588,7 +588,7 @@ void SwDoc::SetFlyFrameTitle( SwFlyFrameFormat& rFlyFrameFormat,
if (GetIDocumentUndoRedo().DoesUndo())
{
GetIDocumentUndoRedo().AppendUndo( new SwUndoFlyStrAttr( rFlyFrameFormat,
- UNDO_FLYFRMFMT_TITLE,
+ SwUndoId::FLYFRMFMT_TITLE,
rFlyFrameFormat.GetObjTitle(),
sNewTitle ) );
}
@@ -611,7 +611,7 @@ void SwDoc::SetFlyFrameDescription( SwFlyFrameFormat& rFlyFrameFormat,
if (GetIDocumentUndoRedo().DoesUndo())
{
GetIDocumentUndoRedo().AppendUndo( new SwUndoFlyStrAttr( rFlyFrameFormat,
- UNDO_FLYFRMFMT_DESCRIPTION,
+ SwUndoId::FLYFRMFMT_DESCRIPTION,
rFlyFrameFormat.GetObjDescription(),
sNewDescription ) );
}
@@ -730,7 +730,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
return false;
}
- GetIDocumentUndoRedo().StartUndo( UNDO_INSATTR, nullptr );
+ GetIDocumentUndoRedo().StartUndo( SwUndoId::INSATTR, nullptr );
bool bUnmark = false;
for ( size_t i = 0; i < _rMrkList.GetMarkCount(); ++i )
@@ -961,7 +961,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
}
}
- GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
+ GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
getIDocumentState().SetModified();
return bUnmark;
@@ -1069,7 +1069,7 @@ SwChainRet SwDoc::Chain( SwFrameFormat &rSource, const SwFrameFormat &rDest )
SwChainRet nErr = Chainable( rSource, rDest );
if ( nErr == SwChainRet::OK )
{
- GetIDocumentUndoRedo().StartUndo( UNDO_CHAINE, nullptr );
+ GetIDocumentUndoRedo().StartUndo( SwUndoId::CHAINE, nullptr );
SwFlyFrameFormat& rDestFormat = const_cast<SwFlyFrameFormat&>(static_cast<const SwFlyFrameFormat&>(rDest));
@@ -1102,7 +1102,7 @@ SwChainRet SwDoc::Chain( SwFrameFormat &rSource, const SwFrameFormat &rDest )
}
SetAttr( aSet, rSource );
- GetIDocumentUndoRedo().EndUndo( UNDO_CHAINE, nullptr );
+ GetIDocumentUndoRedo().EndUndo( SwUndoId::CHAINE, nullptr );
}
return nErr;
}
@@ -1112,14 +1112,14 @@ void SwDoc::Unchain( SwFrameFormat &rFormat )
SwFormatChain aChain( rFormat.GetChain() );
if ( aChain.GetNext() )
{
- GetIDocumentUndoRedo().StartUndo( UNDO_UNCHAIN, nullptr );
+ GetIDocumentUndoRedo().StartUndo( SwUndoId::UNCHAIN, nullptr );
SwFrameFormat *pFollow = aChain.GetNext();
aChain.SetNext( nullptr );
SetAttr( aChain, rFormat );
aChain = pFollow->GetChain();
aChain.SetPrev( nullptr );
SetAttr( aChain, *pFollow );
- GetIDocumentUndoRedo().EndUndo( UNDO_UNCHAIN, nullptr );
+ GetIDocumentUndoRedo().EndUndo( SwUndoId::UNCHAIN, nullptr );
}
}
diff --git a/sw/source/core/doc/docglos.cxx b/sw/source/core/doc/docglos.cxx
index 339e8b1de5b3..8c208a97e125 100644
--- a/sw/source/core/doc/docglos.cxx
+++ b/sw/source/core/doc/docglos.cxx
@@ -167,7 +167,7 @@ bool SwDoc::InsertGlossary( SwTextBlocks& rBlock, const OUString& rEntry,
aCpyPam.GetPoint()->nContent.Assign(
pContentNd, (pContentNd) ? pContentNd->Len() : 0 );
- GetIDocumentUndoRedo().StartUndo( UNDO_INSGLOSSARY, nullptr );
+ GetIDocumentUndoRedo().StartUndo( SwUndoId::INSGLOSSARY, nullptr );
SwPaM *_pStartCursor = &rPaM, *_pStartCursor2 = _pStartCursor;
do {
@@ -194,7 +194,7 @@ bool SwDoc::InsertGlossary( SwTextBlocks& rBlock, const OUString& rEntry,
pShell->SaveTableBoxContent( &rInsPos );
} while( (_pStartCursor = _pStartCursor->GetNext()) !=
_pStartCursor2 );
- GetIDocumentUndoRedo().EndUndo( UNDO_INSGLOSSARY, nullptr );
+ GetIDocumentUndoRedo().EndUndo( SwUndoId::INSGLOSSARY, nullptr );
getIDocumentFieldsAccess().UnlockExpFields();
if( !getIDocumentFieldsAccess().IsExpFieldsLocked() )
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 0aecf911b2e7..7a59d8ca5391 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -351,7 +351,7 @@ SwFlyFrameFormat* SwDoc::MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rS
{
const SwFormatAnchor& rAnch = static_cast<const SwFormatAnchor&>(rSet.Get( RES_ANCHOR ));
- GetIDocumentUndoRedo().StartUndo( UNDO_INSLAYFMT, nullptr );
+ GetIDocumentUndoRedo().StartUndo( SwUndoId::INSLAYFMT, nullptr );
SwFlyFrameFormat* pFormat = MakeFlySection( rAnch.GetAnchorId(), rPam.GetPoint(),
&rSet, pParent );
@@ -458,7 +458,7 @@ SwFlyFrameFormat* SwDoc::MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rS
getIDocumentState().SetModified();
- GetIDocumentUndoRedo().EndUndo( UNDO_INSLAYFMT, nullptr );
+ GetIDocumentUndoRedo().EndUndo( SwUndoId::INSLAYFMT, nullptr );
return pFormat;
}
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 7f95a681b43c..40831b1822e2 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -1092,7 +1092,7 @@ SwNodeIndex SwDoc::AppendDoc(const SwDoc& rSource, sal_uInt16 const nStartPageNu
<< " " << aCpyPam.GetNode().GetIndex() << ")" );
#endif
- this->GetIDocumentUndoRedo().StartUndo( UNDO_INSGLOSSARY, nullptr );
+ this->GetIDocumentUndoRedo().StartUndo( SwUndoId::INSGLOSSARY, nullptr );
this->getIDocumentFieldsAccess().LockExpFields();
// Position where the appended doc starts. Will be filled in later.
@@ -1235,7 +1235,7 @@ else
}
}
- this->GetIDocumentUndoRedo().EndUndo( UNDO_INSGLOSSARY, nullptr );
+ this->GetIDocumentUndoRedo().EndUndo( SwUndoId::INSGLOSSARY, nullptr );
getIDocumentFieldsAccess().UnlockExpFields();
getIDocumentFieldsAccess().UpdateFields(false);
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index ac0fce441e94..e3585a1954a9 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -363,7 +363,7 @@ bool SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
if (GetIDocumentUndoRedo().DoesUndo())
{
- GetIDocumentUndoRedo().StartUndo(UNDO_OUTLINE_LR, nullptr);
+ GetIDocumentUndoRedo().StartUndo(SwUndoId::OUTLINE_LR, nullptr);
SwUndo *const pUndoOLR( new SwUndoOutlineLeftRight( rPam, nOffset ) );
GetIDocumentUndoRedo().AppendUndo(pUndoOLR);
}
@@ -401,7 +401,7 @@ bool SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
}
if (GetIDocumentUndoRedo().DoesUndo())
{
- GetIDocumentUndoRedo().EndUndo(UNDO_OUTLINE_LR, nullptr);
+ GetIDocumentUndoRedo().EndUndo(SwUndoId::OUTLINE_LR, nullptr);
}
ChkCondColls();
@@ -833,7 +833,7 @@ OUString SwDoc::SetNumRule( const SwPaM& rPam,
if (GetIDocumentUndoRedo().DoesUndo())
{
// Start/End for attributes!
- GetIDocumentUndoRedo().StartUndo( UNDO_INSNUM, nullptr );
+ GetIDocumentUndoRedo().StartUndo( SwUndoId::INSNUM, nullptr );
pUndo = new SwUndoInsNum( rPam, rRule );
GetIDocumentUndoRedo().AppendUndo(pUndo);
}
@@ -936,7 +936,7 @@ OUString SwDoc::SetNumRule( const SwPaM& rPam,
if (GetIDocumentUndoRedo().DoesUndo())
{
- GetIDocumentUndoRedo().EndUndo( UNDO_INSNUM, nullptr );
+ GetIDocumentUndoRedo().EndUndo( SwUndoId::INSNUM, nullptr );
}
getIDocumentState().SetModified();
@@ -1133,7 +1133,7 @@ bool SwDoc::ReplaceNumRule( const SwPosition& rPos,
if (GetIDocumentUndoRedo().DoesUndo())
{
// Start/End for attributes!
- GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
+ GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
pUndo = new SwUndoInsNum( rPos, *pNewRule, rOldRule );
GetIDocumentUndoRedo().AppendUndo(pUndo);
}
@@ -1170,7 +1170,7 @@ bool SwDoc::ReplaceNumRule( const SwPosition& rPos,
pTextNd->NumRuleChgd();
}
}
- GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
+ GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
getIDocumentState().SetModified();
bRet = true;
@@ -1889,7 +1889,7 @@ bool SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, bool bIsOutlMv )
if( !pOwnRedl )
{
- GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
+ GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
// First the Insert, then the Delete
SwPosition aInsPos( aIdx );
@@ -1968,7 +1968,7 @@ bool SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, bool bIsOutlMv )
// Still NEEDS to be optimized (even after 14 years)
getIDocumentRedlineAccess().SetRedlineFlags(
RedlineFlags::On | RedlineFlags::ShowInsert | RedlineFlags::ShowDelete );
- SwUndo *const pUndo(new SwUndoRedlineDelete(aPam, UNDO_DELETE));
+ SwUndo *const pUndo(new SwUndoRedlineDelete(aPam, SwUndoId::DELETE));
GetIDocumentUndoRedo().AppendUndo(pUndo);
}
@@ -1984,7 +1984,7 @@ bool SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, bool bIsOutlMv )
// Still NEEDS to be optimized!
getIDocumentRedlineAccess().SetRedlineFlags( eOld );
- GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
+ GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
getIDocumentState().SetModified();
return true;
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 555cff796b59..a932cf88728f 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -139,7 +139,7 @@ bool SwExtraRedlineTable::DeleteAllTableRedlines( SwDoc* pDoc, const SwTable& rT
{
// #TODO - Add 'Undo' support for deleting 'Table Cell' redlines
/*
- SwUndoRedline* pUndo = new SwUndoRedline( UNDO_REDLINE, rRange );
+ SwUndoRedline* pUndo = new SwUndoRedline( SwUndoId::REDLINE, rRange );
if( pUndo->GetRedlSaveCount() )
{
GetIDocumentUndoRedo().AppendUndo(pUndo);
@@ -218,7 +218,7 @@ bool SwExtraRedlineTable::DeleteTableRowRedline( SwDoc* pDoc, const SwTableLine&
{
// #TODO - Add 'Undo' support for deleting 'Table Cell' redlines
/*
- SwUndoRedline* pUndo = new SwUndoRedline( UNDO_REDLINE, rRange );
+ SwUndoRedline* pUndo = new SwUndoRedline( SwUndoId::REDLINE, rRange );
if( pUndo->GetRedlSaveCount() )
{
GetIDocumentUndoRedo().AppendUndo(pUndo);
@@ -265,7 +265,7 @@ bool SwExtraRedlineTable::DeleteTableCellRedline( SwDoc* pDoc, const SwTableBox&
{
// #TODO - Add 'Undo' support for deleting 'Table Cell' redlines
/*
- SwUndoRedline* pUndo = new SwUndoRedline( UNDO_REDLINE, rRange );
+ SwUndoRedline* pUndo = new SwUndoRedline( SwUndoId::REDLINE, rRange );
if( pUndo->GetRedlSaveCount() )
{
GetIDocumentUndoRedo().AppendUndo(pUndo);
diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx
index 452907237398..050e825bd8a6 100644
--- a/sw/source/core/doc/docruby.cxx
+++ b/sw/source/core/doc/docruby.cxx
@@ -93,7 +93,7 @@ sal_uInt16 SwDoc::FillRubyList( const SwPaM& rPam, SwRubyList& rList,
void SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
sal_uInt16 nMode )
{
- GetIDocumentUndoRedo().StartUndo( UNDO_SETRUBYATTR, nullptr );
+ GetIDocumentUndoRedo().StartUndo( SwUndoId::SETRUBYATTR, nullptr );
std::set<sal_uInt16> aDelArr;
aDelArr.insert( RES_TXTATR_CJK_RUBY );
@@ -174,7 +174,7 @@ void SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
} while( 30 > rList.size() &&
(_pStartCursor = _pStartCursor->GetNext()) != _pStartCursor2 );
- GetIDocumentUndoRedo().EndUndo( UNDO_SETRUBYATTR, nullptr );
+ GetIDocumentUndoRedo().EndUndo( SwUndoId::SETRUBYATTR, nullptr );
}
bool SwDoc::SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, sal_uInt16 )
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index e23c961d5138..c1e47b041d59 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -322,7 +322,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
bool const bUndo = GetIDocumentUndoRedo().DoesUndo();
if( bUndo )
{
- GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
+ GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
}
SwPaM* pRedlPam = nullptr;
@@ -471,7 +471,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
GetIDocumentUndoRedo().DoUndo( bUndo );
if( bUndo )
{
- GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
+ GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
}
return true;
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 2e08e18b8846..48ff5a95f0fa 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -325,7 +325,7 @@ SwTOXBaseSection* SwDoc::InsertTableOf( const SwPosition& rPos,
const SfxItemSet* pSet,
bool bExpand )
{
- GetIDocumentUndoRedo().StartUndo( UNDO_INSTOX, nullptr );
+ GetIDocumentUndoRedo().StartUndo( SwUndoId::INSTOX, nullptr );
OUString sSectNm = GetUniqueTOXBaseName( *rTOX.GetTOXType(), rTOX.GetTOXName() );
SwPaM aPam( rPos );
@@ -362,7 +362,7 @@ SwTOXBaseSection* SwDoc::InsertTableOf( const SwPosition& rPos,
}
}
- GetIDocumentUndoRedo().EndUndo( UNDO_INSTOX, nullptr );
+ GetIDocumentUndoRedo().EndUndo( SwUndoId::INSTOX, nullptr );
return pNewSection;
}
@@ -495,7 +495,7 @@ bool SwDoc::DeleteTOX( const SwTOXBase& rTOXBase, bool bDelNodes )
SwSectionNode const * pMyNode = pFormat ? pFormat->GetSectionNode() : nullptr;
if (pMyNode)
{
- GetIDocumentUndoRedo().StartUndo( UNDO_CLEARTOXRANGE, nullptr );
+ GetIDocumentUndoRedo().StartUndo( SwUndoId::CLEARTOXRANGE, nullptr );
/* Save start node of section's surrounding. */
SwNode const * pStartNd = pMyNode->StartOfSectionNode();
@@ -562,7 +562,7 @@ bool SwDoc::DeleteTOX( const SwTOXBase& rTOXBase, bool bDelNodes )
DelSectionFormat( const_cast<SwSectionFormat *>(pFormat), bDelNodes );
- GetIDocumentUndoRedo().EndUndo( UNDO_CLEARTOXRANGE, nullptr );
+ GetIDocumentUndoRedo().EndUndo( SwUndoId::CLEARTOXRANGE, nullptr );
bRet = true;
}
diff --git a/sw/source/core/doc/extinput.cxx b/sw/source/core/doc/extinput.cxx
index 2f1cdc7a3e18..8eb26bacd64c 100644
--- a/sw/source/core/doc/extinput.cxx
+++ b/sw/source/core/doc/extinput.cxx
@@ -84,10 +84,10 @@ SwExtTextInput::~SwExtTextInput()
if( bInsText )
{
rIdx = nSttCnt;
- pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_OVERWRITE, nullptr );
+ pDoc->GetIDocumentUndoRedo().StartUndo( SwUndoId::OVERWRITE, nullptr );
pDoc->getIDocumentContentOperations().Overwrite( *this, sText.copy( 0, nOWLen ) );
pDoc->getIDocumentContentOperations().InsertString( *this, sText.copy( nOWLen ) );
- pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_OVERWRITE, nullptr );
+ pDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::OVERWRITE, nullptr );
}
}
else
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 15a01d9fdec4..967ea384d0e3 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -3504,8 +3504,8 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
if( ppUndo )
*ppUndo = aParam.CreateUndo(
- aParam.bBigger ? UNDO_COL_DELETE
- : UNDO_TABLE_INSCOL );
+ aParam.bBigger ? SwUndoId::COL_DELETE
+ : SwUndoId::TABLE_INSCOL );
}
else if( ppUndo )
*ppUndo = new SwUndoAttrTable( *aParam.pTableNd, true );
@@ -3698,8 +3698,8 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
xFndBox.reset(::lcl_SaveInsDelData(aParam, ppUndo, aTmpLst, nDistStt));
if( ppUndo )
*ppUndo = aParam.CreateUndo(
- aParam.bBigger ? UNDO_TABLE_DELBOX
- : UNDO_TABLE_INSCOL );
+ aParam.bBigger ? SwUndoId::TABLE_DELBOX
+ : SwUndoId::TABLE_INSCOL );
}
else if( ppUndo )
*ppUndo = new SwUndoAttrTable( *aParam.pTableNd, true );
@@ -3812,8 +3812,8 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
xFndBox.reset(::lcl_SaveInsDelData(aParam, ppUndo, aTmpLst, nDistStt));
if( ppUndo )
*ppUndo = aParam.CreateUndo(
- aParam.bBigger ? UNDO_TABLE_DELBOX
- : UNDO_TABLE_INSCOL );
+ aParam.bBigger ? SwUndoId::TABLE_DELBOX
+ : SwUndoId::TABLE_INSCOL );
}
else if( ppUndo )
*ppUndo = new SwUndoAttrTable( *aParam.pTableNd, true );
@@ -4197,8 +4197,8 @@ bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
if( ppUndo )
*ppUndo = aParam.CreateUndo(
- bBigger ? UNDO_TABLE_INSROW
- : UNDO_ROW_DELETE );
+ bBigger ? SwUndoId::TABLE_INSROW
+ : SwUndoId::ROW_DELETE );
}
else if( ppUndo )
*ppUndo = new SwUndoAttrTable( *aParam.pTableNd, true );
@@ -4281,8 +4281,8 @@ bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
xFndBox.reset(::lcl_SaveInsDelData( aParam, ppUndo, aTmpLst ));
if( ppUndo )
*ppUndo = aParam.CreateUndo(
- bBigger ? UNDO_TABLE_INSROW
- : UNDO_ROW_DELETE );
+ bBigger ? SwUndoId::TABLE_INSROW
+ : SwUndoId::ROW_DELETE );
}
else if( ppUndo )
*ppUndo = new SwUndoAttrTable( *aParam.pTableNd, true );
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index 62d87c8a0144..403ccc69cdb6 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -516,7 +516,7 @@ void SwDoc::DelSectionFormat( SwSectionFormat *pFormat, bool bDelNodes )
{
SwSectionFormats::iterator itFormatPos = std::find( mpSectionFormatTable->begin(), mpSectionFormatTable->end(), pFormat );
- GetIDocumentUndoRedo().StartUndo(UNDO_DELSECTION, nullptr);
+ GetIDocumentUndoRedo().StartUndo(SwUndoId::DELSECTION, nullptr);
if( mpSectionFormatTable->end() != itFormatPos )
{
@@ -542,7 +542,7 @@ void SwDoc::DelSectionFormat( SwSectionFormat *pFormat, bool bDelNodes )
GetFootnoteIdxs().UpdateFootnote( aUpdIdx );
getIDocumentState().SetModified();
//#126178# start/end undo have to be pairs!
- GetIDocumentUndoRedo().EndUndo(UNDO_DELSECTION, nullptr);
+ GetIDocumentUndoRedo().EndUndo(SwUndoId::DELSECTION, nullptr);
return ;
}
GetIDocumentUndoRedo().AppendUndo( MakeUndoDelSection( *pFormat ) );
@@ -556,7 +556,7 @@ void SwDoc::DelSectionFormat( SwSectionFormat *pFormat, bool bDelNodes )
GetFootnoteIdxs().UpdateFootnote( aUpdIdx );
getIDocumentState().SetModified();
//#126178# start/end undo have to be pairs!
- GetIDocumentUndoRedo().EndUndo(UNDO_DELSECTION, nullptr);
+ GetIDocumentUndoRedo().EndUndo(SwUndoId::DELSECTION, nullptr);
return ;
}
@@ -599,7 +599,7 @@ void SwDoc::DelSectionFormat( SwSectionFormat *pFormat, bool bDelNodes )
//FEATURE::CONDCOLL
}
- GetIDocumentUndoRedo().EndUndo(UNDO_DELSECTION, nullptr);
+ GetIDocumentUndoRedo().EndUndo(SwUndoId::DELSECTION, nullptr);
getIDocumentState().SetModified();
}
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index b8a57e6ee520..c0269df09910 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -645,7 +645,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts,
SwUndoTextToTable* pUndo = nullptr;
if( GetIDocumentUndoRedo().DoesUndo() )
{
- GetIDocumentUndoRedo().StartUndo( UNDO_TEXTTOTABLE, nullptr );
+ GetIDocumentUndoRedo().StartUndo( SwUndoId::TEXTTOTABLE, nullptr );
pUndo = new SwUndoTextToTable( aOriginal, rInsTableOpts, cCh,
static_cast<sal_uInt16>(eAdjust), pTAFormat );
GetIDocumentUndoRedo().AppendUndo( pUndo );
@@ -876,7 +876,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts,
if( pUndo )
{
- GetIDocumentUndoRedo().EndUndo( UNDO_TEXTTOTABLE, nullptr );
+ GetIDocumentUndoRedo().EndUndo( SwUndoId::TEXTTOTABLE, nullptr );
}
getIDocumentState().SetEnableSetModified(bEnableSetModified);
@@ -1734,7 +1734,7 @@ bool SwDoc::InsertCol( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, bool bBehind )
SwUndoTableNdsChg* pUndo = nullptr;
if (GetIDocumentUndoRedo().DoesUndo())
{
- pUndo = new SwUndoTableNdsChg( UNDO_TABLE_INSCOL, rBoxes, *pTableNd,
+ pUndo = new SwUndoTableNdsChg( SwUndoId::TABLE_INSCOL, rBoxes, *pTableNd,
0, 0, nCnt, bBehind, false );
aTmpLst.insert( rTable.GetTabSortBoxes() );
}
@@ -1796,7 +1796,7 @@ bool SwDoc::InsertRow( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, bool bBehind )
SwUndoTableNdsChg* pUndo = nullptr;
if (GetIDocumentUndoRedo().DoesUndo())
{
- pUndo = new SwUndoTableNdsChg( UNDO_TABLE_INSROW,rBoxes, *pTableNd,
+ pUndo = new SwUndoTableNdsChg( SwUndoId::TABLE_INSROW,rBoxes, *pTableNd,
0, 0, nCnt, bBehind, false );
aTmpLst.insert( rTable.GetTabSortBoxes() );
}
@@ -1930,9 +1930,9 @@ bool SwDoc::DeleteRow( const SwCursor& rCursor )
}
// Thus delete the Rows
- GetIDocumentUndoRedo().StartUndo(UNDO_ROW_DELETE, nullptr);
+ GetIDocumentUndoRedo().StartUndo(SwUndoId::ROW_DELETE, nullptr);
bool bResult = DeleteRowCol( aBoxes );
- GetIDocumentUndoRedo().EndUndo(UNDO_ROW_DELETE, nullptr);
+ GetIDocumentUndoRedo().EndUndo(SwUndoId::ROW_DELETE, nullptr);
return bResult;
}
@@ -1956,9 +1956,9 @@ bool SwDoc::DeleteCol( const SwCursor& rCursor )
}
// Thus delete the Columns
- GetIDocumentUndoRedo().StartUndo(UNDO_COL_DELETE, nullptr);
+ GetIDocumentUndoRedo().StartUndo(SwUndoId::COL_DELETE, nullptr);
bool bResult = DeleteRowCol( aBoxes, true );
- GetIDocumentUndoRedo().EndUndo(UNDO_COL_DELETE, nullptr);
+ GetIDocumentUndoRedo().EndUndo(SwUndoId::COL_DELETE, nullptr);
return bResult;
}
@@ -2130,7 +2130,7 @@ bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
SwUndoTableNdsChg* pUndo = nullptr;
if (GetIDocumentUndoRedo().DoesUndo())
{
- pUndo = new SwUndoTableNdsChg( UNDO_TABLE_DELBOX, aSelBoxes, *pTableNd,
+ pUndo = new SwUndoTableNdsChg( SwUndoId::TABLE_DELBOX, aSelBoxes, *pTableNd,
nMin, nMax, 0, false, false );
}
@@ -2193,7 +2193,7 @@ bool SwDoc::SplitTable( const SwSelBoxes& rBoxes, bool bVert, sal_uInt16 nCnt,
SwUndoTableNdsChg* pUndo = nullptr;
if (GetIDocumentUndoRedo().DoesUndo())
{
- pUndo = new SwUndoTableNdsChg( UNDO_TABLE_SPLIT, rBoxes, *pTableNd, 0, 0,
+ pUndo = new SwUndoTableNdsChg( SwUndoId::TABLE_SPLIT, rBoxes, *pTableNd, 0, 0,
nCnt, bVert, bSameHeight );
aTmpLst.insert( rTable.GetTabSortBoxes() );
@@ -2266,7 +2266,7 @@ sal_uInt16 SwDoc::MergeTable( SwPaM& rPam )
}
// #i33394#
- GetIDocumentUndoRedo().StartUndo( UNDO_TABLE_MERGE, nullptr );
+ GetIDocumentUndoRedo().StartUndo( SwUndoId::TABLE_MERGE, nullptr );
RedlineFlags eOld = getIDocumentRedlineAccess().GetRedlineFlags();
getIDocumentRedlineAccess().SetRedlineFlags_intern(eOld | RedlineFlags::Ignore);
@@ -2286,9 +2286,9 @@ sal_uInt16 SwDoc::MergeTable( SwPaM& rPam )
if( pUndo )
{
delete pUndo;
- SwUndoId nLastUndoId(UNDO_EMPTY);
+ SwUndoId nLastUndoId(SwUndoId::EMPTY);
if (GetIDocumentUndoRedo().GetLastUndoInfo(nullptr, & nLastUndoId)
- && (UNDO_REDLINE == nLastUndoId))
+ && (SwUndoId::REDLINE == nLastUndoId))
{
// FIXME: why is this horrible cleanup necessary?
SwUndoRedline *const pU = dynamic_cast<SwUndoRedline*>(
@@ -2349,7 +2349,7 @@ sal_uInt16 SwDoc::MergeTable( SwPaM& rPam )
::ClearFEShellTabCols();
getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld );
}
- GetIDocumentUndoRedo().EndUndo( UNDO_TABLE_MERGE, nullptr );
+ GetIDocumentUndoRedo().EndUndo( SwUndoId::TABLE_MERGE, nullptr );
return nRet;
}
@@ -2819,7 +2819,7 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly,
GetTabRows( aOld, nullptr, pBoxFrame );
- GetIDocumentUndoRedo().StartUndo( UNDO_TABLE_ATTR, nullptr );
+ GetIDocumentUndoRedo().StartUndo( SwUndoId::TABLE_ATTR, nullptr );
// check for differences between aOld and rNew:
const size_t nCount = rNew.Count();
@@ -2902,7 +2902,7 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly,
}
}
- GetIDocumentUndoRedo().EndUndo( UNDO_TABLE_ATTR, nullptr );
+ GetIDocumentUndoRedo().EndUndo( SwUndoId::TABLE_ATTR, nullptr );
::ClearFEShellTabCols();
}
@@ -4056,7 +4056,7 @@ void SwDoc::ChkBoxNumFormat( SwTableBox& rBox, bool bCallUpdate )
{
if (GetIDocumentUndoRedo().DoesUndo())
{
- GetIDocumentUndoRedo().StartUndo( UNDO_TABLE_AUTOFMT, nullptr );
+ GetIDocumentUndoRedo().StartUndo( SwUndoId::TABLE_AUTOFMT, nullptr );
pUndo = new SwUndoTableNumFormat( rBox );
pUndo->SetNumFormat( nFormatIdx, fNumber );
}
@@ -4129,7 +4129,7 @@ void SwDoc::ChkBoxNumFormat( SwTableBox& rBox, bool bCallUpdate )
{
if (GetIDocumentUndoRedo().DoesUndo())
{
- GetIDocumentUndoRedo().StartUndo( UNDO_TABLE_AUTOFMT, nullptr );
+ GetIDocumentUndoRedo().StartUndo( SwUndoId::TABLE_AUTOFMT, nullptr );
pUndo = new SwUndoTableNumFormat( rBox );
}
@@ -4157,7 +4157,7 @@ void SwDoc::ChkBoxNumFormat( SwTableBox& rBox, bool bCallUpdate )
{
pUndo->SetBox( rBox );
GetIDocumentUndoRedo().AppendUndo(pUndo);
- GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
+ GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
}
const SwTableNode* pTableNd = rBox.GetSttNd()->FindTableNode();
@@ -4531,7 +4531,7 @@ bool SwDoc::UnProtectCells( const SwSelBoxes& rBoxes )
bool SwDoc::UnProtectTables( const SwPaM& rPam )
{
- GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
+ GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
bool bChgd = false, bHasSel = rPam.HasMark() ||
rPam.GetNext() != &rPam;
@@ -4565,7 +4565,7 @@ bool SwDoc::UnProtectTables( const SwPaM& rPam )
bChgd |= UnProtectTableCells( *pTable );
}
- GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr);
+ GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
if( bChgd )
getIDocumentState().SetModified();
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 6513ec9b44e4..4913c148f940 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -774,7 +774,7 @@ void SwVirtFlyDrawObj::NbcCrop(const Point& rRef, const Fraction& xFact, const F
// Apply values
pSh->StartAllAction();
-// pSh->StartUndo(UNDO_START);
+// pSh->StartUndo(SwUndoId::START);
// Set new crop values in twips
aCrop.SetLeft (convertMm100ToTwip(nLeftCrop));
@@ -790,7 +790,7 @@ void SwVirtFlyDrawObj::NbcCrop(const Point& rRef, const Fraction& xFact, const F
aSz.SetHeight(aNewRect.GetHeight());
pFormat->GetDoc()->SetAttr( aSz, *pFormat );
-// pSh->EndUndo(UNDO_END);
+// pSh->EndUndo(SwUndoId::END);
pSh->EndAllAction();
}
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index ae40150357ac..9e95c18c6464 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -931,7 +931,7 @@ void SwDrawView::DeleteMarked()
SwRootFrame *pTmpRoot = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
if ( pTmpRoot )
pTmpRoot->StartAllAction();
- pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
+ pDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
// replace marked <SwDrawVirtObj>-objects by its reference objects.
{
SdrPageView* pDrawPageView = rImp.GetPageView();
@@ -966,7 +966,7 @@ void SwDrawView::DeleteMarked()
for (std::vector<SwFrameFormat*>::iterator i = aTextBoxesToDelete.begin(); i != aTextBoxesToDelete.end(); ++i)
pDoc->getIDocumentLayoutAccess().DelLayoutFormat(*i);
}
- pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr);
+ pDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
if( pTmpRoot )
pTmpRoot->EndAllAction();
}
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index f0f88cc4243a..ed42d4ff1d4d 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -134,7 +134,7 @@ bool SwAutoCorrDoc::Insert( sal_Int32 nPos, const OUString& rText )
bUndoIdInitialized = true;
if( 1 == rText.getLength() )
{
- rEditSh.StartUndo( UNDO_AUTOCORRECT );
+ rEditSh.StartUndo( SwUndoId::AUTOCORRECT );
++m_nEndUndoCounter;
}
}
@@ -217,7 +217,7 @@ bool SwAutoCorrDoc::ReplaceRange( sal_Int32 nPos, sal_Int32 nSourceLength, const
bUndoIdInitialized = true;
if( 1 == rText.getLength() )
{
- rEditSh.StartUndo( UNDO_AUTOCORRECT );
+ rEditSh.StartUndo( SwUndoId::AUTOCORRECT );
++m_nEndUndoCounter;
}
}
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index fbc2421f4b9f..b3dd522da1e3 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -2538,7 +2538,7 @@ void SwEditShell::AutoFormat( const SvxSwAutoFormatFlags* pAFlags )
SET_CURR_SHELL( this );
StartAllAction();
- StartUndo( UNDO_AUTOFORMAT );
+ StartUndo( SwUndoId::AUTOFORMAT );
SvxSwAutoFormatFlags aAFFlags; // use default values or add params?
if( pAFlags )
@@ -2566,7 +2566,7 @@ void SwEditShell::AutoFormat( const SvxSwAutoFormatFlags* pAFlags )
SwAutoFormat aFormat( this, aAFFlags );
}
- EndUndo( UNDO_AUTOFORMAT );
+ EndUndo( SwUndoId::AUTOFORMAT );
EndAllAction();
}
@@ -2577,7 +2577,7 @@ void SwEditShell::AutoFormatBySplitNode()
if( !pCursor->IsMultiSelection() && pCursor->Move( fnMoveBackward, GoInNode ) )
{
StartAllAction();
- StartUndo( UNDO_AUTOFORMAT );
+ StartUndo( SwUndoId::AUTOFORMAT );
bool bRange = false;
pCursor->SetMark();
@@ -2616,7 +2616,7 @@ void SwEditShell::AutoFormatBySplitNode()
pCursor->DeleteMark();
pCursor->Move( fnMoveForward, GoInNode );
- EndUndo( UNDO_AUTOFORMAT );
+ EndUndo( SwUndoId::AUTOFORMAT );
EndAllAction();
}
}
diff --git a/sw/source/core/edit/edatmisc.cxx b/sw/source/core/edit/edatmisc.cxx
index 83f796369c01..6e58be8cee1e 100644
--- a/sw/source/core/edit/edatmisc.cxx
+++ b/sw/source/core/edit/edatmisc.cxx
@@ -38,7 +38,7 @@ void SwEditShell::ResetAttr( const std::set<sal_uInt16> &attrs, SwPaM* pPaM )
bool bUndoGroup = pCursor->GetNext() != pCursor;
if( bUndoGroup )
{
- GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_RESETATTR, nullptr);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::RESETATTR, nullptr);
}
for(SwPaM& rCurrentCursor : pCursor->GetRingContainer())
@@ -46,7 +46,7 @@ void SwEditShell::ResetAttr( const std::set<sal_uInt16> &attrs, SwPaM* pPaM )
if( bUndoGroup )
{
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_RESETATTR, nullptr);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::RESETATTR, nullptr);
}
CallChgLnk();
EndAllAction();
@@ -103,7 +103,7 @@ void SwEditShell::SetAttrItem( const SfxPoolItem& rHint, SetAttrMode nFlags )
if( pCursor->GetNext() != pCursor ) // Ring of Cursors
{
bool bIsTableMode = IsTableMode();
- GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_INSATTR, nullptr);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::INSATTR, nullptr);
for(SwPaM& rPaM : GetCursor()->GetRingContainer())
{
@@ -114,7 +114,7 @@ void SwEditShell::SetAttrItem( const SfxPoolItem& rHint, SetAttrMode nFlags )
}
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_INSATTR, nullptr);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::INSATTR, nullptr);
}
else
{
@@ -134,7 +134,7 @@ void SwEditShell::SetAttrSet( const SfxItemSet& rSet, SetAttrMode nFlags, SwPaM*
if( pCursor->GetNext() != pCursor ) // Ring of Cursors
{
bool bIsTableMode = IsTableMode();
- GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_INSATTR, nullptr);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::INSATTR, nullptr);
for(SwPaM& rTmpCursor : pCursor->GetRingContainer())
{
@@ -145,7 +145,7 @@ void SwEditShell::SetAttrSet( const SfxItemSet& rSet, SetAttrMode nFlags, SwPaM*
}
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_INSATTR, nullptr);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::INSATTR, nullptr);
}
else
{
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index 19e74392c535..9b181e84ff4b 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -521,7 +521,7 @@ bool SwEditShell::IsMoveLeftMargin( bool bRight, bool bModulus ) const
void SwEditShell::MoveLeftMargin( bool bRight, bool bModulus )
{
StartAllAction();
- StartUndo( UNDO_START );
+ StartUndo( SwUndoId::START );
SwPaM* pCursor = GetCursor();
if( pCursor->GetNext() != pCursor ) // Multiple selection ?
@@ -535,7 +535,7 @@ void SwEditShell::MoveLeftMargin( bool bRight, bool bModulus )
else
GetDoc()->MoveLeftMargin( *pCursor, bRight, bModulus );
- EndUndo( UNDO_END );
+ EndUndo( SwUndoId::END );
EndAllAction();
}
diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx
index 0ab00d9f6cf4..591fe8f911db 100644
--- a/sw/source/core/edit/eddel.cxx
+++ b/sw/source/core/edit/eddel.cxx
@@ -53,7 +53,7 @@ void SwEditShell::DeleteSel( SwPaM& rPam, bool* pUndo )
// group the Undo in the table
if( pUndo && !*pUndo )
{
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
*pUndo = true;
}
SwPaM aDelPam( *rPam.Start() );
@@ -125,7 +125,7 @@ long SwEditShell::Delete()
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, SW_RESSTR(STR_MULTISEL));
- GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_DELETE, &aRewriter);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::DELETE, &aRewriter);
}
for(SwPaM& rPaM : GetCursor()->GetRingContainer())
@@ -136,7 +136,7 @@ long SwEditShell::Delete()
// If undo container then close here
if( bUndo )
{
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_END, nullptr);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::END, nullptr);
}
EndAllAction();
nRet = 1;
@@ -206,7 +206,7 @@ bool SwEditShell::Copy( SwEditShell* pDestShell )
// For block selection this list is filled with the insert positions
std::list< std::shared_ptr<SwPosition> >::iterator pNextInsert = aInsertList.begin();
- pDestShell->GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
+ pDestShell->GetDoc()->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
for(SwPaM& rPaM : GetCursor()->GetRingContainer())
{
if( !pPos )
@@ -285,7 +285,7 @@ bool SwEditShell::Copy( SwEditShell* pDestShell )
#endif
// close Undo container here
- pDestShell->GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
+ pDestShell->GetDoc()->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
pDestShell->EndAllAction();
pDestShell->SaveTableBoxContent( pDestShell->GetCursor()->GetPoint() );
@@ -308,7 +308,7 @@ bool SwEditShell::Replace( const OUString& rNewStr, bool bRegExpRplc )
if( !HasReadonlySel() )
{
StartAllAction();
- GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
for(SwPaM& rPaM : GetCursor()->GetRingContainer())
{
@@ -321,7 +321,7 @@ bool SwEditShell::Replace( const OUString& rNewStr, bool bRegExpRplc )
}
// close Undo container here
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
EndAllAction();
}
return bRet;
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 5277af00a11b..cac8d8c11e32 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -385,7 +385,7 @@ void SwEditShell::SetTextFormatColl(SwTextFormatColl *pFormat,
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, pLocal->GetName());
- GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_SETFMTCOLL, &aRewriter);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::SETFMTCOLL, &aRewriter);
for(SwPaM& rPaM : GetCursor()->GetRingContainer())
{
@@ -405,7 +405,7 @@ void SwEditShell::SetTextFormatColl(SwTextFormatColl *pFormat,
}
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_SETFMTCOLL, &aRewriter);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::SETFMTCOLL, &aRewriter);
EndAllAction();
}
diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx
index 69b900a177ee..f7d4b1b71f87 100644
--- a/sw/source/core/edit/edfld.cxx
+++ b/sw/source/core/edit/edfld.cxx
@@ -129,7 +129,7 @@ void SwEditShell::FieldToText( SwFieldType* pType )
SET_CURR_SHELL( this );
StartAllAction();
- StartUndo( UNDO_DELETE );
+ StartUndo( SwUndoId::DELETE );
Push();
SwPaM* pPaM = GetCursor();
// TODO: this is really hackish
@@ -143,7 +143,7 @@ void SwEditShell::FieldToText( SwFieldType* pType )
Pop( false );
EndAllAction();
- EndUndo( UNDO_DELETE );
+ EndUndo( SwUndoId::DELETE );
}
/// add a field at the cursor position
diff --git a/sw/source/core/edit/edglbldc.cxx b/sw/source/core/edit/edglbldc.cxx
index 694e71506811..dd303cfbd812 100644
--- a/sw/source/core/edit/edglbldc.cxx
+++ b/sw/source/core/edit/edglbldc.cxx
@@ -157,7 +157,7 @@ bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
else
{
bEndUndo = true;
- pMyDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
+ pMyDoc->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
--rPos.nNode;
pMyDoc->getIDocumentContentOperations().AppendTextNode( rPos );
pCursor->SetMark();
@@ -167,7 +167,7 @@ bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
if( bEndUndo )
{
- pMyDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
+ pMyDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
}
EndAllAction();
@@ -199,7 +199,7 @@ bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
else
{
bEndUndo = true;
- pMyDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
+ pMyDoc->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
--rPos.nNode;
pMyDoc->getIDocumentContentOperations().AppendTextNode( rPos );
}
@@ -208,7 +208,7 @@ bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
if( bEndUndo )
{
- pMyDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
+ pMyDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
}
EndAllAction();
@@ -245,7 +245,7 @@ bool SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr ,
SET_CURR_SHELL( this );
StartAllAction();
- StartUndo( UNDO_START );
+ StartUndo( SwUndoId::START );
SwPaM* pCursor = GetCursor();
if( pCursor->GetNext() != pCursor || IsTableMode() )
@@ -297,7 +297,7 @@ bool SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr ,
break;
}
- EndUndo( UNDO_END );
+ EndUndo( SwUndoId::END );
EndAllAction();
return true;
}
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index f733d2b9047e..27f439796fc6 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -178,7 +178,7 @@ void SwEditShell::Overwrite(const OUString &rStr)
long SwEditShell::SplitNode( bool bAutoFormat, bool bCheckTableStart )
{
StartAllAction();
- GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
for(SwPaM& rPaM : GetCursor()->GetRingContainer())
{
@@ -187,7 +187,7 @@ long SwEditShell::SplitNode( bool bAutoFormat, bool bCheckTableStart )
GetDoc()->getIDocumentContentOperations().SplitNode( *rPaM.GetPoint(), bCheckTableStart );
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
if( bAutoFormat )
AutoFormatBySplitNode();
@@ -202,7 +202,7 @@ bool SwEditShell::AppendTextNode()
{
bool bRet = false;
StartAllAction();
- GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
for(SwPaM& rPaM : GetCursor()->GetRingContainer())
{
@@ -210,7 +210,7 @@ bool SwEditShell::AppendTextNode()
bRet = GetDoc()->getIDocumentContentOperations().AppendTextNode( *rPaM.GetPoint()) || bRet;
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
ClearTableBoxContent();
@@ -608,7 +608,7 @@ bool SwEditShell::InsertURL( const SwFormatINetFormat& rFormat, const OUString&
if( rFormat.GetValue().isEmpty() || ( rStr.isEmpty() && !HasSelection() ) )
return false;
StartAllAction();
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_UI_INSERT_URLTXT, nullptr);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( SwUndoId::UI_INSERT_URLTXT, nullptr);
bool bInsText = true;
if( !rStr.isEmpty() )
@@ -651,7 +651,7 @@ bool SwEditShell::InsertURL( const SwFormatINetFormat& rFormat, const OUString&
ClearMark();
if( bInsText )
DontExpandFormat();
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_UI_INSERT_URLTXT, nullptr );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( SwUndoId::UI_INSERT_URLTXT, nullptr );
EndAllAction();
return true;
}
@@ -979,13 +979,13 @@ void SwEditShell::TransliterateText( TransliterationFlags nType )
SwPaM* pCursor = GetCursor();
if( pCursor->GetNext() != pCursor )
{
- GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
for(SwPaM& rPaM : GetCursor()->GetRingContainer())
{
if( rPaM.HasMark() )
GetDoc()->getIDocumentContentOperations().TransliterateText( rPaM, aTrans );
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
}
else
GetDoc()->getIDocumentContentOperations().TransliterateText( *pCursor, aTrans );
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index 7397114ec600..524457c820ce 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -1135,7 +1135,7 @@ void SwEditShell::ApplyChangedSentence(const svx::SpellPortions& rNewPortions, b
// iterate over the new portions, beginning at the end to take advantage of the previously
// saved content positions
- mpDoc->GetIDocumentUndoRedo().StartUndo( UNDO_UI_TEXT_CORRECTION, nullptr );
+ mpDoc->GetIDocumentUndoRedo().StartUndo( SwUndoId::UI_TEXT_CORRECTION, nullptr );
StartAction();
SwPaM *pCursor = GetCursor();
@@ -1265,7 +1265,7 @@ void SwEditShell::ApplyChangedSentence(const svx::SpellPortions& rNewPortions, b
// set continuation position for spell/grammar checking to the end of this sentence
g_pSpellIter->SetCurr( new SwPosition(*pCursor->Start()) );
- mpDoc->GetIDocumentUndoRedo().EndUndo( UNDO_UI_TEXT_CORRECTION, nullptr );
+ mpDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::UI_TEXT_CORRECTION, nullptr );
EndAction();
}
}
diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx
index ab385cd975e9..4236b5bd2c85 100644
--- a/sw/source/core/edit/ednumber.cxx
+++ b/sw/source/core/edit/ednumber.cxx
@@ -133,12 +133,12 @@ bool SwEditShell::NoNum()
SwPaM* pCursor = GetCursor();
if( pCursor->GetNext() != pCursor ) // Multiple selection?
{
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
SwPamRanges aRangeArr( *pCursor );
SwPaM aPam( *pCursor->GetPoint() );
for( size_t n = 0; n < aRangeArr.Count(); ++n )
bRet = bRet && GetDoc()->NoNum( aRangeArr.SetPam( n, aPam ));
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
}
else
bRet = GetDoc()->NoNum( *pCursor );
@@ -278,14 +278,14 @@ void SwEditShell::DelNumRules()
SwPaM* pCursor = GetCursor();
if( pCursor->IsMultiSelection() )
{
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
SwPamRanges aRangeArr( *pCursor );
SwPaM aPam( *pCursor->GetPoint() );
for( size_t n = 0; n < aRangeArr.Count(); ++n )
{
GetDoc()->DelNumRules( aRangeArr.SetPam( n, aPam ) );
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
}
else
GetDoc()->DelNumRules( *pCursor );
@@ -311,12 +311,12 @@ bool SwEditShell::NumUpDown( bool bDown )
bRet = GetDoc()->NumUpDown( *pCursor, bDown );
else
{
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
SwPamRanges aRangeArr( *pCursor );
SwPaM aPam( *pCursor->GetPoint() );
for( size_t n = 0; n < aRangeArr.Count(); ++n )
bRet = bRet && GetDoc()->NumUpDown( aRangeArr.SetPam( n, aPam ), bDown );
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
}
GetDoc()->getIDocumentState().SetModified();
@@ -532,13 +532,13 @@ bool SwEditShell::OutlineUpDown( short nOffset )
bRet = GetDoc()->OutlineUpDown( *pCursor, nOffset );
else
{
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
SwPamRanges aRangeArr( *pCursor );
SwPaM aPam( *pCursor->GetPoint() );
for( size_t n = 0; n < aRangeArr.Count(); ++n )
bRet = bRet && GetDoc()->OutlineUpDown(
aRangeArr.SetPam( n, aPam ), nOffset );
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
}
GetDoc()->getIDocumentState().SetModified();
EndAllAction();
@@ -737,7 +737,7 @@ void SwEditShell::SetCurNumRule( const SwNumRule& rRule,
{
StartAllAction();
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
SwPaM* pCursor = GetCursor();
if( IsMultiSelection() )
@@ -770,7 +770,7 @@ void SwEditShell::SetCurNumRule( const SwNumRule& rRule,
true, bResetIndentAttrs );
GetDoc()->SetCounted( *pCursor, true );
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
EndAllAction();
}
@@ -801,12 +801,12 @@ void SwEditShell::SetNumRuleStart( bool bFlag, SwPaM* pPaM )
SwPaM* pCursor = pPaM ? pPaM : GetCursor();
if( pCursor->IsMultiSelection() ) // multiple selection ?
{
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
SwPamRanges aRangeArr( *pCursor );
SwPaM aPam( *pCursor->GetPoint() );
for( size_t n = 0; n < aRangeArr.Count(); ++n )
GetDoc()->SetNumRuleStart( *aRangeArr.SetPam( n, aPam ).GetPoint(), bFlag );
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
}
else
GetDoc()->SetNumRuleStart( *pCursor->GetPoint(), bFlag );
@@ -828,12 +828,12 @@ void SwEditShell::SetNodeNumStart( sal_uInt16 nStt )
SwPaM* pCursor = GetCursor();
if( pCursor->IsMultiSelection() ) // multiple selection ?
{
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
SwPamRanges aRangeArr( *pCursor );
SwPaM aPam( *pCursor->GetPoint() );
for( size_t n = 0; n < aRangeArr.Count(); ++n )
GetDoc()->SetNodeNumStart( *aRangeArr.SetPam( n, aPam ).GetPoint(), nStt );
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
}
else
GetDoc()->SetNodeNumStart( *pCursor->GetPoint(), nStt );
diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx
index 447a57e7ac6d..b7606eedbd80 100644
--- a/sw/source/core/edit/edsect.cxx
+++ b/sw/source/core/edit/edsect.cxx
@@ -39,7 +39,7 @@ SwEditShell::InsertSection(
if( !IsTableMode() )
{
StartAllAction();
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_INSSECTION, nullptr );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( SwUndoId::INSSECTION, nullptr );
for(SwPaM& rPaM : GetCursor()->GetRingContainer())
{
@@ -49,7 +49,7 @@ SwEditShell::InsertSection(
pRet = pNew;
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_INSSECTION, nullptr );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( SwUndoId::INSSECTION, nullptr );
EndAllAction();
}
return pRet;
diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx
index af870f8ff913..42d1b1e81826 100644
--- a/sw/source/core/edit/edtab.cxx
+++ b/sw/source/core/edit/edtab.cxx
@@ -99,7 +99,7 @@ const SwTable& SwEditShell::InsertTable( const SwInsertTableOptions& rInsTableOp
bool bEndUndo = 0 != pPos->nContent.GetIndex();
if( bEndUndo )
{
- StartUndo( UNDO_START );
+ StartUndo( SwUndoId::START );
GetDoc()->getIDocumentContentOperations().SplitNode( *pPos, false );
}
@@ -110,7 +110,7 @@ const SwTable& SwEditShell::InsertTable( const SwInsertTableOptions& rInsTableOp
css::text::HoriOrientation::FULL, pTAFormat,
nullptr, true );
if( bEndUndo )
- EndUndo( UNDO_END );
+ EndUndo( SwUndoId::END );
EndAllAction();
return *pTable;
@@ -220,7 +220,7 @@ void SwEditShell::InsertDDETable( const SwInsertTableOptions& rInsTableOpts,
bool bEndUndo = 0 != pPos->nContent.GetIndex();
if( bEndUndo )
{
- StartUndo( UNDO_START );
+ StartUndo( SwUndoId::START );
GetDoc()->getIDocumentContentOperations().SplitNode( *pPos, false );
}
@@ -235,7 +235,7 @@ void SwEditShell::InsertDDETable( const SwInsertTableOptions& rInsTableOpts,
pTableNode->SetNewTable( pDDETable ); // setze die DDE-Tabelle
if( bEndUndo )
- EndUndo( UNDO_END );
+ EndUndo( SwUndoId::END );
EndAllAction();
}
@@ -355,12 +355,12 @@ void SwEditShell::SetTableBoxFormulaAttrs( const SfxItemSet& rSet )
ClearTableBoxContent();
StartAllAction();
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
for (size_t n = 0; n < aBoxes.size(); ++n)
{
GetDoc()->SetTableBoxFormulaAttrs( *aBoxes[ n ], rSet );
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
EndAllAction();
}
@@ -433,11 +433,11 @@ bool SwEditShell::SplitTable( SplitTable_HeadlineOption eMode )
if( pCursor->GetNode().FindTableNode() )
{
StartAllAction();
- GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
bRet = GetDoc()->SplitTable( *pCursor->GetPoint(), eMode, true );
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
ClearFEShellTabCols();
EndAllAction();
}
@@ -451,11 +451,11 @@ bool SwEditShell::MergeTable( bool bWithPrev )
if( pCursor->GetNode().FindTableNode() )
{
StartAllAction();
- GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
bRet = GetDoc()->MergeTable( *pCursor->GetPoint(), bWithPrev );
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, nullptr);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
ClearFEShellTabCols();
EndAllAction();
}
diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx
index 10162be0ecee..14d38ece657d 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -174,7 +174,7 @@ bool SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
::StartProgress( STR_STATSTR_TOX_UPDATE, 0, 0, pDocSh );
::SetProgressText( STR_STATSTR_TOX_UPDATE, pDocSh );
- pMyDoc->GetIDocumentUndoRedo().StartUndo(UNDO_TOXCHANGE, nullptr);
+ pMyDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::TOXCHANGE, nullptr);
// create listing stub
pTOX->Update(pSet);
@@ -189,7 +189,7 @@ bool SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
// insert page numbering
pTOX->UpdatePageNum();
- pMyDoc->GetIDocumentUndoRedo().EndUndo(UNDO_TOXCHANGE, nullptr);
+ pMyDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::TOXCHANGE, nullptr);
::EndProgress( pDocSh );
EndAllAction();
diff --git a/sw/source/core/edit/edundo.cxx b/sw/source/core/edit/edundo.cxx
index 8d9d580d6543..133770d50d6a 100644
--- a/sw/source/core/edit/edundo.cxx
+++ b/sw/source/core/edit/edundo.cxx
@@ -112,12 +112,12 @@ bool SwEditShell::Undo(sal_uInt16 const nCount)
// Keep Cursor - so that we're able to set it at
// the same position for autoformat or autocorrection
- SwUndoId nLastUndoId(UNDO_EMPTY);
+ SwUndoId nLastUndoId(SwUndoId::EMPTY);
GetLastUndoInfo(nullptr, & nLastUndoId);
const bool bRestoreCursor = nCount == 1
- && ( UNDO_AUTOFORMAT == nLastUndoId
- || UNDO_AUTOCORRECT == nLastUndoId
- || UNDO_SETDEFTATTR == nLastUndoId );
+ && ( SwUndoId::AUTOFORMAT == nLastUndoId
+ || SwUndoId::AUTOCORRECT == nLastUndoId
+ || SwUndoId::SETDEFTATTR == nLastUndoId );
Push();
// Destroy stored TableBoxPtr. A dection is only permitted for the new "Box"!
@@ -171,9 +171,9 @@ bool SwEditShell::Redo(sal_uInt16 const nCount)
SetMark(); // Bound1 and Bound2 in the same Node
ClearMark();
- SwUndoId nFirstRedoId(UNDO_EMPTY);
+ SwUndoId nFirstRedoId(SwUndoId::EMPTY);
GetDoc()->GetIDocumentUndoRedo().GetFirstRedoInfo(nullptr, & nFirstRedoId);
- const bool bRestoreCursor = nCount == 1 && UNDO_SETDEFTATTR == nFirstRedoId;
+ const bool bRestoreCursor = nCount == 1 && SwUndoId::SETDEFTATTR == nFirstRedoId;
Push();
// Destroy stored TableBoxPtr. A dection is only permitted for the new "Box"!
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index b6d2d04a51be..d62e5cea4300 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -711,7 +711,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc )
bool bRet = true;
StartAllAction();
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_INSGLOSSARY, nullptr );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( SwUndoId::INSGLOSSARY, nullptr );
GetDoc()->getIDocumentFieldsAccess().LockExpFields();
// When the clipboard content has been created by a rectangular selection
@@ -1082,7 +1082,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc )
}
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_INSGLOSSARY, nullptr );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( SwUndoId::INSGLOSSARY, nullptr );
// have new table formulas been inserted?
if( pTableFieldTyp->HasWriterListeners() )
@@ -1128,7 +1128,7 @@ bool SwFEShell::PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt1
if(pTableNode)
{
//insert a paragraph
- StartUndo(UNDO_INSERT);
+ StartUndo(SwUndoId::INSERT);
SwNodeIndex aTableIdx( *pTableNode, -1 );
SwPosition aBefore(aTableIdx);
if(GetDoc()->getIDocumentContentOperations().AppendTextNode( aBefore ))
@@ -1136,7 +1136,7 @@ bool SwFEShell::PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt1
SwPaM aTmp(aBefore);
aCpyPam = aTmp;
}
- EndUndo(UNDO_INSERT);
+ EndUndo(SwUndoId::INSERT);
}
MovePage( GetThisFrame, GetLastSub );
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index a2c30f8ec451..394454cc7ba9 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -661,7 +661,7 @@ const SwFrameFormat *SwFEShell::NewFlyFrame( const SfxItemSet& rSet, bool bAnchV
SwFlyFrameFormat *pRet;
if( bMoveContent )
{
- GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_INSLAYFMT, nullptr );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( SwUndoId::INSLAYFMT, nullptr );
SwFormatAnchor* pOldAnchor = nullptr;
bool bHOriChgd = false, bVOriChgd = false;
SwFormatVertOrient aOldV;
@@ -718,12 +718,12 @@ const SwFrameFormat *SwFEShell::NewFlyFrame( const SfxItemSet& rSet, bool bAnchV
// changing the anchors should not be recorded
bool const bDoesUndo =
GetDoc()->GetIDocumentUndoRedo().DoesUndo();
- SwUndoId nLastUndoId(UNDO_EMPTY);
+ SwUndoId nLastUndoId(SwUndoId::EMPTY);
if (bDoesUndo &&
GetDoc()->GetIDocumentUndoRedo().GetLastUndoInfo(nullptr,
& nLastUndoId))
{
- if (UNDO_INSLAYFMT == nLastUndoId)
+ if (SwUndoId::INSLAYFMT == nLastUndoId)
{
GetDoc()->GetIDocumentUndoRedo().DoUndo(false);
}
@@ -741,7 +741,7 @@ const SwFrameFormat *SwFEShell::NewFlyFrame( const SfxItemSet& rSet, bool bAnchV
}
delete pOldAnchor;
}
- GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_INSLAYFMT, nullptr );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( SwUndoId::INSLAYFMT, nullptr );
}
else
/* If called from a shell try to propagate an
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 687b8854131d..9ff50efd80c9 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -738,7 +738,7 @@ void SwFEShell::EndDrag( const Point * )
for(SwViewShell& rSh : GetRingContainer())
rSh.StartAction();
- StartUndo( UNDO_START );
+ StartUndo( SwUndoId::START );
// #50778# Bug during dragging: In StartAction a HideShowXor is called.
// In EndDragObj() this is reversed, for no reason and even wrong.
@@ -755,7 +755,7 @@ void SwFEShell::EndDrag( const Point * )
GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(true);
ChgAnchor( 0, true );
- EndUndo( UNDO_END );
+ EndUndo( SwUndoId::END );
for(SwViewShell& rSh : GetRingContainer())
{
@@ -2415,11 +2415,11 @@ void SwFEShell::GroupSelection()
if ( IsGroupAllowed() )
{
StartAllAction();
- StartUndo( UNDO_START );
+ StartUndo( SwUndoId::START );
GetDoc()->GroupSelection( *Imp()->GetDrawView() );
- EndUndo( UNDO_END );
+ EndUndo( SwUndoId::END );
EndAllAction();
}
}
@@ -2430,11 +2430,11 @@ void SwFEShell::UnGroupSelection()
if ( IsGroupSelected() )
{
StartAllAction();
- StartUndo( UNDO_START );
+ StartUndo( SwUndoId::START );
GetDoc()->UnGroupSelection( *Imp()->GetDrawView() );
- EndUndo( UNDO_END );
+ EndUndo( SwUndoId::END );
EndAllAction();
}
}
@@ -2628,7 +2628,7 @@ bool SwFEShell::SetObjAttr( const SfxItemSet& rSet )
}
StartAllAction();
- StartUndo( UNDO_INSATTR );
+ StartUndo( SwUndoId::INSATTR );
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
for ( size_t i = 0; i < rMrkList.GetMarkCount(); ++i )
@@ -2638,7 +2638,7 @@ bool SwFEShell::SetObjAttr( const SfxItemSet& rSet )
GetDoc()->SetAttr( rSet, *pContact->GetFormat() );
}
- EndUndo( UNDO_INSATTR );
+ EndUndo( SwUndoId::INSATTR );
EndAllActionAndCall();
GetDoc()->getIDocumentState().SetModified();
return true;
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index 8380afb0eab2..e9d927b9e84d 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -309,9 +309,9 @@ bool SwFEShell::DeleteCol()
ParkCursorInTab();
// then delete the column
- StartUndo(UNDO_COL_DELETE);
+ StartUndo(SwUndoId::COL_DELETE);
bRet = GetDoc()->DeleteRowCol( aBoxes, true );
- EndUndo(UNDO_COL_DELETE);
+ EndUndo(SwUndoId::COL_DELETE);
}
else
@@ -433,9 +433,9 @@ bool SwFEShell::DeleteRow(bool bCompleteTable)
}
// now delete the lines
- StartUndo(bCompleteTable ? UNDO_UI_TABLE_DELETE : UNDO_ROW_DELETE);
+ StartUndo(bCompleteTable ? SwUndoId::UI_TABLE_DELETE : SwUndoId::ROW_DELETE);
bRet = GetDoc()->DeleteRowCol( aBoxes );
- EndUndo(bCompleteTable ? UNDO_UI_TABLE_DELETE : UNDO_ROW_DELETE);
+ EndUndo(bCompleteTable ? SwUndoId::UI_TABLE_DELETE : SwUndoId::ROW_DELETE);
}
else
bRet = false;
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index ab0a560d5826..33552c42b699 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -405,7 +405,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rText, con
{
StartAllAction();
SwRewriter aRewriter(SwUndoInsertLabel::CreateRewriter(rText));
- StartUndo(UNDO_INSERTLABEL, &aRewriter);
+ StartUndo(SwUndoId::INSERTLABEL, &aRewriter);
sal_uLong nIdx = 0;
bool bInnerCntIsFly = false;
diff --git a/sw/source/core/inc/UndoNumbering.hxx b/sw/source/core/inc/UndoNumbering.hxx
index e5f24a4290c6..aa16113f9fe2 100644
--- a/sw/source/core/inc/UndoNumbering.hxx
+++ b/sw/source/core/inc/UndoNumbering.hxx
@@ -37,7 +37,7 @@ class SwUndoInsNum : public SwUndo, private SwUndRng
public:
SwUndoInsNum( const SwPaM& rPam, const SwNumRule& rRule );
SwUndoInsNum( const SwNumRule& rOldRule, const SwNumRule& rNewRule,
- const SwDoc* pDoc, SwUndoId nUndoId = UNDO_INSFMTATTR );
+ const SwDoc* pDoc, SwUndoId nUndoId = SwUndoId::INSFMTATTR );
SwUndoInsNum( const SwPosition& rPos, const SwNumRule& rRule,
const OUString& rReplaceRule );
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index ee8619f7b34e..8521e3354ddf 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -1315,7 +1315,7 @@ void SwFlyAtContentFrame::SetAbsPos( const Point &rNew )
nX = rNew.X() - pFrame->Frame().Left();
}
}
- GetFormat()->GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
+ GetFormat()->GetDoc()->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
if( pCnt != GetAnchorFrame() || ( IsAutoPos() && pCnt->IsTextFrame() &&
GetFormat()->getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE)) )
@@ -1374,7 +1374,7 @@ void SwFlyAtContentFrame::SetAbsPos( const Point &rNew )
ChgRelPos( aRelPos );
- GetFormat()->GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
+ GetFormat()->GetDoc()->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
if ( pOldPage != FindPageFrame() )
::Notify_Background( GetVirtDrawObj(), pOldPage, aOld, PREP_FLY_LEAVE, false );
diff --git a/sw/source/core/undo/SwUndoField.cxx b/sw/source/core/undo/SwUndoField.cxx
index 2b075c0842d0..929c467d48f4 100644
--- a/sw/source/core/undo/SwUndoField.cxx
+++ b/sw/source/core/undo/SwUndoField.cxx
@@ -58,7 +58,7 @@ SwUndoFieldFromDoc::SwUndoFieldFromDoc(const SwPosition & rPos,
const SwField & rOldField,
const SwField & rNewField,
SwMsgPoolItem * _pHint, bool _bUpdate)
- : SwUndoField(rPos,UNDO_FIELD)
+ : SwUndoField(rPos,SwUndoId::FIELD)
, pOldField(rOldField.CopyField())
, pNewField(rNewField.CopyField())
, pHint(_pHint)
diff --git a/sw/source/core/undo/SwUndoFmt.cxx b/sw/source/core/undo/SwUndoFmt.cxx
index 5682cc04f8b9..773fe42295cc 100644
--- a/sw/source/core/undo/SwUndoFmt.cxx
+++ b/sw/source/core/undo/SwUndoFmt.cxx
@@ -192,7 +192,7 @@ SwRewriter SwUndoRenameFormat::GetRewriter() const
SwUndoTextFormatCollCreate::SwUndoTextFormatCollCreate
(SwTextFormatColl * _pNew, SwTextFormatColl * _pDerivedFrom, SwDoc * _pDoc)
- : SwUndoFormatCreate(UNDO_TXTFMTCOL_CREATE, _pNew, _pDerivedFrom, _pDoc)
+ : SwUndoFormatCreate(SwUndoId::TXTFMTCOL_CREATE, _pNew, _pDerivedFrom, _pDoc)
{
}
@@ -213,7 +213,7 @@ SwFormat * SwUndoTextFormatCollCreate::Find(const OUString & rName) const
SwUndoTextFormatCollDelete::SwUndoTextFormatCollDelete(SwTextFormatColl * _pOld,
SwDoc * _pDoc)
- : SwUndoFormatDelete(UNDO_TXTFMTCOL_DELETE, _pOld, _pDoc)
+ : SwUndoFormatDelete(SwUndoId::TXTFMTCOL_DELETE, _pOld, _pDoc)
{
}
@@ -257,7 +257,7 @@ SwFormat * SwUndoCondTextFormatCollDelete::Create(SwFormat * pDerivedFrom)
SwUndoRenameFormatColl::SwUndoRenameFormatColl(const OUString & sInitOldName,
const OUString & sInitNewName,
SwDoc * _pDoc)
- : SwUndoRenameFormat(UNDO_TXTFMTCOL_RENAME, sInitOldName, sInitNewName, _pDoc)
+ : SwUndoRenameFormat(SwUndoId::TXTFMTCOL_RENAME, sInitOldName, sInitNewName, _pDoc)
{
}
@@ -269,7 +269,7 @@ SwFormat * SwUndoRenameFormatColl::Find(const OUString & rName) const
SwUndoCharFormatCreate::SwUndoCharFormatCreate(SwCharFormat * pNewFormat,
SwCharFormat * pDerivedFrom,
SwDoc * pDocument)
- : SwUndoFormatCreate(UNDO_CHARFMT_CREATE, pNewFormat, pDerivedFrom, pDocument)
+ : SwUndoFormatCreate(SwUndoId::CHARFMT_CREATE, pNewFormat, pDerivedFrom, pDocument)
{
}
@@ -289,7 +289,7 @@ SwFormat * SwUndoCharFormatCreate::Find(const OUString & rName) const
}
SwUndoCharFormatDelete::SwUndoCharFormatDelete(SwCharFormat * pOld, SwDoc * pDocument)
- : SwUndoFormatDelete(UNDO_CHARFMT_DELETE, pOld, pDocument)
+ : SwUndoFormatDelete(SwUndoId::CHARFMT_DELETE, pOld, pDocument)
{
}
@@ -311,7 +311,7 @@ SwFormat * SwUndoCharFormatDelete::Find(const OUString & rName) const
SwUndoRenameCharFormat::SwUndoRenameCharFormat(const OUString & sInitOldName,
const OUString & sInitNewName,
SwDoc * pDocument)
- : SwUndoRenameFormat(UNDO_CHARFMT_RENAME, sInitOldName, sInitNewName, pDocument)
+ : SwUndoRenameFormat(SwUndoId::CHARFMT_RENAME, sInitOldName, sInitNewName, pDocument)
{
}
@@ -323,7 +323,7 @@ SwFormat * SwUndoRenameCharFormat::Find(const OUString & rName) const
SwUndoFrameFormatCreate::SwUndoFrameFormatCreate(SwFrameFormat * pNewFormat,
SwFrameFormat * pDerivedFrom,
SwDoc * pDocument)
- : SwUndoFormatCreate(UNDO_FRMFMT_CREATE, pNewFormat, pDerivedFrom, pDocument)
+ : SwUndoFormatCreate(SwUndoId::FRMFMT_CREATE, pNewFormat, pDerivedFrom, pDocument)
{
}
@@ -343,7 +343,7 @@ SwFormat * SwUndoFrameFormatCreate::Find(const OUString & rName) const
}
SwUndoFrameFormatDelete::SwUndoFrameFormatDelete(SwFrameFormat * pOld, SwDoc * pDocument)
- : SwUndoFormatDelete(UNDO_FRMFMT_DELETE, pOld, pDocument)
+ : SwUndoFormatDelete(SwUndoId::FRMFMT_DELETE, pOld, pDocument)
{
}
@@ -365,7 +365,7 @@ SwFormat * SwUndoFrameFormatDelete::Find(const OUString & rName) const
SwUndoRenameFrameFormat::SwUndoRenameFrameFormat(const OUString & sInitOldName,
const OUString & sInitNewName,
SwDoc * pDocument)
- : SwUndoRenameFormat(UNDO_FRMFMT_RENAME, sInitOldName, sInitNewName, pDocument)
+ : SwUndoRenameFormat(SwUndoId::FRMFMT_RENAME, sInitOldName, sInitNewName, pDocument)
{
}
@@ -376,7 +376,7 @@ SwFormat * SwUndoRenameFrameFormat::Find(const OUString & rName) const
SwUndoNumruleCreate::SwUndoNumruleCreate(const SwNumRule * _pNew,
SwDoc * _pDoc)
- : SwUndo(UNDO_NUMRULE_CREATE, _pDoc), pNew(_pNew), aNew(*_pNew), pDoc(_pDoc),
+ : SwUndo(SwUndoId::NUMRULE_CREATE, _pDoc), pNew(_pNew), aNew(*_pNew), pDoc(_pDoc),
bInitialized(false)
{
}
@@ -414,7 +414,7 @@ SwRewriter SwUndoNumruleCreate::GetRewriter() const
SwUndoNumruleDelete::SwUndoNumruleDelete(const SwNumRule & rRule,
SwDoc * _pDoc)
- : SwUndo(UNDO_NUMRULE_DELETE, _pDoc), aOld(rRule), pDoc(_pDoc)
+ : SwUndo(SwUndoId::NUMRULE_DELETE, _pDoc), aOld(rRule), pDoc(_pDoc)
{
}
@@ -440,7 +440,7 @@ SwRewriter SwUndoNumruleDelete::GetRewriter() const
SwUndoNumruleRename::SwUndoNumruleRename(const OUString & _aOldName,
const OUString & _aNewName,
SwDoc * _pDoc)
- : SwUndo(UNDO_NUMRULE_RENAME, _pDoc), aOldName(_aOldName), aNewName(_aNewName),
+ : SwUndo(SwUndoId::NUMRULE_RENAME, _pDoc), aOldName(_aOldName), aNewName(_aNewName),
pDoc(_pDoc)
{
}
diff --git a/sw/source/core/undo/SwUndoPageDesc.cxx b/sw/source/core/undo/SwUndoPageDesc.cxx
index d1bb5bb1f8b3..258eb5e4ac03 100644
--- a/sw/source/core/undo/SwUndoPageDesc.cxx
+++ b/sw/source/core/undo/SwUndoPageDesc.cxx
@@ -100,8 +100,8 @@ SwUndoPageDesc::SwUndoPageDesc(const SwPageDesc & _aOld,
const SwPageDesc & _aNew,
SwDoc * _pDoc)
: SwUndo( _aOld.GetName() != _aNew.GetName() ?
- UNDO_RENAME_PAGEDESC :
- UNDO_CHANGE_PAGEDESC,
+ SwUndoId::RENAME_PAGEDESC :
+ SwUndoId::CHANGE_PAGEDESC,
_pDoc ),
aOld(_aOld, _pDoc), aNew(_aNew, _pDoc), pDoc(_pDoc), bExchange( false )
{
@@ -372,7 +372,7 @@ SwRewriter SwUndoPageDesc::GetRewriter() const
SwUndoPageDescCreate::SwUndoPageDescCreate(const SwPageDesc * pNew,
SwDoc * _pDoc)
- : SwUndo(UNDO_CREATE_PAGEDESC, _pDoc), pDesc(pNew), aNew(*pNew, _pDoc),
+ : SwUndo(SwUndoId::CREATE_PAGEDESC, _pDoc), pDesc(pNew), aNew(*pNew, _pDoc),
pDoc(_pDoc)
{
OSL_ENSURE(nullptr != pDoc, "no document?");
@@ -424,7 +424,7 @@ SwRewriter SwUndoPageDescCreate::GetRewriter() const
SwUndoPageDescDelete::SwUndoPageDescDelete(const SwPageDesc & _aOld,
SwDoc * _pDoc)
- : SwUndo(UNDO_DELETE_PAGEDESC, _pDoc), aOld(_aOld, _pDoc), pDoc(_pDoc)
+ : SwUndo(SwUndoId::DELETE_PAGEDESC, _pDoc), aOld(_aOld, _pDoc), pDoc(_pDoc)
{
OSL_ENSURE(nullptr != pDoc, "no document?");
}
diff --git a/sw/source/core/undo/SwUndoTOXChange.cxx b/sw/source/core/undo/SwUndoTOXChange.cxx
index 5305fb2af2cd..5b69ab91abe0 100644
--- a/sw/source/core/undo/SwUndoTOXChange.cxx
+++ b/sw/source/core/undo/SwUndoTOXChange.cxx
@@ -22,7 +22,7 @@
#include <doctxm.hxx>
SwUndoTOXChange::SwUndoTOXChange(const SwDoc *pDoc, SwTOXBase * _pTOX, const SwTOXBase & rNew)
- : SwUndo(UNDO_TOXCHANGE, pDoc), pTOX(_pTOX), aOld(*_pTOX), aNew(rNew)
+ : SwUndo(SwUndoId::TOXCHANGE, pDoc), pTOX(_pTOX), aOld(*_pTOX), aNew(rNew)
{
}
diff --git a/sw/source/core/undo/docundo.cxx b/sw/source/core/undo/docundo.cxx
index e1ca5244c782..ee674659ddce 100644
--- a/sw/source/core/undo/docundo.cxx
+++ b/sw/source/core/undo/docundo.cxx
@@ -267,18 +267,18 @@ UndoManager::StartUndo(SwUndoId const i_eUndoId,
{
if (!IsUndoEnabled())
{
- return UNDO_EMPTY;
+ return SwUndoId::EMPTY;
}
- SwUndoId const eUndoId( (i_eUndoId == UNDO_EMPTY) ? UNDO_START : i_eUndoId );
+ SwUndoId const eUndoId( (i_eUndoId == SwUndoId::EMPTY) ? SwUndoId::START : i_eUndoId );
- assert(UNDO_END != eUndoId);
- OUString comment( (UNDO_START == eUndoId)
+ assert(SwUndoId::END != eUndoId);
+ OUString comment( (SwUndoId::START == eUndoId)
? OUString("??")
- : OUString(SW_RES(UNDO_BASE + eUndoId)) );
+ : OUString(SW_RES(UNDO_BASE + (int)eUndoId)) );
if (pRewriter)
{
- assert(UNDO_START != eUndoId);
+ assert(SwUndoId::START != eUndoId);
comment = pRewriter->Apply(comment);
}
@@ -288,22 +288,22 @@ UndoManager::StartUndo(SwUndoId const i_eUndoId,
if (const SwView* pView = m_pDocShell->GetView())
nViewShellId = pView->GetViewShellId();
}
- SdrUndoManager::EnterListAction(comment, comment, eUndoId, nViewShellId);
+ SdrUndoManager::EnterListAction(comment, comment, (sal_uInt16)eUndoId, nViewShellId);
return eUndoId;
}
SwUndoId
-UndoManager::EndUndo(SwUndoId const i_eUndoId, SwRewriter const*const pRewriter)
+UndoManager::EndUndo(SwUndoId eUndoId, SwRewriter const*const pRewriter)
{
if (!IsUndoEnabled())
{
- return UNDO_EMPTY;
+ return SwUndoId::EMPTY;
}
- SwUndoId const eUndoId( ((i_eUndoId == UNDO_EMPTY) || (UNDO_START == i_eUndoId))
- ? UNDO_END : i_eUndoId );
- OSL_ENSURE(!((UNDO_END == eUndoId) && pRewriter),
+ if ((eUndoId == SwUndoId::EMPTY) || (SwUndoId::START == eUndoId))
+ eUndoId = SwUndoId::END;
+ OSL_ENSURE(!((SwUndoId::END == eUndoId) && pRewriter),
"EndUndo(): no Undo ID, but rewriter given?");
SfxUndoAction *const pLastUndo(
@@ -315,24 +315,22 @@ UndoManager::EndUndo(SwUndoId const i_eUndoId, SwRewriter const*const pRewriter)
if (nCount) // otherwise: empty list action not inserted!
{
assert(pLastUndo);
- assert(UNDO_START != eUndoId);
- SfxUndoAction *const pUndoAction(SdrUndoManager::GetUndoAction());
- SfxListUndoAction *const pListAction(
- dynamic_cast<SfxListUndoAction*>(pUndoAction));
+ assert(SwUndoId::START != eUndoId);
+ auto pListAction = dynamic_cast<SfxListUndoAction*>(SdrUndoManager::GetUndoAction());
assert(pListAction);
- if (UNDO_END != eUndoId)
+ if (SwUndoId::END != eUndoId)
{
- OSL_ENSURE(pListAction->GetId() == eUndoId,
+ OSL_ENSURE((SwUndoId)pListAction->GetId() == eUndoId,
"EndUndo(): given ID different from StartUndo()");
// comment set by caller of EndUndo
- OUString comment = SW_RES(UNDO_BASE + eUndoId);
+ OUString comment = SW_RES(UNDO_BASE + (int)eUndoId);
if (pRewriter)
{
comment = pRewriter->Apply(comment);
}
pListAction->SetComment(comment);
}
- else if ((UNDO_START != pListAction->GetId()))
+ else if (SwUndoId::START != (SwUndoId)pListAction->GetId())
{
// comment set by caller of StartUndo: nothing to do here
}
@@ -375,7 +373,7 @@ UndoManager::GetLastUndoInfo(
{
if (o_pId)
{
- *o_pId = UNDO_CONFLICT;
+ *o_pId = SwUndoId::CONFLICT;
}
return false;
}
@@ -433,7 +431,7 @@ bool UndoManager::GetFirstRedoInfo(OUString *const o_pStr,
{
if (o_pId)
{
- *o_pId = UNDO_CONFLICT;
+ *o_pId = SwUndoId::CONFLICT;
}
return false;
}
@@ -470,9 +468,9 @@ SwUndoComments_t UndoManager::GetRedoComments() const
SwUndoId UndoManager::GetRepeatInfo(OUString *const o_pStr) const
{
- SwUndoId nRepeatId(UNDO_EMPTY);
+ SwUndoId nRepeatId(SwUndoId::EMPTY);
GetLastUndoInfo(o_pStr, & nRepeatId);
- if( REPEAT_START <= nRepeatId && REPEAT_END > nRepeatId )
+ if( SwUndoId::REPEAT_START <= nRepeatId && SwUndoId::REPEAT_END > nRepeatId )
{
return nRepeatId;
}
@@ -480,7 +478,7 @@ SwUndoId UndoManager::GetRepeatInfo(OUString *const o_pStr) const
{
o_pStr->clear();
}
- return UNDO_EMPTY;
+ return SwUndoId::EMPTY;
}
SwUndo * UndoManager::RemoveLastUndo()
@@ -662,7 +660,7 @@ bool UndoManager::Repeat(::sw::RepeatContext & rContext,
if (const SwView* pView = m_pDocShell->GetView())
nViewShellId = pView->GetViewShellId();
}
- EnterListAction(comment, rcomment, nId, nViewShellId);
+ EnterListAction(comment, rcomment, (sal_uInt16)nId, nViewShellId);
}
SwPaM* pTmp = rContext.m_pCurrentPaM;
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index 47228ee4af1e..0354d15a0d25 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -102,7 +102,7 @@ void SwUndoFormatAttrHelper::Modify( const SfxPoolItem* pOld, const SfxPoolItem*
SwUndoFormatAttr::SwUndoFormatAttr( const SfxItemSet& rOldSet,
SwFormat& rChgFormat,
bool bSaveDrawPt )
- : SwUndo( UNDO_INSFMTATTR, rChgFormat.GetDoc() )
+ : SwUndo( SwUndoId::INSFMTATTR, rChgFormat.GetDoc() )
, m_pFormat( &rChgFormat )
// #i56253#
, m_pOldSet( new SfxItemSet( rOldSet ) )
@@ -115,7 +115,7 @@ SwUndoFormatAttr::SwUndoFormatAttr( const SfxItemSet& rOldSet,
SwUndoFormatAttr::SwUndoFormatAttr( const SfxPoolItem& rItem, SwFormat& rChgFormat,
bool bSaveDrawPt )
- : SwUndo( UNDO_INSFMTATTR, rChgFormat.GetDoc() )
+ : SwUndo( SwUndoId::INSFMTATTR, rChgFormat.GetDoc() )
, m_pFormat( &rChgFormat )
, m_pOldSet( m_pFormat->GetAttrSet().Clone( false ) )
, m_nNodeIndex( 0 )
@@ -514,7 +514,7 @@ bool SwUndoFormatAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext)
SwUndoFormatResetAttr::SwUndoFormatResetAttr( SwFormat& rChangedFormat,
const sal_uInt16 nWhichId )
- : SwUndo( UNDO_RESETATTR, rChangedFormat.GetDoc() )
+ : SwUndo( SwUndoId::RESETATTR, rChangedFormat.GetDoc() )
, m_pChangedFormat( &rChangedFormat )
, m_nWhichId( nWhichId )
{
@@ -543,14 +543,14 @@ void SwUndoFormatResetAttr::RedoImpl(::sw::UndoRedoContext &)
}
SwUndoResetAttr::SwUndoResetAttr( const SwPaM& rRange, sal_uInt16 nFormatId )
- : SwUndo( UNDO_RESETATTR, rRange.GetDoc() ), SwUndRng( rRange )
+ : SwUndo( SwUndoId::RESETATTR, rRange.GetDoc() ), SwUndRng( rRange )
, m_pHistory( new SwHistory )
, m_nFormatId( nFormatId )
{
}
SwUndoResetAttr::SwUndoResetAttr( const SwPosition& rPos, sal_uInt16 nFormatId )
- : SwUndo( UNDO_RESETATTR, rPos.GetDoc() )
+ : SwUndo( SwUndoId::RESETATTR, rPos.GetDoc() )
, m_pHistory( new SwHistory )
, m_nFormatId( nFormatId )
{
@@ -658,7 +658,7 @@ void SwUndoResetAttr::SetAttrs( const std::set<sal_uInt16> &rAttrs )
SwUndoAttr::SwUndoAttr( const SwPaM& rRange, const SfxPoolItem& rAttr,
const SetAttrMode nFlags )
- : SwUndo( UNDO_INSATTR, rRange.GetDoc() ), SwUndRng( rRange )
+ : SwUndo( SwUndoId::INSATTR, rRange.GetDoc() ), SwUndRng( rRange )
, m_AttrSet( rRange.GetDoc()->GetAttrPool(), rAttr.Which(), rAttr.Which() )
, m_pHistory( new SwHistory )
, m_nNodeIndex( ULONG_MAX )
@@ -669,7 +669,7 @@ SwUndoAttr::SwUndoAttr( const SwPaM& rRange, const SfxPoolItem& rAttr,
SwUndoAttr::SwUndoAttr( const SwPaM& rRange, const SfxItemSet& rSet,
const SetAttrMode nFlags )
- : SwUndo( UNDO_INSATTR, rRange.GetDoc() ), SwUndRng( rRange )
+ : SwUndo( SwUndoId::INSATTR, rRange.GetDoc() ), SwUndRng( rRange )
, m_AttrSet( rSet )
, m_pHistory( new SwHistory )
, m_nNodeIndex( ULONG_MAX )
@@ -823,7 +823,7 @@ void SwUndoAttr::RemoveIdx( SwDoc& rDoc )
}
SwUndoDefaultAttr::SwUndoDefaultAttr( const SfxItemSet& rSet, const SwDoc* pDoc )
- : SwUndo( UNDO_SETDEFTATTR, pDoc )
+ : SwUndo( SwUndoId::SETDEFTATTR, pDoc )
{
const SfxPoolItem* pItem;
if( SfxItemState::SET == rSet.GetItemState( RES_PARATR_TABSTOP, false, &pItem ) ) {
@@ -869,7 +869,7 @@ void SwUndoDefaultAttr::RedoImpl(::sw::UndoRedoContext & rContext)
SwUndoMoveLeftMargin::SwUndoMoveLeftMargin(
const SwPaM& rPam, bool bFlag, bool bMod )
- : SwUndo( bFlag ? UNDO_INC_LEFTMARGIN : UNDO_DEC_LEFTMARGIN, rPam.GetDoc() )
+ : SwUndo( bFlag ? SwUndoId::INC_LEFTMARGIN : SwUndoId::DEC_LEFTMARGIN, rPam.GetDoc() )
, SwUndRng( rPam )
, m_pHistory( new SwHistory )
, m_bModulus( bMod )
@@ -897,20 +897,20 @@ void SwUndoMoveLeftMargin::RedoImpl(::sw::UndoRedoContext & rContext)
SwPaM & rPam = AddUndoRedoPaM(rContext);
rDoc.MoveLeftMargin( rPam,
- GetId() == UNDO_INC_LEFTMARGIN, m_bModulus );
+ GetId() == SwUndoId::INC_LEFTMARGIN, m_bModulus );
}
void SwUndoMoveLeftMargin::RepeatImpl(::sw::RepeatContext & rContext)
{
SwDoc & rDoc = rContext.GetDoc();
- rDoc.MoveLeftMargin(rContext.GetRepeatPaM(), GetId() == UNDO_INC_LEFTMARGIN,
+ rDoc.MoveLeftMargin(rContext.GetRepeatPaM(), GetId() == SwUndoId::INC_LEFTMARGIN,
m_bModulus );
}
SwUndoChangeFootNote::SwUndoChangeFootNote(
const SwPaM& rRange, const OUString& rText,
sal_uInt16 nNum, bool bIsEndNote )
- : SwUndo( UNDO_CHGFTN, rRange.GetDoc() ), SwUndRng( rRange )
+ : SwUndo( SwUndoId::CHGFTN, rRange.GetDoc() ), SwUndRng( rRange )
, m_pHistory( new SwHistory() )
, m_Text( rText )
, m_nNumber( nNum )
@@ -949,7 +949,7 @@ void SwUndoChangeFootNote::RepeatImpl(::sw::RepeatContext & rContext)
}
SwUndoFootNoteInfo::SwUndoFootNoteInfo( const SwFootnoteInfo &rInfo, const SwDoc* pDoc )
- : SwUndo( UNDO_FTNINFO, pDoc )
+ : SwUndo( SwUndoId::FTNINFO, pDoc )
, m_pFootNoteInfo( new SwFootnoteInfo( rInfo ) )
{
}
@@ -975,7 +975,7 @@ void SwUndoFootNoteInfo::RedoImpl(::sw::UndoRedoContext & rContext)
}
SwUndoEndNoteInfo::SwUndoEndNoteInfo( const SwEndNoteInfo &rInfo, const SwDoc* pDoc )
- : SwUndo( UNDO_FTNINFO, pDoc )
+ : SwUndo( SwUndoId::FTNINFO, pDoc )
, m_pEndNoteInfo( new SwEndNoteInfo( rInfo ) )
{
}
@@ -1001,7 +1001,7 @@ void SwUndoEndNoteInfo::RedoImpl(::sw::UndoRedoContext & rContext)
}
SwUndoDontExpandFormat::SwUndoDontExpandFormat( const SwPosition& rPos )
- : SwUndo( UNDO_DONTEXPAND, rPos.GetDoc() )
+ : SwUndo( SwUndoId::DONTEXPAND, rPos.GetDoc() )
, m_nNodeIndex( rPos.nNode.GetIndex() )
, m_nContentIndex( rPos.nContent.GetIndex() )
{
diff --git a/sw/source/core/undo/unbkmk.cxx b/sw/source/core/undo/unbkmk.cxx
index ae96d7c53761..d30d78e82dd0 100644
--- a/sw/source/core/undo/unbkmk.cxx
+++ b/sw/source/core/undo/unbkmk.cxx
@@ -72,7 +72,7 @@ SwRewriter SwUndoBookmark::GetRewriter() const
}
SwUndoInsBookmark::SwUndoInsBookmark( const ::sw::mark::IMark& rBkmk )
- : SwUndoBookmark( UNDO_INSBOOKMARK, rBkmk )
+ : SwUndoBookmark( SwUndoId::INSBOOKMARK, rBkmk )
{
}
@@ -87,7 +87,7 @@ void SwUndoInsBookmark::RedoImpl(::sw::UndoRedoContext & rContext)
}
SwUndoDeleteBookmark::SwUndoDeleteBookmark( const ::sw::mark::IMark& rBkmk )
- : SwUndoBookmark( UNDO_DELBOOKMARK, rBkmk )
+ : SwUndoBookmark( SwUndoId::DELBOOKMARK, rBkmk )
{
}
@@ -102,7 +102,7 @@ void SwUndoDeleteBookmark::RedoImpl(::sw::UndoRedoContext & rContext)
}
SwUndoRenameBookmark::SwUndoRenameBookmark( const OUString& rOldName, const OUString& rNewName, const SwDoc* pDoc )
- : SwUndo( UNDO_BOOKMARK_RENAME, pDoc )
+ : SwUndo( SwUndoId::BOOKMARK_RENAME, pDoc )
, m_sOldName( rOldName )
, m_sNewName( rNewName )
{
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index 9825faf3ecca..9ed7449890fa 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -97,7 +97,7 @@ SwUndoDelete::SwUndoDelete(
SwPaM& rPam,
bool bFullPara,
bool bCalledByTableCpy )
- : SwUndo(UNDO_DELETE, rPam.GetDoc()),
+ : SwUndo(SwUndoId::DELETE, rPam.GetDoc()),
SwUndRng( rPam ),
m_pMvStt( nullptr ),
m_pSttStr(nullptr),
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index eae583195d0f..6455257b1cfe 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -179,8 +179,8 @@ sal_Int32 SwUndo::CreateViewShellId(const SwDoc* pDoc)
bool SwUndo::IsDelBox() const
{
- return GetId() == UNDO_COL_DELETE || GetId() == UNDO_ROW_DELETE ||
- GetId() == UNDO_TABLE_DELBOX;
+ return GetId() == SwUndoId::COL_DELETE || GetId() == SwUndoId::ROW_DELETE ||
+ GetId() == SwUndoId::TABLE_DELBOX;
}
SwUndo::~SwUndo()
@@ -250,7 +250,7 @@ bool SwUndo::CanRepeat(SfxRepeatTarget & rContext) const
{
assert(dynamic_cast< ::sw::RepeatContext * >(& rContext));
(void)rContext;
- return (REPEAT_START <= GetId()) && (GetId() < REPEAT_END);
+ return (SwUndoId::REPEAT_START <= GetId()) && (GetId() < SwUndoId::REPEAT_END);
}
void SwUndo::RepeatImpl( ::sw::RepeatContext & )
@@ -265,7 +265,7 @@ OUString SwUndo::GetComment() const
{
if (! pComment)
{
- pComment.reset( new OUString(SW_RES(UNDO_BASE + GetId())) );
+ pComment.reset( new OUString(SW_RES(UNDO_BASE + (int)GetId())) );
SwRewriter aRewriter = GetRewriter();
@@ -276,7 +276,7 @@ OUString SwUndo::GetComment() const
}
else
{
- aResult = SW_RES(UNDO_BASE + GetId());
+ aResult = SW_RES(UNDO_BASE + (int)GetId());
SwRewriter aRewriter = GetRewriter();
diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx
index 0b0b21f33e69..6e9a9e4d25af 100644
--- a/sw/source/core/undo/undobj1.cxx
+++ b/sw/source/core/undo/undobj1.cxx
@@ -208,7 +208,7 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc )
SwUndoInsLayFormat::SwUndoInsLayFormat( SwFrameFormat* pFormat, sal_uLong nNodeIdx, sal_Int32 nCntIdx )
: SwUndoFlyBase( pFormat, RES_DRAWFRMFMT == pFormat->Which() ?
- UNDO_INSDRAWFMT : UNDO_INSLAYFMT ),
+ SwUndoId::INSDRAWFMT : SwUndoId::INSLAYFMT ),
mnCursorSaveIndexPara( nNodeIdx ), mnCursorSaveIndexPos( nCntIdx )
{
const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor();
@@ -365,15 +365,15 @@ lcl_GetSwUndoId(SwFrameFormat *const pFrameFormat)
SwNoTextNode *const pNoTextNode(firstNode.GetNode().GetNoTextNode());
if (pNoTextNode && pNoTextNode->IsGrfNode())
{
- return UNDO_DELGRF;
+ return SwUndoId::DELGRF;
}
else if (pNoTextNode && pNoTextNode->IsOLENode())
{
- // surprisingly not UNDO_DELOLE, which does not seem to work
- return UNDO_DELETE;
+ // surprisingly not SwUndoId::DELOLE, which does not seem to work
+ return SwUndoId::DELETE;
}
}
- return UNDO_DELLAYFMT;
+ return SwUndoId::DELLAYFMT;
}
SwUndoDelLayFormat::SwUndoDelLayFormat( SwFrameFormat* pFormat )
@@ -437,7 +437,7 @@ void SwUndoDelLayFormat::RedoForRollback()
}
SwUndoSetFlyFormat::SwUndoSetFlyFormat( SwFrameFormat& rFlyFormat, SwFrameFormat& rNewFrameFormat )
- : SwUndo( UNDO_SETFLYFRMFMT, rFlyFormat.GetDoc() ), SwClient( &rFlyFormat ), pFrameFormat( &rFlyFormat ),
+ : SwUndo( SwUndoId::SETFLYFRMFMT, rFlyFormat.GetDoc() ), SwClient( &rFlyFormat ), pFrameFormat( &rFlyFormat ),
pOldFormat( static_cast<SwFrameFormat*>(rFlyFormat.DerivedFrom()) ), pNewFormat( &rNewFrameFormat ),
pItemSet( new SfxItemSet( *rFlyFormat.GetAttrSet().GetPool(),
rFlyFormat.GetAttrSet().GetRanges() )),
diff --git a/sw/source/core/undo/undoflystrattr.cxx b/sw/source/core/undo/undoflystrattr.cxx
index a15b3c68ea70..1a811ad21716 100644
--- a/sw/source/core/undo/undoflystrattr.cxx
+++ b/sw/source/core/undo/undoflystrattr.cxx
@@ -30,8 +30,8 @@ SwUndoFlyStrAttr::SwUndoFlyStrAttr( SwFlyFrameFormat& rFlyFrameFormat,
msOldStr( sOldStr ),
msNewStr( sNewStr )
{
- assert(eUndoId == UNDO_FLYFRMFMT_TITLE
- || eUndoId == UNDO_FLYFRMFMT_DESCRIPTION);
+ assert(eUndoId == SwUndoId::FLYFRMFMT_TITLE
+ || eUndoId == SwUndoId::FLYFRMFMT_DESCRIPTION);
}
SwUndoFlyStrAttr::~SwUndoFlyStrAttr()
@@ -42,12 +42,12 @@ void SwUndoFlyStrAttr::UndoImpl(::sw::UndoRedoContext &)
{
switch ( GetId() )
{
- case UNDO_FLYFRMFMT_TITLE:
+ case SwUndoId::FLYFRMFMT_TITLE:
{
mrFlyFrameFormat.SetObjTitle( msOldStr, true );
}
break;
- case UNDO_FLYFRMFMT_DESCRIPTION:
+ case SwUndoId::FLYFRMFMT_DESCRIPTION:
{
mrFlyFrameFormat.SetObjDescription( msOldStr, true );
}
@@ -62,12 +62,12 @@ void SwUndoFlyStrAttr::RedoImpl(::sw::UndoRedoContext &)
{
switch ( GetId() )
{
- case UNDO_FLYFRMFMT_TITLE:
+ case SwUndoId::FLYFRMFMT_TITLE:
{
mrFlyFrameFormat.SetObjTitle( msNewStr, true );
}
break;
- case UNDO_FLYFRMFMT_DESCRIPTION:
+ case SwUndoId::FLYFRMFMT_DESCRIPTION:
{
mrFlyFrameFormat.SetObjDescription( msNewStr, true );
}
diff --git a/sw/source/core/undo/undraw.cxx b/sw/source/core/undo/undraw.cxx
index f17600fc2347..cd2d23ff1aa1 100644
--- a/sw/source/core/undo/undraw.cxx
+++ b/sw/source/core/undo/undraw.cxx
@@ -76,7 +76,7 @@ IMPL_LINK( SwDoc, AddDrawUndo, SdrUndoAction *, pUndo, void )
}
SwSdrUndo::SwSdrUndo( SdrUndoAction* pUndo, const SdrMarkList* pMrkLst, const SwDoc* pDoc )
- : SwUndo( UNDO_DRAWUNDO, pDoc ), pSdrUndo( pUndo )
+ : SwUndo( SwUndoId::DRAWUNDO, pDoc ), pSdrUndo( pUndo )
{
if( pMrkLst && pMrkLst->GetMarkCount() )
pMarkList = new SdrMarkList( *pMrkLst );
@@ -185,7 +185,7 @@ static void lcl_RestoreAnchor( SwFrameFormat* pFormat, sal_uLong& rNodePos )
}
SwUndoDrawGroup::SwUndoDrawGroup( sal_uInt16 nCnt, const SwDoc* pDoc )
- : SwUndo( UNDO_DRAWGROUP, pDoc ), nSize( nCnt + 1 ), bDelFormat( true )
+ : SwUndo( SwUndoId::DRAWGROUP, pDoc ), nSize( nCnt + 1 ), bDelFormat( true )
{
pObjArr = new SwUndoGroupObjImpl[ nSize ];
}
@@ -318,7 +318,7 @@ void SwUndoDrawGroup::SetGroupFormat( SwDrawFrameFormat* pFormat )
}
SwUndoDrawUnGroup::SwUndoDrawUnGroup( SdrObjGroup* pObj, const SwDoc* pDoc )
- : SwUndo( UNDO_DRAWUNGROUP, pDoc ), bDelFormat( false )
+ : SwUndo( SwUndoId::DRAWUNGROUP, pDoc ), bDelFormat( false )
{
nSize = (sal_uInt16)pObj->GetSubList()->GetObjCount() + 1;
pObjArr = new SwUndoGroupObjImpl[ nSize ];
@@ -439,7 +439,7 @@ void SwUndoDrawUnGroup::AddObj( sal_uInt16 nPos, SwDrawFrameFormat* pFormat )
}
SwUndoDrawUnGroupConnectToLayout::SwUndoDrawUnGroupConnectToLayout(const SwDoc* pDoc)
- : SwUndo( UNDO_DRAWUNGROUP, pDoc )
+ : SwUndo( SwUndoId::DRAWUNGROUP, pDoc )
{
}
@@ -487,7 +487,7 @@ void SwUndoDrawUnGroupConnectToLayout::AddFormatAndObj( SwDrawFrameFormat* pDraw
}
SwUndoDrawDelete::SwUndoDrawDelete( sal_uInt16 nCnt, const SwDoc* pDoc )
- : SwUndo( UNDO_DRAWDELETE, pDoc ), nSize( nCnt ), bDelFormat( true )
+ : SwUndo( SwUndoId::DRAWDELETE, pDoc ), nSize( nCnt ), bDelFormat( true )
{
pObjArr = new SwUndoGroupObjImpl[ nSize ];
pMarkLst = new SdrMarkList();
diff --git a/sw/source/core/undo/unfmco.cxx b/sw/source/core/undo/unfmco.cxx
index 7af6718bdf60..bc506d79c794 100644
--- a/sw/source/core/undo/unfmco.cxx
+++ b/sw/source/core/undo/unfmco.cxx
@@ -29,7 +29,7 @@ SwUndoFormatColl::SwUndoFormatColl( const SwPaM& rRange,
SwFormatColl* pColl,
const bool bReset,
const bool bResetListAttrs )
- : SwUndo( UNDO_SETFMTCOLL, rRange.GetDoc() ),
+ : SwUndo( SwUndoId::SETFMTCOLL, rRange.GetDoc() ),
SwUndRng( rRange ),
pHistory( new SwHistory ),
pFormatColl( pColl ),
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index a29081116257..abed8436eb4c 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -110,7 +110,7 @@ SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd, sal_Int32 nCnt,
sal_Int32 nL,
const SwInsertFlags nInsertFlags,
bool bWDelim )
- : SwUndo(UNDO_TYPING, rNd.GetNode().GetDoc()), pText( nullptr ), pRedlData( nullptr ),
+ : SwUndo(SwUndoId::TYPING, rNd.GetNode().GetDoc()), pText( nullptr ), pRedlData( nullptr ),
nNode( rNd.GetIndex() ), nContent(nCnt), nLen(nL),
bIsWordDelim( bWDelim ), bIsAppend( false )
, m_bWithRsid(false)
@@ -120,7 +120,7 @@ SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd, sal_Int32 nCnt,
}
SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd )
- : SwUndo(UNDO_SPLITNODE, rNd.GetNode().GetDoc()), pText( nullptr ),
+ : SwUndo(SwUndoId::SPLITNODE, rNd.GetNode().GetDoc()), pText( nullptr ),
pRedlData( nullptr ), nNode( rNd.GetIndex() ), nContent(0), nLen(1),
bIsWordDelim( false ), bIsAppend( true )
, m_bWithRsid(false)
@@ -511,7 +511,7 @@ public:
SwUndoReplace::SwUndoReplace(SwPaM const& rPam,
OUString const& rIns, bool const bRegExp)
- : SwUndo( UNDO_REPLACE, rPam.GetDoc() )
+ : SwUndo( SwUndoId::REPLACE, rPam.GetDoc() )
, m_pImpl(o3tl::make_unique<Impl>(rPam, rIns, bRegExp))
{
}
@@ -787,7 +787,7 @@ void SwUndoReplace::Impl::SetEnd(SwPaM const& rPam)
}
SwUndoReRead::SwUndoReRead( const SwPaM& rPam, const SwGrfNode& rGrfNd )
- : SwUndo( UNDO_REREAD, rPam.GetDoc() ), nPos( rPam.GetPoint()->nNode.GetIndex() )
+ : SwUndo( SwUndoId::REREAD, rPam.GetDoc() ), nPos( rPam.GetPoint()->nNode.GetIndex() )
{
SaveGraphicData( rGrfNd );
}
@@ -869,7 +869,7 @@ SwUndoInsertLabel::SwUndoInsertLabel( const SwLabelType eTyp,
const OUString& rCharacterStyle,
const bool bCpyBorder,
const SwDoc* pDoc )
- : SwUndo( UNDO_INSERTLABEL, pDoc ),
+ : SwUndo( SwUndoId::INSERTLABEL, pDoc ),
sText( rText ),
sSeparator( rSeparator ),
sNumberSeparator( rNumberSeparator ),//#i61007# order of captions
diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx
index 24f6452b242f..e56edaf56415 100644
--- a/sw/source/core/undo/unmove.cxx
+++ b/sw/source/core/undo/unmove.cxx
@@ -28,7 +28,7 @@
// MOVE
SwUndoMove::SwUndoMove( const SwPaM& rRange, const SwPosition& rMvPos )
- : SwUndo( UNDO_MOVE, rRange.GetDoc() )
+ : SwUndo( SwUndoId::MOVE, rRange.GetDoc() )
, SwUndRng( rRange )
, nDestSttNode(0)
, nDestEndNode(0)
@@ -95,7 +95,7 @@ SwUndoMove::SwUndoMove( const SwPaM& rRange, const SwPosition& rMvPos )
SwUndoMove::SwUndoMove( SwDoc* pDoc, const SwNodeRange& rRg,
const SwNodeIndex& rMvPos )
- : SwUndo(UNDO_MOVE, pDoc)
+ : SwUndo(SwUndoId::MOVE, pDoc)
, nDestSttNode(0)
, nDestEndNode(0)
, nInsPosNode(0)
diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx
index 6717a1e2df92..c33c9997bf1e 100644
--- a/sw/source/core/undo/unnum.cxx
+++ b/sw/source/core/undo/unnum.cxx
@@ -39,7 +39,7 @@ SwUndoInsNum::SwUndoInsNum( const SwNumRule& rOldRule,
}
SwUndoInsNum::SwUndoInsNum( const SwPaM& rPam, const SwNumRule& rRule )
- : SwUndo( UNDO_INSNUM, rPam.GetDoc() ), SwUndRng( rPam ),
+ : SwUndo( SwUndoId::INSNUM, rPam.GetDoc() ), SwUndRng( rPam ),
aNumRule( rRule ), pHistory( nullptr ),
nSttSet( ULONG_MAX ), pOldNumRule( nullptr ), nLRSavePos( 0 )
{
@@ -47,7 +47,7 @@ SwUndoInsNum::SwUndoInsNum( const SwPaM& rPam, const SwNumRule& rRule )
SwUndoInsNum::SwUndoInsNum( const SwPosition& rPos, const SwNumRule& rRule,
const OUString& rReplaceRule )
- : SwUndo( UNDO_INSNUM, rPos.nNode.GetNode().GetDoc() ),
+ : SwUndo( SwUndoId::INSNUM, rPos.nNode.GetNode().GetDoc() ),
aNumRule( rRule ), pHistory( nullptr ),
nSttSet( ULONG_MAX ), pOldNumRule( nullptr ),
sReplaceRule( rReplaceRule ), nLRSavePos( 0 )
@@ -68,7 +68,7 @@ SwUndoInsNum::~SwUndoInsNum()
SwRewriter SwUndoInsNum::GetRewriter() const
{
SwRewriter aResult;
- if( UNDO_INSFMTATTR == GetId() )
+ if( SwUndoId::INSFMTATTR == GetId() )
aResult.AddRule(UndoArg1, aNumRule.GetName());
return aResult;
}
@@ -163,7 +163,7 @@ void SwUndoInsNum::SaveOldNumRule( const SwNumRule& rOld )
}
SwUndoDelNum::SwUndoDelNum( const SwPaM& rPam )
- : SwUndo( UNDO_DELNUM, rPam.GetDoc() ), SwUndRng( rPam )
+ : SwUndo( SwUndoId::DELNUM, rPam.GetDoc() ), SwUndRng( rPam )
{
aNodes.reserve( nEndNode - nSttNode > 255 ? 255 : nEndNode - nSttNode );
pHistory.reset( new SwHistory );
@@ -213,7 +213,7 @@ void SwUndoDelNum::AddNode( const SwTextNode& rNd )
}
SwUndoMoveNum::SwUndoMoveNum( const SwPaM& rPam, long nOff, bool bIsOutlMv )
- : SwUndo( bIsOutlMv ? UNDO_OUTLINE_UD : UNDO_MOVENUM, rPam.GetDoc() ),
+ : SwUndo( bIsOutlMv ? SwUndoId::OUTLINE_UD : SwUndoId::MOVENUM, rPam.GetDoc() ),
SwUndRng( rPam ),
nNewStt( 0 ), nOffset( nOff )
{
@@ -236,7 +236,7 @@ void SwUndoMoveNum::UndoImpl(::sw::UndoRedoContext & rContext)
SwPaM & rPam( AddUndoRedoPaM(rContext) );
rContext.GetDoc().MoveParagraph( rPam, -nOffset,
- UNDO_OUTLINE_UD == GetId() );
+ SwUndoId::OUTLINE_UD == GetId() );
nSttNode = nTmpStt;
nEndNode = nTmpEnd;
}
@@ -244,13 +244,13 @@ void SwUndoMoveNum::UndoImpl(::sw::UndoRedoContext & rContext)
void SwUndoMoveNum::RedoImpl(::sw::UndoRedoContext & rContext)
{
SwPaM & rPam( AddUndoRedoPaM(rContext) );
- rContext.GetDoc().MoveParagraph(rPam, nOffset, UNDO_OUTLINE_UD == GetId());
+ rContext.GetDoc().MoveParagraph(rPam, nOffset, SwUndoId::OUTLINE_UD == GetId());
}
void SwUndoMoveNum::RepeatImpl(::sw::RepeatContext & rContext)
{
SwDoc & rDoc = rContext.GetDoc();
- if( UNDO_OUTLINE_UD == GetId() )
+ if( SwUndoId::OUTLINE_UD == GetId() )
{
rDoc.MoveOutlinePara(rContext.GetRepeatPaM(),
0 < nOffset ? 1 : -1 );
@@ -262,7 +262,7 @@ void SwUndoMoveNum::RepeatImpl(::sw::RepeatContext & rContext)
}
SwUndoNumUpDown::SwUndoNumUpDown( const SwPaM& rPam, short nOff )
- : SwUndo( nOff > 0 ? UNDO_NUMUP : UNDO_NUMDOWN, rPam.GetDoc() ),
+ : SwUndo( nOff > 0 ? SwUndoId::NUMUP : SwUndoId::NUMDOWN, rPam.GetDoc() ),
SwUndRng( rPam ),
nOffset( nOff )
{
@@ -289,7 +289,7 @@ void SwUndoNumUpDown::RepeatImpl(::sw::RepeatContext & rContext)
SwUndoNumOrNoNum::SwUndoNumOrNoNum( const SwNodeIndex& rIdx, bool bOldNum,
bool bNewNum)
- : SwUndo( UNDO_NUMORNONUM, rIdx.GetNode().GetDoc() ),
+ : SwUndo( SwUndoId::NUMORNONUM, rIdx.GetNode().GetDoc() ),
nIdx( rIdx.GetIndex() ), mbNewNum(bNewNum),
mbOldNum(bOldNum)
{
@@ -333,14 +333,14 @@ void SwUndoNumOrNoNum::RepeatImpl(::sw::RepeatContext & rContext)
}
SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, bool bFlg )
- : SwUndo( UNDO_SETNUMRULESTART, rPos.GetDoc() ),
+ : SwUndo( SwUndoId::SETNUMRULESTART, rPos.GetDoc() ),
nIdx( rPos.nNode.GetIndex() ), nOldStt( USHRT_MAX ),
nNewStt( USHRT_MAX ), bSetSttValue( false ), bFlag( bFlg )
{
}
SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, sal_uInt16 nStt )
- : SwUndo(UNDO_SETNUMRULESTART, rPos.GetDoc())
+ : SwUndo(SwUndoId::SETNUMRULESTART, rPos.GetDoc())
, nIdx(rPos.nNode.GetIndex())
, nOldStt(USHRT_MAX)
, nNewStt(nStt)
diff --git a/sw/source/core/undo/unoutl.cxx b/sw/source/core/undo/unoutl.cxx
index d4573288e88e..8b9429c159ec 100644
--- a/sw/source/core/undo/unoutl.cxx
+++ b/sw/source/core/undo/unoutl.cxx
@@ -26,7 +26,7 @@
SwUndoOutlineLeftRight::SwUndoOutlineLeftRight( const SwPaM& rPam,
short nOff )
- : SwUndo( UNDO_OUTLINE_LR, rPam.GetDoc() ), SwUndRng( rPam ), nOffset( nOff )
+ : SwUndo( SwUndoId::OUTLINE_LR, rPam.GetDoc() ), SwUndRng( rPam ), nOffset( nOff )
{
}
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index 3f2924fb0c13..b73bc2a150f1 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -42,7 +42,7 @@ using namespace ::com::sun::star::uno;
SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos,
sal_Unicode cIns )
- : SwUndo(UNDO_OVERWRITE, pDoc),
+ : SwUndo(SwUndoId::OVERWRITE, pDoc),
pRedlSaveData( nullptr ), bGroup( false )
{
if( !pDoc->getIDocumentRedlineAccess().IsIgnoreRedline() && !pDoc->getIDocumentRedlineAccess().GetRedlineTable().empty() )
@@ -341,7 +341,7 @@ struct UndoTransliterate_Data
SwUndoTransliterate::SwUndoTransliterate(
const SwPaM& rPam,
const utl::TransliterationWrapper& rTrans )
- : SwUndo( UNDO_TRANSLITERATE, rPam.GetDoc() ), SwUndRng( rPam ), nType( rTrans.getType() )
+ : SwUndo( SwUndoId::TRANSLITERATE, rPam.GetDoc() ), SwUndRng( rPam ), nType( rTrans.getType() )
{
}
diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx
index 690b424ce6ad..de6d41b9822c 100644
--- a/sw/source/core/undo/unredln.cxx
+++ b/sw/source/core/undo/unredln.cxx
@@ -34,7 +34,7 @@
#include <docedt.hxx>
SwUndoRedline::SwUndoRedline( SwUndoId nUsrId, const SwPaM& rRange )
- : SwUndo( UNDO_REDLINE, rRange.GetDoc() ), SwUndRng( rRange ),
+ : SwUndo( SwUndoId::REDLINE, rRange.GetDoc() ), SwUndRng( rRange ),
mpRedlData( nullptr ), mpRedlSaveData( nullptr ), mnUserId( nUsrId ),
mbHiddenRedlines( false )
{
@@ -44,8 +44,8 @@ SwUndoRedline::SwUndoRedline( SwUndoId nUsrId, const SwPaM& rRange )
{
switch( mnUserId )
{
- case UNDO_DELETE:
- case UNDO_REPLACE:
+ case SwUndoId::DELETE:
+ case SwUndoId::REPLACE:
mpRedlData = new SwRedlineData( nsRedlineType_t::REDLINE_DELETE, rDoc.getIDocumentRedlineAccess().GetRedlineAuthor() );
break;
default:
@@ -57,7 +57,7 @@ SwUndoRedline::SwUndoRedline( SwUndoId nUsrId, const SwPaM& rRange )
sal_uLong nEndExtra = rDoc.GetNodes().GetEndOfExtras().GetIndex();
mpRedlSaveData = new SwRedlineSaveDatas;
- if( !FillSaveData( rRange, *mpRedlSaveData, false, UNDO_REJECT_REDLINE != mnUserId ))
+ if( !FillSaveData( rRange, *mpRedlSaveData, false, SwUndoId::REJECT_REDLINE != mnUserId ))
{
delete mpRedlSaveData;
mpRedlSaveData = nullptr;
@@ -118,7 +118,7 @@ void SwUndoRedline::RedoImpl(::sw::UndoRedoContext & rContext)
if( mpRedlSaveData && mbHiddenRedlines )
{
sal_uLong nEndExtra = rDoc.GetNodes().GetEndOfExtras().GetIndex();
- FillSaveData(rPam, *mpRedlSaveData, false, UNDO_REJECT_REDLINE != mnUserId );
+ FillSaveData(rPam, *mpRedlSaveData, false, SwUndoId::REJECT_REDLINE != mnUserId );
nEndExtra -= rDoc.GetNodes().GetEndOfExtras().GetIndex();
nSttNode -= nEndExtra;
@@ -142,11 +142,11 @@ void SwUndoRedline::RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
}
SwUndoRedlineDelete::SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUsrId )
- : SwUndoRedline( nUsrId ? nUsrId : UNDO_DELETE, rRange ),
+ : SwUndoRedline( nUsrId != SwUndoId::EMPTY ? nUsrId : SwUndoId::DELETE, rRange ),
bCanGroup( false ), bIsDelim( false ), bIsBackspace( false )
{
const SwTextNode* pTNd;
- if( UNDO_DELETE == mnUserId &&
+ if( SwUndoId::DELETE == mnUserId &&
nSttNode == nEndNode && nSttContent + 1 == nEndContent &&
nullptr != (pTNd = rRange.GetNode().GetTextNode()) )
{
@@ -179,7 +179,7 @@ void SwUndoRedlineDelete::RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
bool SwUndoRedlineDelete::CanGrouping( const SwUndoRedlineDelete& rNext )
{
bool bRet = false;
- if( UNDO_DELETE == mnUserId && mnUserId == rNext.mnUserId &&
+ if( SwUndoId::DELETE == mnUserId && mnUserId == rNext.mnUserId &&
bCanGroup == rNext.bCanGroup &&
bIsDelim == rNext.bIsDelim &&
bIsBackspace == rNext.bIsBackspace &&
@@ -212,7 +212,7 @@ bool SwUndoRedlineDelete::CanGrouping( const SwUndoRedlineDelete& rNext )
SwUndoRedlineSort::SwUndoRedlineSort( const SwPaM& rRange,
const SwSortOptions& rOpt )
- : SwUndoRedline( UNDO_SORT_TXT, rRange ),
+ : SwUndoRedline( SwUndoId::SORT_TXT, rRange ),
pOpt( new SwSortOptions( rOpt ) ),
nSaveEndNode( nEndNode ), nOffset( 0 ), nSaveEndContent( nEndContent )
{
@@ -324,7 +324,7 @@ void SwUndoRedlineSort::SetOffset( const SwNodeIndex& rIdx )
}
SwUndoAcceptRedline::SwUndoAcceptRedline( const SwPaM& rRange )
- : SwUndoRedline( UNDO_ACCEPT_REDLINE, rRange )
+ : SwUndoRedline( SwUndoId::ACCEPT_REDLINE, rRange )
{
}
@@ -339,7 +339,7 @@ void SwUndoAcceptRedline::RepeatImpl(::sw::RepeatContext & rContext)
}
SwUndoRejectRedline::SwUndoRejectRedline( const SwPaM& rRange )
- : SwUndoRedline( UNDO_REJECT_REDLINE, rRange )
+ : SwUndoRedline( SwUndoId::REJECT_REDLINE, rRange )
{
}
@@ -354,7 +354,7 @@ void SwUndoRejectRedline::RepeatImpl(::sw::RepeatContext & rContext)
}
SwUndoCompDoc::SwUndoCompDoc( const SwPaM& rRg, bool bIns )
- : SwUndo( UNDO_COMPAREDOC, rRg.GetDoc() ), SwUndRng( rRg ), pRedlData( nullptr ),
+ : SwUndo( SwUndoId::COMPAREDOC, rRg.GetDoc() ), SwUndRng( rRg ), pRedlData( nullptr ),
pUnDel( nullptr ), pUnDel2( nullptr ), pRedlSaveData( nullptr ), bInsert( bIns )
{
SwDoc* pDoc = rRg.GetDoc();
@@ -367,7 +367,7 @@ SwUndoCompDoc::SwUndoCompDoc( const SwPaM& rRg, bool bIns )
}
SwUndoCompDoc::SwUndoCompDoc( const SwRangeRedline& rRedl )
- : SwUndo( UNDO_COMPAREDOC, rRedl.GetDoc() ), SwUndRng( rRedl ), pRedlData( nullptr ),
+ : SwUndo( SwUndoId::COMPAREDOC, rRedl.GetDoc() ), SwUndRng( rRedl ), pRedlData( nullptr ),
pUnDel( nullptr ), pUnDel2( nullptr ), pRedlSaveData( nullptr ),
// for MergeDoc the corresponding inverse is needed
bInsert( nsRedlineType_t::REDLINE_DELETE == rRedl.GetType() )
diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx
index 891f645bf861..270e676f04a8 100644
--- a/sw/source/core/undo/unsect.cxx
+++ b/sw/source/core/undo/unsect.cxx
@@ -70,7 +70,7 @@ static SfxItemSet* lcl_GetAttrSet( const SwSection& rSect )
SwUndoInsSection::SwUndoInsSection(
SwPaM const& rPam, SwSectionData const& rNewData,
SfxItemSet const*const pSet, SwTOXBase const*const pTOXBase)
- : SwUndo( UNDO_INSSECTION, rPam.GetDoc() ), SwUndRng( rPam )
+ : SwUndo( SwUndoId::INSSECTION, rPam.GetDoc() ), SwUndRng( rPam )
, m_pSectionData(new SwSectionData(rNewData))
, m_pTOXBase( (pTOXBase) ? new SwTOXBase(*pTOXBase) : nullptr )
, m_pAttrSet( (pSet && pSet->Count()) ? new SfxItemSet( *pSet ) : nullptr )
@@ -301,7 +301,7 @@ SwUndo * MakeUndoDelSection(SwSectionFormat const& rFormat)
SwUndoDelSection::SwUndoDelSection(
SwSectionFormat const& rSectionFormat, SwSection const& rSection,
SwNodeIndex const*const pIndex)
- : SwUndo( UNDO_DELSECTION, rSectionFormat.GetDoc() )
+ : SwUndo( SwUndoId::DELSECTION, rSectionFormat.GetDoc() )
, m_pSectionData( new SwSectionData(rSection) )
, m_pTOXBase( dynamic_cast<const SwTOXBaseSection*>( &rSection) != nullptr
? new SwTOXBase(static_cast<SwTOXBaseSection const&>(rSection))
@@ -404,7 +404,7 @@ MakeUndoUpdateSection(SwSectionFormat const& rFormat, bool const bOnlyAttr)
SwUndoUpdateSection::SwUndoUpdateSection(
SwSection const& rSection, SwNodeIndex const*const pIndex,
bool const bOnlyAttr)
- : SwUndo( UNDO_CHGSECTION, pIndex->GetNode().GetDoc() )
+ : SwUndo( SwUndoId::CHGSECTION, pIndex->GetNode().GetDoc() )
, m_pSectionData( new SwSectionData(rSection) )
, m_pAttrSet( ::lcl_GetAttrSet(rSection) )
, m_nStartNode( pIndex->GetIndex() )
diff --git a/sw/source/core/undo/unsort.cxx b/sw/source/core/undo/unsort.cxx
index 903c42b794b0..b6892c8faadb 100644
--- a/sw/source/core/undo/unsort.cxx
+++ b/sw/source/core/undo/unsort.cxx
@@ -42,7 +42,7 @@ SwSortUndoElement::~SwSortUndoElement()
}
SwUndoSort::SwUndoSort(const SwPaM& rRg, const SwSortOptions& rOpt)
- : SwUndo(UNDO_SORT_TXT, rRg.GetDoc())
+ : SwUndo(SwUndoId::SORT_TXT, rRg.GetDoc())
, SwUndRng(rRg)
, pUndoTableAttr(nullptr)
, nTableNd(0)
@@ -52,7 +52,7 @@ SwUndoSort::SwUndoSort(const SwPaM& rRg, const SwSortOptions& rOpt)
SwUndoSort::SwUndoSort( sal_uLong nStt, sal_uLong nEnd, const SwTableNode& rTableNd,
const SwSortOptions& rOpt, bool bSaveTable )
- : SwUndo(UNDO_SORT_TBL, rTableNd.GetDoc()), pUndoTableAttr( nullptr )
+ : SwUndo(SwUndoId::SORT_TBL, rTableNd.GetDoc()), pUndoTableAttr( nullptr )
{
nSttNode = nStt;
nEndNode = nEnd;
diff --git a/sw/source/core/undo/unspnd.cxx b/sw/source/core/undo/unspnd.cxx
index f4133fff45b8..ee5de4acce69 100644
--- a/sw/source/core/undo/unspnd.cxx
+++ b/sw/source/core/undo/unspnd.cxx
@@ -37,7 +37,7 @@
SwUndoSplitNode::SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos,
bool bChkTable )
- : SwUndo( UNDO_SPLITNODE, pDoc ), pHistory( nullptr ), pRedlData( nullptr ), nNode( rPos.nNode.GetIndex() ),
+ : SwUndo( SwUndoId::SPLITNODE, pDoc ), pHistory( nullptr ), pRedlData( nullptr ), nNode( rPos.nNode.GetIndex() ),
nContent( rPos.nContent.GetIndex() ),
bTableFlag( false ), bChkTableStt( bChkTable )
{
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 9e8c107945ee..ad8561b5cbaa 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -220,7 +220,7 @@ SwUndoInsTable::SwUndoInsTable( const SwPosition& rPos, sal_uInt16 nCl, sal_uInt
const SwTableAutoFormat* pTAFormat,
const std::vector<sal_uInt16> *pColArr,
const OUString & rName)
- : SwUndo( UNDO_INSTABLE, rPos.GetDoc() ),
+ : SwUndo( SwUndoId::INSTABLE, rPos.GetDoc() ),
aInsTableOpts( rInsTableOpts ), pDDEFieldType( nullptr ), pColWidth( nullptr ), pRedlData( nullptr ), pAutoFormat( nullptr ),
nSttNode( rPos.nNode.GetIndex() ), nRows( nRw ), nCols( nCl ), nAdjust( nAdj )
{
@@ -396,7 +396,7 @@ SwTableToTextSave::SwTableToTextSave( SwDoc& rDoc, sal_uLong nNd, sal_uLong nEnd
}
SwUndoTableToText::SwUndoTableToText( const SwTable& rTable, sal_Unicode cCh )
- : SwUndo( UNDO_TABLETOTEXT, rTable.GetFrameFormat()->GetDoc() ),
+ : SwUndo( SwUndoId::TABLETOTEXT, rTable.GetFrameFormat()->GetDoc() ),
sTableNm( rTable.GetFrameFormat()->GetName() ), pDDEFieldType( nullptr ), pHistory( nullptr ),
nSttNd( 0 ), nEndNd( 0 ),
cTrenner( cCh ), nHdlnRpt( rTable.GetRowsToRepeat() )
@@ -690,7 +690,7 @@ SwUndoTextToTable::SwUndoTextToTable( const SwPaM& rRg,
const SwInsertTableOptions& rInsTableOpts,
sal_Unicode cCh, sal_uInt16 nAdj,
const SwTableAutoFormat* pAFormat )
- : SwUndo( UNDO_TEXTTOTABLE, rRg.GetDoc() ), SwUndRng( rRg ), aInsTableOpts( rInsTableOpts ),
+ : SwUndo( SwUndoId::TEXTTOTABLE, rRg.GetDoc() ), SwUndRng( rRg ), aInsTableOpts( rInsTableOpts ),
pDelBoxes( nullptr ), pAutoFormat( nullptr ),
pHistory( nullptr ), cTrenner( cCh ), nAdjust( nAdj )
{
@@ -827,7 +827,7 @@ SwHistory& SwUndoTextToTable::GetHistory()
SwUndoTableHeadline::SwUndoTableHeadline( const SwTable& rTable, sal_uInt16 nOldHdl,
sal_uInt16 nNewHdl )
- : SwUndo( UNDO_TABLEHEADLINE, rTable.GetFrameFormat()->GetDoc() ),
+ : SwUndo( SwUndoId::TABLEHEADLINE, rTable.GetFrameFormat()->GetDoc() ),
nOldHeadline( nOldHdl ),
nNewHeadline( nNewHdl )
{
@@ -1366,7 +1366,7 @@ void SaveBox::CreateNew( SwTable& rTable, SwTableLine& rParent, SaveTable& rSTab
// UndoObject for attribute changes on table
SwUndoAttrTable::SwUndoAttrTable( const SwTableNode& rTableNd, bool bClearTabCols )
- : SwUndo( UNDO_TABLE_ATTR, rTableNd.GetDoc() ),
+ : SwUndo( SwUndoId::TABLE_ATTR, rTableNd.GetDoc() ),
nSttNode( rTableNd.GetIndex() )
{
bClearTabCol = bClearTabCols;
@@ -1402,7 +1402,7 @@ void SwUndoAttrTable::RedoImpl(::sw::UndoRedoContext & rContext)
// UndoObject for AutoFormat on Table
SwUndoTableAutoFormat::SwUndoTableAutoFormat( const SwTableNode& rTableNd,
const SwTableAutoFormat& rAFormat )
- : SwUndo( UNDO_TABLE_AUTOFMT, rTableNd.GetDoc() )
+ : SwUndo( SwUndoId::TABLE_AUTOFMT, rTableNd.GetDoc() )
, m_TableStyleName(rTableNd.GetTable().GetTableStyleName())
, nSttNode( rTableNd.GetIndex() )
, bSaveContentAttr( false )
@@ -1831,7 +1831,7 @@ void SwUndoTableNdsChg::RedoImpl(::sw::UndoRedoContext & rContext)
// create SelBoxes and call InsertCell/-Row/SplitTable
switch( GetId() )
{
- case UNDO_TABLE_INSCOL:
+ case SwUndoId::TABLE_INSCOL:
if( USHRT_MAX == nSetColType )
rDoc.InsertCol( aSelBoxes, nCount, bFlag );
else
@@ -1842,7 +1842,7 @@ void SwUndoTableNdsChg::RedoImpl(::sw::UndoRedoContext & rContext)
}
break;
- case UNDO_TABLE_INSROW:
+ case SwUndoId::TABLE_INSROW:
if( USHRT_MAX == nSetColType )
rDoc.InsertRow( aSelBoxes, nCount, bFlag );
else
@@ -1856,12 +1856,12 @@ void SwUndoTableNdsChg::RedoImpl(::sw::UndoRedoContext & rContext)
}
break;
- case UNDO_TABLE_SPLIT:
+ case SwUndoId::TABLE_SPLIT:
rDoc.SplitTable( aSelBoxes, bFlag, nCount, bSameHeight );
break;
- case UNDO_TABLE_DELBOX:
- case UNDO_ROW_DELETE:
- case UNDO_COL_DELETE:
+ case SwUndoId::TABLE_DELBOX:
+ case SwUndoId::ROW_DELETE:
+ case SwUndoId::COL_DELETE:
if( USHRT_MAX == nSetColType )
{
SwTableFormulaUpdate aMsgHint( &pTableNd->GetTable() );
@@ -1930,7 +1930,7 @@ void SwUndoTableNdsChg::RedoImpl(::sw::UndoRedoContext & rContext)
}
SwUndoTableMerge::SwUndoTableMerge( const SwPaM& rTableSel )
- : SwUndo( UNDO_TABLE_MERGE, rTableSel.GetDoc() ), SwUndRng( rTableSel )
+ : SwUndo( SwUndoId::TABLE_MERGE, rTableSel.GetDoc() ), SwUndRng( rTableSel )
, m_pMoves(new SwUndoMoves)
, pHistory(nullptr)
{
@@ -2147,7 +2147,7 @@ void SwUndoTableMerge::SaveCollection( const SwTableBox& rBox )
SwUndoTableNumFormat::SwUndoTableNumFormat( const SwTableBox& rBox,
const SfxItemSet* pNewSet )
- : SwUndo(UNDO_TBLNUMFMT, rBox.GetFrameFormat()->GetDoc())
+ : SwUndo(SwUndoId::TBLNUMFMT, rBox.GetFrameFormat()->GetDoc())
, pBoxSet(nullptr)
, pHistory(nullptr)
, nFormatIdx(css::util::NumberFormat::TEXT)
@@ -2420,7 +2420,7 @@ UndoTableCpyTable_Entry::~UndoTableCpyTable_Entry()
}
SwUndoTableCpyTable::SwUndoTableCpyTable(const SwDoc* pDoc)
- : SwUndo( UNDO_TBLCPYTBL, pDoc )
+ : SwUndo( SwUndoId::TBLCPYTBL, pDoc )
, m_pArr(new SwUndoTableCpyTable_Entries)
, pInsRowUndo(nullptr)
{
@@ -2774,7 +2774,7 @@ SwUndo* SwUndoTableCpyTable::PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox
if( aDeleteStart != aCellEnd )
{ // If the old (deleted) part is not empty, here we are...
SwPaM aDeletePam( aDeleteStart, aCellEnd );
- pUndo = new SwUndoRedlineDelete( aDeletePam, UNDO_DELETE );
+ pUndo = new SwUndoRedlineDelete( aDeletePam, SwUndoId::DELETE );
pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_DELETE, aDeletePam ), true );
}
else if( !rJoin ) // If the old part is empty and joined, we are finished
@@ -2804,7 +2804,7 @@ bool SwUndoTableCpyTable::InsertRow( SwTable& rTable, const SwSelBoxes& rBoxes,
SwTableNode* pTableNd = const_cast<SwTableNode*>(rTable.GetTabSortBoxes()[0]->
GetSttNd()->FindTableNode());
- pInsRowUndo = new SwUndoTableNdsChg( UNDO_TABLE_INSROW, rBoxes, *pTableNd,
+ pInsRowUndo = new SwUndoTableNdsChg( SwUndoId::TABLE_INSROW, rBoxes, *pTableNd,
0, 0, nCnt, true, false );
SwTableSortBoxes aTmpLst( rTable.GetTabSortBoxes() );
@@ -2825,7 +2825,7 @@ bool SwUndoTableCpyTable::IsEmpty() const
}
SwUndoCpyTable::SwUndoCpyTable(const SwDoc* pDoc)
- : SwUndo( UNDO_CPYTBL, pDoc ), pDel( nullptr ), nTableNode( 0 )
+ : SwUndo( SwUndoId::CPYTBL, pDoc ), pDel( nullptr ), nTableNode( 0 )
{
}
@@ -2866,7 +2866,7 @@ void SwUndoCpyTable::RedoImpl(::sw::UndoRedoContext & rContext)
SwUndoSplitTable::SwUndoSplitTable( const SwTableNode& rTableNd,
SwSaveRowSpan* pRowSp, SplitTable_HeadlineOption eMode, bool bNewSize )
- : SwUndo( UNDO_SPLIT_TABLE, rTableNd.GetDoc() ),
+ : SwUndo( SwUndoId::SPLIT_TABLE, rTableNd.GetDoc() ),
nTableNode( rTableNd.GetIndex() ), nOffset( 0 ), mpSaveRowSpan( pRowSp ), pSavTable( nullptr ),
pHistory( nullptr ), nMode( eMode ), nFormulaEnd( 0 ), bCalcNewSize( bNewSize )
{
@@ -2999,7 +2999,7 @@ void SwUndoSplitTable::SaveFormula( SwHistory& rHistory )
SwUndoMergeTable::SwUndoMergeTable( const SwTableNode& rTableNd,
const SwTableNode& rDelTableNd,
bool bWithPrv, sal_uInt16 nMd )
- : SwUndo( UNDO_MERGE_TABLE, rTableNd.GetDoc() ), pSavTable( nullptr ),
+ : SwUndo( SwUndoId::MERGE_TABLE, rTableNd.GetDoc() ), pSavTable( nullptr ),
pHistory( nullptr ), nMode( nMd ), bWithPrev( bWithPrv )
{
// memorize end node of the last table cell that'll stay in position
@@ -3160,7 +3160,7 @@ void CheckTable( const SwTable& rTable )
#endif
SwUndoTableStyleMake::SwUndoTableStyleMake(const OUString& rName, const SwDoc* pDoc)
- : SwUndo(UNDO_TBLSTYLE_CREATE, pDoc),
+ : SwUndo(SwUndoId::TBLSTYLE_CREATE, pDoc),
m_sName(rName)
{ }
@@ -3193,7 +3193,7 @@ SwRewriter SwUndoTableStyleMake::GetRewriter() const
}
SwUndoTableStyleDelete::SwUndoTableStyleDelete(std::unique_ptr<SwTableAutoFormat> pAutoFormat, const std::vector<SwTable*>& rAffectedTables, const SwDoc* pDoc)
- : SwUndo(UNDO_TBLSTYLE_DELETE, pDoc),
+ : SwUndo(SwUndoId::TBLSTYLE_DELETE, pDoc),
m_pAutoFormat(std::move(pAutoFormat)),
m_rAffectedTables(rAffectedTables)
{ }
@@ -3223,7 +3223,7 @@ SwRewriter SwUndoTableStyleDelete::GetRewriter() const
}
SwUndoTableStyleUpdate::SwUndoTableStyleUpdate(const OUString& rName, const SwTableAutoFormat& rOldFormat, const SwDoc* pDoc)
- : SwUndo(UNDO_TBLSTYLE_UPDATE, pDoc),
+ : SwUndo(SwUndoId::TBLSTYLE_UPDATE, pDoc),
m_pOldFormat(new SwTableAutoFormat(rOldFormat)),
m_pNewFormat(new SwTableAutoFormat(*pDoc->GetTableStyles().FindAutoFormat(rName)))
{ }
diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx
index 8850ecc322a7..90452f76592c 100644
--- a/sw/source/core/undo/untblk.cxx
+++ b/sw/source/core/undo/untblk.cxx
@@ -313,12 +313,12 @@ void SwUndoInserts::RepeatImpl(::sw::RepeatContext & rContext)
}
SwUndoInsDoc::SwUndoInsDoc( const SwPaM& rPam )
- : SwUndoInserts( UNDO_INSDOKUMENT, rPam )
+ : SwUndoInserts( SwUndoId::INSDOKUMENT, rPam )
{
}
SwUndoCpyDoc::SwUndoCpyDoc( const SwPaM& rPam )
- : SwUndoInserts( UNDO_COPY, rPam )
+ : SwUndoInserts( SwUndoId::COPY, rPam )
{
}
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index 2fb4bad44b93..86129ccc4720 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -835,7 +835,7 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam)
if( rPam.GetNext() != &rPam ) // Multiple selection?
{
- pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
+ pDoc->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
SwPamRanges aRangeArr( rPam );
SwPaM aPam( *rPam.GetPoint() );
for ( size_t n = 0; n < aRangeArr.Count(); ++n )
@@ -843,7 +843,7 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam)
// no start of a new list
pDoc->SetNumRule( aRangeArr.SetPam( n, aPam ), aRule, false );
}
- pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
+ pDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
}
else
{
@@ -925,12 +925,12 @@ void resetCursorPropertyValue(const SfxItemPropertySimpleEntry& rEntry, SwPaM& r
if( rPam.GetNext() != &rPam ) // Multiple selection?
{
- pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
+ pDoc->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
SwPamRanges aRangeArr( rPam );
SwPaM aPam( *rPam.GetPoint() );
for( size_t n = 0; n < aRangeArr.Count(); ++n )
pDoc->SetNodeNumStart( *aRangeArr.SetPam( n, aPam ).GetPoint(), 1 );
- pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
+ pDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
}
else
pDoc->SetNodeNumStart( *rPam.GetPoint(), 0 );
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index b661fa4b94b3..a15bacd7e745 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -760,7 +760,7 @@ uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference<
if( !bFlyInCnt )
{
UnoActionContext aContext(pDoc);
- pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
+ pDoc->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
SwDrawContact* pContact = pDoc->GroupSelection( *pPage->GetDrawView() );
pDoc->ChgAnchor(
@@ -774,7 +774,7 @@ uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference<
uno::Reference< uno::XInterface > xInt = SwFmDrawPage::GetInterface( pContact->GetMaster() );
xRet.set(xInt, uno::UNO_QUERY);
}
- pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
+ pDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
}
}
pPage->RemovePageView();
@@ -795,13 +795,13 @@ void SwXDrawPage::ungroup(const uno::Reference< drawing::XShapeGroup > & rShapeG
{
pPage->PreUnGroup(rShapeGroup);
UnoActionContext aContext(pDoc);
- pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
+ pDoc->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
pDoc->UnGroupSelection( *pPage->GetDrawView() );
pDoc->ChgAnchor( pPage->GetDrawView()->GetMarkedObjectList(),
FLY_AT_PARA,
true, false );
- pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
+ pDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
pPage->RemovePageView();
}
}
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 128bc48e0318..7de59808c43c 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -2912,7 +2912,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
if ( xIPObj.is() )
{
UnoActionContext aAction(pDoc);
- pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, nullptr);
+ pDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::INSERT, nullptr);
if(!bSizeFound)
{
//TODO/LATER: from where do I get a ViewAspect? And how do I transport it to the OLENode?
@@ -2959,7 +2959,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
pFormat2 = pDoc->getIDocumentContentOperations().Insert(aPam, xObjRef, &aFrameSet );
assert(pFormat2 && "Doc->Insert(notxt) failed.");
- pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, nullptr);
+ pDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::INSERT, nullptr);
pFormat2->Add(this);
if(!m_sName.isEmpty())
pDoc->SetFlyName((SwFlyFrameFormat&)*pFormat2, m_sName);
@@ -2969,11 +2969,11 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
{
OUString sStreamName;
(*pStreamName) >>= sStreamName;
- pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, nullptr);
+ pDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::INSERT, nullptr);
SwFlyFrameFormat* pFrameFormat = nullptr;
pFrameFormat = pDoc->getIDocumentContentOperations().InsertOLE( aPam, sStreamName, embed::Aspects::MSOLE_CONTENT, &aFrameSet, nullptr );
- pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, nullptr);
+ pDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::INSERT, nullptr);
pFrameFormat->Add(this);
if(!m_sName.isEmpty())
pDoc->SetFlyName((SwFlyFrameFormat&)*pFrameFormat, m_sName);
@@ -2985,7 +2985,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
svt::EmbeddedObjectRef xObj;
xObj.Assign( obj, embed::Aspects::MSOLE_CONTENT );
- pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, nullptr);
+ pDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::INSERT, nullptr);
// Not sure if these setParent() and InsertEmbeddedObject() calls are really
// needed, it seems to work without, but logic from code elsewhere suggests
@@ -2999,7 +2999,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
SwFlyFrameFormat* pFrameFormat = nullptr;
pFrameFormat = pDoc->getIDocumentContentOperations().Insert( aPam, xObj, &aFrameSet );
- pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, nullptr);
+ pDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::INSERT, nullptr);
pFrameFormat->Add(this);
if(!m_sName.isEmpty())
pDoc->SetFlyName((SwFlyFrameFormat&)*pFrameFormat, m_sName);
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index 43066ff489c8..730d329a05dc 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -281,13 +281,13 @@ SwUnoCursorHelper::SetTextFormatColl(const uno::Any & rAny, SwPaM & rPaM)
SwTextFormatColl *const pLocal = pStyle->GetCollection();
UnoActionContext aAction(pDoc);
- pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
+ pDoc->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
SwPaM *pTmpCursor = &rPaM;
do {
pDoc->SetTextFormatColl(*pTmpCursor, pLocal);
pTmpCursor = pTmpCursor->GetNext();
} while ( pTmpCursor != &rPaM );
- pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
+ pDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
}
bool
@@ -351,7 +351,7 @@ lcl_SetNodeNumStart(SwPaM & rCursor, uno::Any const& rValue)
if( rCursor.GetNext() != &rCursor ) // MultiSelection?
{
- pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
+ pDoc->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
SwPamRanges aRangeArr( rCursor );
SwPaM aPam( *rCursor.GetPoint() );
for( size_t n = 0; n < aRangeArr.Count(); ++n )
@@ -360,7 +360,7 @@ lcl_SetNodeNumStart(SwPaM & rCursor, uno::Any const& rValue)
pDoc->SetNodeNumStart(*aRangeArr.SetPam( n, aPam ).GetPoint(),
nStt );
}
- pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
+ pDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
}
else
{
@@ -381,7 +381,7 @@ lcl_setCharFormatSequence(SwPaM & rPam, uno::Any const& rValue)
for (sal_Int32 nStyle = 0; nStyle < aCharStyles.getLength(); nStyle++)
{
uno::Any aStyle;
- rPam.GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_START, nullptr);
+ rPam.GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::START, nullptr);
aStyle <<= aCharStyles.getConstArray()[nStyle];
// create a local set and apply each format directly
SfxItemSet aSet(rPam.GetDoc()->GetAttrPool(),
@@ -392,7 +392,7 @@ lcl_setCharFormatSequence(SwPaM & rPam, uno::Any const& rValue)
SwUnoCursorHelper::SetCursorAttr(rPam, aSet, (nStyle)
? SetAttrMode::DONTREPLACE
: SetAttrMode::DEFAULT);
- rPam.GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_START, nullptr);
+ rPam.GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::START, nullptr);
}
return true;
}
@@ -731,7 +731,7 @@ void SwXTextCursor::DeleteAndInsert(const OUString& rText,
SwDoc* pDoc = pUnoCursor->GetDoc();
UnoActionContext aAction(pDoc);
const sal_Int32 nTextLen = rText.getLength();
- pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, nullptr);
+ pDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::INSERT, nullptr);
auto pCurrent = pUnoCursor;
do
{
@@ -752,7 +752,7 @@ void SwXTextCursor::DeleteAndInsert(const OUString& rText,
}
pCurrent = static_cast<SwCursor*>(pCurrent->GetNext());
} while (pCurrent != pUnoCursor);
- pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, nullptr);
+ pDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::INSERT, nullptr);
}
}
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index 8c32d66b38a0..0a202afbf3dd 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -338,7 +338,7 @@ void SwUnoCursorHelper::SetCursorAttr(SwPaM & rPam,
UnoActionContext aAction(pDoc);
if (rPam.GetNext() != &rPam) // Ring of Cursors
{
- pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSATTR, nullptr);
+ pDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::INSATTR, nullptr);
for(SwPaM& rCurrent : rPam.GetRingContainer())
{
@@ -350,7 +350,7 @@ void SwUnoCursorHelper::SetCursorAttr(SwPaM & rPam,
}
}
- pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSATTR, nullptr);
+ pDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::INSATTR, nullptr);
}
else
{
@@ -814,7 +814,7 @@ void SwXTextRange::DeleteAndInsert(
if (GetPositions(aCursor))
{
UnoActionContext aAction(& m_pImpl->m_rDoc);
- m_pImpl->m_rDoc.GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, nullptr);
+ m_pImpl->m_rDoc.GetIDocumentUndoRedo().StartUndo(SwUndoId::INSERT, nullptr);
if (aCursor.HasMark())
{
m_pImpl->m_rDoc.getIDocumentContentOperations().DeleteAndJoin(aCursor);
@@ -829,7 +829,7 @@ void SwXTextRange::DeleteAndInsert(
aCursor.Left(rText.getLength());
}
SetPositions(aCursor);
- m_pImpl->m_rDoc.GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, nullptr);
+ m_pImpl->m_rDoc.GetIDocumentUndoRedo().EndUndo(SwUndoId::INSERT, nullptr);
}
}
@@ -1551,7 +1551,7 @@ void SwUnoCursorHelper::SetString(SwCursor & rCursor, const OUString& rString)
// Start/EndAction
SwDoc *const pDoc = rCursor.GetDoc();
UnoActionContext aAction(pDoc);
- pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, nullptr);
+ pDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::INSERT, nullptr);
if (rCursor.HasMark())
{
pDoc->getIDocumentContentOperations().DeleteAndJoin(rCursor);
@@ -1565,7 +1565,7 @@ void SwUnoCursorHelper::SetString(SwCursor & rCursor, const OUString& rString)
SwUnoCursorHelper::SelectPam(rCursor, true);
rCursor.Left(rString.getLength());
}
- pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, nullptr);
+ pDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::INSERT, nullptr);
}
struct SwXParaFrameEnumerationImpl final : public SwXParaFrameEnumeration
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index a8ea565c43ef..211f78b987b5 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -296,7 +296,7 @@ SwXTextSection::attach(const uno::Reference< text::XTextRange > & xTextRange)
//das muss jetzt true liefern
::sw::XTextRangeToSwPaM(aPam, xTextRange);
UnoActionContext aCont(pDoc);
- pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_INSSECTION, nullptr );
+ pDoc->GetIDocumentUndoRedo().StartUndo( SwUndoId::INSSECTION, nullptr );
if (m_pImpl->m_sName.isEmpty())
{
@@ -400,7 +400,7 @@ SwXTextSection::attach(const uno::Reference< text::XTextRange > & xTextRange)
if (!pRet) // fdo#42450 text range could partially overlap existing section
{
// shouldn't have created an undo object yet
- pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_INSSECTION, nullptr );
+ pDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::INSSECTION, nullptr );
throw lang::IllegalArgumentException(
"SwXTextSection::attach(): invalid TextRange",
static_cast< ::cppu::OWeakObject*>(this), 0);
@@ -427,7 +427,7 @@ SwXTextSection::attach(const uno::Reference< text::XTextRange > & xTextRange)
}
// Undo-Klammerung hier beenden
- pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_INSSECTION, nullptr );
+ pDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::INSSECTION, nullptr );
m_pImpl->m_pProps.reset();
m_pImpl->m_bIsDescriptor = false;
}
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 86f8e0919859..23a26c681d3f 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -2143,7 +2143,7 @@ SwXTextTable::attach(const uno::Reference<text::XTextRange> & xTextRange)
{
UnoActionContext aCont(pDoc);
- pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, nullptr);
+ pDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
const SwTable* pTable(nullptr);
if( 0 != aPam.Start()->nContent.GetIndex() )
{
@@ -2184,7 +2184,7 @@ SwXTextTable::attach(const uno::Reference<text::XTextRange> & xTextRange)
setName(pName->get<OUString>());
m_pImpl->m_pTableProps.reset();
}
- pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
+ pDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
}
}
@@ -2681,7 +2681,7 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, const uno::An
SwDoc* pDoc = pFormat->GetDoc();
SwTable* pTable = SwTable::FindTable( pFormat );
SwTableLines &rLines = pTable->GetTabLines();
- pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_START, nullptr);
+ pDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::START, nullptr);
for(size_t i = 0; i < rLines.size(); ++i)
{
SwTableLine* pLine = rLines[i];
@@ -2711,7 +2711,7 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, const uno::An
}
}
}
- pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_END, nullptr);
+ pDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::END, nullptr);
}
break;
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index b3e7704ef12e..fcde2732ac2d 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -921,7 +921,7 @@ SwXText::setString(const OUString& rString)
throw uno::RuntimeException();
}
- GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_START, nullptr);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::START, nullptr);
//insert an empty paragraph at the start and at the end to ensure that
//all tables and sections can be removed by the selecting text::XTextCursor
if (CursorType::Meta != m_pImpl->m_eType)
@@ -959,14 +959,14 @@ SwXText::setString(const OUString& rString)
const uno::Reference< text::XTextCursor > xRet = CreateCursor();
if(!xRet.is())
{
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_END, nullptr);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::END, nullptr);
uno::RuntimeException aRuntime;
aRuntime.Message = cInvalidObject;
throw aRuntime;
}
xRet->gotoEnd(true);
xRet->setString(rString);
- GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_END, nullptr);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::END, nullptr);
}
//FIXME why is CheckForOwnMember duplicated in some insert methods?
@@ -1246,7 +1246,7 @@ SwXText::Impl::finishOrAppendParagraph(
bool bIllegalException = false;
bool bRuntimeException = false;
OUString sMessage;
- m_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_START , nullptr);
+ m_pDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::START , nullptr);
// find end node, go backward - don't skip tables because the new
// paragraph has to be the last node
//aPam.Move( fnMoveBackward, GoInNode );
@@ -1292,7 +1292,7 @@ SwXText::Impl::finishOrAppendParagraph(
bRuntimeException = true;
}
- m_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_END, nullptr);
+ m_pDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::END, nullptr);
if (bIllegalException || bRuntimeException)
{
m_pDoc->GetIDocumentUndoRedo().Undo();
@@ -1345,7 +1345,7 @@ SwXText::insertTextPortion(
bool bIllegalException = false;
bool bRuntimeException = false;
OUString sMessage;
- m_pImpl->m_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, nullptr);
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::INSERT, nullptr);
auto& rCursor(pTextCursor->GetCursor());
m_pImpl->m_pDoc->DontExpandFormat( *rCursor.Start() );
@@ -1379,7 +1379,7 @@ SwXText::insertTextPortion(
sMessage = rRuntime.Message;
bRuntimeException = true;
}
- m_pImpl->m_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, nullptr);
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::INSERT, nullptr);
if (bIllegalException || bRuntimeException)
{
m_pImpl->m_pDoc->GetIDocumentUndoRedo().Undo();
@@ -1430,7 +1430,7 @@ SwXText::insertTextContentWithProperties(
throw uno::RuntimeException();
}
- m_pImpl->m_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, nullptr);
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::INSERT, nullptr);
// now attach the text content here
insertTextContent( xInsertPosition, xTextContent, false );
@@ -1454,13 +1454,13 @@ SwXText::insertTextContentWithProperties(
}
catch (const uno::Exception& e)
{
- m_pImpl->m_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, nullptr);
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::INSERT, nullptr);
lang::WrappedTargetRuntimeException wrapped;
wrapped.TargetException <<= e;
throw wrapped;
}
}
- m_pImpl->m_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, nullptr);
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::INSERT, nullptr);
return xInsertPosition;
}
@@ -1518,7 +1518,7 @@ SwXText::convertToTextFrame(
pEndRange->Invalidate();
}
- m_pImpl->m_pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
bool bIllegalException = false;
bool bRuntimeException = false;
OUString sMessage;
@@ -1732,7 +1732,7 @@ SwXText::convertToTextFrame(
}
}
- m_pImpl->m_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_END, nullptr);
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::END, nullptr);
if (bIllegalException || bRuntimeException)
{
m_pImpl->m_pDoc->GetIDocumentUndoRedo().Undo();
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index 91c9d40440a1..e1e8694a2586 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -128,7 +128,7 @@ sal_uLong SwReader::Read( const Reader& rOptions )
else
{
mxDoc->GetIDocumentUndoRedo().ClearRedo();
- mxDoc->GetIDocumentUndoRedo().StartUndo( UNDO_INSDOKUMENT, nullptr );
+ mxDoc->GetIDocumentUndoRedo().StartUndo( SwUndoId::INSDOKUMENT, nullptr );
}
}
mxDoc->GetIDocumentUndoRedo().DoUndo(false);
@@ -355,7 +355,7 @@ sal_uLong SwReader::Read( const Reader& rOptions )
if( bSaveUndo )
{
mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld );
- mxDoc->GetIDocumentUndoRedo().EndUndo( UNDO_INSDOKUMENT, nullptr );
+ mxDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::INSDOKUMENT, nullptr );
mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( RedlineFlags::Ignore );
}
}
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index 8b9ca44b01d3..ad9eae74e4d0 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -253,7 +253,7 @@ SwFrameFormat* SwMailMergeLayoutPage::InsertAddressAndGreeting(SwView* pView,
bool bAlignToBody)
{
SwFrameFormat* pAddressBlockFormat = nullptr;
- pView->GetWrtShell().StartUndo(UNDO_INSERT);
+ pView->GetWrtShell().StartUndo(SwUndoId::INSERT);
if(rConfigItem.IsAddressBlock() && !rConfigItem.IsAddressInserted())
{
//insert the frame
@@ -271,7 +271,7 @@ SwFrameFormat* SwMailMergeLayoutPage::InsertAddressAndGreeting(SwView* pView,
InsertGreeting( pView->GetWrtShell(), rConfigItem, false);
rConfigItem.SetGreetingInserted();
}
- pView->GetWrtShell().EndUndo(UNDO_INSERT);
+ pView->GetWrtShell().EndUndo(SwUndoId::INSERT);
return pAddressBlockFormat;
}
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 666e6450d459..2d08f8dcf6fc 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -399,7 +399,7 @@ void SwIndexMarkPane::Apply()
// apply changes
void SwIndexMarkPane::InsertUpdate()
{
- pSh->StartUndo(bDel ? UNDO_INDEX_ENTRY_DELETE : UNDO_INDEX_ENTRY_INSERT);
+ pSh->StartUndo(bDel ? SwUndoId::INDEX_ENTRY_DELETE : SwUndoId::INDEX_ENTRY_INSERT);
pSh->StartAllAction();
SwRewriter aRewriter;
@@ -423,7 +423,7 @@ void SwIndexMarkPane::InsertUpdate()
}
pSh->EndAllAction();
- pSh->EndUndo(bDel ? UNDO_INDEX_ENTRY_DELETE : UNDO_INDEX_ENTRY_INSERT);
+ pSh->EndUndo(bDel ? SwUndoId::INDEX_ENTRY_DELETE : SwUndoId::INDEX_ENTRY_INSERT);
if((nTypePos = m_pTypeDCB->GetEntryPos(m_pTypeDCB->GetSelectEntry())) == LISTBOX_ENTRY_NOTFOUND)
nTypePos = 0;
diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx
index f441e8bd7644..13eef0bcc73e 100644
--- a/sw/source/ui/misc/insfnote.cxx
+++ b/sw/source/ui/misc/insfnote.cxx
@@ -52,7 +52,7 @@ void SwInsFootNoteDlg::Apply()
{
rSh.StartAction();
rSh.Left(CRSR_SKIP_CHARS, false, 1, false );
- rSh.StartUndo( UNDO_START );
+ rSh.StartUndo( SwUndoId::START );
SwFormatFootnote aNote( m_pEndNoteBtn->IsChecked() );
aNote.SetNumStr( aStr );
@@ -70,7 +70,7 @@ void SwInsFootNoteDlg::Apply()
rSh.ResetSelect(nullptr, false);
rSh.Left(CRSR_SKIP_CHARS, false, 1, false );
}
- rSh.EndUndo( UNDO_END );
+ rSh.EndUndo( SwUndoId::END );
rSh.EndAction();
}
else
diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx
index 286ddc49ed42..7296f06c69d1 100644
--- a/sw/source/uibase/app/appenv.cxx
+++ b/sw/source/uibase/app/appenv.cxx
@@ -267,7 +267,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
//not be deleted on inserting envelopes
pSh->EnterStdMode();
// Here it goes (insert)
- pSh->StartUndo(UNDO_UI_INSERT_ENVELOPE);
+ pSh->StartUndo(SwUndoId::UI_INSERT_ENVELOPE);
pSh->StartAllAction();
pSh->SttEndDoc(true);
@@ -467,7 +467,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
if (nMode == ENV_NEWDOC)
pSh->DoUndo();
else
- pSh->EndUndo(UNDO_UI_INSERT_ENVELOPE);
+ pSh->EndUndo(SwUndoId::UI_INSERT_ENVELOPE);
if (nMode == ENV_NEWDOC)
{
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 7ae5a2fbb700..32cc62f7eafb 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -654,7 +654,7 @@ sal_uInt16 SwDocShell::Edit(
sal_uInt16 nRet = nMask;
bool bModified = m_pDoc->getIDocumentState().IsModified();
- SwUndoId nNewStyleUndoId(UNDO_EMPTY);
+ SwUndoId nNewStyleUndoId(SwUndoId::EMPTY);
if( bNew )
{
@@ -1072,7 +1072,7 @@ SfxStyleFamily SwDocShell::UpdateStyle(const OUString &rName, SfxStyleFamily nFa
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, pColl->GetName());
- GetWrtShell()->StartUndo(UNDO_INSFMTATTR, &aRewriter);
+ GetWrtShell()->StartUndo(SwUndoId::INSFMTATTR, &aRewriter);
GetWrtShell()->FillByEx(pColl);
// also apply template to remove hard set attributes
GetWrtShell()->SetTextFormatColl( pColl );
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index ff9a10de82c3..d384b34f882d 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -1458,7 +1458,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
{
SwRewriter aRewriter;
aRewriter.AddRule( UndoArg1, GetName() );
- rDoc.GetIDocumentUndoRedo().StartUndo( UNDO_INSFMTATTR, &aRewriter );
+ rDoc.GetIDocumentUndoRedo().StartUndo( SwUndoId::INSFMTATTR, &aRewriter );
}
SwFormat* pFormat = nullptr;
@@ -1720,7 +1720,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
if (rDoc.GetIDocumentUndoRedo().DoesUndo())
{
- rDoc.GetIDocumentUndoRedo().EndUndo(UNDO_END, nullptr);
+ rDoc.GetIDocumentUndoRedo().EndUndo(SwUndoId::END, nullptr);
}
}
diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx
index 95961f277321..2d5d3718ecb5 100644
--- a/sw/source/uibase/dochdl/gloshdl.cxx
+++ b/sw/source/uibase/dochdl/gloshdl.cxx
@@ -491,7 +491,7 @@ bool SwGlossaryHdl::Expand( const OUString& rShortName,
// otherwise the possible Shell change gets delayed and
// API-programs would hang.
// Moreover the event macro must also not be called in an action
- pWrtShell->StartUndo(UNDO_INSGLOSSARY);
+ pWrtShell->StartUndo(SwUndoId::INSGLOSSARY);
if( aStartMacro.HasMacro() )
pWrtShell->ExecMacro( aStartMacro );
if(pWrtShell->HasSelection())
@@ -507,7 +507,7 @@ bool SwGlossaryHdl::Expand( const OUString& rShortName,
{
pWrtShell->ExecMacro( aEndMacro );
}
- pWrtShell->EndUndo(UNDO_INSGLOSSARY);
+ pWrtShell->EndUndo(SwUndoId::INSGLOSSARY);
// demand input for all new InputFields
if( aFieldLst.BuildSortLst() )
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 3a3063bda6ef..83bfd70f4e43 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -780,11 +780,11 @@ void SwTransferable::DeleteSelection()
return;
// ask for type of selection before action-bracketing
const int nSelection = m_pWrtShell->GetSelectionType();
- m_pWrtShell->StartUndo( UNDO_START );
+ m_pWrtShell->StartUndo( SwUndoId::START );
if( ( nsSelectionType::SEL_TXT | nsSelectionType::SEL_TBL ) & nSelection )
m_pWrtShell->IntelligentCut( nSelection );
m_pWrtShell->DelRight();
- m_pWrtShell->EndUndo( UNDO_END );
+ m_pWrtShell->EndUndo( SwUndoId::END );
}
int SwTransferable::PrepareForCopy( bool bIsCut )
@@ -1250,7 +1250,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData,
if( bDelSel )
// #i34830#
- pAction.reset(new SwTrnsfrActionAndUndo( &rSh, UNDO_PASTE_CLIPBOARD, true ));
+ pAction.reset(new SwTrnsfrActionAndUndo( &rSh, SwUndoId::PASTE_CLIPBOARD, true ));
}
SwTransferable *pTrans=nullptr, *pTunneledTrans=GetSwTransferable( rData );
@@ -1295,7 +1295,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData,
{
if( !pAction )
{
- pAction.reset(new SwTrnsfrActionAndUndo( &rSh, UNDO_PASTE_CLIPBOARD));
+ pAction.reset(new SwTrnsfrActionAndUndo( &rSh, SwUndoId::PASTE_CLIPBOARD));
}
// in Drag&Drop MessageBoxes must not be showed
@@ -3185,7 +3185,7 @@ void SwTransferable::DragFinished( sal_Int8 nAction )
//delete.
m_pWrtShell->StartAllAction();
- m_pWrtShell->StartUndo( UNDO_UI_DRAG_AND_MOVE );
+ m_pWrtShell->StartUndo( SwUndoId::UI_DRAG_AND_MOVE );
if ( m_pWrtShell->IsTableMode() )
m_pWrtShell->DeleteTableSel();
else
@@ -3195,7 +3195,7 @@ void SwTransferable::DragFinished( sal_Int8 nAction )
m_pWrtShell->IntelligentCut( m_pWrtShell->GetSelectionType() );
m_pWrtShell->DelRight();
}
- m_pWrtShell->EndUndo( UNDO_UI_DRAG_AND_MOVE );
+ m_pWrtShell->EndUndo( SwUndoId::UI_DRAG_AND_MOVE );
m_pWrtShell->EndAllAction();
}
else
@@ -3247,7 +3247,7 @@ bool SwTransferable::PrivatePaste( SwWrtShell& rShell )
const int nSelection = rShell.GetSelectionType();
- SwTrnsfrActionAndUndo aAction( &rShell, UNDO_PASTE_CLIPBOARD);
+ SwTrnsfrActionAndUndo aAction( &rShell, SwUndoId::PASTE_CLIPBOARD);
bool bKillPaMs = false;
@@ -3391,7 +3391,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
const int nSel = rSrcSh.GetSelectionType();
- SwUndoId eUndoId = bMove ? UNDO_UI_DRAG_AND_MOVE : UNDO_UI_DRAG_AND_COPY;
+ SwUndoId eUndoId = bMove ? SwUndoId::UI_DRAG_AND_MOVE : SwUndoId::UI_DRAG_AND_COPY;
SwRewriter aRewriter;
diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx
index a3e4fa8735b9..2ec1f3f0dae1 100644
--- a/sw/source/uibase/docvw/PageBreakWin.cxx
+++ b/sw/source/uibase/docvw/PageBreakWin.cxx
@@ -280,7 +280,7 @@ void SwPageBreakWin::Select( )
SwContentFrame *pCnt = const_cast< SwContentFrame* >( pBodyFrame->ContainsContent() );
SwContentNode* pNd = pCnt->GetNode();
- pNd->GetDoc()->GetIDocumentUndoRedo( ).StartUndo( UNDO_UI_DELETE_PAGE_BREAK, nullptr );
+ pNd->GetDoc()->GetIDocumentUndoRedo( ).StartUndo( SwUndoId::UI_DELETE_PAGE_BREAK, nullptr );
SfxItemSet aSet( GetEditWin()->GetView().GetWrtShell().GetAttrPool(),
RES_PAGEDESC, RES_PAGEDESC,
@@ -292,7 +292,7 @@ void SwPageBreakWin::Select( )
SwPaM aPaM( *pNd );
pNd->GetDoc()->getIDocumentContentOperations().InsertItemSet( aPaM, aSet );
- pNd->GetDoc()->GetIDocumentUndoRedo( ).EndUndo( UNDO_UI_DELETE_PAGE_BREAK, nullptr );
+ pNd->GetDoc()->GetIDocumentUndoRedo( ).EndUndo( SwUndoId::UI_DELETE_PAGE_BREAK, nullptr );
}
}
break;
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index ff282b3692f2..2ea6d0707a2c 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -1492,7 +1492,7 @@ void SwPostItMgr::Delete(const OUString& rAuthor)
}
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, SW_RESSTR(STR_DELETE_AUTHOR_NOTES) + rAuthor);
- mpWrtShell->StartUndo( UNDO_DELETE, &aRewriter );
+ mpWrtShell->StartUndo( SwUndoId::DELETE, &aRewriter );
IsPostitFieldWithAuthorOf aFilter(rAuthor);
FieldDocWatchingStack aStack(mvPostItFields, *mpView->GetDocShell(), aFilter);
@@ -1519,7 +1519,7 @@ void SwPostItMgr::Delete(sal_uInt32 nPostItId)
}
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, SW_RESSTR(STR_CONTENT_TYPE_SINGLE_POSTIT));
- mpWrtShell->StartUndo( UNDO_DELETE, &aRewriter );
+ mpWrtShell->StartUndo( SwUndoId::DELETE, &aRewriter );
IsPostitFieldWithPostitId aFilter(nPostItId);
FieldDocWatchingStack aStack(mvPostItFields, *mpView->GetDocShell(), aFilter);
@@ -1540,7 +1540,7 @@ void SwPostItMgr::Delete()
SetActiveSidebarWin(nullptr);
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, SW_RES(STR_DELETE_ALL_NOTES) );
- mpWrtShell->StartUndo( UNDO_DELETE, &aRewriter );
+ mpWrtShell->StartUndo( SwUndoId::DELETE, &aRewriter );
IsPostitField aFilter;
FieldDocWatchingStack aStack(mvPostItFields, *mpView->GetDocShell(),
@@ -1599,7 +1599,7 @@ void SwPostItMgr::FormatAll(const SfxItemSet &rNewAttr)
mpWrtShell->StartAllAction();
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, SW_RES(STR_FORMAT_ALL_NOTES) );
- mpWrtShell->StartUndo( UNDO_INSATTR, &aRewriter );
+ mpWrtShell->StartUndo( SwUndoId::INSATTR, &aRewriter );
for(SwSidebarItem_iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i)
{
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 3532441517a8..99c9a9a62f58 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -2591,7 +2591,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
case SwKeyState::GlossaryExpand:
{
// replace the word or abbreviation with the auto text
- rSh.StartUndo( UNDO_START );
+ rSh.StartUndo( SwUndoId::START );
OUString sFnd( aTmpQHD.m_aHelpStrings[ aTmpQHD.nCurArrPos ] );
if( aTmpQHD.m_bIsAutoText )
@@ -2616,7 +2616,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
m_pQuickHlpData->m_bAppendSpace = !pACorr ||
pACorr->GetSwFlags().bAutoCmpltAppendBlanc;
}
- rSh.EndUndo( UNDO_END );
+ rSh.EndUndo( SwUndoId::END );
}
break;
@@ -4474,9 +4474,9 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
}
if ( aSttPt != aEndPt )
{
- rSh.StartUndo( UNDO_UI_DRAG_AND_COPY );
+ rSh.StartUndo( SwUndoId::UI_DRAG_AND_COPY );
rSh.Copy(&rSh, aSttPt, aEndPt);
- rSh.EndUndo( UNDO_UI_DRAG_AND_COPY );
+ rSh.EndUndo( SwUndoId::UI_DRAG_AND_COPY );
}
}
else {
@@ -4730,10 +4730,10 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
!GetConnectMetaFile() &&
rSh.VisArea().IsInside( aDocPt ))
{
- SwUndoId nLastUndoId(UNDO_EMPTY);
+ SwUndoId nLastUndoId(SwUndoId::EMPTY);
if (rSh.GetLastUndoInfo(nullptr, & nLastUndoId))
{
- if (UNDO_INS_FROM_SHADOWCRSR == nLastUndoId)
+ if (SwUndoId::INS_FROM_SHADOWCRSR == nLastUndoId)
{
rSh.Undo();
}
diff --git a/sw/source/uibase/index/toxmgr.cxx b/sw/source/uibase/index/toxmgr.cxx
index ca81f0c73dc3..bbd2b293628d 100644
--- a/sw/source/uibase/index/toxmgr.cxx
+++ b/sw/source/uibase/index/toxmgr.cxx
@@ -429,7 +429,7 @@ bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
if (pDoc->GetIDocumentUndoRedo().DoesUndo())
{
pDoc->GetIDocumentUndoRedo().DelAllUndoObj();
- pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_TOXCHANGE, nullptr);
+ pDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::TOXCHANGE, nullptr);
}
pDoc->ChgTOX(*pTOX, *pNewTOX);
@@ -440,7 +440,7 @@ bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
if (pDoc->GetIDocumentUndoRedo().DoesUndo())
{
- pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_TOXCHANGE, nullptr);
+ pDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::TOXCHANGE, nullptr);
}
}
diff --git a/sw/source/uibase/lingu/hhcwrp.cxx b/sw/source/uibase/lingu/hhcwrp.cxx
index 8dd8c75137c3..6cbbbe7b4e4c 100644
--- a/sw/source/uibase/lingu/hhcwrp.cxx
+++ b/sw/source/uibase/lingu/hhcwrp.cxx
@@ -423,7 +423,7 @@ void SwHHCWrapper::ReplaceUnit(
if (pRuby)
{
- m_rWrtShell.StartUndo( UNDO_SETRUBYATTR );
+ m_rWrtShell.StartUndo( SwUndoId::SETRUBYATTR );
if (!aNewOrigText.isEmpty())
{
// according to FT we currently should not bother about keeping
@@ -451,11 +451,11 @@ void SwHHCWrapper::ReplaceUnit(
#endif
m_rWrtShell.SetAttrItem(*pRuby);
delete pRuby;
- m_rWrtShell.EndUndo( UNDO_SETRUBYATTR );
+ m_rWrtShell.EndUndo( SwUndoId::SETRUBYATTR );
}
else
{
- m_rWrtShell.StartUndo( UNDO_OVERWRITE );
+ m_rWrtShell.StartUndo( SwUndoId::OVERWRITE );
// according to FT we should currently not bother about keeping
// attributes in Hangul/Hanja conversion and leave that untouched.
@@ -504,7 +504,7 @@ void SwHHCWrapper::ReplaceUnit(
m_rWrtShell.ClearMark();
}
- m_rWrtShell.EndUndo( UNDO_OVERWRITE );
+ m_rWrtShell.EndUndo( SwUndoId::OVERWRITE );
}
m_rWrtShell.EndAllAction();
diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx
index 39a52d85399b..b8d3c886f0b3 100644
--- a/sw/source/uibase/lingu/olmenu.cxx
+++ b/sw/source/uibase/lingu/olmenu.cxx
@@ -707,7 +707,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
aTmpStr += OUString(SW_RES(STR_END_QUOTE));
aRewriter.AddRule(UndoArg3, aTmpStr);
- m_pSh->StartUndo(UNDO_UI_REPLACE, &aRewriter);
+ m_pSh->StartUndo(SwUndoId::UI_REPLACE, &aRewriter);
m_pSh->StartAction();
m_pSh->DelLeft();
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index bb3cf0da6858..839c82ff9a53 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -824,7 +824,7 @@ void SwRedlineAcceptDlg::CallAcceptReject( bool bSelect, bool bAccept )
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, aTmpStr);
- pSh->StartUndo(bAccept? UNDO_ACCEPT_REDLINE : UNDO_REJECT_REDLINE,
+ pSh->StartUndo(bAccept? SwUndoId::ACCEPT_REDLINE : SwUndoId::REJECT_REDLINE,
&aRewriter);
}
diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx
index 5189f8c4b91e..0d34b801f3aa 100644
--- a/sw/source/uibase/ribbar/drawbase.cxx
+++ b/sw/source/uibase/ribbar/drawbase.cxx
@@ -265,7 +265,7 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, SW_RES(STR_FRAME));
- m_pSh->StartUndo(UNDO_INSERT, &aRewriter);
+ m_pSh->StartUndo(SwUndoId::INSERT, &aRewriter);
}
m_pSh->EndCreate(SdrCreateCmd::ForceEnd);
diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx
index 392569890be8..e5363622fa31 100644
--- a/sw/source/uibase/ribbar/inputwin.cxx
+++ b/sw/source/uibase/ribbar/inputwin.cxx
@@ -245,9 +245,9 @@ void SwInputWindow::ShowWin()
}
if( pWrtShell->SwCursorShell::HasSelection() )
{
- pWrtShell->StartUndo( UNDO_DELETE );
+ pWrtShell->StartUndo( SwUndoId::DELETE );
pWrtShell->Delete();
- if( 0 != pWrtShell->EndUndo( UNDO_DELETE ))
+ if( SwUndoId::EMPTY != pWrtShell->EndUndo( SwUndoId::DELETE ))
{
m_bCallUndo = true;
}
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index 499cc63a85ea..cbd82e01256d 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -1490,7 +1490,7 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq)
const SfxItemSet* pArgs = rReq.GetArgs();
::svl::IUndoManager* pUndoManager = GetUndoManager();
SwWrtShell &rSh = rView.GetWrtShell();
- SwUndoId nUndoId(UNDO_EMPTY);
+ SwUndoId nUndoId(SwUndoId::EMPTY);
long aOldHeight = rView.GetPostItMgr()->HasActiveSidebarWin()
? rView.GetPostItMgr()->GetActiveSidebarWin()->GetPostItTextHeight()
@@ -1506,7 +1506,7 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq)
case SID_UNDO:
{
rSh.GetLastUndoInfo(nullptr, &nUndoId);
- if (nUndoId == UNDO_CONFLICT)
+ if (nUndoId == SwUndoId::CONFLICT)
{
rReq.SetReturnValue( SfxUInt32Item(nId, static_cast<sal_uInt32>(nUndoId)) );
break;
@@ -1537,7 +1537,7 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq)
case SID_REDO:
{
(void)rSh.GetFirstRedoInfo(nullptr, &nUndoId);
- if (nUndoId == UNDO_CONFLICT)
+ if (nUndoId == SwUndoId::CONFLICT)
{
rReq.SetReturnValue( SfxUInt32Item(nId, static_cast<sal_uInt32>(nUndoId)) );
break;
@@ -1579,7 +1579,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
return;
SfxWhichIter aIter(rSet);
- SwUndoId nUndoId(UNDO_EMPTY);
+ SwUndoId nUndoId(SwUndoId::EMPTY);
sal_uInt16 nWhich = aIter.FirstWhich();
::svl::IUndoManager* pUndoManager = GetUndoManager();
SfxViewFrame *pSfxViewFrame = rView.GetViewFrame();
@@ -1598,7 +1598,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
{
rSet.Put( SfxStringItem( nWhich, rSh.GetDoString(SwWrtShell::UNDO)) );
}
- else if (nUndoId == UNDO_CONFLICT)
+ else if (nUndoId == SwUndoId::CONFLICT)
{
rSet.Put( SfxUInt32Item(nWhich, static_cast<sal_uInt32>(nUndoId)) );
}
@@ -1615,7 +1615,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
{
rSet.Put(SfxStringItem( nWhich, rSh.GetDoString(SwWrtShell::REDO)) );
}
- else if (nUndoId == UNDO_CONFLICT)
+ else if (nUndoId == SwUndoId::CONFLICT)
{
rSet.Put( SfxUInt32Item(nWhich, static_cast<sal_uInt32>(nUndoId)) );
}
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index dd18d849a30b..fc752de614ed 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -478,7 +478,7 @@ void SwBaseShell::ExecUndo(SfxRequest &rReq)
{
SwWrtShell &rWrtShell = GetShell();
- SwUndoId nUndoId(UNDO_EMPTY);
+ SwUndoId nUndoId(SwUndoId::EMPTY);
sal_uInt16 nId = rReq.GetSlot(), nCnt = 1;
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
@@ -533,7 +533,7 @@ void SwBaseShell::ExecUndo(SfxRequest &rReq)
OSL_FAIL("wrong Dispatcher");
}
- if (nUndoId == UNDO_CONFLICT)
+ if (nUndoId == SwUndoId::CONFLICT)
{
rReq.SetReturnValue( SfxUInt32Item(nId, static_cast<sal_uInt32>(nUndoId)) );
}
@@ -545,7 +545,7 @@ void SwBaseShell::ExecUndo(SfxRequest &rReq)
void SwBaseShell::StateUndo(SfxItemSet &rSet)
{
- SwUndoId nUndoId(UNDO_EMPTY);
+ SwUndoId nUndoId(SwUndoId::EMPTY);
SwWrtShell &rSh = GetShell();
SfxWhichIter aIter(rSet);
sal_uInt16 nWhich = aIter.FirstWhich();
@@ -560,7 +560,7 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet)
rSet.Put( SfxStringItem(nWhich,
rSh.GetDoString(SwWrtShell::UNDO)));
}
- else if (nUndoId == UNDO_CONFLICT)
+ else if (nUndoId == SwUndoId::CONFLICT)
{
rSet.Put( SfxUInt32Item(nWhich, static_cast<sal_uInt32>(nUndoId)) );
}
@@ -576,7 +576,7 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet)
rSet.Put(SfxStringItem(nWhich,
rSh.GetDoString(SwWrtShell::REDO)));
}
- else if (nUndoId == UNDO_CONFLICT)
+ else if (nUndoId == SwUndoId::CONFLICT)
{
rSet.Put( SfxInt32Item(nWhich, static_cast<sal_uInt32>(nUndoId)) );
}
@@ -588,7 +588,7 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet)
{ // Repeat is only possible if no REDO is possible - UI-Restriction
if ((!rSh.GetFirstRedoInfo(nullptr, nullptr)) &&
!rSh.IsSelFrameMode() &&
- (UNDO_EMPTY != rSh.GetRepeatInfo(nullptr)))
+ (SwUndoId::EMPTY != rSh.GetRepeatInfo(nullptr)))
{
rSet.Put(SfxStringItem(nWhich, rSh.GetRepeatString()));
}
@@ -2619,7 +2619,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
SwInsertTableOptions aInsTableOpts = pModOpt->GetInsTableFlags(bHTMLMode);
- rSh.StartUndo(UNDO_INSTABLE);
+ rSh.StartUndo(SwUndoId::INSTABLE);
bCallEndUndo = true;
bool bInserted = rSh.TextToTable( aInsTableOpts, '\t' );
@@ -2703,7 +2703,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
_rRequest.AppendItem( SfxInt32Item( FN_PARAM_1, (sal_Int32) aInsTableOpts.mnInsMode ) );
_rRequest.Done();
- rSh.StartUndo(UNDO_INSTABLE);
+ rSh.StartUndo(SwUndoId::INSTABLE);
bCallEndUndo = true;
rSh.StartAllAction();
@@ -2733,7 +2733,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
aRewriter.AddRule(UndoArg3, SW_RESSTR(STR_END_QUOTE));
}
- rSh.EndUndo(UNDO_INSTABLE, &aRewriter); // If possible change the Shell
+ rSh.EndUndo(SwUndoId::INSTABLE, &aRewriter); // If possible change the Shell
}
}
}
diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx
index 95af0166fc97..b756e19a4c20 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -137,7 +137,7 @@ void SwDrawShell::InsertPictureFromFile(SdrObject& rObject)
const bool bAsLink(aDlg.IsAsLink());
SdrObject* pResult = &rObject;
- rSh.StartUndo(UNDO_PASTE_CLIPBOARD);
+ rSh.StartUndo(SwUndoId::PASTE_CLIPBOARD);
if (SdrGrafObj* pSdrGrafObj = dynamic_cast<SdrGrafObj*>(&rObject))
{
@@ -175,7 +175,7 @@ void SwDrawShell::InsertPictureFromFile(SdrObject& rObject)
rObject.SetMergedItemSetAndBroadcast(aSet);
}
- rSh.EndUndo( UNDO_END );
+ rSh.EndUndo( SwUndoId::END );
if(pResult)
{
@@ -232,10 +232,10 @@ void SwDrawShell::Execute(SfxRequest &rReq)
case SID_OBJECT_HELL:
if (rSh.IsObjSelected())
{
- rSh.StartUndo( UNDO_START );
+ rSh.StartUndo( SwUndoId::START );
SetWrapMode(FN_FRAME_WRAPTHRU_TRANSP);
rSh.SelectionToHell();
- rSh.EndUndo( UNDO_END );
+ rSh.EndUndo( SwUndoId::END );
rBnd.Invalidate(SID_OBJECT_HEAVEN);
}
break;
@@ -243,10 +243,10 @@ void SwDrawShell::Execute(SfxRequest &rReq)
case SID_OBJECT_HEAVEN:
if (rSh.IsObjSelected())
{
- rSh.StartUndo( UNDO_START );
+ rSh.StartUndo( SwUndoId::START );
SetWrapMode(FN_FRAME_WRAPTHRU);
rSh.SelectionToHeaven();
- rSh.EndUndo( UNDO_END );
+ rSh.EndUndo( SwUndoId::END );
rBnd.Invalidate(SID_OBJECT_HELL);
}
break;
@@ -254,7 +254,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
case FN_TOOL_HIERARCHIE:
if (rSh.IsObjSelected())
{
- rSh.StartUndo( UNDO_START );
+ rSh.StartUndo( SwUndoId::START );
if (rSh.GetLayerId() == 0)
{
SetWrapMode(FN_FRAME_WRAPTHRU);
@@ -265,7 +265,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
SetWrapMode(FN_FRAME_WRAPTHRU_TRANSP);
rSh.SelectionToHell();
}
- rSh.EndUndo( UNDO_END );
+ rSh.EndUndo( SwUndoId::END );
rBnd.Invalidate( SID_OBJECT_HELL );
rBnd.Invalidate( SID_OBJECT_HEAVEN );
}
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
index 3cd06bbc0b4e..65c12cec1242 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -255,7 +255,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
pSh->StartAllAction();
// #i30451#
- pSh->StartUndo(UNDO_INSFMTATTR);
+ pSh->StartUndo(SwUndoId::INSFMTATTR);
pSdrView->SetGeoAttrToMarked(*pOutSet);
@@ -338,7 +338,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
rBind.InvalidateAll(false);
// #i30451#
- pSh->EndUndo( UNDO_INSFMTATTR );
+ pSh->EndUndo( SwUndoId::INSFMTATTR );
pSh->EndAllAction();
}
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index 1c291f973fe3..4a7e9cfcae5d 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -169,7 +169,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
if( aDialog->Execute() == RET_OK )
{
rSh.StartAllAction();
- rSh.StartUndo(UNDO_START);
+ rSh.StartUndo(SwUndoId::START);
Rectangle aScaledCropedRectangle = aDialog->GetScaledCropRectangle();
aCrop.SetLeft( convertMm100ToTwip( aScaledCropedRectangle.Left() ));
@@ -183,7 +183,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
rSh.SetAttrItem(aCrop);
rSh.SetAttrItem(aMirror);
- rSh.EndUndo(UNDO_END);
+ rSh.EndUndo(SwUndoId::END);
rSh.EndAllAction();
}
}
@@ -360,7 +360,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
if (pDlg->Execute() == RET_OK)
{
rSh.StartAllAction();
- rSh.StartUndo(UNDO_START);
+ rSh.StartUndo(SwUndoId::START);
const SfxPoolItem* pItem;
SfxItemSet* pSet = const_cast<SfxItemSet*>(pDlg->GetOutputItemSet());
rReq.Done(*pSet);
@@ -462,7 +462,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
if( aGrfSet.Count() )
rSh.SetAttrSet( aGrfSet );
- rSh.EndUndo(UNDO_END);
+ rSh.EndUndo(SwUndoId::END);
rSh.EndAllAction();
}
}
@@ -857,7 +857,7 @@ void SwGrfShell::ExecuteRotation(SfxRequest &rReq)
}
rShell.StartAllAction();
- rShell.StartUndo(UNDO_START);
+ rShell.StartUndo(SwUndoId::START);
Graphic aGraphic = *rShell.GetGraphic();
GraphicNativeTransform aTransform(aGraphic);
@@ -902,7 +902,7 @@ void SwGrfShell::ExecuteRotation(SfxRequest &rReq)
rShell.SetAttrItem(aCrop);
- rShell.EndUndo(UNDO_END);
+ rShell.EndUndo(SwUndoId::END);
rShell.EndAllAction();
}
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 585222a38f59..8d529b410c6e 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -280,7 +280,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
SwWrtShell &rSh )
{
rSh.StartAllAction();
- rSh.StartUndo( UNDO_TABLE_ATTR );
+ rSh.StartUndo( SwUndoId::TABLE_ATTR );
const SfxPoolItem* pItem = nullptr;
if(SfxItemState::SET == rSet.GetItemState(SID_BACKGRND_DESTINATION, false, &pItem))
@@ -441,7 +441,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
rSh.SetTabCols( aTabCols, bSingleLine );
}
- rSh.EndUndo( UNDO_TABLE_ATTR );
+ rSh.EndUndo( SwUndoId::TABLE_ATTR );
rSh.EndAllAction();
}
@@ -901,22 +901,22 @@ void SwTableShell::Execute(SfxRequest &rReq)
SfxItemSet aCoreSet( GetPool(), aUITableAttrRange);
::lcl_TableParamToItemSet( aCoreSet, rSh );
bool bSetInnerBorders = false;
- SwUndoId nUndoId = UNDO_EMPTY;
+ SwUndoId nUndoId = SwUndoId::EMPTY;
// <--End
if( bColumn )
{
- rSh.StartUndo( UNDO_TABLE_INSCOL );
+ rSh.StartUndo( SwUndoId::TABLE_INSCOL );
rSh.InsertCol( nCount, bAfter );
bSetInnerBorders = true;
- nUndoId = UNDO_TABLE_INSCOL;
+ nUndoId = SwUndoId::TABLE_INSCOL;
}
else if ( !rSh.IsInRepeatedHeadline() )
{
- rSh.StartUndo( UNDO_TABLE_INSROW );
+ rSh.StartUndo( SwUndoId::TABLE_INSROW );
rSh.InsertRow( nCount, bAfter );
bSetInnerBorders = true;
- nUndoId = UNDO_TABLE_INSROW;
+ nUndoId = SwUndoId::TABLE_INSROW;
}
// -->after inserting,reset the inner table borders
diff --git a/sw/source/uibase/shells/textdrw.cxx b/sw/source/uibase/shells/textdrw.cxx
index 7e51c42168df..73da9c9b145f 100644
--- a/sw/source/uibase/shells/textdrw.cxx
+++ b/sw/source/uibase/shells/textdrw.cxx
@@ -59,7 +59,7 @@ void SwBaseShell::InsertURLButton(const OUString& rURL, const OUString& rTarget,
Point aStartPos(rSh.GetCharRect().Pos() + Point(0, 1));
rSh.StartAction();
- rSh.StartUndo( UNDO_UI_INSERT_URLBTN );
+ rSh.StartUndo( SwUndoId::UI_INSERT_URLBTN );
if (rSh.BeginCreate(OBJ_FM_BUTTON, SdrInventor::FmForm, aStartPos))
{
pSdrView->SetOrtho(false);
@@ -122,7 +122,7 @@ void SwBaseShell::InsertURLButton(const OUString& rURL, const OUString& rTarget,
rSh.UnSelectFrame();
}
}
- rSh.EndUndo( UNDO_UI_INSERT_URLBTN );
+ rSh.EndUndo( SwUndoId::UI_INSERT_URLBTN );
rSh.EndAction();
}
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index 4af6c0aa8676..ef28dbd4871c 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -488,7 +488,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
SwWrtShell& rShell = GetShell();
rShell.LockPaint();
rShell.StartAllAction();
- rShell.StartUndo(UNDO_INSERT);
+ rShell.StartUndo(SwUndoId::INSERT);
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
aMgr.SetAttrSet(*pOutSet);
@@ -518,7 +518,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
aRewriter.AddRule(UndoArg1, SW_RESSTR(STR_FRAME));
- rShell.EndUndo(UNDO_INSERT, &aRewriter);
+ rShell.EndUndo(SwUndoId::INSERT, &aRewriter);
}
rShell.EndAllAction();
rShell.UnlockPaint();
@@ -971,7 +971,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, SW_RESSTR(STR_SPECIALCHAR));
- rSh.StartUndo( UNDO_INSERT, &aRewriter );
+ rSh.StartUndo( SwUndoId::INSERT, &aRewriter );
if ( rSh.HasSelection() )
{
rSh.DelRight();
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index aecf52c6b51c..b81dc314fa00 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -305,13 +305,13 @@ void SwTextShell::Execute(SfxRequest &rReq)
aRewriter.AddRule( UndoArg1, aToggle.StringToReplace() );
aRewriter.AddRule( UndoArg2, SW_RES(STR_YIELDS) );
aRewriter.AddRule( UndoArg3, sReplacement );
- rWrtSh.StartUndo(UNDO_REPLACE, &aRewriter);
+ rWrtSh.StartUndo(SwUndoId::REPLACE, &aRewriter);
rWrtSh.GetCursor()->Normalize(false);
rWrtSh.ClearMark();
for( sal_uInt32 i=aToggle.CharsToDelete(); i > 0; --i )
rWrtSh.DelLeft();
rWrtSh.Insert2( sReplacement );
- rWrtSh.EndUndo(UNDO_REPLACE, &aRewriter);
+ rWrtSh.EndUndo(SwUndoId::REPLACE, &aRewriter);
}
}
break;
@@ -402,7 +402,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
rWrtSh.ExtendedSelectAll();
}
- rWrtSh.StartUndo( ( !bForParagraph && !bForSelection ) ? UNDO_SETDEFTATTR : UNDO_EMPTY );
+ rWrtSh.StartUndo( ( !bForParagraph && !bForSelection ) ? SwUndoId::SETDEFTATTR : SwUndoId::EMPTY );
if (aNewLangText == aStrNone)
SwLangHelper::SetLanguage_None( rWrtSh, bForSelection, aCoreSet );
else if (aNewLangText == aStrResetLangs)
@@ -459,7 +459,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
if ( pNameItem )
aStr = pNameItem->GetValue();
bool bFont = pFont && !pFont->GetValue().isEmpty();
- rWrtSh.StartUndo( UNDO_UI_INSERT_FOOTNOTE );
+ rWrtSh.StartUndo( SwUndoId::UI_INSERT_FOOTNOTE );
rWrtSh.InsertFootnote( aStr, nSlot == FN_INSERT_ENDNOTE, !bFont );
if ( bFont )
{
@@ -471,7 +471,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
rWrtSh.EndSelect();
rWrtSh.GotoFootnoteText();
}
- rWrtSh.EndUndo( UNDO_UI_INSERT_FOOTNOTE );
+ rWrtSh.EndUndo( SwUndoId::UI_INSERT_FOOTNOTE );
rReq.Done();
}
break;
@@ -771,7 +771,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
bool bDelSel = rWrtSh.HasSelection();
if( bDelSel )
{
- rWrtSh.StartUndo( UNDO_START );
+ rWrtSh.StartUndo( SwUndoId::START );
rWrtSh.DelRight();
}
else
@@ -800,7 +800,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
if( bDelSel )
- rWrtSh.EndUndo( UNDO_END );
+ rWrtSh.EndUndo( SwUndoId::END );
rWrtSh.EndAllAction();
rReq.Done();
}
@@ -1054,7 +1054,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SfxItemState::SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) );
if ( bUndoNeeded )
{
- rWrtSh.StartUndo( UNDO_INSATTR );
+ rWrtSh.StartUndo( SwUndoId::INSATTR );
}
if( pSet->Count() )
{
@@ -1101,7 +1101,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
// #i56253#
if ( bUndoNeeded )
{
- rWrtSh.EndUndo( UNDO_INSATTR );
+ rWrtSh.EndUndo( SwUndoId::INSATTR );
}
}
}
@@ -1206,7 +1206,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
if (nSlot != SID_ATTR_CHAR_COLOR_EXT)
{
- rWrtSh.StartUndo( UNDO_INSATTR );
+ rWrtSh.StartUndo( SwUndoId::INSATTR );
rWrtSh.SetAttrItem(
SvxBrushItem( rEdtWin.GetWaterCanTextBackColor(), RES_CHRATR_BACKGROUND) );
@@ -1229,7 +1229,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
rWrtSh.SetAttrItem( aGrabBag );
}
- rWrtSh.EndUndo( UNDO_INSATTR );
+ rWrtSh.EndUndo( SwUndoId::INSATTR );
}
else
rWrtSh.SetAttrItem(
diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx
index efc78b4d727e..5b478b23348a 100644
--- a/sw/source/uibase/shells/txtattr.cxx
+++ b/sw/source/uibase/shells/txtattr.cxx
@@ -264,7 +264,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
else
vItems = rWrtSh.GetItemWithPaM( RES_CHRATR_FONTSIZE );
- rWrtSh.StartUndo( UNDO_INSATTR );
+ rWrtSh.StartUndo( SwUndoId::INSATTR );
for( std::pair< const SfxPoolItem*, std::unique_ptr<SwPaM> >& iPair : vItems )
{
std::unique_ptr<SwPaM> pPaM = std::move(iPair.second);
@@ -293,7 +293,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
rWrtSh.SetAttrSet( aAttrSet, SetAttrMode::DEFAULT, pPaM.get() );
}
}
- rWrtSh.EndUndo( UNDO_INSATTR );
+ rWrtSh.EndUndo( SwUndoId::INSATTR );
rReq.Done();
}
break;
@@ -492,14 +492,14 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
if (pDlg->Execute() == RET_OK)
{
rSh.StartAction();
- rSh.StartUndo( UNDO_START );
+ rSh.StartUndo( SwUndoId::START );
if ( SfxItemState::SET == aSet.GetItemState(HINT_END,false,&pItem) )
{
if ( !static_cast<const SfxStringItem*>(pItem)->GetValue().isEmpty() )
rSh.ReplaceDropText(static_cast<const SfxStringItem*>(pItem)->GetValue());
}
rSh.SetAttrSet(*pDlg->GetOutputItemSet());
- rSh.StartUndo( UNDO_END );
+ rSh.StartUndo( SwUndoId::END );
rSh.EndAction();
rReq.Done(*pDlg->GetOutputItemSet());
}
diff --git a/sw/source/uibase/table/tablemgr.cxx b/sw/source/uibase/table/tablemgr.cxx
index 0da405ccf81c..0a91f7f91428 100644
--- a/sw/source/uibase/table/tablemgr.cxx
+++ b/sw/source/uibase/table/tablemgr.cxx
@@ -196,7 +196,7 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
SwFlyFrameFormat** ppFlyFrameFormat )
{
uno::Reference< frame::XModel > xChartModel;
- pSh->StartUndo( UNDO_UI_INSERT_CHART );
+ pSh->StartUndo( SwUndoId::UI_INSERT_CHART );
pSh->StartAllAction();
OUString aName;
@@ -319,7 +319,7 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
xDataReceiver->setArguments( aArgs );
}
- pSh->EndUndo( UNDO_UI_INSERT_CHART );
+ pSh->EndUndo( SwUndoId::UI_INSERT_CHART );
if( xChartModel.is() )
xChartModel->unlockControllers(); //#i79578# don't request a new replacement image for charts to often
diff --git a/sw/source/uibase/uiview/formatclipboard.cxx b/sw/source/uibase/uiview/formatclipboard.cxx
index 99e49c2ce089..ea79b16805a0 100644
--- a/sw/source/uibase/uiview/formatclipboard.cxx
+++ b/sw/source/uibase/uiview/formatclipboard.cxx
@@ -467,7 +467,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
}
rWrtShell.StartAction();
- rWrtShell.StartUndo(UNDO_INSATTR);
+ rWrtShell.StartUndo(SwUndoId::INSATTR);
ItemVector aItemVector;
@@ -573,7 +573,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
if( m_pTableItemSet && nSelectionType & (nsSelectionType::SEL_TBL | nsSelectionType::SEL_TBL_CELLS) )
lcl_setTableAttributes( *m_pTableItemSet, rWrtShell );
- rWrtShell.EndUndo(UNDO_INSATTR);
+ rWrtShell.EndUndo(SwUndoId::INSATTR);
rWrtShell.EndAction();
if(!m_bPersistentCopy)
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 50928019c4f9..7b534fdc0f7a 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -447,7 +447,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq )
// #i123922# determine if we really want to insert or replace the graphic at a selected object
const bool bReplaceMode(rSh.HasSelection() && nsSelectionType::SEL_FRM == rSh.GetSelectionType());
- rSh.StartUndo(UNDO_INSERT, &aRewriter);
+ rSh.StartUndo(SwUndoId::INSERT, &aRewriter);
int nError = InsertGraphic( aFileName, aFilterName, bAsLink, &GraphicFilter::GetGraphicFilter() );
diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx
index 55b1c55c3726..1b3a9a80aec1 100644
--- a/sw/source/uibase/uiview/viewling.cxx
+++ b/sw/source/uibase/uiview/viewling.cxx
@@ -181,11 +181,11 @@ void SwView::ExecLingu(SfxRequest &rReq)
// since this conversion is not interactive the whole converted
// document should be undone in a single undo step.
- m_pWrtShell->StartUndo( UNDO_OVERWRITE );
+ m_pWrtShell->StartUndo( SwUndoId::OVERWRITE );
StartTextConversion( nSourceLang, nTargetLang, &aTargetFont, nOptions, false );
- m_pWrtShell->EndUndo( UNDO_OVERWRITE );
+ m_pWrtShell->EndUndo( SwUndoId::OVERWRITE );
if (bRestoreCursor)
{
@@ -448,7 +448,7 @@ void SwView::HyphenateDocument()
Reference< XLinguProperties > xProp( ::GetLinguPropertySet() );
- m_pWrtShell->StartUndo(UNDO_INSATTR); // valid later
+ m_pWrtShell->StartUndo(SwUndoId::INSATTR); // valid later
bool bHyphSpecial = xProp.is() && xProp->getIsHyphSpecial();
bool bSelection = static_cast<SwCursorShell*>(m_pWrtShell)->HasSelection() ||
@@ -477,7 +477,7 @@ void SwView::HyphenateDocument()
{
SwHyphWrapper aWrap( this, xHyph, bStart, bOther, bSelection );
aWrap.SpellDocument();
- m_pWrtShell->EndUndo(UNDO_INSATTR);
+ m_pWrtShell->EndUndo(SwUndoId::INSATTR);
}
pVOpt->SetIdle( bOldIdle );
}
@@ -504,7 +504,7 @@ void SwView::InsertThesaurusSynonym( const OUString &rSynonmText, const OUString
m_pWrtShell->SetInsMode();
m_pWrtShell->StartAllAction();
- m_pWrtShell->StartUndo(UNDO_DELETE);
+ m_pWrtShell->StartUndo(SwUndoId::DELETE);
if( !bSelection )
{
@@ -534,7 +534,7 @@ void SwView::InsertThesaurusSynonym( const OUString &rSynonmText, const OUString
m_pWrtShell->Insert( rSynonmText );
- m_pWrtShell->EndUndo(UNDO_DELETE);
+ m_pWrtShell->EndUndo(SwUndoId::DELETE);
m_pWrtShell->EndAllAction();
m_pWrtShell->SetInsMode( bOldIns );
diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx
index f29aa9427924..70857e6e7a8b 100644
--- a/sw/source/uibase/uiview/viewsrch.cxx
+++ b/sw/source/uibase/uiview/viewsrch.cxx
@@ -686,7 +686,7 @@ void SwView::Replace()
aRewriter.AddRule(UndoArg2, SW_RESSTR(STR_YIELDS));
aRewriter.AddRule(UndoArg3, m_pSrchItem->GetReplaceString());
- m_pWrtShell->StartUndo(UNDO_UI_REPLACE_STYLE, &aRewriter);
+ m_pWrtShell->StartUndo(SwUndoId::UI_REPLACE_STYLE, &aRewriter);
m_pWrtShell->SetTextFormatColl( m_pWrtShell->GetParaStyle(
m_pSrchItem->GetReplaceString(),
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 70e6ab3fb517..8288f5445217 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -2354,7 +2354,7 @@ void SwContentTree::ExecCommand(const OUString& rCmd, bool bOutlineWithChildren)
if (!bStartedAction)
{
pShell->StartAllAction();
- pShell->StartUndo(bLeftRight ? UNDO_OUTLINE_LR : UNDO_OUTLINE_UD);
+ pShell->StartUndo(bLeftRight ? SwUndoId::OUTLINE_LR : SwUndoId::OUTLINE_UD);
bStartedAction = true;
}
pShell->GotoOutline( nActPos); // If text selection != box selection
@@ -3177,7 +3177,7 @@ void SwContentTree::EditEntry(SvTreeListEntry* pEntry, EditEntryMode nMode)
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, sTable);
- m_pActiveShell->StartUndo(UNDO_DELETE, &aRewriter);
+ m_pActiveShell->StartUndo(SwUndoId::DELETE, &aRewriter);
m_pActiveShell->GetView().GetViewFrame()->GetDispatcher()->Execute(FN_TABLE_SELECT_ALL);
m_pActiveShell->DeleteRow();
m_pActiveShell->EndUndo();
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 93b74386aed3..ce1af88dad2a 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -219,7 +219,7 @@ void SwWrtShell::Insert( const OUString &rStr )
aRewriter.AddRule(UndoArg3, rStr);
}
- StartUndo(UNDO_REPLACE, &aRewriter);
+ StartUndo(SwUndoId::REPLACE, &aRewriter);
bStarted = true;
bDeleted = DelRight() != 0;
}
@@ -250,7 +250,7 @@ void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter,
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, SW_RES(STR_GRAPHIC));
- StartUndo(UNDO_INSERT, &aRewriter);
+ StartUndo(SwUndoId::INSERT, &aRewriter);
if ( HasSelection() )
DelRight();
@@ -445,7 +445,7 @@ bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrame
ResetCursorStack();
StartAllAction();
- StartUndo(UNDO_INSERT);
+ StartUndo(SwUndoId::INSERT);
//Some differences between StarMath and any other objects:
//1. Selections should be deleted. For StarMath the Text should be
@@ -560,7 +560,7 @@ bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrame
else
aRewriter.AddRule(UndoArg1, SW_RES(STR_OLE));
- EndUndo(UNDO_INSERT, &aRewriter);
+ EndUndo(SwUndoId::INSERT, &aRewriter);
return bActivate;
}
@@ -841,7 +841,7 @@ void SwWrtShell::InsertPageBreak(const OUString *pPageDesc, const ::boost::optio
if( CanInsert() )
{
SwActContext aActContext(this);
- StartUndo(UNDO_UI_INSERT_PAGE_BREAK);
+ StartUndo(SwUndoId::UI_INSERT_PAGE_BREAK);
if ( !IsCursorInTable() )
{
@@ -862,7 +862,7 @@ void SwWrtShell::InsertPageBreak(const OUString *pPageDesc, const ::boost::optio
}
else
SetAttrItem( SvxFormatBreakItem(SvxBreak::PageBefore, RES_BREAK) );
- EndUndo(UNDO_UI_INSERT_PAGE_BREAK);
+ EndUndo(SwUndoId::UI_INSERT_PAGE_BREAK);
}
}
@@ -895,7 +895,7 @@ void SwWrtShell::InsertColumnBreak()
ResetCursorStack();
if( CanInsert() )
{
- StartUndo(UNDO_UI_INSERT_COLUMN_BREAK);
+ StartUndo(SwUndoId::UI_INSERT_COLUMN_BREAK);
if ( !IsCursorInTable() )
{
@@ -905,7 +905,7 @@ void SwWrtShell::InsertColumnBreak()
}
SetAttrItem(SvxFormatBreakItem(SvxBreak::ColumnBefore, RES_BREAK));
- EndUndo(UNDO_UI_INSERT_COLUMN_BREAK);
+ EndUndo(SwUndoId::UI_INSERT_COLUMN_BREAK);
}
}
@@ -956,13 +956,13 @@ void SwWrtShell::SplitNode( bool bAutoFormat )
bool bHasSel = HasSelection();
if( bHasSel )
{
- StartUndo( UNDO_INSERT );
+ StartUndo( SwUndoId::INSERT );
DelRight();
}
SwFEShell::SplitNode( bAutoFormat );
if( bHasSel )
- EndUndo( UNDO_INSERT );
+ EndUndo( SwUndoId::INSERT );
}
}
@@ -985,7 +985,7 @@ void SwWrtShell::NumOrBulletOn(bool bNum)
// determine numbering rule found at current cursor position in the document.
const SwNumRule* pCurRule = GetNumRuleAtCurrCursorPos();
- StartUndo(UNDO_NUMORNONUM);
+ StartUndo(SwUndoId::NUMORNONUM);
const SwNumRule * pNumRule = pCurRule;
@@ -1290,7 +1290,7 @@ void SwWrtShell::NumOrBulletOn(bool bNum)
SetCurNumRule( aNumRule, true, OUString(), true );
}
- EndUndo(UNDO_NUMORNONUM);
+ EndUndo(SwUndoId::NUMORNONUM);
}
// <- #i40041#
@@ -1610,7 +1610,7 @@ void SwWrtShell::AutoCorrect( SvxAutoCorrect& rACorr, sal_Unicode cChar )
aRewriter.AddRule( UndoArg2, SW_RES(STR_YIELDS) );
aRewriter.AddRule( UndoArg3, aTmpStr3 );
- StartUndo( UNDO_REPLACE, &aRewriter );
+ StartUndo( SwUndoId::REPLACE, &aRewriter );
bStarted = true;
DelRight();
}
@@ -1619,7 +1619,7 @@ void SwWrtShell::AutoCorrect( SvxAutoCorrect& rACorr, sal_Unicode cChar )
if(bStarted)
{
EndAllAction();
- EndUndo( UNDO_REPLACE, &aRewriter );
+ EndUndo( SwUndoId::REPLACE, &aRewriter );
}
}
}
@@ -1766,7 +1766,7 @@ void SwWrtShell::ChangeHeaderOrFooter(
{
addCurrentPosition();
StartAllAction();
- StartUndo( UNDO_HEADER_FOOTER ); // #i7983#
+ StartUndo( SwUndoId::HEADER_FOOTER ); // #i7983#
bool bExecute = true;
bool bCursorSet = false;
for( size_t nFrom = 0, nTo = GetPageDescCnt();
@@ -1829,7 +1829,7 @@ void SwWrtShell::ChangeHeaderOrFooter(
}
}
}
- EndUndo( UNDO_HEADER_FOOTER ); // #i7983#
+ EndUndo( SwUndoId::HEADER_FOOTER ); // #i7983#
EndAllAction();
}
diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx
index 1486b83a22c7..1ff5866f5dd2 100644
--- a/sw/source/uibase/wrtsh/wrtsh2.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh2.cxx
@@ -77,7 +77,7 @@ void SwWrtShell::Insert(SwField &rField)
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, rField.GetDescription());
- StartUndo(UNDO_INSERT, &aRewriter);
+ StartUndo(SwUndoId::INSERT, &aRewriter);
bool bDeleted = false;
std::unique_ptr<SwPaM> pAnnotationTextRange;
@@ -348,12 +348,12 @@ void SwWrtShell::ClickToField( const SwField& rField )
if( nSlotId )
{
- StartUndo( UNDO_START );
+ StartUndo( SwUndoId::START );
//#97295# immediately select the right shell
GetView().StopShellTimer();
GetView().GetViewFrame()->GetDispatcher()->Execute( nSlotId,
SfxCallMode::SYNCHRON|SfxCallMode::RECORD );
- EndUndo( UNDO_END );
+ EndUndo( SwUndoId::END );
}
}
break;
@@ -571,10 +571,10 @@ void SwWrtShell::NavigatorPaste( const NaviContentBookmark& rBkmk,
// the undostack. Then the change of the section don't create
// any undoobject. - BUG 69145
bool bDoesUndo = DoesUndo();
- SwUndoId nLastUndoId(UNDO_EMPTY);
+ SwUndoId nLastUndoId(SwUndoId::EMPTY);
if (GetLastUndoInfo(nullptr, & nLastUndoId))
{
- if (UNDO_INSSECTION != nLastUndoId)
+ if (SwUndoId::INSSECTION != nLastUndoId)
{
DoUndo(false);
}