Kaydet (Commit) 927da98a authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Add integrity check after column cell storage is modified.

Change-Id: I8d2bd7616e0428e4e881ef0dc1012c4973e636a9
üst 63229066
......@@ -28,6 +28,14 @@
#include <set>
#include <vector>
#define DEBUG_COLUMN_STORAGE 1
#if DEBUG_COLUMN_STORAGE
#ifdef NDEBUG
#undef NDEBUG
#endif
#endif
#include <mdds/multi_type_vector.hpp>
#include <mdds/multi_type_vector_trait.hpp>
......
......@@ -56,6 +56,13 @@
#include <math.h>
#if DEBUG_COLUMN_STORAGE
#include "columniterator.hxx"
#include <iostream>
using std::cout;
using std::endl;
#endif
// -----------------------------------------------------------------------
// factor from font size to optimal cell height (text width)
......@@ -1384,6 +1391,20 @@ SCROW ScColumn::FindNextVisibleRowWithContent(SCROW nRow, bool bForward) const
void ScColumn::CellStorageModified()
{
#if DEBUG_COLUMN_STORAGE
ScColumnTextWidthIterator aIter(*this, 0, MAXROW);
for (; aIter.hasCell(); aIter.next())
{
SCROW nRow = aIter.getPos();
ScBaseCell* pCell = GetCell(nRow);
if (!pCell)
{
cout << "Cell and text width storages are out of sync!" << endl;
cout.flush();
abort();
}
}
#endif
}
unsigned short ScColumn::GetTextWidth(SCROW nRow) const
......
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