diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-07-30 10:40:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-07-30 16:18:59 +0200 |
commit | fb98eb24d451a1b422bad1ed42459b8876397fd6 (patch) | |
tree | 461f925eaa306f350cf2ed604cfb5b5dd817bf00 /sw/source/uibase/ribbar/inputwin.cxx | |
parent | 4e246d407b21b72cfb0f8dd9c6ac51ca06d909a3 (diff) |
loplugin:flatten in sw/uibase/fldui..sw/uibase/ribbar
Change-Id: Iff2bd302c3a6cc23be462e5a59aee0d12e7e7c09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99794
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/ribbar/inputwin.cxx')
-rw-r--r-- | sw/source/uibase/ribbar/inputwin.cxx | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx index 8ae9fe5d087d..de00c7fc7108 100644 --- a/sw/source/uibase/ribbar/inputwin.cxx +++ b/sw/source/uibase/ribbar/inputwin.cxx @@ -155,19 +155,19 @@ void SwInputWindow::dispose() void SwInputWindow::CleanupUglyHackWithUndo() { - if (m_bResetUndo) + if (!m_bResetUndo) + return; + + if (pWrtShell) { - if (pWrtShell) + DelBoxContent(); + pWrtShell->DoUndo(m_bDoesUndo); + if (m_bCallUndo) { - DelBoxContent(); - pWrtShell->DoUndo(m_bDoesUndo); - if (m_bCallUndo) - { - pWrtShell->Undo(); - } + pWrtShell->Undo(); } - m_bResetUndo = false; // #i117122# once is enough :) } + m_bResetUndo = false; // #i117122# once is enough :) } void SwInputWindow::Resize() @@ -354,22 +354,22 @@ void SwInputWindow::ApplyFormula() void SwInputWindow::CancelFormula() { - if(pView) - { - pView->GetViewFrame()->GetDispatcher()->Lock( false ); - pView->GetEditWin().LockKeyInput(false); - CleanupUglyHackWithUndo(); - pWrtShell->Pop(SwCursorShell::PopMode::DeleteCurrent); + if(!pView) + return; - if( bDelSel ) - pWrtShell->EnterStdMode(); + pView->GetViewFrame()->GetDispatcher()->Lock( false ); + pView->GetEditWin().LockKeyInput(false); + CleanupUglyHackWithUndo(); + pWrtShell->Pop(SwCursorShell::PopMode::DeleteCurrent); - pWrtShell->EndSelTableCells(); + if( bDelSel ) + pWrtShell->EnterStdMode(); - pView->GetEditWin().GrabFocus(); + pWrtShell->EndSelTableCells(); - pView->GetViewFrame()->GetDispatcher()->Execute( FN_EDIT_FORMULA, SfxCallMode::ASYNCHRON); - } + pView->GetEditWin().GrabFocus(); + + pView->GetViewFrame()->GetDispatcher()->Execute( FN_EDIT_FORMULA, SfxCallMode::ASYNCHRON); } const sal_Unicode CH_LRE = 0x202a; |