writerfilter/qa/cppunittests/rtftok/data/pass/rhbz960019.rtf | 12 +++++++++ writerfilter/source/rtftok/rtfdocumentimpl.cxx | 14 +++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-)
New commits: commit 91c6f2645a31b2e11b3f948d0df0443b28c8b44f Author: Michael Stahl <mst...@redhat.com> Date: Wed Jul 10 12:41:57 2013 +0200 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. Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx writerfilter/source/rtftok/rtfdocumentimpl.cxx Change-Id: Ic41ffd8bd4edcff065f49ecef3464efedd909d63 (cherry picked from commit b3944f124ab3dc87332796a46387f837ad29e8d5) Reviewed-on: https://gerrit.libreoffice.org/4801 Reviewed-by: Miklos Vajna <vmik...@suse.cz> Tested-by: Miklos Vajna <vmik...@suse.cz> diff --git a/writerfilter/qa/cppunittests/rtftok/data/pass/rhbz960019.rtf b/writerfilter/qa/cppunittests/rtftok/data/pass/rhbz960019.rtf new file mode 100644 index 0000000..869aa33 --- /dev/null +++ b/writerfilter/qa/cppunittests/rtftok/data/pass/rhbz960019.rtf @@ -0,0 +1,12 @@ +{\rtf1 +{\*\listtable +{\list\listtemplateid-723955400\listsimple{\listlevel\leveljc\levelfollow0\levelspace0\levelindent0\levelstartat1{\leveltext\'03\'00. ;}{\levelnumbers\'01;}\f0 }{\listname ;}\listid-1155484576} +} +{\*\listoverridetable +{\*\listoverride{\listid-1155484576\listoverridecount0\ls1}} +} +\pard\plain \pvpg\phpg\posx1143\posy4743\absw9615\absh-2922\dfrmtxtx72\dfrmtxty72\nowrap +Hello\par +\pard\plain\par +} + diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index f9bcdc1..959833c 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -4258,8 +4258,18 @@ int RTFDocumentImpl::popState() // list override table else if (aState.nDestinationState == 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); + } } else if (aState.nDestinationState == DESTINATION_LEVELTEXT) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits