summaryrefslogtreecommitdiff
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 10:25:11 +0000
commit49e7666c2d635c3f910429e55895858eab8d7deb (patch)
tree4d781b6e0c904eb753ec69e8bc6e3f88edc520d9
parentabce5c9fc563d0d9ff0c8a4ae547a3b974c49527 (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 ) );