summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-08-19 14:45:20 +0200
committerMichael Stahl <mstahl@redhat.com>2013-08-22 13:46:18 +0200
commitb8499fc3dcf474050f026b8d5cd1d9037bbe42b7 (patch)
treefd03153ad3c4563f65a4924cb7d486e8a6c31910
parent796409636f999cf58a4f36dd7977497b7bd6ab20 (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/5541 Reviewed-by: Thorsten Behrens <tbehrens@suse.com> Reviewed-by: Petr Mladek <pmladek@suse.cz> Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
-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 5d0232e56194..bb1d78ffd551 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -212,6 +212,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 ) );
@@ -271,6 +273,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 ) );