diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-09-30 09:06:18 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-09-30 09:06:34 +0200 |
commit | b69478acff4f5b7a9d334a765a1a528d44d7b3a4 (patch) | |
tree | e59cac90e176e3776bdde07b84d6f2c5602d0d71 | |
parent | 68daa8a22611605299ac3174a3632191f93236d9 (diff) |
Use constants for ST_VerticalJc values
Change-Id: Ib7d2ecfa2c5bcbda55859144af6b55bc8ef09c3d
-rw-r--r-- | writerfilter/source/dmapper/TablePropertiesHandler.cxx | 14 | ||||
-rw-r--r-- | writerfilter/source/ooxml/model.xml | 8 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 6 |
3 files changed, 14 insertions, 14 deletions
diff --git a/writerfilter/source/dmapper/TablePropertiesHandler.cxx b/writerfilter/source/dmapper/TablePropertiesHandler.cxx index 1e3fa21a9926..a46387fbe06c 100644 --- a/writerfilter/source/dmapper/TablePropertiesHandler.cxx +++ b/writerfilter/source/dmapper/TablePropertiesHandler.cxx @@ -201,10 +201,10 @@ namespace dmapper { case NS_ooxml::LN_CT_TcPrBase_vAlign://90694 { sal_Int16 nVertOrient = text::VertOrientation::NONE; - switch( nIntValue ) //0 - top 1 - center 3 - bottom (ST_VerticalJc) + switch( nIntValue ) { - case 1: nVertOrient = text::VertOrientation::CENTER; break; - case 3: nVertOrient = text::VertOrientation::BOTTOM; break; + case NS_ooxml::LN_Value_ST_VerticalJc_center: nVertOrient = text::VertOrientation::CENTER; break; + case NS_ooxml::LN_Value_ST_VerticalJc_bottom: nVertOrient = text::VertOrientation::BOTTOM; break; default:; }; TablePropertyMapPtr pCellPropMap( new TablePropertyMap() ); @@ -216,10 +216,10 @@ namespace dmapper { OUString aVertOrient; switch( nIntValue ) { - case 0: aVertOrient = "top"; break; - case 1: aVertOrient = "center"; break; - case 2: aVertOrient = "both"; break; - case 3: aVertOrient = "bottom"; break; + case NS_ooxml::LN_Value_ST_VerticalJc_top: aVertOrient = "top"; break; + case NS_ooxml::LN_Value_ST_VerticalJc_center: aVertOrient = "center"; break; + case NS_ooxml::LN_Value_ST_VerticalJc_both: aVertOrient = "both"; break; + case NS_ooxml::LN_Value_ST_VerticalJc_bottom: aVertOrient = "bottom"; break; }; if (!aVertOrient.isEmpty()) { diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml index b5ec46cacb60..ddfc71761633 100644 --- a/writerfilter/source/ooxml/model.xml +++ b/writerfilter/source/ooxml/model.xml @@ -17714,10 +17714,10 @@ <element name="col" tokenid="ooxml:CT_Columns_col"/> </resource> <resource name="ST_VerticalJc" resource="List"> - <value tokenid="0">top</value> - <value tokenid="1">center</value> - <value tokenid="2">both</value> - <value tokenid="3">bottom</value> + <value tokenid="ooxml:Value_ST_VerticalJc_top">top</value> + <value tokenid="ooxml:Value_ST_VerticalJc_center">center</value> + <value tokenid="ooxml:Value_ST_VerticalJc_both">both</value> + <value tokenid="ooxml:Value_ST_VerticalJc_bottom">bottom</value> </resource> <resource name="CT_VerticalJc" resource="Value"> <attribute name="val" tokenid="ooxml:CT_VerticalJc_val" action="setValue"/> diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index d61344949f64..33b83dddd763 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -3074,13 +3074,13 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) switch (nKeyword) { case RTF_CLVERTALT: - nParam = 0; + nParam = NS_ooxml::LN_Value_ST_VerticalJc_top; break; case RTF_CLVERTALC: - nParam = 1; + nParam = NS_ooxml::LN_Value_ST_VerticalJc_center; break; case RTF_CLVERTALB: - nParam = 3; + nParam = NS_ooxml::LN_Value_ST_VerticalJc_bottom; break; default: break; |