From 037d5fa9b129a4060f8f572cb72801b7dfa1608f Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 31 Aug 2017 15:15:41 +0200 Subject: tdf#112122 xmloff: inserting index marks into editengine throws MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Catch the exception, since that isn't even invalid input, editengine just can't do it. Change-Id: I362923889add4f1a1d3f8f18b0795993119d54b1 (cherry picked from commit 98552e46521b012e7694c056eca956ae4ee27a0c) Reviewed-on: https://gerrit.libreoffice.org/41759 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- xmloff/source/text/txtparai.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index f2fad10da496..76d759f37f11 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.cxx @@ -2110,8 +2110,15 @@ XMLParaContext::~XMLParaContext() Reference xMark( static_cast(pHint)->GetMark()); Reference xContent(xMark, UNO_QUERY); - xTxtImport->GetText()->insertTextContent( - xAttrCursor, xContent, true ); + try + { + xTxtImport->GetText()->insertTextContent( + xAttrCursor, xContent, true ); + } + catch (uno::RuntimeException const& e) + { + SAL_INFO("xmloff.text", "could not insert index mark, presumably in editengine text " << e.Message); + } } break; case XML_HINT_TEXT_FRAME: -- cgit v1.2.3