summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-12-16 17:21:48 +0100
committerMichael Stahl <mstahl@redhat.com>2016-12-16 17:37:57 +0100
commitae3ec0d53a22ae5d2b7fb244a6056d0627b71873 (patch)
treed3783f3399b80f33950f18e532cef8559b1eb4c3
parenttdf#101464 tdf#91260 tdf#104620 sw: fix null SwPageFrame crash (diff)
downloadcore-ae3ec0d53a22ae5d2b7fb244a6056d0627b71873.tar.gz
core-ae3ec0d53a22ae5d2b7fb244a6056d0627b71873.zip
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
-rw-r--r--sw/source/core/draw/dcontact.cxx9
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);
}
else
{