sw/source/core/layout/colfrm.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit 8f6d624843fef768a159724e199459a23f3ad2bb Author: Caolán McNamara <caol...@redhat.com> Date: Fri Oct 21 20:29:25 2016 +0100 Resolves: tdf#103359 undo of insert of multi column frame crashes this pattern has been seen before in #i32968#, so fix the same way Change-Id: I72ac628ee507abf23c38defede33058b34e17857 (cherry picked from commit e1dea8100b345b15705cad366d1bcc9516bb15e9) Reviewed-on: https://gerrit.libreoffice.org/30153 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx index bbd5366..07d893d 100644 --- a/sw/source/core/layout/colfrm.cxx +++ b/sw/source/core/layout/colfrm.cxx @@ -31,6 +31,7 @@ #include "ftnfrm.hxx" #include <IDocumentState.hxx> #include <IDocumentLayoutAccess.hxx> +#include <IDocumentUndoRedo.hxx> SwColumnFrame::SwColumnFrame( SwFrameFormat *pFormat, SwFrame* pSib ): SwFootnoteBossFrame( pFormat, pSib ) @@ -152,9 +153,12 @@ static bool lcl_AddColumns( SwLayoutFrame *pCont, sal_uInt16 nCount ) else { bRet = true; + // tdf#103359, like #i32968# Inserting columns in the section causes MakeFrameFormat to put + // nCount objects of type SwUndoFrameFormat on the undo stack. We don't want them. + ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); for ( sal_uInt16 i = 0; i < nCount; ++i ) { - SwFrameFormat *pFormat = pDoc->MakeFrameFormat( aEmptyOUStr, pDoc->GetDfltFrameFormat()); + SwFrameFormat *pFormat = pDoc->MakeFrameFormat(aEmptyOUStr, pDoc->GetDfltFrameFormat()); SwColumnFrame *pTmp = new SwColumnFrame( pFormat, pCont ); pTmp->SetMaxFootnoteHeight( nMax ); pTmp->Paste( pCont );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits