summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-03-15 10:57:42 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-03-15 11:37:07 -0400
commit431c4536ce58410d6dd3e199185bd128bac624ef (patch)
treef1caab8b2c56559f39e987384bbea35e79f3aa95 /sc
parent17be36299fd59babe10de164ef2c885c21ae3a54 (diff)
Better consistency checking.
Change-Id: I096282ebb9a10d212affbab32aaa49ca1815b1a7
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/column2.cxx26
1 files changed, 25 insertions, 1 deletions
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 19e5e9cab211..f96515a97f53 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -1392,18 +1392,42 @@ SCROW ScColumn::FindNextVisibleRowWithContent(SCROW nRow, bool bForward) const
void ScColumn::CellStorageModified()
{
#if DEBUG_COLUMN_STORAGE
+ if (maItems.empty())
+ {
+ if (maTextWidths.empty())
+ {
+ cout << "ScColumn::CellStorageModified: Text width array is empty, but shouldn't." << endl;
+ abort();
+ }
+
+ if (maTextWidths.block_size() != 1 || maTextWidths.begin()->type != mdds::mtv::element_type_empty)
+ {
+ cout << "ScColumn::CellStorageModified: When the cell array is empty, the text with array should consist of one empty block." << endl;
+ abort();
+ }
+
+ return;
+ }
+
+ cout << "-- begin" << endl;
+ std::vector<ColEntry>::const_iterator it = maItems.begin(), itEnd = maItems.end();
+ for (; it != itEnd; ++it)
+ cout << "ScColumn::CellStorageModified: entry: row = " << it->nRow << "; cell = " << it->pCell << endl;
+
ScColumnTextWidthIterator aIter(*this, 0, MAXROW);
for (; aIter.hasCell(); aIter.next())
{
SCROW nRow = aIter.getPos();
ScBaseCell* pCell = GetCell(nRow);
+ cout << "ScColumn::CellStorageModified: row = " << nRow << "; cell = " << pCell << endl;
if (!pCell)
{
- cout << "Cell and text width storages are out of sync!" << endl;
+ cout << "ScColumn::CellStorageModified: Cell and text width storages are out of sync!" << endl;
cout.flush();
abort();
}
}
+ cout << "-- end" << endl;
#endif
}