[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - writerfilter/source
Caolán McNamara
caolanm at redhat.com
Wed Jun 29 09:05:09 UTC 2016
writerfilter/source/rtftok/rtfdocumentimpl.cxx | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
New commits:
commit a4a43adb0ced8f20b85e47e7dd69e111bd21efe1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue May 10 09:34:58 2016 +0100
rtf: m_aStates can be empty in the inner condition
Change-Id: Id262a3019a693f236630b798579f360c9462d12e
(cherry picked from commit 05cc87ce45fad402445c8d748817e386e56148af)
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 5cdc8e9..cc1cdfb 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -455,11 +455,15 @@ writerfilter::Reference<Properties>::Pointer_t RTFDocumentImpl::getProperties(RT
// cloneAndDeduplicate() wants to know about only a single "style", so
// let's merge paragraph and character style properties here.
- int nCharStyle = m_aStates.top().nCurrentCharacterStyleIndex;
- RTFReferenceTable::Entries_t::iterator itChar = m_aStyleTableEntries.find(nCharStyle);
+ RTFReferenceTable::Entries_t::iterator itChar = m_aStyleTableEntries.end();
+ if (!m_aStates.empty())
+ {
+ int nCharStyle = m_aStates.top().nCurrentCharacterStyleIndex;
+ itChar = m_aStyleTableEntries.find(nCharStyle);
+ }
+
RTFSprms aStyleSprms;
RTFSprms aStyleAttributes;
-
// Ensure the paragraph style is a flat list.
lcl_copyFlatten(rProps, aStyleAttributes, aStyleSprms);
More information about the Libreoffice-commits
mailing list