From f23d6a124dc413bcbb98f5145d230de707ca85db Mon Sep 17 00:00:00 2001
From: Michael Stahl <mstahl@redhat.com>
Date: Tue, 5 Aug 2014 22:50:23 +0200
Subject: [PATCH 086/137] 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@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
---
sw/source/core/doc/docfmt.cxx | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
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() );
--
1.9.3