diff options
-rw-r--r-- | toolkit/source/awt/vclxwindow.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index 9b5ff6b2484e..b472c89a0401 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -2243,13 +2243,15 @@ void VCLXWindow::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno: if ( isDesignMode() || mpImpl->isEnableVisible() ) { + OutputDevice* pDev = VCLUnoHelper::GetOutputDevice( mpImpl->mxViewGraphics ); + if (!pDev) + pDev = pWindow->GetParent(); TabPage* pTabPage = dynamic_cast< TabPage* >( pWindow ); if ( pTabPage ) { Point aPos( nX, nY ); Size aSize = pWindow->GetSizePixel(); - OutputDevice* pDev = VCLUnoHelper::GetOutputDevice( mpImpl->mxViewGraphics ); aPos = pDev->PixelToLogic( aPos ); aSize = pDev->PixelToLogic( aSize ); @@ -2257,12 +2259,8 @@ void VCLXWindow::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno: return; } - OutputDevice* pDev = VCLUnoHelper::GetOutputDevice( mpImpl->mxViewGraphics ); Point aPos( nX, nY ); - if ( !pDev ) - pDev = pWindow->GetParent(); - if ( pWindow->GetParent() && !pWindow->IsSystemWindow() && ( pWindow->GetParent() == pDev ) ) { // #i40647# don't draw here if this is a recursive call |