[Libreoffice-commits] .: sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Sep 12 13:21:35 PDT 2012


 sw/source/core/unocore/unosect.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 2940a697dce2292e9c5b118feb8ec4159e3606fa
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Sep 12 22:14:59 2012 +0200

    fdo#42450: also end undo on error condition
    
    Change-Id: I59a33631d73a02cf8c84ccc002401bdc2da10267

diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index 4e68e30..517d3a3 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -402,6 +402,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
         pDoc->InsertSwSection( aPam, aSect, 0, aSet.Count() ? &aSet : 0 );
     if (!pRet) // fdo#42450 text range could parially overlap existing section
     {
+        // shouldn't have created an undo object yet
+        pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_INSSECTION, NULL );
         throw lang::IllegalArgumentException(
                 "SwXTextSection::attach(): invalid TextRange",
                 static_cast< ::cppu::OWeakObject*>(this), 0);


More information about the Libreoffice-commits mailing list