[Libreoffice-commits] core.git: writerfilter/source
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Thu Sep 26 08:31:08 UTC 2019
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
New commits:
commit 0dd1d80f48e94c4cd16095bace52664ce1e8a3a9
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Sep 25 13:18:01 2019 +0200
Commit: Michael Stahl <michael.stahl at cib.de>
CommitDate: Thu Sep 26 10:30:12 2019 +0200
writerfilter: fix crash on import of tdf113230-1.docx
The SvxUnoTextBase::finishParagraph() returns null because there's no
GetTextForwarder(); in any case the ListId property isn't supported by
SvxUnoTextRange.
(regression from 7992bd73a2307edce96a145e954f8e4c3ab9f57d)
Change-Id: I8f63d805a593a5950c8cb08eaeebd34e977b4700
Reviewed-on: https://gerrit.libreoffice.org/79552
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 81acdf59ebce..f8d67f0710c1 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1527,7 +1527,8 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con
xTextRange = xTextAppend->finishParagraph( comphelper::containerToSequence(aProperties) );
m_xPreviousParagraph.set(xTextRange, uno::UNO_QUERY);
- if (isNumberingViaStyle || itNumberingRules != aProperties.end())
+ if (m_xPreviousParagraph.is() && // null for SvxUnoTextBase
+ (isNumberingViaStyle || itNumberingRules != aProperties.end()))
{
assert(dynamic_cast<ParagraphPropertyMap*>(pPropertyMap.get()));
sal_Int32 const nListId( isNumberingViaStyle
@@ -1535,8 +1536,11 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con
: static_cast<ParagraphPropertyMap*>(pPropertyMap.get())->GetListId());
if (ListDef::Pointer const& pList = m_pListTable->GetList(nListId))
{ // styles could refer to non-existing lists...
- if (AbstractListDef::Pointer const& pAbsList =
- pList->GetAbstractDefinition())
+ AbstractListDef::Pointer const& pAbsList =
+ pList->GetAbstractDefinition();
+ if (pAbsList &&
+ // SvxUnoTextRange doesn't have ListId
+ m_xPreviousParagraph->getPropertySetInfo()->hasPropertyByName("ListId"))
{
OUString paraId;
m_xPreviousParagraph->getPropertyValue("ListId") >>= paraId;
More information about the Libreoffice-commits
mailing list