sw/source/core/layout/paintfrm.cxx | 9 +++++++++ 1 file changed, 9 insertions(+)
New commits: commit b9ad8b10c7c277214ae2ca7ef21781e2b0cc4bba Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Thu Aug 22 12:45:22 2024 +0200 Commit: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> CommitDate: Fri Aug 23 13:17:06 2024 +0200 sw: do not paint hidden frames Table frames in hidden sections may still paint their border lines. Check that the height (or width, if vertical) is not 0 before painting. (regression from commit ff7f1b59e22092d8548459e75fe912db852f056f) Change-Id: I6ace6d6608d5e23ff2f3c5a61d37e3f6da958977 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172250 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit 13495926390ba54fbcd45ec00fbe613b1f2b734b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172199 Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 98679695df29..31cbf1138341 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3718,6 +3718,11 @@ SwShortCut::SwShortCut( const SwFrame& rFrame, const SwRect& rRect ) void SwLayoutFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, PaintFrameMode ePaintFrameMode, SwPrintData const*const) const { + if (!getFramePrintArea().HasArea()) + { + return; // do not paint hidden frame + } + // #i16816# tagged pdf support Frame_Info aFrameInfo(*this, false); SwTaggedPDFHelper aTaggedPDFHelper( nullptr, @@ -4667,6 +4672,10 @@ void SwTextFrame::PaintOutlineContentVisibilityButton() const void SwTabFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, PaintFrameMode, SwPrintData const*const) const { + if (!getFramePrintArea().HasArea()) + { + return; // do not paint hidden frame + } const SwViewOption* pViewOption = gProp.pSGlobalShell->GetViewOptions(); if (pViewOption->IsTable()) {