diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-10-05 16:13:43 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-10-05 16:19:28 +0200 |
commit | 3559b4b1ab434897491a65ed06db54ba7ecb27de (patch) | |
tree | a3a17f65bda0a8bc8047fa4be9416e24cb8a4c9a /sw | |
parent | 349bbf8f068f82801428c837aec50658cf169ebc (diff) |
SwUndoPageDesc: take care of SwPageDesc::aFirst
Change-Id: I05621cc1bf6d4201120c8757d5c2886723d7d18c
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/undo/SwUndoPageDesc.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sw/source/core/undo/SwUndoPageDesc.cxx b/sw/source/core/undo/SwUndoPageDesc.cxx index a48414d496ad..abe49e44c639 100644 --- a/sw/source/core/undo/SwUndoPageDesc.cxx +++ b/sw/source/core/undo/SwUndoPageDesc.cxx @@ -149,6 +149,8 @@ SwUndoPageDesc::SwUndoPageDesc(const SwPageDesc & _aOld, bExchange = false; if( rOldFoot.IsActive() && ( rOldDesc.IsFooterShared() != rNewDesc.IsFooterShared() ) ) bExchange = false; + if( ( rOldHead.IsActive() || rOldFoot.IsActive() ) && ( rOldDesc.IsFirstShared() != rNewDesc.IsFirstShared() ) ) + bExchange = false; if( bExchange ) { if( rNewHead.IsActive() ) @@ -162,6 +164,12 @@ SwUndoPageDesc::SwUndoPageDesc(const SwPageDesc & _aOld, // The Ctor of this object will remove the duplicate! SwFmtHeader aFormatHeader( pFormat ); } + if( !rNewDesc.IsFirstShared() ) + { + pFormat = new SwFrmFmt( *rNewDesc.GetFirst().GetHeader().GetHeaderFmt() ); + // The Ctor of this object will remove the duplicate! + SwFmtHeader aFormatHeader( pFormat ); + } } // Same procedure for footers... if( rNewFoot.IsActive() ) @@ -175,6 +183,12 @@ SwUndoPageDesc::SwUndoPageDesc(const SwPageDesc & _aOld, // The Ctor of this object will remove the duplicate! SwFmtFooter aFormatFooter( pFormat ); } + if( !rNewDesc.IsFirstShared() ) + { + pFormat = new SwFrmFmt( *rNewDesc.GetFirst().GetFooter().GetFooterFmt() ); + // The Ctor of this object will remove the duplicate! + SwFmtFooter aFormatFooter( pFormat ); + } } // After this exchange method the old page description will point to zero, |