writerfilter/qa/cppunittests/rtftok/data/pass/valuelist-1.rtf |binary writerfilter/source/rtftok/rtfdispatchsymbol.cxx | 3 ++- 2 files changed, 2 insertions(+), 1 deletion(-)
New commits: commit 30af3971d826d55426f51a7beb14c24ac3880250 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Sep 6 15:57:30 2016 +0100 fftester: missing ValueLast Change-Id: I8e881871b1ae4dea757263d04796779e62e168dc Reviewed-on: https://gerrit.libreoffice.org/28693 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/writerfilter/qa/cppunittests/rtftok/data/pass/valuelist-1.rtf b/writerfilter/qa/cppunittests/rtftok/data/pass/valuelist-1.rtf new file mode 100644 index 0000000..847e165 Binary files /dev/null and b/writerfilter/qa/cppunittests/rtftok/data/pass/valuelist-1.rtf differ diff --git a/writerfilter/source/rtftok/rtfdispatchsymbol.cxx b/writerfilter/source/rtftok/rtfdispatchsymbol.cxx index 2a4154b..36f8562 100644 --- a/writerfilter/source/rtftok/rtfdispatchsymbol.cxx +++ b/writerfilter/source/rtftok/rtfdispatchsymbol.cxx @@ -253,7 +253,8 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword) if ((m_nCellxMax - m_nTopLevelCurrentCellX) >= MINLAY) { auto pXValueLast = m_aStates.top().aTableRowSprms.find(NS_ooxml::LN_CT_TblGridBase_gridCol, false); - auto pXValue = std::make_shared<RTFValue>(pXValueLast->getInt() + m_nCellxMax - m_nTopLevelCurrentCellX); + const int nXValueLast = pXValueLast ? pXValueLast->getInt() : 0; + auto pXValue = std::make_shared<RTFValue>(nXValueLast + m_nCellxMax - m_nTopLevelCurrentCellX); m_aStates.top().aTableRowSprms.eraseLast(NS_ooxml::LN_CT_TblGridBase_gridCol); m_aStates.top().aTableRowSprms.set(NS_ooxml::LN_CT_TblGridBase_gridCol, pXValue, RTFOverwrite::NO_APPEND); m_nTopLevelCurrentCellX = m_nCellxMax;
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits