diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-03-16 13:49:00 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-03-19 09:09:02 +0100 |
commit | dac6b7938173d0793810ee5731de51c440c1af5e (patch) | |
tree | 9cf79213ce5f2c734b6a0f0da16c98a1e049eb24 | |
parent | bb34b73730a3109bdcae0a03137c1faffab610d5 (diff) |
fdo#43965 fix RTF import of \up and \dn with custom parameters
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 3e0c9b901302..f8da21d9cd84 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -2252,18 +2252,11 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) m_aStates.top().aCharacterSprms->push_back(make_pair(0x6877, pValue)); } break; - case RTF_UP: // TODO handle when point size is not shrinking - { - OUString aValue(RTL_CONSTASCII_USTRINGPARAM("superscript")); - RTFValue::Pointer_t pValue(new RTFValue(aValue)); - m_aStates.top().aCharacterSprms->push_back(make_pair(NS_ooxml::LN_EG_RPrBase_vertAlign, pValue)); - } - break; + case RTF_UP: case RTF_DN: { - OUString aValue(RTL_CONSTASCII_USTRINGPARAM("subscript")); - RTFValue::Pointer_t pValue(new RTFValue(aValue)); - m_aStates.top().aCharacterSprms->push_back(make_pair(NS_ooxml::LN_EG_RPrBase_vertAlign, pValue)); + RTFValue::Pointer_t pValue(new RTFValue(nParam * (nKeyword == RTF_UP ? 1 : -1))); + m_aStates.top().aCharacterSprms->push_back(make_pair(NS_sprm::LN_CHpsPos, pValue)); } break; case RTF_HORZVERT: |