diff options
Diffstat (limited to 'svtools/source/uno/svtxgridcontrol.cxx')
-rw-r--r-- | svtools/source/uno/svtxgridcontrol.cxx | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 2dee47478120..1a6ce6ff88e5 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -278,12 +278,8 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An //check whether the data row vector length matches with the column count if(m_xColumnModel->getColumnCount() == 0) { - for ( ::svt::table::ColPos col = 0; col < rawRowData.getLength(); ++col ) - { - UnoControlTableColumn* tableColumn = new UnoControlTableColumn(); - m_pTableModel->appendColumn( PColumnModel( tableColumn ) ); - } m_xColumnModel->setDefaultColumns(rawRowData.getLength()); + // this will trigger notifications, which in turn will let us update our m_pTableModel } else if((unsigned int)rawRowData.getLength()!=(unsigned)m_pTableModel->getColumnCount()) @@ -400,13 +396,8 @@ void SAL_CALL SVTXGridControl::rowAdded(const ::com::sun::star::awt::grid::GridD int colCount = m_xColumnModel->getColumnCount(); if(colCount == 0) { - Reference<XGridColumnListener> listener(*this,UNO_QUERY_THROW); m_xColumnModel->setDefaultColumns(rawRowData.getLength()); - for ( ::svt::table::ColPos col = 0; col < rawRowData.getLength(); ++col ) - { - UnoControlTableColumn* tableColumn = new UnoControlTableColumn(); - m_pTableModel->appendColumn( PColumnModel( tableColumn ) ); - } + // this will trigger notifications, which in turn will let us update our m_pTableModel } else if((unsigned int)rawRowData.getLength()!=(unsigned)colCount) |