diff options
authorMichael Stahl <>2016-12-16 17:21:48 +0100
committerMichael Stahl <>2016-12-16 17:37:57 +0100
commitae3ec0d53a22ae5d2b7fb244a6056d0627b71873 (patch)
parentbdd1a03b450f9f8a0ead46c38bec58f6879b2c5d (diff)
tdf#91260 sw: fix nasty corner case of SdrGroupObject in header
or footer. Some very special handling going on to paint these in VOCOfDrawVirtObj with a GetSwDrawVirtObj().GetOffset() added; they are falsely identified as invisible because their sub-objects have an anchor set but it is always on the first page so to properly check them we'd have to add the same GetOffset() thing but checking the top-level object should be sufficient. (regression from 689cead9e0837dc932e3a4cd765f7d319b529018) Change-Id: Ida6fcd41948f46410ca02193549e426bc9dae8c5
1 files changed, 8 insertions, 1 deletions
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 4d8d2243c274..a1651f64080f 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -2117,6 +2117,13 @@ namespace sdr
drawinglayer::primitive2d::Primitive2DContainer VOCOfDrawVirtObj::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
+ // tdf#91260 have already checked top-level one is on the right page
+ assert(isPrimitiveVisible(rDisplayInfo));
+ // nasty corner case: override to clear page frame to disable the
+ // sub-objects' anchor check, because their anchor is always on
+ // the first page that the page style is applied to
+ DisplayInfo aDisplayInfo(rDisplayInfo);
+ aDisplayInfo.SetWriterPageFrame(basegfx::B2IRectangle());
const VCOfDrawVirtObj& rVC = static_cast< const VCOfDrawVirtObj& >(GetViewContact());
const SdrObject& rReferencedObject = rVC.GetSwDrawVirtObj().GetReferencedObj();
drawinglayer::primitive2d::Primitive2DContainer xRetval;
@@ -2141,7 +2148,7 @@ namespace sdr
// Get the VOC of the referenced object (the Group) and fetch primitives from it
const ViewObjectContact& rVOCOfRefObj = rReferencedObject.GetViewContact().GetViewObjectContact(GetObjectContact());
- impAddPrimitivesFromGroup(rVOCOfRefObj, aOffsetMatrix, rDisplayInfo, xRetval);
+ impAddPrimitivesFromGroup(rVOCOfRefObj, aOffsetMatrix, aDisplayInfo, xRetval);