Kaydet (Commit) a96e7428 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: fdo#47347 overwrite incorrect font table entry with the correct one

Change-Id: I563cf50b6eb029276115b9b02951d36b1ec0d39c
üst 349d64b8
...@@ -885,7 +885,15 @@ void RTFDocumentImpl::text(OUString& rString) ...@@ -885,7 +885,15 @@ void RTFDocumentImpl::text(OUString& rString)
writerfilter::Reference<Properties>::Pointer_t const pProp( writerfilter::Reference<Properties>::Pointer_t const pProp(
new RTFReferenceProperties(m_aStates.top().aTableAttributes, m_aStates.top().aTableSprms) new RTFReferenceProperties(m_aStates.top().aTableAttributes, m_aStates.top().aTableSprms)
); );
m_aFontTableEntries.insert(make_pair(m_nCurrentFontIndex, pProp));
//See fdo#47347 initial invalid font entry properties are inserted first,
//so when we attempt to insert the correct ones, there's already an
//entry in the map for them, so the new ones aren't inserted.
RTFReferenceTable::Entries_t::iterator lb = m_aFontTableEntries.lower_bound(m_nCurrentFontIndex);
if (lb != m_aFontTableEntries.end() && !(m_aFontTableEntries.key_comp()(m_nCurrentFontIndex, lb->first)))
lb->second = pProp;
else
m_aFontTableEntries.insert(lb, make_pair(m_nCurrentFontIndex, pProp));
} }
break; break;
case DESTINATION_STYLESHEET: case DESTINATION_STYLESHEET:
......
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