diff options
author | Jaume Pujantell <jaume.pujantell@collabora.com> | 2023-04-27 14:54:55 +0200 |
---|---|---|
committer | Justin Luth <jluth@mail.com> | 2023-05-05 12:56:49 +0200 |
commit | 1600181e74692714d844e7e51f411765895ea3de (patch) | |
tree | 171be6a9e9f6eae48a35cee57df6536580bbb9b7 /writerfilter | |
parent | 6b734f99a1ca9165b86f6588a720de6dc90d3f7b (diff) |
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 <ash@collabora.com>
(cherry picked from commit 5431b756d45bebe74beaba2026704552ee6891f0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151281
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index bb8ac11129b3..7086a4329cc9 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -6539,7 +6539,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&) |