tdf#69183 Pasting a table in Writer no longer inherits list formatting

The entry point of the paste is in SwFEShell::Paste as stated in
the bug comments.  This code calls
"rClpDoc.getIDocumentContentOperations().CopyRange" which calls
"DocumentContentOperationsManager::CopyImplImpl".  In that
function, there is a check for whether to propagate the
formatting of a previous list in the document.  All we do is
add a check there to see if additionally it is a table we
are pasting, and if so to ignore propagating the list format.

Change-Id: I655f54c4df44385fc82976b37d3e21b5fabf45ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154149
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 1387ebf..0b51fc6 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -4968,10 +4968,13 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
    // Do not propagate previous found list, if
    // - destination is an empty paragraph which is not in a list and
    // - source contains at least one paragraph which is not in a list
    // or
    // - source is a table
    if ( pNumRuleToPropagate &&
         pDestTextNd && !pDestTextNd->GetText().getLength() &&
         ((pDestTextNd && !pDestTextNd->GetText().getLength() &&
         !pDestTextNd->IsInList() &&
         !lcl_ContainsOnlyParagraphsInList( rPam ) )
         !lcl_ContainsOnlyParagraphsInList(rPam)) ||
         rPam.GetBound().nNode.GetNode().GetNodeType() == SwNodeType::Table) )
    {
        pNumRuleToPropagate = nullptr;
    }