sw/source/core/undo/SwUndoPageDesc.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
New commits: commit 3559b4b1ab434897491a65ed06db54ba7ecb27de Author: Miklos Vajna <vmik...@suse.cz> Date: Fri Oct 5 16:13:43 2012 +0200 SwUndoPageDesc: take care of SwPageDesc::aFirst Change-Id: I05621cc1bf6d4201120c8757d5c2886723d7d18c diff --git a/sw/source/core/undo/SwUndoPageDesc.cxx b/sw/source/core/undo/SwUndoPageDesc.cxx index a48414d..abe49e4 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, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits