[Libreoffice-commits] core.git: writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Tue Sep 30 00:06:55 PDT 2014
writerfilter/source/dmapper/TablePropertiesHandler.cxx | 14 +++++++-------
writerfilter/source/ooxml/model.xml | 8 ++++----
writerfilter/source/rtftok/rtfdocumentimpl.cxx | 6 +++---
3 files changed, 14 insertions(+), 14 deletions(-)
New commits:
commit b69478acff4f5b7a9d334a765a1a528d44d7b3a4
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Sep 30 09:06:18 2014 +0200
Use constants for ST_VerticalJc values
Change-Id: Ib7d2ecfa2c5bcbda55859144af6b55bc8ef09c3d
diff --git a/writerfilter/source/dmapper/TablePropertiesHandler.cxx b/writerfilter/source/dmapper/TablePropertiesHandler.cxx
index 1e3fa21..a46387f 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 b5ec46c..ddfc717 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 d613449..33b83dd 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;
More information about the Libreoffice-commits
mailing list