summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx3
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.hxx3
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx3
-rw-r--r--writerfilter/source/ooxml/model.xml2
4 files changed, 10 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 58cbb4d4d048..1dd4acf3e94a 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1506,6 +1506,9 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
case NS_ooxml::LN_CT_SdtListItem_value:
m_pImpl->m_pSdtHelper->getDropDownItems().push_back(sStringValue);
break;
+ case NS_ooxml::LN_CT_Background_color:
+ m_pImpl->m_oBackgroundColor.reset(nIntValue);
+ break;
default:
{
#if OSL_DEBUG_LEVEL > 0
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index cc6fd63c2f4d..5906a42fb532 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -661,6 +661,9 @@ public:
bool IsNewDoc();
SdtHelper* m_pSdtHelper;
+
+ /// Document background color, applied to every page style.
+ boost::optional<sal_Int32> m_oBackgroundColor;
};
} //namespace dmapper
} //namespace writerfilter
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index 4dcea8ea2d71..4781a671daa2 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -885,6 +885,9 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
operator[]( PropertyDefinition( PROP_LEFT_MARGIN, false )) = uno::makeAny( m_nLeftMargin );
operator[]( PropertyDefinition( PROP_RIGHT_MARGIN, false )) = uno::makeAny( m_nRightMargin );
+ if (rDM_Impl.m_oBackgroundColor)
+ operator[](PropertyDefinition(PROP_BACK_COLOR, false)) = uno::makeAny(*rDM_Impl.m_oBackgroundColor);
+
/*** if headers/footers are available then the top/bottom margins of the
header/footer are copied to the top/bottom margin of the page
*/
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index 47971ff529d3..a4d4069172a9 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -14974,7 +14974,7 @@
<ref name="CT_PictureBase"/>
<optional>
<attribute name="color">
- <text/>
+ <ref name="ST_HexColor"/>
<xs:documentation>Background Color</xs:documentation>
</attribute>
</optional>