From 2bda972c0f40a0d69749504f51e3c16d7488d011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 4 Jul 2016 15:31:29 +0100 Subject: Resolves: tdf#100761 after insert note, focus cannot return to inputbar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit suspected regression from. commit 11d605cc5a0c221d2423b6e63f502db660d085d2 Date: Mon Feb 1 18:39:51 2016 +0200 tdf#84843 Stop using PseudoSlots for drawing slots Change-Id: I64aba363f7562c6b16ae1d679968149fea1ba763 Reviewed-on: https://gerrit.libreoffice.org/26909 Tested-by: Jenkins Reviewed-by: Eike Rathke Tested-by: Eike Rathke (cherry picked from commit 80509950d35cebaede89fcb52c446a1fd3e45ba3) Reviewed-on: https://gerrit.libreoffice.org/26936 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sc/source/ui/view/tabview5.cxx | 3 +-- sc/source/ui/view/tabvwsh4.cxx | 2 +- sc/source/ui/view/viewfun6.cxx | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx index 6e5e3bf27caa..a06afbc84a34 100644 --- a/sc/source/ui/view/tabview5.cxx +++ b/sc/source/ui/view/tabview5.cxx @@ -353,8 +353,7 @@ void ScTabView::DrawDeselectAll() if (pDrawView) { ScTabViewShell* pViewSh = aViewData.GetViewShell(); - if ( pDrawActual && - ( pViewSh->IsDrawTextShell() || pDrawActual->GetSlotID() == SID_DRAW_NOTEEDIT ) ) + if (pDrawActual && pViewSh->IsDrawTextShell()) { // end text edit (as if escape pressed, in FuDraw) aViewData.GetDispatcher().Execute( pDrawActual->GetSlotID(), diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index d1430303fb14..2d8825b2dec0 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -282,7 +282,7 @@ bool ScTabViewShell::PrepareClose(bool bUI) // draw text edit mode must be closed FuPoor* pPoor = GetDrawFuncPtr(); - if ( pPoor && ( IsDrawTextShell() || pPoor->GetSlotID() == SID_DRAW_NOTEEDIT ) ) + if (pPoor && IsDrawTextShell()) { // "clean" end of text edit, including note handling, subshells and draw func switching, // as in FuDraw and ScTabView::DrawDeselectAll diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx index 37e2cfa550ce..d7848f5b99ad 100644 --- a/sc/source/ui/view/viewfun6.cxx +++ b/sc/source/ui/view/viewfun6.cxx @@ -503,11 +503,11 @@ void ScViewFunc::EditNote() // activate object (as in FuSelection::TestComment) GetViewData().GetDispatcher().Execute( SID_DRAW_NOTEEDIT, SfxCallMode::SYNCHRON | SfxCallMode::RECORD ); // now get the created FuText and set into EditMode - FuPoor* pPoor = GetDrawFuncPtr(); - if ( pPoor && (pPoor->GetSlotID() == SID_DRAW_NOTEEDIT) ) // has no RTTI + FuText* pFuText = dynamic_cast(GetDrawFuncPtr()); + if (pFuText) { ScrollToObject( pCaption ); // make object fully visible - static_cast< FuText* >( pPoor )->SetInEditMode( pCaption ); + pFuText->SetInEditMode( pCaption ); } } } -- cgit v1.2.1