summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-08-20 11:51:27 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-08-21 10:24:44 +0000
commitb82d99e50d846c3b2505466d3048eacf02488757 (patch)
tree7bfc85b1286013f235adb4d469eb12483b1785a7
parent0d3ddd977fa417e47493edf80d7d90be8a4f580c (diff)
fdo#66145: fix Undo invalidation in SwDoc::ChgPageDesc()
SwDoc::ChgPageDesc(): make the invalidation of the Undo stack on change of IsFirstShared work by delaying ChgFirstShare() until after the check. Change-Id: Ifbefe446df8b6d785ed1bb6394ec5beb803fb1fe (cherry picked from commit 0b7a823bb6df79384939dda4de3b7f28e5e52758) Reviewed-on: https://gerrit.libreoffice.org/5531 Reviewed-by: Petr Mladek <pmladek@suse.cz> Tested-by: Petr Mladek <pmladek@suse.cz> Reviewed-by: Thorsten Behrens <tbehrens@suse.com> Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
-rw-r--r--sw/source/core/doc/docdesc.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 920853f6b463..56e48ee49b22 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -321,7 +321,6 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged )
// Take over orientation
pDesc->SetLandscape( rChged.GetLandscape() );
- pDesc->ChgFirstShare( rChged.IsFirstShared() );
// #i46909# no undo if header or footer changed
bool bHeaderFooterChanged = false;
@@ -342,6 +341,8 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged )
CopyMasterHeader(rChged, rHead, pDesc, true); // Copy left header
CopyMasterHeader(rChged, rHead, pDesc, false); // Copy first header
pDesc->ChgHeaderShare( rChged.IsHeaderShared() );
+ // there is just one first shared flag for both header and footer?
+ pDesc->ChgFirstShare( rChged.IsFirstShared() );
// Synch Footer.
const SwFmtFooter &rFoot = rChged.GetMaster().GetFooter();
@@ -352,8 +353,7 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged )
const SwFmtFooter &rOldFoot = pDesc->GetMaster().GetFooter();
bHeaderFooterChanged |=
( rFoot.IsActive() != rOldFoot.IsActive() ||
- rChged.IsFooterShared() != pDesc->IsFooterShared() ||
- rChged.IsFirstShared() != pDesc->IsFirstShared() );
+ rChged.IsFooterShared() != pDesc->IsFooterShared() );
}
pDesc->GetMaster().SetFmtAttr( rFoot );
CopyMasterFooter(rChged, rFoot, pDesc, true); // Copy left footer