diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-05-27 17:09:44 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-05-27 17:49:12 +0200 |
commit | 992da0d5cf04497bad55637f6a6ebfcdaec03e16 (patch) | |
tree | cd39a899d29a0b9bfe719165c000ec63494d9dae /writerfilter | |
parent | a0f85534a71e5b04a8ca21c12ab3f04335f34344 (diff) |
bnc#817956 DOCX import of document background color
See wwSectionManager::SetSegmentToPageDesc(), this has to be applied to
every page style.
Change-Id: Iea2707ae665a55eabda3ed7575cf3658f7af5237
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 3 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.hxx | 3 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyMap.cxx | 3 | ||||
-rw-r--r-- | writerfilter/source/ooxml/model.xml | 2 |
4 files changed, 10 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 0be87b7fee49..cfc7c1ad68bd 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -1445,6 +1445,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 b7da3a937a95..fba658aafb3f 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -684,6 +684,9 @@ public: bool m_bInTableStyleRunProps; 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 9e22551ff686..2ab0ff5b77dc 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -889,6 +889,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 0e11017cc142..cdafa91e89bf 100644 --- a/writerfilter/source/ooxml/model.xml +++ b/writerfilter/source/ooxml/model.xml @@ -14997,7 +14997,7 @@ <ref name="CT_PictureBase"/> <optional> <attribute name="color"> - <text/> + <ref name="ST_HexColor"/> <xs:documentation>Background Color</xs:documentation> </attribute> </optional> |