diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2024-08-22 12:45:22 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2024-08-30 15:39:04 +0200 |
commit | a9af62f9adef9e4cfd2ab2968a1d59f5de143ad7 (patch) | |
tree | 0b41644e40b2b592eafdded41973d155e1d191df | |
parent | tdf#162370: check if nNext is valid, too (diff) | |
download | core-a9af62f9adef9e4cfd2ab2968a1d59f5de143ad7.tar.gz core-a9af62f9adef9e4cfd2ab2968a1d59f5de143ad7.zip |
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.stahl@allotropia.de>
(cherry picked from commit 13495926390ba54fbcd45ec00fbe613b1f2b734b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172200
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 00ad650a213406466b8ccd5d7907ed069326ef07)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172272
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 2375fae0db3c..db2e567d5543 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3703,6 +3703,11 @@ SwShortCut::SwShortCut( const SwFrame& rFrame, const SwRect& rRect ) void SwLayoutFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, 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, &aFrameInfo, nullptr, rRenderContext ); @@ -4642,6 +4647,10 @@ void SwTextFrame::PaintOutlineContentVisibilityButton() const void SwTabFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const { + if (!getFramePrintArea().HasArea()) + { + return; // do not paint hidden frame + } const SwViewOption* pViewOption = gProp.pSGlobalShell->GetViewOptions(); if (pViewOption->IsTable()) { |