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.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sd/source/ui/annotations/annotationtag.cxx b/sd/source/ui/annotations/annotationtag.cxx
index 052245ac15fd..cfd632dcc2bd 100644
--- a/sd/source/ui/annotations/annotationtag.cxx
+++ b/sd/source/ui/annotations/annotationtag.cxx
@@ -414,7 +414,7 @@ bool AnnotationTag::OnMove( const KeyEvent& rKEvt )
if(rKEvt.GetKeyCode().IsMod2())
{
- OutputDevice* pOut = mrView.GetViewShell()->GetActiveWindow();
+ OutputDevice* pOut = mrView.GetViewShell()->GetActiveWindow()->GetOutDev();
Size aLogicSizeOnePixel = pOut ? pOut->PixelToLogic(Size(1,1)) : Size(100, 100);
nX *= aLogicSizeOnePixel.Width();
nY *= aLogicSizeOnePixel.Height();
@@ -574,7 +574,8 @@ void AnnotationTag::OpenPopup( bool bEdit )
if( !mpAnnotationWindow )
{
- vcl::Window* pWindow = dynamic_cast< vcl::Window* >( getView().GetFirstOutputDevice() );
+ OutputDevice* pOut = getView().GetFirstOutputDevice();
+ vcl::Window* pWindow = pOut ? pOut->GetOwnerWindow() : nullptr;
if( pWindow )
{
RealPoint2D aPosition( mxAnnotation->getPosition() );