diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2024-05-08 14:20:26 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2024-05-10 10:08:20 +0200 |
commit | 9fb9bd54a82ee20f5916aa68e428e0fb67f02ed6 (patch) | |
tree | c0a7a484b597d19cf09a4b82e020ed70af694e1c /include | |
parent | 609d1e353cfd7a9b138fcbe656a2faae9f84c36a (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 'include')
-rw-r--r-- | include/svx/svdobj.hxx | 8 | ||||
-rw-r--r-- | include/svx/svdovirt.hxx | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx index 2951d41e8904..4e03abf18da3 100644 --- a/include/svx/svdobj.hxx +++ b/include/svx/svdobj.hxx @@ -732,10 +732,10 @@ public: bool IsMoveProtect() const { return m_bMovProt;} void SetResizeProtect(bool bProt); bool IsResizeProtect() const { return m_bSizProt;} - void SetPrintable(bool bPrn); - bool IsPrintable() const { return !m_bNoPrint;} - void SetVisible(bool bVisible); - bool IsVisible() const { return mbVisible;} + virtual void SetPrintable(bool isPrintable); + virtual bool IsPrintable() const; + virtual void SetVisible(bool isVisible); + virtual bool IsVisible() const; void SetMarkProtect(bool bProt); bool IsMarkProtect() const { return m_bMarkProt;} virtual bool IsSdrTextObj() const { return false; } diff --git a/include/svx/svdovirt.hxx b/include/svx/svdovirt.hxx index 17c869313067..ca5f6858ecaa 100644 --- a/include/svx/svdovirt.hxx +++ b/include/svx/svdovirt.hxx @@ -61,6 +61,10 @@ public: const SdrObject& GetReferencedObj() const; virtual void NbcSetAnchorPos(const Point& rAnchorPos) override; + virtual void SetPrintable(bool isPrintable) override; + virtual bool IsPrintable() const override; + virtual void SetVisible(bool isVisible) override; + virtual bool IsVisible() const override; virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override; virtual SdrInventor GetObjInventor() const override; virtual SdrObjKind GetObjIdentifier() const override; |