[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - writerfilter/qa writerfilter/source
Caolán McNamara
caolanm at redhat.com
Thu Sep 8 15:34:54 UTC 2016
writerfilter/qa/cppunittests/rtftok/data/pass/valuelist-1.rtf |binary
writerfilter/source/rtftok/rtfdocumentimpl.cxx | 3 ++-
2 files changed, 2 insertions(+), 1 deletion(-)
New commits:
commit f5bbdd05582a0a6fa9a3db399f97df18373215ad
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Sep 6 15:57:30 2016 +0100
fftester: missing ValueLast
Reviewed-on: https://gerrit.libreoffice.org/28693
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 30af3971d826d55426f51a7beb14c24ac3880250)
Change-Id: I8e881871b1ae4dea757263d04796779e62e168dc
Reviewed-on: https://gerrit.libreoffice.org/28712
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
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/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 8b2efd6..1910baf 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2328,7 +2328,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;
More information about the Libreoffice-commits
mailing list