summaryrefslogtreecommitdiff
path: root/toolkit/source/awt/vclxwindow.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-05-21 15:54:15 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-05-22 13:17:30 +0200
commitc200aa27ee4a0f5a89af6e970c2c22580029eded (patch)
tree3988c0c756df2d1eb182c50ad1dc0e226d2ecf14 /toolkit/source/awt/vclxwindow.cxx
parentaf6561532832615f39b5ea82aa5d9b3e240784e8 (diff)
remove Size arg from Window::Draw and depend on GetSizePixel
90% of cases pass GetSizePixel as the Size arg already and this aligns Window::Draw with how Window::PaintToDevice works Change-Id: If5b024179a4b7a3b099177c2f6d4b1fb006b95ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94644 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'toolkit/source/awt/vclxwindow.cxx')
-rw-r--r--toolkit/source/awt/vclxwindow.cxx12
1 files changed, 3 insertions, 9 deletions
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 8aeb3a49679f..8c7b306b084e 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -2217,12 +2217,8 @@ void VCLXWindow::draw( sal_Int32 nX, sal_Int32 nY )
if ( pTabPage )
{
Point aPos( nX, nY );
- Size aSize = pWindow->GetSizePixel();
-
- aPos = pDev->PixelToLogic( aPos );
- aSize = pDev->PixelToLogic( aSize );
-
- pTabPage->Draw( pDev, aPos, aSize, DrawFlags::NONE );
+ aPos = pDev->PixelToLogic( aPos );
+ pTabPage->Draw( pDev, aPos, DrawFlags::NONE );
return;
}
@@ -2269,8 +2265,6 @@ void VCLXWindow::draw( sal_Int32 nX, sal_Int32 nY )
}
else if ( pDev )
{
- Size aSz = pWindow->GetSizePixel();
- aSz = pDev->PixelToLogic( aSz );
Point aP = pDev->PixelToLogic( aPos );
vcl::PDFExtOutDevData* pPDFExport = dynamic_cast<vcl::PDFExtOutDevData*>(pDev->GetExtOutDevData());
@@ -2279,7 +2273,7 @@ void VCLXWindow::draw( sal_Int32 nX, sal_Int32 nY )
|| ( pPDFExport != nullptr );
if ( bDrawSimple )
{
- pWindow->Draw( pDev, aP, aSz, DrawFlags::NoControls );
+ pWindow->Draw( pDev, aP, DrawFlags::NoControls );
}
else
{