[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - xmloff/source

Michael Stahl mstahl at redhat.com
Tue Sep 5 14:26:20 UTC 2017


 xmloff/source/text/txtparai.cxx |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 0771ddbeb063be1e38ba9b409ec365910faef492
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Aug 31 15:15:41 2017 +0200

    tdf#112122 xmloff: inserting index marks into editengine throws
    
    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/41758
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index e911a4c38516..5708930cf798 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -2068,8 +2068,15 @@ XMLParaContext::~XMLParaContext()
                     Reference<beans::XPropertySet> xMark(
                         static_cast<const XMLIndexMarkHint_Impl *>(pHint)->GetMark());
                     Reference<XTextContent> 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:


More information about the Libreoffice-commits mailing list