diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-11-18 10:01:25 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-11-18 12:13:59 +0100 |
commit | 7afb836b23c286eac4605ef4d98cf517f825b8d8 (patch) | |
tree | 7475eebe85113a482656306d3c4dd003ee68e757 /sw/source | |
parent | 828ea8d37d98cedca389e082388a19f4ce7200dd (diff) |
crashtesting: crash on import of rtf exported from forum-en-32886.odt
see: git diff -w
Change-Id: Id50e45e53b7b433d6c468038a7de14441f4ee560
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176707
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/writerfilter/dmapper/PropertyMap.cxx | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/sw/source/writerfilter/dmapper/PropertyMap.cxx b/sw/source/writerfilter/dmapper/PropertyMap.cxx index 66df3296a8bf..ce373b092890 100644 --- a/sw/source/writerfilter/dmapper/PropertyMap.cxx +++ b/sw/source/writerfilter/dmapper/PropertyMap.cxx @@ -1203,18 +1203,25 @@ void SectionPropertyMap::HandleMarginsHeaderFooter(DomainMapper_Impl& rDM_Impl) { rtl::Reference<SwXBaseStyle> xDefaultPageStyle = rDM_Impl.GetPageStyles()->getStyleByName(u"Standard"_ustr); - for (const beans::Property& rProp : m_aPageStyle->getPropertySetInfo()->getProperties()) + if (!m_aPageStyle) { - if (!rProp.Name.startsWith("Fill")) // only copy XATTR_FILL properties - continue; - try - { - const uno::Any aFillValue = xDefaultPageStyle->getPropertyValue(rProp.Name); - m_aPageStyle->setPropertyValue(rProp.Name, aFillValue); - } - catch (uno::Exception&) + SAL_WARN( "writerfilter", "No Page Style!" ); + } + else + { + for (const beans::Property& rProp : m_aPageStyle->getPropertySetInfo()->getProperties()) { - DBG_UNHANDLED_EXCEPTION("writerfilter", "Exception setting page background fill"); + if (!rProp.Name.startsWith("Fill")) // only copy XATTR_FILL properties + continue; + try + { + const uno::Any aFillValue = xDefaultPageStyle->getPropertyValue(rProp.Name); + m_aPageStyle->setPropertyValue(rProp.Name, aFillValue); + } + catch (uno::Exception&) + { + DBG_UNHANDLED_EXCEPTION("writerfilter", "Exception setting page background fill"); + } } } } |