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

Michael Stahl mstahl at redhat.com
Thu Aug 7 01:45:24 PDT 2014


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

New commits:
commit f23d6a124dc413bcbb98f5145d230de707ca85db
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Aug 5 22:50:23 2014 +0200

    fdo#69282: sw: fix updating of page styles via SwDocShell::_LoadStyles()
    
    SwDoc::CopyPageDesc() only copies master and left SwFrmFmt attributes,
    but not first-master and first-left.  They will contain exactly the same
    attributes as master and left but they still need to be copied...
    
    (see also: that FIXME in pagedesc.hxx)
    
    (regression from 75084f6c42c27dc95418df9cefed2fddfb26000e)
    
    Change-Id: I3dcc3627708b5d6a477eb7fef76cf6c42c95c004
    (cherry picked from commit 5c1cc92ee09f9fcc99077cacd3fc55640f03b7b2)
    Reviewed-on: https://gerrit.libreoffice.org/10774
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 561cb0f..b987918 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -2148,6 +2148,22 @@ void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc,
 
         rDstDesc.GetLeft().DelDiffs( aAttrSet );
         rDstDesc.GetLeft().SetFmtAttr( aAttrSet );
+
+        aAttrSet.ClearItem();
+        aAttrSet.Put( rSrcDesc.GetFirstMaster().GetAttrSet() );
+        aAttrSet.ClearItem( RES_HEADER );
+        aAttrSet.ClearItem( RES_FOOTER );
+
+        rDstDesc.GetFirstMaster().DelDiffs( aAttrSet );
+        rDstDesc.GetFirstMaster().SetFmtAttr( aAttrSet );
+
+        aAttrSet.ClearItem();
+        aAttrSet.Put( rSrcDesc.GetFirstLeft().GetAttrSet() );
+        aAttrSet.ClearItem( RES_HEADER );
+        aAttrSet.ClearItem( RES_FOOTER );
+
+        rDstDesc.GetFirstLeft().DelDiffs( aAttrSet );
+        rDstDesc.GetFirstLeft().SetFmtAttr( aAttrSet );
     }
 
     CopyHeader( rSrcDesc.GetMaster(), rDstDesc.GetMaster() );


More information about the Libreoffice-commits mailing list