summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-08-04 12:26:23 +0200
committerMichael Stahl <michael.stahl@cib.de>2020-08-04 15:38:53 +0200
commitaf38654b4b8388f0a0236601742b7ab3d1590ae8 (patch)
tree1c8afb4c504d06324330f3ee57174c3b5549cbdf
parent3c185bf386b4c9609ab32d19bf95b83fe0eeeea3 (diff)
tdf#135144 sw: copy bookmarks in SwDoc::CopyMasterHeader()
... and SwDoc::CopyMasterFooter(); this is the same as commit 9f7ee38acec0cb614e37aecc5ea9c5f1c63b61b6 but for 2 other functions that do the same thing. Change-Id: Id7ed449a004ee3c9452d4603bf8632e2720651ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100077 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
-rw-r--r--sw/source/core/doc/docdesc.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index e63097b29279..9da9fb21ad9d 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -293,7 +293,9 @@ void SwDoc::CopyMasterHeader(const SwPageDesc &rChged, const SwFormatHeader &rHe
GetNodes().Copy_( aRange, aTmp, false );
aTmp = *pSttNd;
GetDocumentContentOperationsManager().CopyFlyInFlyImpl(aRange, nullptr, aTmp);
-
+ SwPaM const source(aRange.aStart, aRange.aEnd);
+ SwPosition dest(aTmp);
+ sw::CopyBookmarks(source, dest);
pFormat->SetFormatAttr( SwFormatContent( pSttNd ) );
rDescFrameFormat.SetFormatAttr( SwFormatHeader( pFormat ) );
}
@@ -365,7 +367,9 @@ void SwDoc::CopyMasterFooter(const SwPageDesc &rChged, const SwFormatFooter &rFo
GetNodes().Copy_( aRange, aTmp, false );
aTmp = *pSttNd;
GetDocumentContentOperationsManager().CopyFlyInFlyImpl(aRange, nullptr, aTmp);
-
+ SwPaM const source(aRange.aStart, aRange.aEnd);
+ SwPosition dest(aTmp);
+ sw::CopyBookmarks(source, dest);
pFormat->SetFormatAttr( SwFormatContent( pSttNd ) );
rDescFrameFormat.SetFormatAttr( SwFormatFooter( pFormat ) );
}