[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sw/source
Michael Stahl
mstahl at redhat.com
Wed Aug 6 01:14:39 PDT 2014
sw/source/core/doc/docfmt.cxx | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
New commits:
commit 11525a6f164a5b89caffded73a35797a044f4107
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/10772
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 8f1f976..f5d3ed4 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -2136,6 +2136,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