diff options
author | Jim Raykowski <raykowj@gmail.com> | 2024-05-28 06:39:19 -0800 |
---|---|---|
committer | Jim Raykowski <raykowj@gmail.com> | 2024-05-30 00:22:24 +0200 |
commit | 24c28600430668c0bef6c24679a2fd0279d6253f (patch) | |
tree | 39c825e1e834f4b5f1a36f759ee0bb89f76b25ea /sw/source/uibase/utlui | |
parent | 0d9da34ad098ef81b5fee7535c1eace2bd813b1e (diff) |
SwNavigator: simplify table delete
Change-Id: Ic26712972e3465eba10dbaba9cfce20365c5644a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168172
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/source/uibase/utlui')
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 78177a9e226c..edfcac1b63b0 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -5597,21 +5597,8 @@ void SwContentTree::EditEntry(const weld::TreeIter& rEntry, EditEntryMode nMode) } else if(nMode == EditEntryMode::DELETE) { - m_pActiveShell->StartAction(); - OUString sTable = SwResId(STR_TABLE_NAME); - SwRewriter aRewriterTableName; - aRewriterTableName.AddRule(UndoArg1, SwResId(STR_START_QUOTE)); - aRewriterTableName.AddRule(UndoArg2, pCnt->GetName()); - aRewriterTableName.AddRule(UndoArg3, SwResId(STR_END_QUOTE)); - sTable = aRewriterTableName.Apply(sTable); - - SwRewriter aRewriter; - aRewriter.AddRule(UndoArg1, sTable); - m_pActiveShell->StartUndo(SwUndoId::DELETE, &aRewriter); - m_pActiveShell->GetView().GetViewFrame().GetDispatcher()->Execute(FN_TABLE_SELECT_ALL); - m_pActiveShell->DeleteRow(); - m_pActiveShell->EndUndo(); - m_pActiveShell->EndAction(); + m_pActiveShell->SelTable(); + m_pActiveShell->DeleteTable(); } else if(nMode == EditEntryMode::RENAME) { |