summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2024-05-08 14:20:26 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2024-05-10 10:08:20 +0200
commit9fb9bd54a82ee20f5916aa68e428e0fb67f02ed6 (patch)
treec0a7a484b597d19cf09a4b82e020ed70af694e1c /sw/source
parent609d1e353cfd7a9b138fcbe656a2faae9f84c36a (diff)
tdf#156484 svx,sw: fix visibility of shapes in header/footer
Similar to commit ae132145ff42a95dc24fb124847c04af4b8c8dab, also forward IsVisible() and IsPrintable() from SdrVirtObj to its real object; evidently the properties aren't copied when creating SdrVirtObj but there is no reason for that to have these properties independent. This triggers an assert in VOCOfDrawVirtObj::createPrimitive2DSequence() because that is called during layout from getObjectRange(); the assert was added in commit ae3ec0d53a22ae5d2b7fb244a6056d0627b71873 and intended for painting, but this isn't painting, and it's not easily possible to detect if the function is called during painting, so remove the assert. Change-Id: Id2a04a5d07f43b86eb9c524b30ba74ecaf6a95c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167350 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/draw/dcontact.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 9ccd019181ea..138470ee11f9 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -2220,8 +2220,9 @@ namespace sdr::contact
void VOCOfDrawVirtObj::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const
{
- // tdf#91260 have already checked top-level one is on the right page
- assert(isPrimitiveVisible(rDisplayInfo));
+ // this may be called for painting where it's a precondition that
+ // isPrimitiveVisible() is true, or for e.g. getObjectRange() (even
+ // during layout) where there are no preconditions...
// 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