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>
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 36c5ba5..bf9b616 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);