summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2021-07-27 13:20:35 +0200
committerJustin Luth <justin_luth@sil.org>2021-07-29 08:24:44 +0200
commitfb0628b5ffe2571af3fb811c5c5109698b1bf773 (patch)
treebcb5f5b009b25ab314ce49165a3f6e0dd14e3e88
parent82b14219969c4f80d421015c9e89e8d3db4650d8 (diff)
tdf#91083 sw layout: don't emulate table keep when already set
EmulateKeep is intended for interoperability with MS formats. But if an MS format is saved in ODF format, it can once again have the real table keep-with-next-paragraph property. In that case, we shouldn't try to emulate what is explicitly set. This is based on a code-read and debugging of tdf#143468. However, I don't have any examples or proof docs that show this actually caused any real problems. However, clearly there is no need to emulate in this particular situation, so best to make that clear ASAP. Change-Id: I1cd6af4a89c50f2d3ae60fcbf07bf604e1976c5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119575 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
-rw-r--r--sw/source/core/layout/tabfrm.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 36c5ba5faf1e..bf9b6161f8bb 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -1943,7 +1943,9 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
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 );
+ const bool bEmulateTableKeep = !bLargeTable && bTableRowKeep
+ && !pAttrs->GetAttrSet().GetKeep().GetValue()
+ && AreAllRowsKeepWithNext(GetFirstNonHeadlineRow(), /*bCheckParents=*/false);
// The beloved keep attribute
const bool bKeep = IsKeep(pAttrs->GetAttrSet().GetKeep(), GetBreakItem(), bEmulateTableKeep);