An error occurred while fetching merge requests data.
Kaydet (Commit) b18d49e0 authored tarafından Caolán McNamara's avatar Caolán McNamara

fftester: subtable is a subtable of itself

Change-Id: I9de983e3c9436ab3a37d3482b0f18f04c7cdaaca
üst 50ac0f50
File added
......@@ -141,6 +141,8 @@ public:
*/
virtual void ToXml(IXFStream *pStrm) override;
const XFTable* GetSubTable() const { return m_pSubTable; }
private:
XFRow *m_pOwnerRow;
XFTable *m_pSubTable;
......
......@@ -91,6 +91,13 @@ void XFTable::AddRow(XFRow *pRow)
{
assert(pRow);
for (sal_Int32 i = 0; i < pRow->GetCellCount(); ++i)
{
XFCell* pFirstCell = pRow->GetCell(i + 1); //starts at 1, not 0
if (pFirstCell->GetSubTable() == this)
throw std::runtime_error("table is a subtable of itself");
}
int row = pRow->GetRow();
if( row<1 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment