diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-08-19 14:45:20 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-08-20 11:56:54 +0200 |
commit | bf206549228685a68e1504db05119d8fa1d354b3 (patch) | |
tree | 7351f5cffbe55793152f0145660e9c0de7d39f4f | |
parent | 90a2c73f903b8d07b52dc7774fd7296b2bf0c125 (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).
Change-Id: I985a6b89f8cde96dc0fa0b489c44d77987f91a8a
-rw-r--r-- | sw/source/core/doc/docdesc.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx index e1a0e25d0e85..f5df1d04e64e 100644 --- a/sw/source/core/doc/docdesc.cxx +++ b/sw/source/core/doc/docdesc.cxx @@ -189,14 +189,7 @@ void SwDoc::CopyMasterHeader(const SwPageDesc &rChged, const SwFmtHeader &rHead, const SwFmtCntnt &aRCnt = pRight->GetCntnt(); const SwFmtCntnt &aCnt = rFmtHead.GetHeaderFmt()->GetCntnt(); - // In case "PROP_FIRST_IS_SHARED" (writefilter) is set and headerFmt has 'cntnt' node, - // Already anchored node is original fmt. - // But at this part, change startnode(below create new pSttNd). - // Because of this, fdo45183.rtf(sw/qa/extras/rtfimport/data/fdo45183.rtf) cannot draw picture. - // Compare module is sw/source/core/layout/frmtool.cxx : AppendObjs() function. - // In this function, because selected node index and anchored node index aren't equal, don't draw object. - // So, If (aCnt.GetCntntIdx() && !bLeft) - use the original headerFmt. - if( !aCnt.GetCntntIdx() || !bLeft ) + if (!aCnt.GetCntntIdx()) { const SwFrmFmt& rChgedFrmFmt = (bLeft ? rChged.GetLeft() : rChged.GetFirst()); rDescFrmFmt.SetFmtAttr( rChgedFrmFmt.GetHeader() ); @@ -215,6 +208,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 ) ); @@ -269,6 +264,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 ) ); |