tdf#147164 Drawings are gone converting to PDF from commandline
regression from
commit 9a850dd9f3c221660b6259bdfd64a77343f2256c
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date: Wed Jan 12 10:27:38 2022 +0200
used cache value in ViewObjectContact::getPrimitive2DSequence (2nd
attempt)
for reasons I do not understand, the cached maObjectRange is wrong at this
point in the execution, so switch back to fetching it again, like the code
did before the above commit,
Change-Id: I4a9f0abc38e59ef687b460689a30ee4badf620a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129994
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx b/svx/source/sdr/contact/viewobjectcontact.cxx
index 6577b78..1a66760 100644
--- a/svx/source/sdr/contact/viewobjectcontact.cxx
+++ b/svx/source/sdr/contact/viewobjectcontact.cxx
@@ -436,10 +436,12 @@ void ViewObjectContact::getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInf
// get ranges
const drawinglayer::geometry::ViewInformation2D& rViewInformation2D(GetObjectContact().getViewInformation2D());
// tdf#147164 cannot use maObjectRange here, it is unreliable
const basegfx::B2DRange aObjectRange(mxPrimitive2DSequence.getB2DRange(rViewInformation2D));
const basegfx::B2DRange& aViewRange(rViewInformation2D.getViewport());
// check geometrical visibility
bool bVisible = aViewRange.isEmpty() || aViewRange.overlaps(maObjectRange);
bool bVisible = aViewRange.isEmpty() || aViewRange.overlaps(aObjectRange);
if(!bVisible)
return;