[Libreoffice-commits] core.git: vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Sep 28 19:49:47 UTC 2021
vcl/source/app/salvtables.cxx | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
New commits:
commit 36cec4b92e8be9f47467539967672ba8906096e1
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Sep 28 17:11:02 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Sep 28 21:49:11 2021 +0200
tdf#144139 gen backend doesn't crash but DrawOutDev is a null op for Printers
Change-Id: I90be3c3343890989eefce3d6a535ffa854d77698
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122782
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index fd17e157d8ce..2d30c82e781b 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1285,7 +1285,19 @@ void SalInstanceWidget::DoRecursivePaint(vcl::Window* pWindow, const Point& rRen
Size aTempLogicSize(xOutput->PixelToLogic(aChildSizePixel));
Size aRenderLogicSize(rOutput.PixelToLogic(aChildSizePixel));
- xOutput->DrawOutDev(Point(), aTempLogicSize, rRenderLogicPos, aRenderLogicSize, rOutput);
+ switch (rOutput.GetOutDevType())
+ {
+ case OUTDEV_WINDOW:
+ case OUTDEV_VIRDEV:
+ xOutput->DrawOutDev(Point(), aTempLogicSize, rRenderLogicPos, aRenderLogicSize,
+ rOutput);
+ break;
+ case OUTDEV_PRINTER:
+ case OUTDEV_PDF:
+ xOutput->SetBackground(rOutput.GetBackground());
+ xOutput->Erase();
+ break;
+ }
//set ReallyVisible to match Visible, we restore the original state after Paint
WindowImpl* pImpl = pWindow->ImplGetWindowImpl();
@@ -1297,7 +1309,19 @@ void SalInstanceWidget::DoRecursivePaint(vcl::Window* pWindow, const Point& rRen
pImpl->mbReallyVisible = bRVisible;
- rOutput.DrawOutDev(rRenderLogicPos, aRenderLogicSize, Point(), aTempLogicSize, *xOutput);
+ switch (rOutput.GetOutDevType())
+ {
+ case OUTDEV_WINDOW:
+ case OUTDEV_VIRDEV:
+ rOutput.DrawOutDev(rRenderLogicPos, aRenderLogicSize, Point(), aTempLogicSize,
+ *xOutput);
+ break;
+ case OUTDEV_PRINTER:
+ case OUTDEV_PDF:
+ rOutput.DrawBitmapEx(rRenderLogicPos, aRenderLogicSize,
+ xOutput->GetBitmapEx(Point(), aTempLogicSize));
+ break;
+ }
xOutput.disposeAndClear();
More information about the Libreoffice-commits
mailing list