summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-08-19 14:45:20 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-08-21 12:07:33 +0000
commit34f55adfd701c4cc3dd7c804690cd946cec30e48 (patch)
tree532e3956cdd54f5350d86b3eebe4f08f8536b913 /sw
parent1514f2c5d00a6f4743f942c93c3a930e13c14263 (diff)
fdo#66145: revert change to CopyMasterHeader
Not copying the nodes for first page is not an option; the real problem with the fdo45183.rtf is that flys in the header are not copied along with the nodes, like it is done in SwDoc::CopyPageDescHeaderFooterImpl. Also, the same problem may occur for footers too (CopyMasterFooter). Conflicts: sw/source/core/doc/docdesc.cxx The comment above is for the master commit, but copyting the flys is actually necessary with e1a9a348a519a69f898c9c1e6d87a5837b8267f9 too, since that copying code is now executed when changing sharing flags in the UI so withtout this commit you lose any flys anchored in the header/footer. (cherry picked from commit bf206549228685a68e1504db05119d8fa1d354b3) Change-Id: I985a6b89f8cde96dc0fa0b489c44d77987f91a8a Reviewed-on: https://gerrit.libreoffice.org/5542 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/docdesc.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 932eb8451782..5f37fe229073 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -215,6 +215,8 @@ void SwDoc::CopyMasterHeader(const SwPageDesc &rChged, const SwFmtHeader &rHead,
*aRCnt.GetCntntIdx()->GetNode().EndOfSectionNode() );
aTmp = *pSttNd->EndOfSectionNode();
GetNodes()._Copy( aRange, aTmp, sal_False );
+ aTmp = *pSttNd;
+ CopyFlyInFlyImpl(aRange, 0, aTmp);
pFmt->SetFmtAttr( SwFmtCntnt( pSttNd ) );
rDescFrmFmt.SetFmtAttr( SwFmtHeader( pFmt ) );
@@ -274,6 +276,8 @@ void SwDoc::CopyMasterFooter(const SwPageDesc &rChged, const SwFmtFooter &rFoot,
*aRCnt.GetCntntIdx()->GetNode().EndOfSectionNode() );
aTmp = *pSttNd->EndOfSectionNode();
GetNodes()._Copy( aRange, aTmp, sal_False );
+ aTmp = *pSttNd;
+ CopyFlyInFlyImpl(aRange, 0, aTmp);
pFmt->SetFmtAttr( SwFmtCntnt( pSttNd ) );
rDescFrmFmt.SetFmtAttr( SwFmtFooter( pFmt ) );