[Libreoffice-commits] core.git: sw/source
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Mon Aug 31 10:42:06 UTC 2020
sw/source/core/layout/frmtool.cxx | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 586750da40c5b332d2442ef24ae121795e88e903
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Fri Aug 28 22:05:06 2020 +0200
Commit: Michael Stahl <michael.stahl at cib.de>
CommitDate: Mon Aug 31 12:41:22 2020 +0200
tdf#135001 sw_redlinehide: fix IsShown() for AT_PARA flys
There is one merged text frame from node 102 to node 328 with no
extents, and of course a shape anchored at node 271 should not be
visible at all.
This crashes because the shape was removed from the layout during
CheckParaRedlineMerge() but then moved to the visible heaven layer
again via sw::AddRemoveFlysAnchoredToFrameStartingAtNode() and the
layer determines if it's visible as far as Sdr* is concerned;
it lacks a connection to a SwFrame though.
warn:legacy.osl:3547848:3547848:sw/source/core/layout/paintfrm.cxx:3861: <SwFlyFrame::IsPaint(..)> - paint of drawing object without anchor frame!?
(regression from 6aaae44da382f4bc3eafc287b4a21734b740cf21)
Change-Id: Ia20449b3a7d251f0c049eb979c88df1e80cd7d5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101584
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 1cadf5f06aec..4a721fb958cb 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1052,7 +1052,15 @@ static bool IsShown(sal_uLong const nIndex,
{
return false;
}
- if (pIter && rAnch.GetAnchorId() != RndStdIds::FLY_AT_PARA)
+ if (rAnch.GetAnchorId() == RndStdIds::FLY_AT_PARA)
+ {
+ return pIter == nullptr // not merged
+ || pIter != pEnd // at least one char visible in node
+ || !IsSelectFrameAnchoredAtPara(rAnchor,
+ SwPosition(const_cast<SwTextNode&>(*pFirstNode), 0),
+ SwPosition(const_cast<SwTextNode&>(*pLastNode), pLastNode->Len()));
+ }
+ if (pIter)
{
// note: frames are not sorted by anchor position.
assert(pEnd);
More information about the Libreoffice-commits
mailing list