Bugzilla – Attachment 160536 Details for
Bug 61423
FILESAVE: wrong export of specific ODT with table to DOC - section break next page after each row
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
tdf61423_pageStyleInTable.patch
tdf61423_pageStyleInTable.patch (text/plain), 4.42 KB, created by
Justin L
on 2020-05-08 13:37:42 UTC
(
hide
)
Description:
tdf61423_pageStyleInTable.patch
Filename:
MIME Type:
Creator:
Justin L
Created:
2020-05-08 13:37:42 UTC
Size:
4.42 KB
patch
obsolete
>From b7ef578e5f1aa5a1986ae83ba64b4db8eb8d3a2c Mon Sep 17 00:00:00 2001 >From: Justin Luth <justin.luth@collabora.com> >Date: Fri, 8 May 2020 15:53:35 +0300 >Subject: [PATCH] sw layout: Remove a basically redundant case > >The only thing that bEmulateTableKeep didn't overlay was >overly large tables, which was just added as a defensive >consideration, so probably it should equally apply >to bTableRowKeep. > >Whether I really would go ahead with this is >still to be seen as there is no pressing reason, >but I guess I just haven't had enough regressions >lately. At earliest, push for 7.1. > >Change-Id: Ib29012c0fe3489d78d41e7444f0f392685e9d1d3 >--- > sw/source/core/layout/tabfrm.cxx | 18 +++++++----------- > 1 file changed, 7 insertions(+), 11 deletions(-) > >diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx >index a7295dc..385b528 100644 >--- a/sw/source/core/layout/tabfrm.cxx >+++ b/sw/source/core/layout/tabfrm.cxx >@@ -1911,7 +1911,9 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext) > > // Indicates that two individual rows may keep together, based on the keep > // attribute set at the first paragraph in the first cell. >- const bool bTableRowKeep = !bDontSplit && GetFormat()->GetDoc()->GetDocumentSettingManager().get(DocumentSettingId::TABLE_ROW_KEEP); >+ const bool bLargeTable = GetTable()->GetTabLines().size() > 64; //arbitrary value, virtually guaranteed to be larger than one page. >+ const bool bTableRowKeep = !bDontSplit && !bLargeTable && >+ GetFormat()->GetDoc()->GetDocumentSettingManager().get(DocumentSettingId::TABLE_ROW_KEEP); > > // The Magic Move: Used for the table row keep feature. > // If only the last row of the table wants to keep (implicitly by setting >@@ -1923,7 +1925,6 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext) > bool bLastRowHasToMoveToFollow = false; > bool bLastRowMoveNoMoreTries = false; > >- const bool bLargeTable = GetTable()->GetTabLines().size() > 64; //arbitrary value, virtually guaranteed to be larger than one page. > const bool bEmulateTableKeep = !bLargeTable && bTableRowKeep && AreAllRowsKeepWithNext( GetFirstNonHeadlineRow(), /*bCheckParents=*/false ); > // The beloved keep attribute > const bool bKeep = IsKeep(pAttrs->GetAttrSet().GetKeep(), GetBreakItem(), bEmulateTableKeep); >@@ -2366,20 +2367,15 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext) > // 3. The table is allowed to split or we do not have a pIndPrev: > SwFrame* pIndPrev = GetIndPrev(); > const SwRowFrame* pFirstNonHeadlineRow = GetFirstNonHeadlineRow(); >- // #i120016# if this row wants to keep, allow split in case that all rows want to keep with next, >- // the table can not move forward as it is the first one and a split is in general allowed. >- const bool bAllowSplitOfRow = ( bTableRowKeep && >- AreAllRowsKeepWithNext( pFirstNonHeadlineRow ) ) && >- !pIndPrev && >- !bDontSplit; >- // tdf91083 MSCompat: this extends bAllowSplitOfRow (and perhaps should just replace it). >+ >+ // tdf91083 #i120016# MSCompat: if this row wants to keep, allow split in case that all rows want to keep with next. > // If the kept-together items cannot move to a new page, a table split is in general allowed. > const bool bEmulateTableKeepSplitAllowed = bEmulateTableKeep && !IsKeepFwdMoveAllowed(/*IgnoreMyOwnKeepValue=*/true); > > if ( pFirstNonHeadlineRow && nUnSplitted > 0 && > ( bEmulateTableKeepSplitAllowed || > ( ( !bTableRowKeep || pFirstNonHeadlineRow->GetNext() || >- !pFirstNonHeadlineRow->ShouldRowKeepWithNext() || bAllowSplitOfRow >+ !pFirstNonHeadlineRow->ShouldRowKeepWithNext() > ) && ( !bDontSplit || !pIndPrev ) > ) ) ) > { >@@ -2480,7 +2476,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext) > } > } > >- const bool bSplitError = !Split( nDeadLine, bTryToSplit, ( bTableRowKeep && !(bAllowSplitOfRow || bEmulateTableKeepSplitAllowed) ) ); >+ const bool bSplitError = !Split( nDeadLine, bTryToSplit, (bTableRowKeep && !bEmulateTableKeepSplitAllowed) ); > if (!bTryToSplit && !bSplitError) > { > --nUnSplitted; >-- >2.7.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 61423
:
75471
|
75472
|
75473
|
154920
| 160536