summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2022-01-17 13:11:19 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2022-02-07 09:01:00 +0100
commitcf5b0d5972b02809e9b7f35780885445242b3f12 (patch)
tree1396fb5059d4779637307165bd98b5ce6f94a779
parent6dcd73f505eca7d0ea31555564855dd4cd0813b4 (diff)
RTL: lok: render correctly interim windows
Change-Id: Iec23fba24464c6d29ecb63d3d2018ded8d9937f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128500 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129495 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
-rw-r--r--vcl/source/app/salvtables.cxx21
1 files changed, 16 insertions, 5 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index ec8f27366a19..778901f85d37 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1307,6 +1307,8 @@ void SalInstanceWidget::DoRecursivePaint(vcl::Window* pWindow, const Point& rRen
break;
}
+ bool bHasMirroredGraphics = pWindow->GetOutDev()->HasMirroredGraphics();
+
xOutput.disposeAndClear();
pWindow->EnableMapMode(bOldMapModeEnabled);
@@ -1317,11 +1319,20 @@ void SalInstanceWidget::DoRecursivePaint(vcl::Window* pWindow, const Point& rRen
{
if (!pChild->IsVisible())
continue;
- Point aRelPos(pChild->GetPosPixel());
- Size aRelLogicOffset(rOutput.PixelToLogic(Size(aRelPos.X(), aRelPos.Y())));
- DoRecursivePaint(pChild,
- rRenderLogicPos + Point(aRelLogicOffset.Width(), aRelLogicOffset.Height()),
- rOutput);
+
+ tools::Long nDeltaX
+ = pChild->GetOutDev()->GetOutOffXPixel() - pWindow->GetOutDev()->GetOutOffXPixel();
+ if (bHasMirroredGraphics)
+ nDeltaX = pWindow->GetOutDev()->GetOutputWidthPixel() - nDeltaX
+ - pChild->GetOutDev()->GetOutputWidthPixel();
+
+ tools::Long nDeltaY
+ = pChild->GetOutDev()->GetOutOffYPixel() - pWindow->GetOutDev()->GetOutOffYPixel();
+
+ Point aPos(rRenderLogicPos);
+ aPos += rOutput.PixelToLogic(Point(nDeltaX, nDeltaY));
+
+ DoRecursivePaint(pChild, aPos, rOutput);
}
}