summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase')
-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
32 files changed, 132 insertions, 132 deletions
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);
}