summaryrefslogtreecommitdiff
path: root/vcl/source/window
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2024-03-03 17:11:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-03-04 09:27:07 +0100
commitb03f1dfb15a67641bc516a1c6b5632857451a18d (patch)
tree7fdcb30e4aa2c3b528d1fa87d9205fd1dc83e768 /vcl/source/window
parent17581e684ca701bfd96ed2bf16aa14c3903b74d4 (diff)
tdf#159817 tdf#159802 Form controls coordinates wrong when export to pdf
This reverts the following commits: d408fe5cd45c9594feecec727ab2f73c66e361d0 "unnecessary LogicToPixel in CheckBox::Draw" 7441aaa4c5b2215e369c62e22af098184e8ce807 "unnecessary LogicToPixel in RadioButton::Draw" a2dacae0c8acfad8a5e5a16c766ee740ec202c5e "unnecessary LogicToPixel in ComboBox::Draw" f73e8c895e24fda10931ecf344a1a0dd8bcdf92c "unnecessary LogicToPixel in TabPage::Draw" I am fairly sure this code that I am restoring is dodgy, and I am just papering over some other bug somewhere, but I can't seem to see where that is. Change-Id: I0f9088e43b0e3af74fd5ff9d297008ee23a3facb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164313 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/window')
-rw-r--r--vcl/source/window/tabpage.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index 612b17d2729e..b97becf2e05e 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -163,6 +163,7 @@ void TabPage::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle&
void TabPage::Draw( OutputDevice* pDev, const Point& rPos, SystemTextColorFlags )
{
+ Point aPos = pDev->LogicToPixel( rPos );
Size aSize = GetSizePixel();
Wallpaper aWallpaper = GetBackground();
@@ -174,14 +175,14 @@ void TabPage::Draw( OutputDevice* pDev, const Point& rPos, SystemTextColorFlags
pDev->SetLineColor();
if ( aWallpaper.IsBitmap() )
- pDev->DrawBitmapEx( rPos, aSize, aWallpaper.GetBitmap() );
+ pDev->DrawBitmapEx( aPos, aSize, aWallpaper.GetBitmap() );
else
{
if( aWallpaper.GetColor() == COL_AUTO )
pDev->SetFillColor( GetSettings().GetStyleSettings().GetDialogColor() );
else
pDev->SetFillColor( aWallpaper.GetColor() );
- pDev->DrawRect( tools::Rectangle( rPos, aSize ) );
+ pDev->DrawRect( tools::Rectangle( aPos, aSize ) );
}
pDev->Pop();