[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice
Subject: patch for kspread
From: montel laurent <montell () club-internet ! fr>
Date: 2000-08-27 19:03:58
[Download RAW message or body]
hi,
I corrected bug in sorting when there are merged cell:
-Now sotring works.
Before kspread didn't test if cell was merged.
could you test it please.
thanks
bye
["patch33.diff" (text/plain)]
? patch29.diff
? patch26.diff
? kword.kwd
? fonts.dir
? toto.csv
? toto2.ksp
? KSpreadLocation.diff
? ???
? KSpreadCellIface_stub.h
? KSpreadCellIface_stub.cpp
? toto.ksp
? filters/Makefile.in
? filters/Makefile
? filters/csv/Makefile
? filters/csv/Makefile.in
? filters/csv/csvfilter
? filters/komma/Makefile.in
? filters/komma/Makefile
? pics/@kde_minidir@
cvs server: Diffing .
Index: kspread_table.cc
===================================================================
RCS file: /home/kde/koffice/kspread/kspread_table.cc,v
retrieving revision 1.200
diff -u -p -r1.200 kspread_table.cc
--- kspread_table.cc 2000/08/27 17:56:59 1.200
+++ kspread_table.cc 2000/08/27 19:01:40
@@ -2670,6 +2670,14 @@ void KSpreadTable::sortByRow( int ref_ro
for ( int d = r.left(); d <= r.right(); d++ )
{
KSpreadCell *cell1 = cellAt( d, ref_row );
+ if ( cell1->isObscured() && cell1->isObscuringForced() )
+ {
+ int moveX=cell1->obscuringCellsColumn();
+ KSpreadCell* cell = cellAt(moveX,ref_row);
+ cell1 = cellAt( moveX+cell->extraXCells()+1,moveX );
+ d=moveX+cell->extraXCells()+1;
+ }
+
// Look for which column we want to swap with the one number d
KSpreadCell * bestCell = cell1;
int bestX = d;
@@ -2680,6 +2688,8 @@ void KSpreadTable::sortByRow( int ref_ro
if ( cell2->isEmpty() )
{ /* No need to swap */ }
+ else if ( cell2->isObscured() && cell2->isObscuringForced() )
+ { /* No need to swap */}
else if ( bestCell->isEmpty() )
{
// empty cells are always shifted to the end
@@ -2759,7 +2769,13 @@ void KSpreadTable::sortByColumn(int ref_
// Look for which row we want to swap with the one number d
KSpreadCell *cell1 = cellAt( ref_column, d );
//kdDebug() << "New ref row " << d << endl;
-
+ if ( cell1->isObscured() && cell1->isObscuringForced() )
+ {
+ int moveY=cell1->obscuringCellsRow();
+ KSpreadCell* cell = cellAt(ref_column, moveY);
+ cell1 = cellAt( ref_column, moveY+cell->extraYCells()+1 );
+ d=moveY+cell->extraYCells()+1;
+ }
KSpreadCell * bestCell = cell1;
int bestY = d;
@@ -2769,6 +2785,8 @@ void KSpreadTable::sortByColumn(int ref_
if ( cell2->isEmpty() )
{ /* No need to swap */ }
+ else if ( cell2->isObscured() && cell2->isObscuringForced() )
+ { /* No need to swap */}
else if ( bestCell->isEmpty() )
{
// empty cells are always shifted to the end
cvs server: Diffing dtd
cvs server: Diffing extensions
cvs server: Diffing filters
cvs server: Diffing filters/csv
cvs server: Diffing filters/komma
cvs server: Diffing pics
cvs server: Diffing plugins
cvs server: Diffing plugins/calculator
cvs server: Diffing plugins/calculator/pics
cvs server: Diffing scripts
cvs server: Diffing tablestyles
cvs server: Diffing toolbar
cvs server: Diffing toolbar/hicolor
cvs server: Diffing toolbar/locolor
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic