desktop/scripts/soffice.sh      |    4 ++--
 solenv/gdb/libreoffice/sw.py    |    6 +++++-
 sw/source/core/layout/wsfrm.cxx |   27 +++++++++++++++++++++------
 3 files changed, 28 insertions(+), 9 deletions(-)

New commits:
commit f027559dde18fe3f524c5f22c255ae9783b51e65
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Fri Jul 28 13:09:41 2023 +0200
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Fri Jul 28 16:07:57 2023 +0200

    sw: layout: invalidate row after fixed-height row too
    
    In SwLayoutFrame::GrowFrame(), invalidate the position of not only the
    next frame, but continue to invalidate until there is a frame with a
    non-fixed height.
    
    The idea with invalidating only the next frame is that the next frame
    will then be formatted and this will then invalidate the position of the
    frame after that.
    
    But with a table row with fixed height, this doesn't work:
    SwLayoutFrame::GrowFrame() returns without doing anything, not invalidating
    next frame; the next-next row is never repositioned and overlaps the
    next row.
    
    (this reproduces as a user-visible problem only when using the API to
     export to PDF, and only in a 6.3-based downstream branch, because
     in SwXTextDocument::getRendererCount() view settings are applied and
     this will differ on the IsParagraph() setting and in master this causes
     all pages to be invalidated and another run of the layout fixes the
     problem; also on the downstream branch backports of commit
     383032c50a3e3354f04200ce984a47ab9d2c5c67 "tdf#123583 use TaskStopwatch
     for Writer Idle loop" and commit
     c605283ad6785dea762feab5fdffd9d27e75c292 "sw: fix spurious layout
     invalidation from ~SwCallLink()" are required to reproduce.)
    
    Change-Id: Ic8a0aa23c496eeab2f3fd87bff7212c8d8ca1cfe
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155017
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>
    (cherry picked from commit 2bf98b495cf187c80ab105f30b51da8f65561e35)

diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index b7e5e3149403..b5101a567df7 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -2735,13 +2735,28 @@ SwTwips SwLayoutFrame::GrowFrame( SwTwips nDist, bool 
bTst, bool bInfo )
             SwPageFrame *pPage = FindPageFrame();
             if ( GetNext() )
             {
-                GetNext()->InvalidatePos_();
-                if (GetNext()->IsRowFrame())
-                {   // also invalidate first cell
-                    
static_cast<SwLayoutFrame*>(GetNext())->Lower()->InvalidatePos_();
+                SwFrame * pNext = GetNext();
+                do
+                {
+                    pNext->InvalidatePos_();
+                    if (pNext->IsRowFrame())
+                    {   // also invalidate first cell
+                        
static_cast<SwLayoutFrame*>(pNext)->Lower()->InvalidatePos_();
+                    }
+                    else if (pNext->IsContentFrame())
+                    {
+                        pNext->InvalidatePage(pPage);
+                    }
+                    if (pNext->HasFixSize())
+                    {   // continue to invalidate because growing pNext won't 
do it!
+                        pNext = pNext->GetNext();
+                    }
+                    else
+                    {
+                        break;
+                    }
                 }
-                if ( GetNext()->IsContentFrame() )
-                    GetNext()->InvalidatePage( pPage );
+                while (pNext);
             }
             if ( !IsPageBodyFrame() )
             {
commit afbd0e14ba052f6c25dd9d0c496d2fb932288889
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Thu Dec 2 11:57:40 2021 +0100
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Fri Jul 28 16:07:57 2023 +0200

    gdb: BigPtrArrayPrinter gets confused by libstdc++ std::unique_ptr
    
    It looks like this in libstdc++:
    
      <BigPtrArray> = {
        m_ppInf = {
          _M_t = {
            <std::__uniq_ptr_impl<BlockInfo*, std::default_delete<BlockInfo* 
[]> >> = {
              _M_t = {
                <std::_Tuple_impl<0, BlockInfo**, 
std::default_delete<BlockInfo* []> >> = {
                  <std::_Tuple_impl<1, std::default_delete<BlockInfo* []> >> = {
                    <std::_Head_base<1, std::default_delete<BlockInfo* []>, 
true>> = {
                      _M_head_impl = {<No data fields>}
                    }, <No data fields>},
                  <std::_Head_base<0, BlockInfo**, false>> = {
                    _M_head_impl = 0x567fd20
                  }, <No data fields>}, <No data fields>}
            }, <No data fields>}
        },
    
    Note there are 2 _M_head_impl members, and somehow gdb 11.1-2.fc34 picks
    the wrong one.
    
    A manual cast to std::_Head_base<0, BlockInfo**, false> seems to help.
    
    Change-Id: I1332c2fc6eb2661d417fd92a73aed977bbb1dcea
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126220
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>
    (cherry picked from commit c9267ca4fa7fa94a1bf79320bec54428a6ad4804)

diff --git a/solenv/gdb/libreoffice/sw.py b/solenv/gdb/libreoffice/sw.py
index e170709fb79c..7a5ce193684b 100644
--- a/solenv/gdb/libreoffice/sw.py
+++ b/solenv/gdb/libreoffice/sw.py
@@ -8,6 +8,7 @@
 #
 
 import six
+import gdb
 from libreoffice.util import printing
 
 class SwPositionPrinter(object):
@@ -194,7 +195,10 @@ class BigPtrArrayPrinter(object):
     class _iterator(six.Iterator):
 
         def __init__(self, array):
-            self.blocks = array['m_ppInf']['_M_t']['_M_t']['_M_head_impl']
+            # libstdc++ unique_ptr is a std::tuple which contains multiple
+            # _M_head_impl members and gdb may pick the wrong one by default
+            # so have to manually cast it to the one that contains the array
+            self.blocks = 
array['m_ppInf']['_M_t']['_M_t'].cast(gdb.lookup_type("std::_Head_base<0, 
BlockInfo**, false>"))['_M_head_impl']
             self.count = array['m_nSize']
             self.pos = 0
             self.block_count = array['m_nBlock']
commit 99e9844b1ebfb555f3701c5ab59d3628a0bf4ce4
Author:     Michael Stahl <michael.st...@cib.de>
AuthorDate: Thu Nov 19 13:35:28 2020 +0100
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Fri Jul 28 16:07:57 2023 +0200

    desktop: rr --ignore-nested was renamed to --nested=ignore
    
    Change-Id: Id1c1789c24b8eec27db0b24e1e43e2eb7d562509
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106291
    Reviewed-by: Michael Stahl <michael.st...@cib.de>
    Tested-by: Jenkins
    (cherry picked from commit 1ab938155c875e65470b9f6b3b3ef65885462f7a)

diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh
index fee25b3f0fb3..3fb45728e287 100755
--- a/desktop/scripts/soffice.sh
+++ b/desktop/scripts/soffice.sh
@@ -78,8 +78,8 @@ for arg in "$@" $EXTRAOPT ; do
     case "$arg" in
         --record)
             if which rr >/dev/null 2>&1 ; then
-                # smoketest may already be recorded => use ignore-nested
-                RRCHECK="rr record --ignore-nested"
+                # smoketest may already be recorded => ignore nested
+                RRCHECK="rr record --nested=ignore"
                 checks="c$checks"
             else
                 echo "Error: Can't find the tool \"rr\", --record option will 
be ignored."

Reply via email to