[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sw/source

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Mon Aug 17 08:36:28 UTC 2020


 sw/source/core/layout/frmtool.cxx |   11 +++++++++++
 1 file changed, 11 insertions(+)

New commits:
commit 9f18678432086ccf659bd9d4cbadc7e09f800897
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Tue Aug 11 17:54:09 2020 +0200
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Aug 17 10:35:55 2020 +0200

    tdf#134746 sw: fix redline hiding of at-char fly on empty paragraphs
    
    If a merged paragraph has no extents, a fly anchored at the start or at
    the end should be shown.
    
    (regression from 28b77c89dfcafae82cf2a6d85731b643ff9290e5)
    
    Change-Id: I78135f3c033cf08aad81c86b0ac693528e3f3f8e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100543
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    (cherry picked from commit f3cb59c46398b3a0646b8b374d5626f715fa6884)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100702
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 15e1d71eb7e8..22217f5c0655 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1274,6 +1274,17 @@ bool IsAnchoredObjShown(SwTextFrame const& rFrame, SwFormatAnchor const& rAnchor
         ret = false;
         auto const pAnchor(rAnchor.GetContentAnchor());
         auto iterFirst(pMergedPara->extents.cbegin());
+        if (iterFirst == pMergedPara->extents.end()
+            && (rAnchor.GetAnchorId() == RndStdIds::FLY_AT_PARA
+                || rAnchor.GetAnchorId() == RndStdIds::FLY_AT_CHAR))
+        {
+            ret = (&pAnchor->nNode.GetNode() == pMergedPara->pFirstNode
+                    && (rAnchor.GetAnchorId() == RndStdIds::FLY_AT_PARA
+                        || pAnchor->nContent == 0))
+                || (&pAnchor->nNode.GetNode() == pMergedPara->pLastNode
+                    && (rAnchor.GetAnchorId() == RndStdIds::FLY_AT_PARA
+                        || pAnchor->nContent == pMergedPara->pLastNode->Len()));
+        }
         auto iter(iterFirst);
         SwTextNode const* pNode(pMergedPara->pFirstNode);
         for ( ; ; ++iter)


More information about the Libreoffice-commits mailing list