writerfilter/source/dmapper/DomainMapper_Impl.cxx |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 08e111b488c7cddfcacbd66560cf40b060ec4b75
Author:     Jaume Pujantell <[email protected]>
AuthorDate: Thu Apr 27 14:54:55 2023 +0200
Commit:     Andras Timar <[email protected]>
CommitDate: Thu May 4 09:27:04 2023 +0200

    tdf#154478 fix comments empy after ToC
    
    TOC creation entered a malformed state where it interfered with
    the creation of other elements (e.g. annotations and textboxes).
    This change is also a fix to tdf#154481, so the patch from
    94de79e7d3c98 can be removed.
    
    Change-Id: I423f9d048b8c5b89fd38229c4f3ad41213d5ab67
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151103
    Tested-by: Jenkins
    Reviewed-by: Ashod Nakashian <[email protected]>
    (cherry picked from commit 5431b756d45bebe74beaba2026704552ee6891f0)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151282
    Tested-by: Andras Timar <[email protected]>
    Reviewed-by: Andras Timar <[email protected]>

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 8b8bff35e40e..e2c2475ecf9f 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -6030,7 +6030,13 @@ uno::Reference<beans::XPropertySet> 
DomainMapper_Impl::createSectionForRange(
             if (stepLeft)
                 xCursor->goLeft(1, true);
             uno::Reference< text::XTextContent > xSection( 
m_xTextFactory->createInstance(sObjectType), uno::UNO_QUERY_THROW );
-            xSection->attach( uno::Reference< text::XTextRange >( xCursor, 
uno::UNO_QUERY_THROW) );
+            try
+            {
+                xSection->attach( uno::Reference< text::XTextRange >( xCursor, 
uno::UNO_QUERY_THROW) );
+            }
+            catch(const uno::Exception&)
+            {
+            }
             xRet.set(xSection, uno::UNO_QUERY );
         }
         catch(const uno::Exception&)

Reply via email to