sw/inc/IDocumentUndoRedo.hxx | 12 sw/inc/SwUndoField.hxx | 2 sw/inc/editsh.hxx | 4 sw/inc/swundo.hxx | 282 ++++++++-------- sw/qa/extras/tiledrendering/tiledrendering.cxx | 4 sw/qa/extras/uiwriter/uiwriter.cxx | 4 sw/source/core/crsr/bookmrk.cxx | 8 sw/source/core/crsr/crstrvl.cxx | 4 sw/source/core/crsr/findattr.cxx | 4 sw/source/core/crsr/findcoll.cxx | 4 sw/source/core/crsr/findtxt.cxx | 4 sw/source/core/doc/DocumentContentOperationsManager.cxx | 12 sw/source/core/doc/DocumentRedlineManager.cxx | 18 - sw/source/core/doc/dbgoutsw.cxx | 2 sw/source/core/doc/doc.cxx | 12 sw/source/core/doc/doccomp.cxx | 8 sw/source/core/doc/docdraw.cxx | 4 sw/source/core/doc/docfly.cxx | 16 sw/source/core/doc/docglos.cxx | 4 sw/source/core/doc/doclay.cxx | 4 sw/source/core/doc/docnew.cxx | 4 sw/source/core/doc/docnum.cxx | 18 - sw/source/core/doc/docredln.cxx | 6 sw/source/core/doc/docruby.cxx | 4 sw/source/core/doc/docsort.cxx | 4 sw/source/core/doc/doctxm.cxx | 8 sw/source/core/doc/extinput.cxx | 4 sw/source/core/doc/tblrwcl.cxx | 20 - sw/source/core/docnode/ndsect.cxx | 8 sw/source/core/docnode/ndtbl.cxx | 42 +- sw/source/core/draw/dflyobj.cxx | 4 sw/source/core/draw/dview.cxx | 4 sw/source/core/edit/acorrect.cxx | 4 sw/source/core/edit/autofmt.cxx | 8 sw/source/core/edit/edatmisc.cxx | 12 sw/source/core/edit/edattr.cxx | 4 sw/source/core/edit/eddel.cxx | 14 sw/source/core/edit/edfcol.cxx | 4 sw/source/core/edit/edfld.cxx | 4 sw/source/core/edit/edglbldc.cxx | 12 sw/source/core/edit/editsh.cxx | 16 sw/source/core/edit/edlingu.cxx | 4 sw/source/core/edit/ednumber.cxx | 28 - sw/source/core/edit/edsect.cxx | 4 sw/source/core/edit/edtab.cxx | 20 - sw/source/core/edit/edtox.cxx | 4 sw/source/core/edit/edundo.cxx | 12 sw/source/core/frmedt/fecopy.cxx | 8 sw/source/core/frmedt/fefly1.cxx | 8 sw/source/core/frmedt/feshview.cxx | 16 sw/source/core/frmedt/fetab.cxx | 8 sw/source/core/frmedt/fews.cxx | 2 sw/source/core/inc/UndoNumbering.hxx | 2 sw/source/core/layout/flycnt.cxx | 4 sw/source/core/undo/SwUndoField.cxx | 2 sw/source/core/undo/SwUndoFmt.cxx | 24 - sw/source/core/undo/SwUndoPageDesc.cxx | 8 sw/source/core/undo/SwUndoTOXChange.cxx | 2 sw/source/core/undo/docundo.cxx | 50 +- sw/source/core/undo/unattr.cxx | 30 - sw/source/core/undo/unbkmk.cxx | 6 sw/source/core/undo/undel.cxx | 2 sw/source/core/undo/undobj.cxx | 10 sw/source/core/undo/undobj1.cxx | 12 sw/source/core/undo/undoflystrattr.cxx | 12 sw/source/core/undo/undraw.cxx | 10 sw/source/core/undo/unfmco.cxx | 2 sw/source/core/undo/unins.cxx | 10 sw/source/core/undo/unmove.cxx | 4 sw/source/core/undo/unnum.cxx | 24 - sw/source/core/undo/unoutl.cxx | 2 sw/source/core/undo/unovwr.cxx | 4 sw/source/core/undo/unredln.cxx | 26 - sw/source/core/undo/unsect.cxx | 6 sw/source/core/undo/unsort.cxx | 4 sw/source/core/undo/unspnd.cxx | 2 sw/source/core/undo/untbl.cxx | 46 +- sw/source/core/undo/untblk.cxx | 4 sw/source/core/unocore/unocrsrhelper.cxx | 8 sw/source/core/unocore/unodraw.cxx | 8 sw/source/core/unocore/unoframe.cxx | 12 sw/source/core/unocore/unoobj.cxx | 16 sw/source/core/unocore/unoobj2.cxx | 12 sw/source/core/unocore/unosect.cxx | 6 sw/source/core/unocore/unotbl.cxx | 8 sw/source/core/unocore/unotext.cxx | 24 - sw/source/filter/basflt/shellio.cxx | 4 sw/source/ui/dbui/mmlayoutpage.cxx | 4 sw/source/ui/index/swuiidxmrk.cxx | 4 sw/source/ui/misc/insfnote.cxx | 4 sw/source/uibase/app/appenv.cxx | 4 sw/source/uibase/app/docst.cxx | 4 sw/source/uibase/app/docstyle.cxx | 4 sw/source/uibase/dochdl/gloshdl.cxx | 4 sw/source/uibase/dochdl/swdtflvr.cxx | 16 sw/source/uibase/docvw/PageBreakWin.cxx | 4 sw/source/uibase/docvw/PostItMgr.cxx | 8 sw/source/uibase/docvw/edtwin.cxx | 12 sw/source/uibase/index/toxmgr.cxx | 4 sw/source/uibase/lingu/hhcwrp.cxx | 8 sw/source/uibase/lingu/olmenu.cxx | 2 sw/source/uibase/misc/redlndlg.cxx | 2 sw/source/uibase/ribbar/drawbase.cxx | 2 sw/source/uibase/ribbar/inputwin.cxx | 4 sw/source/uibase/shells/annotsh.cxx | 12 sw/source/uibase/shells/basesh.cxx | 18 - sw/source/uibase/shells/drawsh.cxx | 16 sw/source/uibase/shells/drwbassh.cxx | 4 sw/source/uibase/shells/grfsh.cxx | 12 sw/source/uibase/shells/tabsh.cxx | 14 sw/source/uibase/shells/textdrw.cxx | 4 sw/source/uibase/shells/textsh.cxx | 6 sw/source/uibase/shells/textsh1.cxx | 22 - sw/source/uibase/shells/txtattr.cxx | 8 sw/source/uibase/table/tablemgr.cxx | 4 sw/source/uibase/uiview/formatclipboard.cxx | 4 sw/source/uibase/uiview/view2.cxx | 2 sw/source/uibase/uiview/viewling.cxx | 12 sw/source/uibase/uiview/viewsrch.cxx | 2 sw/source/uibase/utlui/content.cxx | 4 sw/source/uibase/wrtsh/wrtsh1.cxx | 32 - sw/source/uibase/wrtsh/wrtsh2.cxx | 10 122 files changed, 705 insertions(+), 707 deletions(-)
New commits: commit 8ae9dcec653c4ad3eeb8c3e1fa9b1684e2bd64a2 Author: Noel Grandin <[email protected]> Date: Thu Mar 16 09:11:42 2017 +0200 convert SwUndoId to scoped enum Change-Id: I782fdd53641c0d7c629265b6179de70aa54382f9 Reviewed-on: https://gerrit.libreoffice.org/35246 Tested-by: Jenkins <[email protected]> Reviewed-by: Noel Grandin <[email protected]> diff --git a/sw/inc/IDocumentUndoRedo.hxx b/sw/inc/IDocumentUndoRedo.hxx index 15a9156..62e0571 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 a2c7589..5082540 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 cf8f91d..c352a64 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 c87b5e5..5ddc3ca 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 6fbcded..a4275ff 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 af266fa..d906f3f 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 b688a30..ec13274 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 d756d99..80d9823 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 09c0153..bf0ec91 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 b70b702..cfba274 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 91f477c..1ffffa9 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 f935aa0..a842102 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 2069c34..9ca58a7 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 d4c95ac..45fdaa2 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 eb51f11..2a26848 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 09bd3d0..53606f2 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 df94f1b..a6c66c2 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 6c1847b..231c178 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 339e8b1..8c208a9 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 0aecf91..7a59d8c 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 7f95a68..40831b1 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 ac0fce4..e3585a1 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 555cff7..a932cf8 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 4529072..050e825 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 e23c961..c1e47b0 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 2e08e18..48ff5a9 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 2f1cdc7..8eb26ba 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 15a01d9..967ea38 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 62d87c8..403ccc69 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 b8a57e6..c0269df 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 6513ec9..4913c14 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 ae40150..9e95c18 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 f0f88cc..ed42d4f 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 fbc2421..b3dd522 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 83f7963..6e58be8 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 19e7439..9b181e8 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 0ab00d9..591fe8f 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 5277af0..cac8d8c 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 69b900a..f7d4b1b 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 694e715..dd303cf 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 f733d2b..27f43979 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 7397114..524457c 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 ab385cd..4236b5b 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 447a57e..b7606ee 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 af870f8..42d1b1e 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 10162be..14d38ec 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 8d9d580..133770d 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 b6d2d04..d62e5ce 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 a2c30f8..394454c 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; } ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
