vcl/source/window/paint.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit 6a7e2f4ba5581946adf26195f0782f938c56919f Author: Armin Le Grand (Collabora) <armin.le.gr...@me.com> AuthorDate: Fri Mar 21 11:29:49 2025 +0100 Commit: Armin Le Grand <armin.le.gr...@me.com> CommitDate: Fri Mar 21 13:56:34 2025 +0100 tdf#165706: Fix visualization of MultiFirmControls in EditMode 'Simple' FormControls were rendered correctly with SDPR active, but 'Multi' FormControls did not. Found an error regarding use of MapModes in that drawing code below in vcl that did not handle an evtl. set MapMode, corrected that. Change-Id: I51d7318c2950b7d70e3064ba628909cb17416bae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183196 Tested-by: Jenkins Reviewed-by: Armin Le Grand <armin.le.gr...@me.com> diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index fc6435ef46bd..b024374a13f4 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -1547,7 +1547,11 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP nDeltaX = GetOutDev()->mnOutWidth - nDeltaX - pChild->GetOutDev()->mnOutWidth; tools::Long nDeltaY = pChild->GetOutOffYPixel() - GetOutOffYPixel(); Point aPos( i_rPos ); - Point aDelta( nDeltaX, nDeltaY ); + // tdf#165706 those delta values are in pixels, but aPos copied from + // i_rPos *may* be in logical coordinates if a MapMode is set at + // i_pTargetOutDev. To not mix values of different coordinate systems + // it *needs* to be converted (which does nothing if no MapMode) + Point aDelta( i_pTargetOutDev->PixelToLogic( Point( nDeltaX, nDeltaY )) ); aPos += aDelta; pChild->ImplPaintToDevice( i_pTargetOutDev, aPos ); }