diff options
-rw-r--r-- | lotuswordpro/qa/cppunit/data/fail/ofz20504-1.lwp | bin | 0 -> 21427 bytes | |||
-rw-r--r-- | lotuswordpro/source/filter/lwptablelayout.cxx | 6 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwptablelayout.hxx | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/lotuswordpro/qa/cppunit/data/fail/ofz20504-1.lwp b/lotuswordpro/qa/cppunit/data/fail/ofz20504-1.lwp Binary files differnew file mode 100644 index 000000000000..afbf5780426f --- /dev/null +++ b/lotuswordpro/qa/cppunit/data/fail/ofz20504-1.lwp diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx index 6cf91d345506..3191374b35b0 100644 --- a/lotuswordpro/source/filter/lwptablelayout.cxx +++ b/lotuswordpro/source/filter/lwptablelayout.cxx @@ -421,6 +421,7 @@ LwpTableLayout::LwpTableLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm , m_nRows(0) , m_nCols(0) , m_pDefaultCellLayout(nullptr) + , m_bConverted(false) { } @@ -782,6 +783,7 @@ void LwpTableLayout::ParseTable() // set name of object m_pXFTable.set(new XFTable); + m_pXFTable->SetTableName(pSuper->GetName().str()); // set table style m_pXFTable->SetStyleName(m_StyleName); @@ -837,8 +839,12 @@ void LwpTableLayout::XFConvert(XFContentContainer* pCont) { if (!m_pXFTable) return; + if (m_bConverted) + throw std::runtime_error("already added to a container"); pCont->Add(m_pXFTable.get()); + m_bConverted = true; } + /** * @short convert heading row * @param pXFTable - pointer of table diff --git a/lotuswordpro/source/filter/lwptablelayout.hxx b/lotuswordpro/source/filter/lwptablelayout.hxx index 9cc0c885aa49..af6a92945b57 100644 --- a/lotuswordpro/source/filter/lwptablelayout.hxx +++ b/lotuswordpro/source/filter/lwptablelayout.hxx @@ -163,6 +163,7 @@ private: std::map<sal_uInt16,LwpRowLayout*> m_RowsMap; void SplitConflictCells(); rtl::Reference<XFTable> m_pXFTable; + bool m_bConverted; std::map<std::pair<sal_uInt16,sal_uInt8>,XFCell*> m_CellsMap; void PutCellVals(LwpFoundry* pFoundry, LwpObjectID aTableID); |