Kaydet (Commit) c087b60b authored tarafından Michael Stahl's avatar Michael Stahl

(related: bnc#823675) RTF import: get rid of hacks for \f in LISTLEVEL

These weird hacks are apparently needed only because the \loch \hich
\dbch were mapped wrongly; for the list level destination it's only
important that the existing fonts are not overwritten.

Change-Id: Ie2b9adf332b74c2744e9b1dbc4e878638e5ee078
üst 36246aa9
......@@ -3518,14 +3518,11 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
{
RTFSprms aFontAttributes;
aFontAttributes.set(nSprm, RTFValue::Pointer_t(new RTFValue(m_aFontNames[getFontIndex(nParam)])));
// In the context of listlevels, \af seems to imply \f.
if (nKeyword == RTF_AF)
aFontAttributes.set(NS_ooxml::LN_CT_Fonts_ascii, RTFValue::Pointer_t(new RTFValue(m_aFontNames[getFontIndex(nParam)])));
RTFSprms aRunPropsSprms;
aRunPropsSprms.set(NS_ooxml::LN_EG_RPrBase_rFonts, RTFValue::Pointer_t(new RTFValue(aFontAttributes)));
// If there are multiple \f or \af tokens, only handle the first one.
if (!m_aStates.top().aTableSprms.find(NS_ooxml::LN_CT_Lvl_rPr))
m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Lvl_rPr, RTFValue::Pointer_t(new RTFValue(RTFSprms(), aRunPropsSprms)));
m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Lvl_rPr,
RTFValue::Pointer_t(new RTFValue(RTFSprms(), aRunPropsSprms)),
OVERWRITE_NO_APPEND);
}
else
{
......
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