diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-03-16 13:49:00 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2012-03-20 12:16:55 +0100 |
commit | edc6079bbf61717de040bd8f473dba79ac22f24b (patch) | |
tree | a642de3197398b37f48f327ea8816547ed3e35c6 | |
parent | b9aa086f71ef8940104c477664c1192bbd85e063 (diff) |
fdo#43965 fix RTF import of \up and \dn with custom parameters
Signed-off-by: Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>
-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 4299e5a8fcc8..241e05d7dfce 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -2258,18 +2258,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: |