git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73939
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
bool wxRichTextTable::DeleteRows(int startRow, int noRows)
{
bool wxRichTextTable::DeleteRows(int startRow, int noRows)
{
- wxASSERT((startRow + noRows) < m_rowCount);
- if ((startRow + noRows) >= m_rowCount)
+ wxASSERT((startRow + noRows) <= m_rowCount);
+ if ((startRow + noRows) > m_rowCount)
bool wxRichTextTable::DeleteColumns(int startCol, int noCols)
{
bool wxRichTextTable::DeleteColumns(int startCol, int noCols)
{
- wxASSERT((startCol + noCols) < m_colCount);
- if ((startCol + noCols) >= m_colCount)
+ wxASSERT((startCol + noCols) <= m_colCount);
+ if ((startCol + noCols) > m_colCount)
return false;
bool deleteRows = (noCols == m_colCount);
return false;
bool deleteRows = (noCols == m_colCount);
for (i = 0; i < m_rowCount; i++)
{
wxRichTextObjectPtrArray& colArray = m_cells[deleteRows ? 0 : i];
for (i = 0; i < m_rowCount; i++)
{
wxRichTextObjectPtrArray& colArray = m_cells[deleteRows ? 0 : i];
- for (j = startCol; j < (startCol+noCols); j++)
+ for (j = 0; j < noCols; j++)
- wxRichTextObject* cell = colArray[j];
+ wxRichTextObject* cell = colArray[startCol];
+ colArray.RemoveAt(startCol);