diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-09-12 22:14:59 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-09-12 22:19:19 +0200 |
commit | 2940a697dce2292e9c5b118feb8ec4159e3606fa (patch) | |
tree | 926671317a2e36444d6ed919bbcdc4d9ae7fe76a /sw | |
parent | 1e7666e825e5842bf1e07082df3a026fef02eca5 (diff) |
fdo#42450: also end undo on error condition
Change-Id: I59a33631d73a02cf8c84ccc002401bdc2da10267
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/unocore/unosect.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index 4e68e309ffeb..517d3a36d65d 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); |