Kaydet (Commit) dac6b793 authored tarafından Miklos Vajna's avatar Miklos Vajna

fdo#43965 fix RTF import of \up and \dn with custom parameters

üst bb34b737
...@@ -2252,18 +2252,11 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) ...@@ -2252,18 +2252,11 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
m_aStates.top().aCharacterSprms->push_back(make_pair(0x6877, pValue)); m_aStates.top().aCharacterSprms->push_back(make_pair(0x6877, pValue));
} }
break; break;
case RTF_UP: // TODO handle when point size is not shrinking case RTF_UP:
{
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_DN: case RTF_DN:
{ {
OUString aValue(RTL_CONSTASCII_USTRINGPARAM("subscript")); RTFValue::Pointer_t pValue(new RTFValue(nParam * (nKeyword == RTF_UP ? 1 : -1)));
RTFValue::Pointer_t pValue(new RTFValue(aValue)); m_aStates.top().aCharacterSprms->push_back(make_pair(NS_sprm::LN_CHpsPos, pValue));
m_aStates.top().aCharacterSprms->push_back(make_pair(NS_ooxml::LN_EG_RPrBase_vertAlign, pValue));
} }
break; break;
case RTF_HORZVERT: case RTF_HORZVERT:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment