sw/source/core/layout/layact.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
New commits: commit bfa81a200ab59971b69823f9a29d8ce222d655e6 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Wed Aug 23 15:52:51 2023 +0200 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Thu Aug 24 12:43:31 2023 +0200 tdf#128437 tdf#128966 sw: layout: partially revert fix of tdf#124675 The tdf#128437 bugdoc works since LO 4.1 commit 84203fab20b7eb98f0d3667e6626f5c2139e5a7f "Resolves: #i120016# refine condition for allowing split of a table row". The non-obvious way in which commit cc5916cd314a27b0cc99560ab887480026630a95 changes the layout is the FlowFrameJoinLockGuard on the table frame. While layouting page1, with LockJoin, formatting the content in the rows of the table leaves the table follow valid. Whereas without LockJoin, formatting the content in the rows grows the table frame and this invalidates the position of the follow table frame. 0 SwFrameAreaDefinition::setFrameAreaPositionValid(bool) (this=0x7c85390, bNew=false) at sw/source/core/layout/wsfrm.cxx:90 1 SwFrame::ImplInvalidatePos() (this=0x7c85390) at sw/source/core/layout/wsfrm.cxx:2001 2 SwFrame::InvalidatePos() (this=0x7c85390) at sw/source/core/inc/frame.hxx:1053 3 SwFrame::ImplInvalidateNextPos(bool) (this=0x6edefb0, bNoFootnote=false) at sw/source/core/layout/findfrm.cxx:1368 4 SwFrame::InvalidateNextPos(bool) (this=0x6edefb0, bNoFootnote=false) at sw/source/core/inc/frame.hxx:1083 5 SwTabFrame::GrowFrame(long, bool, bool) (this=0x6edefb0, nDist=10, bTst=false, bInfo=false) sw/source/core/layout/tabfrm.cxx:3428 6 SwFrame::Grow(long, bool, bool) (this=0x6edefb0, nDist=10, bTst=false, bInfo=false) at sw/source/core/layout/wsfrm.cxx:1547 7 SwTabFrame::Format(OutputDevice*, SwBorderAttrs const*) (this=0x6edefb0, pAttrs=0x6f74d00) at sw/source/core/layout/tabfrm.cxx:3357 8 SwTabFrame::MakeAll(OutputDevice*) (this=0x6edefb0) at sw/source/core/layout/tabfrm.cxx:2157 9 SwFrame::PrepareMake(OutputDevice*) (this=0x6edefb0) at sw/source/core/layout/calcmove.cxx:375 10 SwFrame::Calc(OutputDevice*) const (this=0x6edefb0) at sw/source/core/layout/trvlfrm.cxx:1803 11 SwFrame::PrepareMake(OutputDevice*) (this=0x6f118a0) at sw/source/core/layout/calcmove.cxx:253 12 SwFrame::Calc(OutputDevice*) const (this=0x6f118a0) at sw/source/core/layout/trvlfrm.cxx:1803 13 SwFrame::PrepareMake(OutputDevice*) (this=0x6f11a30) at sw/source/core/layout/calcmove.cxx:253 14 SwFrame::Calc(OutputDevice*) const (this=0x6f11a30) at sw/source/core/layout/trvlfrm.cxx:1803 15 SwFrame::OptPrepareMake() (this=0x6f14da0) at sw/source/core/layout/calcmove.cxx:386 16 SwFrame::OptCalc() const (this=0x6f14da0) at sw/source/core/inc/frame.hxx:1090 17 SwLayAction::FormatLayout(OutputDevice*, SwLayoutFrame*, bool) (this=0x7ffdabdf0c90, pLay=0x6f11a30, bAddRect=false) sw/source/core/layout/layact.cxx:1461 18 SwLayAction::FormatLayout(OutputDevice*, SwLayoutFrame*, bool) (this=0x7ffdabdf0c90, pLay=0x6f118a0, bAddRect=false) sw/source/core/layout/layact.cxx:1455 19 SwLayAction::FormatLayoutTab(SwTabFrame*, bool) (this=0x7ffdabdf0c90, pTab=0x6edefb0, bAddRect=false) at sw/source/core/layout/layact.cxx:1679 Thus invalidated, the follow frame's first row will move back and split. Unable to reproduce tdf#124675 with the FlowFrameLockGuard reverted - let's assume that some change elsewhere prevents this kind of crash now. The only problem with this is that some test fails (and i forgot which one), that's why the 3 previous commits are needed. What's amusing is that the layout with this fix is the same as the one in Word 2013, whereas the layout without this fix is the same as the one from exporting the bugdoc from Word 2013 in DOCX without compatibility mode, so this will be a "regression" for DOCX layout but it was all an accident anyway... This also fixes the last case of tdf#128966 so every row is vertically centered now; some previous commit improved it already. Change-Id: I46d77930666a1762ae16af09525f0b23660beba1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155989 Tested-by: Michael Stahl <michael.st...@allotropia.de> Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index e7ee78a9ae6f..88d2a1ebdb54 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1638,11 +1638,7 @@ bool SwLayAction::FormatLayoutTab( SwTabFrame *pTab, bool bAddRect ) // format lowers, only if table frame is valid if ( pTab->isFrameAreaDefinitionValid() ) { - ::std::optional<FlowFrameJoinLockGuard> oTabGuard; - if (pTab->IsMoveable()) // tdf#137523 not in footer - { // tdf#124675 prevent Join() if pTab becomes empty - oTabGuard.emplace(pTab); - } + // tdf#128437 FlowFrameJoinLockGuard on pTab caused a problem here SwLayoutFrame *pLow = static_cast<SwLayoutFrame*>(pTab->Lower()); while ( pLow ) {