writerfilter/source/dmapper/DomainMapper.cxx | 2 +- writerfilter/source/ooxml/model.xml | 4 ++-- writerfilter/source/rtftok/rtfdocumentimpl.cxx | 7 +++++-- 3 files changed, 8 insertions(+), 5 deletions(-)
New commits: commit 5a295a9a9d3c25344d37b162c9c95d10e5c2e0f2 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Thu Oct 2 09:01:07 2014 +0200 Use constants for ST_PageOrientation values Change-Id: Icbce660a7f6678ae6c48ec03d8fc63c67f169072 diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 18800ac..14b9971 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 410ae60..f6e7e03 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 d4415a9..c8d8ae9 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits