diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-06-03 20:32:13 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-06-03 20:57:13 +0200 |
commit | 2c4c6daee00eb7a0b209f6a93518961a3ac5beb3 (patch) | |
tree | 80126f6bfc0f80849b0338062c25b980e0cdec4c | |
parent | eb0505ef3507876781ff7fadae2b1d1cd1348220 (diff) |
(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
(cherry picked from commit c087b60b0dd70c4a711ba1b4d556206a136fa468)
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 2b346ba2b195..9b6229c1ff2e 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -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 { |