[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/kspread-new-cell-storage
From: Stefan Nikolaus <stefan.nikolaus () kdemail ! net>
Date: 2007-01-25 17:09:48
Message-ID: 1169744988.638616.25564.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 627093 by nikolaus:
iterate over the formula storage
M +17 -7 DependencyManager.cpp
--- branches/work/kspread-new-cell-storage/DependencyManager.cpp #627092:627093
@@ -28,6 +28,7 @@
#include "CellStorage.h"
#include "Formula.h"
#include "Map.h"
+#include "PointStorage.h"
#include "Region.h"
#include "Sheet.h"
#include "Value.h"
@@ -36,6 +37,13 @@
using namespace KSpread;
+namespace KSpread
+{
+class FormulaStorage : public PointStorage<Formula> {};
+class LinkStorage : public PointStorage<QString> {};
+class ValueStorage : public PointStorage<Value> {};
+}
+
class DependencyManager::Private
{
public:
@@ -255,20 +263,22 @@
foreach (const Sheet* sheet, map->sheetList())
{
- for ( int c = 0; c < sheet->cellStorage()->count(); ++c )
+ for ( int c = 0; c < sheet->formulaStorage()->count(); ++c )
{
+ Cell cell( sheet, sheet->formulaStorage()->col( c ), \
sheet->formulaStorage()->row( c ) ); +
// empty or default cell or cell without a formula? remove it
- if ( sheet->cellStorage()->data( c ).isEmpty() || \
!sheet->cellStorage()->data( c ).isFormula() ) + if ( \
sheet->formulaStorage()->data( c ) == Formula() ) {
- d->removeDependencies(sheet->cellStorage()->data( c ));
+ d->removeDependencies( cell );
continue;
}
- d->generateDependencies(sheet->cellStorage()->data( c ));
- if (!d->depths.contains(sheet->cellStorage()->data( c )))
+ d->generateDependencies( cell );
+ if (!d->depths.contains( cell ))
{
- int depth = d->computeDepth(sheet->cellStorage()->data( c ));
- d->depths.insert(sheet->cellStorage()->data( c ), depth);
+ int depth = d->computeDepth( cell );
+ d->depths.insert( cell , depth);
}
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic