summaryrefslogtreecommitdiff
path: root/sd/source/ui/annotations/annotationtag.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/annotations/annotationtag.cxx')
-rw-r--r--sd/source/ui/annotations/annotationtag.cxx60
1 files changed, 30 insertions, 30 deletions
diff --git a/sd/source/ui/annotations/annotationtag.cxx b/sd/source/ui/annotations/annotationtag.cxx
index 4e79f8d337f9..052245ac15fd 100644
--- a/sd/source/ui/annotations/annotationtag.cxx
+++ b/sd/source/ui/annotations/annotationtag.cxx
@@ -616,43 +616,43 @@ IMPL_LINK(AnnotationTag, WindowEventHandler, VclWindowEvent&, rEvent, void)
if( !pWindow )
return;
- if( pWindow == mpListenWindow )
+ if( pWindow != mpListenWindow )
+ return;
+
+ switch( rEvent.GetId() )
{
- switch( rEvent.GetId() )
+ case VclEventId::WindowMouseButtonUp:
{
- case VclEventId::WindowMouseButtonUp:
- {
- // if we stop pressing the button without a mouse move we open the popup
- mpListenWindow->RemoveEventListener( LINK(this, AnnotationTag, WindowEventHandler));
- mpListenWindow = nullptr;
- if( !mpAnnotationWindow )
- OpenPopup(false);
- }
- break;
- case VclEventId::WindowMouseMove:
- {
- // if we move the mouse after a button down we want to start dragging
- mpListenWindow->RemoveEventListener( LINK(this, AnnotationTag, WindowEventHandler));
- mpListenWindow = nullptr;
+ // if we stop pressing the button without a mouse move we open the popup
+ mpListenWindow->RemoveEventListener( LINK(this, AnnotationTag, WindowEventHandler));
+ mpListenWindow = nullptr;
+ if( !mpAnnotationWindow )
+ OpenPopup(false);
+ }
+ break;
+ case VclEventId::WindowMouseMove:
+ {
+ // if we move the mouse after a button down we want to start dragging
+ mpListenWindow->RemoveEventListener( LINK(this, AnnotationTag, WindowEventHandler));
+ mpListenWindow = nullptr;
- SdrHdl* pHdl = mrView.PickHandle(maMouseDownPos);
- if( pHdl )
- {
- mrView.BrkAction();
- const sal_uInt16 nDrgLog = static_cast<sal_uInt16>(pWindow->PixelToLogic(Size(DRGPIX,0)).Width());
+ SdrHdl* pHdl = mrView.PickHandle(maMouseDownPos);
+ if( pHdl )
+ {
+ mrView.BrkAction();
+ const sal_uInt16 nDrgLog = static_cast<sal_uInt16>(pWindow->PixelToLogic(Size(DRGPIX,0)).Width());
- rtl::Reference< AnnotationTag > xTag( this );
+ rtl::Reference< AnnotationTag > xTag( this );
- SdrDragMethod* pDragMethod = new AnnotationDragMove( mrView, xTag );
- mrView.BegDragObj(maMouseDownPos, nullptr, pHdl, nDrgLog, pDragMethod );
- }
+ SdrDragMethod* pDragMethod = new AnnotationDragMove( mrView, xTag );
+ mrView.BegDragObj(maMouseDownPos, nullptr, pHdl, nDrgLog, pDragMethod );
}
- break;
- case VclEventId::ObjectDying:
- mpListenWindow = nullptr;
- break;
- default: break;
}
+ break;
+ case VclEventId::ObjectDying:
+ mpListenWindow = nullptr;
+ break;
+ default: break;
}
}