summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-11-18 10:01:25 +0000
committerXisco Fauli <xiscofauli@libreoffice.org>2024-11-18 14:00:32 +0100
commit819e84398888f2841bebb7e079412f6904316b71 (patch)
tree75ffe432f9129e9341bb58038a242a4facff4dbf
parent05272dc1972b3e1e4f85a7738728315a41922933 (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> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176711 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r--sw/source/writerfilter/dmapper/PropertyMap.cxx27
1 files changed, 17 insertions, 10 deletions
diff --git a/sw/source/writerfilter/dmapper/PropertyMap.cxx b/sw/source/writerfilter/dmapper/PropertyMap.cxx
index a9270da6617b..fba05c5e3431 100644
--- a/sw/source/writerfilter/dmapper/PropertyMap.cxx
+++ b/sw/source/writerfilter/dmapper/PropertyMap.cxx
@@ -1209,18 +1209,25 @@ void SectionPropertyMap::HandleMarginsHeaderFooter(DomainMapper_Impl& rDM_Impl)
{
uno::Reference<beans::XPropertySet> xDefaultPageStyle(
rDM_Impl.GetPageStyles()->getByName(u"Standard"_ustr), uno::UNO_QUERY_THROW);
- 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");
+ }
}
}
}