summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/view/tabview5.cxx3
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx2
-rw-r--r--sc/source/ui/view/viewfun6.cxx6
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<FuText*>(GetDrawFuncPtr());
+ if (pFuText)
{
ScrollToObject( pCaption ); // make object fully visible
- static_cast< FuText* >( pPoor )->SetInEditMode( pCaption );
+ pFuText->SetInEditMode( pCaption );
}
}
}