diff options
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 52b863602d8e..660cf16be92b 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -3051,14 +3051,7 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent) if (static_cast<SwContent*>(pEntry->GetUserData())->GetParent()->IsDeletable() && !m_pActiveShell->GetView().GetDocShell()->IsReadOnly()) { - if (static_cast<SwContent*>(pEntry->GetUserData())->GetParent()->GetType() == ContentTypeId::OUTLINE) - DeleteOutlineSelections(); - else - EditEntry(pEntry, EditEntryMode::DELETE); - m_bViewHasChanged = true; - GetParentWindow()->UpdateListBox(); - TimerUpdate(&m_aUpdTimer); - GrabFocus(); + EditEntry(pEntry, EditEntryMode::DELETE); } } } @@ -3394,7 +3387,8 @@ void SwContentTree::ExecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry ) } break; case 806: - DeleteOutlineSelections(); + // Delete outline selections + EditEntry(pFirst, EditEntryMode::DELETE); break; //Display default: @@ -3548,6 +3542,13 @@ void SwContentTree::EditEntry(SvTreeListEntry const * pEntry, EditEntryMode nMod uno::Reference< container::XNameAccess > xNameAccess, xSecond, xThird; switch(nType) { + case ContentTypeId::OUTLINE : + if(nMode == EditEntryMode::DELETE) + { + DeleteOutlineSelections(); + } + break; + case ContentTypeId::TABLE : if(nMode == EditEntryMode::UNPROTECT_TABLE) { @@ -3756,6 +3757,13 @@ void SwContentTree::EditEntry(SvTreeListEntry const * pEntry, EditEntryMode nMod pDlg->SetForbiddenChars(sForbiddenChars); pDlg->Execute(); } + if(EditEntryMode::DELETE == nMode) + { + m_bViewHasChanged = true; + GetParentWindow()->UpdateListBox(); + TimerUpdate(&m_aUpdTimer); + GrabFocus(); + } } void SwContentTree::GotoContent(const SwContent* pCnt) |