diff options
author | Jacobo Aragunde Pérez <jaragunde@igalia.com> | 2014-03-17 20:53:35 +0100 |
---|---|---|
committer | Jacobo Aragunde Pérez <jaragunde@igalia.com> | 2014-03-17 21:09:35 +0100 |
commit | 6820dec8903b182260340c638c35b5a5ca207a85 (patch) | |
tree | 031e66f44cb120e023791dced4fbe29d0e3c9a6d /writerfilter | |
parent | de226dcfaeedf7f77de4f0242a713bc7e4462a0a (diff) |
ooxml: preserve several simple types of sdt
This patch is to preserve the sdt blocks for several simple sdt types:
equation, picture, citation and group.
This patch reuses the infrastructure created at commit
55211e612d2cbed03dd81c039d07ea4e936c2804 to grab-bag the properties of
the sdt block and write them back on export, with small modifications
in particular related with the fact that these tags don't have
children.
The type of the property tags equation, picture, citation and group
was modified in the ooxml model file to be able to process them. They
were previously empty.
A unit test was added to check the preservation of these fields.
Another had to be modified.
Change-Id: Ica1a340f589f5d6c85c1a35d2a3a4bf930eb2d8a
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 4 | ||||
-rw-r--r-- | writerfilter/source/ooxml/model.xml | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 7c259917dc8a..435919ec3a62 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -2229,7 +2229,11 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext ) m_pImpl->m_pSdtHelper->getLocale().append(sStringValue); } break; + case NS_ooxml::LN_CT_SdtPr_equation: case NS_ooxml::LN_CT_SdtPr_docPartObj: + case NS_ooxml::LN_CT_SdtPr_picture: + case NS_ooxml::LN_CT_SdtPr_citation: + case NS_ooxml::LN_CT_SdtPr_group: { // this is an unsupported SDT property, create a grab bag for it OUString sName = OUString::createFromAscii((*QNameToString::Instance())(nSprmId).c_str()); diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml index 417a0de7e42c..d80f2e2d1a3e 100644 --- a/writerfilter/source/ooxml/model.xml +++ b/writerfilter/source/ooxml/model.xml @@ -18855,7 +18855,7 @@ <optional> <choice> <element name="equation"> - <ref name="CT_Empty"/> + <ref name="CT_OnOff"/> </element> <element name="comboBox"> <ref name="CT_SdtComboBox"/> @@ -18873,7 +18873,7 @@ <ref name="CT_SdtDropDownList"/> </element> <element name="picture"> - <ref name="CT_Empty"/> + <ref name="CT_OnOff"/> </element> <element name="richText"> <ref name="CT_Empty"/> @@ -18882,10 +18882,10 @@ <ref name="CT_SdtText"/> </element> <element name="citation"> - <ref name="CT_Empty"/> + <ref name="CT_OnOff"/> </element> <element name="group"> - <ref name="CT_Empty"/> + <ref name="CT_OnOff"/> </element> <element name="bibliography"> <ref name="CT_Empty"/> |