[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - writerfilter/source
Caolán McNamara
caolanm at redhat.com
Tue May 10 11:17:56 UTC 2016
writerfilter/source/rtftok/rtfdocumentimpl.cxx | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
New commits:
commit 6e167436b5d06a91ccdfa70c5fcc0f09a3db7b7b
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)
Reviewed-on: https://gerrit.libreoffice.org/24830
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 4576ed1..2e1e350 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -453,11 +453,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