diff options
-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, |