diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-10-09 08:59:14 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-10-09 08:59:41 +0200 |
commit | 6bd6e19534718b7df394ed4055c71cf2f59269d0 (patch) | |
tree | 20a143da1668f38407c4f445e8d3697fbff822bf | |
parent | 358f5280e0f6afb968edc295d8f1dce55f05e18f (diff) |
Use constants for ST_TblStyleOverrideType values
Change-Id: I61a81bf1aab604d27441630dfb5d55f657211410
-rw-r--r-- | writerfilter/source/dmapper/TblStylePrHandler.cxx | 45 | ||||
-rw-r--r-- | writerfilter/source/ooxml/model.xml | 26 |
2 files changed, 55 insertions, 16 deletions
diff --git a/writerfilter/source/dmapper/TblStylePrHandler.cxx b/writerfilter/source/dmapper/TblStylePrHandler.cxx index 24fee7d5f5dc..2d0575681009 100644 --- a/writerfilter/source/dmapper/TblStylePrHandler.cxx +++ b/writerfilter/source/dmapper/TblStylePrHandler.cxx @@ -79,9 +79,48 @@ void TblStylePrHandler::lcl_attribute(Id rName, Value & rVal) { case NS_ooxml::LN_CT_TblStyleOverrideType: { - // The tokenid should be the same in the model.xml than - // in the TblStyleType enum - m_nType = TblStyleType( rVal.getInt( ) ); + switch (rVal.getInt()) + { + case NS_ooxml::LN_Value_ST_TblStyleOverrideType_wholeTable: + m_nType = TBL_STYLE_WHOLETABLE; + break; + case NS_ooxml::LN_Value_ST_TblStyleOverrideType_firstRow: + m_nType = TBL_STYLE_FIRSTROW; + break; + case NS_ooxml::LN_Value_ST_TblStyleOverrideType_lastRow: + m_nType = TBL_STYLE_LASTROW; + break; + case NS_ooxml::LN_Value_ST_TblStyleOverrideType_firstCol: + m_nType = TBL_STYLE_FIRSTCOL; + break; + case NS_ooxml::LN_Value_ST_TblStyleOverrideType_lastCol: + m_nType = TBL_STYLE_LASTCOL; + break; + case NS_ooxml::LN_Value_ST_TblStyleOverrideType_band1Vert: + m_nType = TBL_STYLE_BAND1VERT; + break; + case NS_ooxml::LN_Value_ST_TblStyleOverrideType_band2Vert: + m_nType = TBL_STYLE_BAND2VERT; + break; + case NS_ooxml::LN_Value_ST_TblStyleOverrideType_band1Horz: + m_nType = TBL_STYLE_BAND1HORZ; + break; + case NS_ooxml::LN_Value_ST_TblStyleOverrideType_band2Horz: + m_nType = TBL_STYLE_BAND2HORZ; + break; + case NS_ooxml::LN_Value_ST_TblStyleOverrideType_neCell: + m_nType = TBL_STYLE_NECELL; + break; + case NS_ooxml::LN_Value_ST_TblStyleOverrideType_nwCell: + m_nType = TBL_STYLE_NWCELL; + break; + case NS_ooxml::LN_Value_ST_TblStyleOverrideType_seCell: + m_nType = TBL_STYLE_SECELL; + break; + case NS_ooxml::LN_Value_ST_TblStyleOverrideType_swCell: + m_nType = TBL_STYLE_SWCELL; + break; + } } break; } diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml index c85267c960fc..0f40a4ea3b68 100644 --- a/writerfilter/source/ooxml/model.xml +++ b/writerfilter/source/ooxml/model.xml @@ -18734,19 +18734,19 @@ <element name="numIdMacAtCleanup" tokenid="ooxml:CT_Numbering_numIdMacAtCleanup"/> </resource> <resource name="ST_TblStyleOverrideType" resource="List"> - <value tokenid="1">wholeTable</value> - <value tokenid="2">firstRow</value> - <value tokenid="3">lastRow</value> - <value tokenid="4">firstCol</value> - <value tokenid="5">lastCol</value> - <value tokenid="6">band1Vert</value> - <value tokenid="7">band2Vert</value> - <value tokenid="8">band1Horz</value> - <value tokenid="9">band2Horz</value> - <value tokenid="10">neCell</value> - <value tokenid="11">nwCell</value> - <value tokenid="12">seCell</value> - <value tokenid="13">swCell</value> + <value tokenid="ooxml:Value_ST_TblStyleOverrideType_wholeTable">wholeTable</value> + <value tokenid="ooxml:Value_ST_TblStyleOverrideType_firstRow">firstRow</value> + <value tokenid="ooxml:Value_ST_TblStyleOverrideType_lastRow">lastRow</value> + <value tokenid="ooxml:Value_ST_TblStyleOverrideType_firstCol">firstCol</value> + <value tokenid="ooxml:Value_ST_TblStyleOverrideType_lastCol">lastCol</value> + <value tokenid="ooxml:Value_ST_TblStyleOverrideType_band1Vert">band1Vert</value> + <value tokenid="ooxml:Value_ST_TblStyleOverrideType_band2Vert">band2Vert</value> + <value tokenid="ooxml:Value_ST_TblStyleOverrideType_band1Horz">band1Horz</value> + <value tokenid="ooxml:Value_ST_TblStyleOverrideType_band2Horz">band2Horz</value> + <value tokenid="ooxml:Value_ST_TblStyleOverrideType_neCell">neCell</value> + <value tokenid="ooxml:Value_ST_TblStyleOverrideType_nwCell">nwCell</value> + <value tokenid="ooxml:Value_ST_TblStyleOverrideType_seCell">seCell</value> + <value tokenid="ooxml:Value_ST_TblStyleOverrideType_swCell">swCell</value> </resource> <resource name="CT_Style_tblStylePr" resource="Properties"> <element name="pPr" tokenid="ooxml:CT_PPrBase"/> |