diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-10-02 09:01:07 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-10-02 09:01:44 +0200 |
commit | 5a295a9a9d3c25344d37b162c9c95d10e5c2e0f2 (patch) | |
tree | 464e92097b09c309c0ab85e0435cd0bf2e4337f8 | |
parent | b1472db9db602a9014cd46775412521bede1e643 (diff) |
Use constants for ST_PageOrientation values
Change-Id: Icbce660a7f6678ae6c48ec03d8fc63c67f169072
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/ooxml/model.xml | 4 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 7 |
3 files changed, 8 insertions, 5 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 18800ac1aeb5..14b99710d507 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -537,7 +537,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val) } break; case NS_ooxml::LN_CT_PageSz_orient: - CT_PageSz.orient = (nIntValue != 0); + CT_PageSz.orient = (nIntValue != NS_ooxml::LN_Value_ST_PageOrientation_portrait); break; case NS_ooxml::LN_CT_PageSz_w: { diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml index 410ae6082e7a..f6e7e03aac49 100644 --- a/writerfilter/source/ooxml/model.xml +++ b/writerfilter/source/ooxml/model.xml @@ -17638,8 +17638,8 @@ <value tokenid="ooxml:Value_ST_NumberFormat_thaiCounting">thaiCounting</value> </resource> <resource name="ST_PageOrientation" resource="List"> - <value tokenid="0">portrait</value> - <value tokenid="1">landscape</value> + <value tokenid="ooxml:Value_ST_PageOrientation_portrait">portrait</value> + <value tokenid="ooxml:Value_ST_PageOrientation_landscape">landscape</value> </resource> <resource name="CT_PageSz" resource="Properties"> <attribute name="w" tokenid="ooxml:CT_PageSz_w"/> diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index d4415a9e3e3b..c8d8ae96c5e5 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -3364,8 +3364,11 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) } break; case RTF_LANDSCAPE: - lcl_putNestedAttribute(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgSz, NS_ooxml::LN_CT_PageSz_orient, RTFValue::Pointer_t(new RTFValue(1))); - break; + { + RTFValue::Pointer_t pValue(new RTFValue(NS_ooxml::LN_Value_ST_PageOrientation_landscape)); + lcl_putNestedAttribute(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgSz, NS_ooxml::LN_CT_PageSz_orient, pValue); + } + break; case RTF_FACINGP: m_aSettingsTableSprms.set(NS_ooxml::LN_CT_Settings_evenAndOddHeaders, RTFValue::Pointer_t(new RTFValue(1))); break; |