summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 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");
+ }
}
}
}