summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-06-18 18:29:57 +0200
committerMichael Stahl <michael.stahl@cib.de>2020-06-18 20:20:49 +0200
commit0be41ce3002e1ee3c84ec3096c95e72645faa187 (patch)
treee6e1468bb0660c1399ae8ca3a159924193c94b0b /sw
parent57d488660572d62ef0371e50dcdd4ca7a6d98a14 (diff)
sw: SelectAll should copy section before table at start of document
Change-Id: I51c9c84073a89402e7e4952c346ad13e1d264622 related: tdf#133982 tdf#133990, see bugdoc of the latter Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96619 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/edit/edglss.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx
index b71c9fde5d9a..9ae88459452e 100644
--- a/sw/source/core/edit/edglss.cxx
+++ b/sw/source/core/edit/edglss.cxx
@@ -237,6 +237,11 @@ bool SwEditShell::CopySelToDoc( SwDoc* pInsDoc )
{
aPaM.Start()->nNode = *pTableNode;
}
+ while (SwSectionNode const* pSectionNode =
+ aPaM.Start()->nNode.GetNode().StartOfSectionNode()->FindSectionNode())
+ {
+ aPaM.Start()->nNode = *pSectionNode;
+ }
aPaM.Start()->nContent.Assign(nullptr, 0);
}
bRet = GetDoc()->getIDocumentContentOperations().CopyRange( aPaM, aPos, SwCopyFlags::CheckPosInFly)