[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - sw/source

Michael Stahl mstahl at redhat.com
Wed Aug 21 05:07:58 PDT 2013


 sw/source/core/doc/docdesc.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 34f55adfd701c4cc3dd7c804690cd946cec30e48
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Aug 19 14:45:20 2013 +0200

    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 at suse.cz>
    Tested-by: Miklos Vajna <vmiklos at suse.cz>

diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 932eb84..5f37fe2 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 ) );


More information about the Libreoffice-commits mailing list