diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-07-10 12:41:57 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-07-10 12:44:34 +0200 |
commit | b3944f124ab3dc87332796a46387f837ad29e8d5 (patch) | |
tree | 19b4b594cd24d49b631b749083597b47857980a0 /writerfilter | |
parent | writerfilter: not every field has a Content property (diff) | |
download | core-b3944f124ab3dc87332796a46387f837ad29e8d5.tar.gz core-b3944f124ab3dc87332796a46387f837ad29e8d5.zip |
rhbz#960019 : RTF import: handle extra groups in listoverride entry
This crashed because for a single listoverride entry 2 SPRMs were sent
to the domain-mapper, and the second one was empty.
Change-Id: Ic41ffd8bd4edcff065f49ecef3464efedd909d63
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 38dd6dc1c6bb..18b3f96173ba 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -4563,8 +4563,18 @@ int RTFDocumentImpl::popState() // list override table case DESTINATION_LISTOVERRIDEENTRY: { - RTFValue::Pointer_t pValue(new RTFValue(aState.aTableAttributes, aState.aTableSprms)); - m_aListTableSprms.set(NS_ooxml::LN_CT_Numbering_num, pValue, false); + if (m_aStates.top().nDestinationState == DESTINATION_LISTOVERRIDEENTRY) + { // copy properties upwards so upper popState inserts it + m_aStates.top().aTableAttributes = aState.aTableAttributes; + m_aStates.top().aTableSprms = aState.aTableSprms; + } + else + { + RTFValue::Pointer_t pValue(new RTFValue( + aState.aTableAttributes, aState.aTableSprms)); + m_aListTableSprms.set(NS_ooxml::LN_CT_Numbering_num, + pValue, false); + } } break; case DESTINATION_LEVELTEXT: |