diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-05-08 17:25:33 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2016-05-09 06:46:08 +0000 |
commit | f538ff6272bf8f9264ebd5c8d97d712831f301d1 (patch) | |
tree | c87009ab81e9d7d0352de8919b8ca67f2c861907 /lotuswordpro | |
parent | 7ff50286bf7a8d99711388dfe7bb5ebeca4aa4d0 (diff) |
fftester: fail on double parse of the same table
Change-Id: I3e462cdc8812d0ac55d9896d2b04ace34a6c4670
(cherry picked from commit 4e509d80ee7b22ce0e79d62f7afb7a008726fe5f)
Reviewed-on: https://gerrit.libreoffice.org/24773
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/qa/cppunit/data/fail/reference-3.lwp | bin | 0 -> 62632 bytes | |||
-rw-r--r-- | lotuswordpro/source/filter/lwptablelayout.cxx | 17 |
2 files changed, 10 insertions, 7 deletions
diff --git a/lotuswordpro/qa/cppunit/data/fail/reference-3.lwp b/lotuswordpro/qa/cppunit/data/fail/reference-3.lwp Binary files differnew file mode 100644 index 000000000000..6076b43b75bf --- /dev/null +++ b/lotuswordpro/qa/cppunit/data/fail/reference-3.lwp diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx index 1bd119f27ffa..c643f3cedb50 100644 --- a/lotuswordpro/source/filter/lwptablelayout.cxx +++ b/lotuswordpro/source/filter/lwptablelayout.cxx @@ -754,9 +754,8 @@ void LwpTableLayout::RegisterStyle() // so the NULL pointer cause sodc freeze. Add code to check the // the pointer. //New Code - if( GetFoundry() && GetTable() ) - - PutCellVals( GetFoundry(),GetTable()->GetObjectID() ); + if (GetFoundry() && GetTable()) + PutCellVals(GetFoundry(), GetTable()->GetObjectID()); } /** * @short read table layout @@ -765,11 +764,15 @@ void LwpTableLayout::RegisterStyle() void LwpTableLayout::ParseTable() { // get super table layout - LwpSuperTableLayout * pSuper = GetSuperTableLayout(); - if(!pSuper) + LwpSuperTableLayout* pSuper = GetSuperTableLayout(); + if (!pSuper) { - assert(false); - return; + throw std::runtime_error("missing super table"); + } + + if (m_pXFTable.get()) + { + throw std::runtime_error("this table is already parsed"); } // set name of object |