summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/sdview2.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index 950a2422c599..6ac19f72e1e7 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -349,14 +349,11 @@ void View::StartDrag( const Point& rStartPos, vcl::Window* pWindow )
if( IsTextEdit() )
SdrEndTextEdit();
- DrawViewShell* pDrawViewShell = dynamic_cast< DrawViewShell* >( mpDocSh ? mpDocSh->GetViewShell() : nullptr );
-
- if( pDrawViewShell )
+ if (DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(mpDocSh ? mpDocSh->GetViewShell() : nullptr))
{
- const rtl::Reference<FuPoor>& xFunction( pDrawViewShell->GetCurrentFunction() );
-
- if( xFunction.is() && nullptr != dynamic_cast< const FuDraw *>( xFunction.get() ) )
- static_cast<FuDraw*>(xFunction.get())->ForcePointer();
+ const rtl::Reference<FuPoor>& xFunction(pDrawViewShell->GetCurrentFunction());
+ if (FuDraw* pFunction = dynamic_cast<FuDraw*>(xFunction.get()))
+ pFunction->ForcePointer();
}
mpDragSrcMarkList.reset( new SdrMarkList(GetMarkedObjectList()) );