diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-08-05 22:50:23 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-08-07 08:45:05 +0000 |
commit | f23d6a124dc413bcbb98f5145d230de707ca85db (patch) | |
tree | f05f46e9bdb34f2b52c378ab0aff8d628468c327 | |
parent | 5591c9c2ab77d32a923200f980e8fe7af61ffd5b (diff) |
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>
-rw-r--r-- | sw/source/core/doc/docfmt.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 561cb0ffb967..b987918ff5c3 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() ); |