[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-31 18:42:03
[Download RAW message or body]

hi,

I added to my previous patch :
-Fix bug when you write a formular (=sum(A1:B5)) and there is a cell Merged.
Now when a cell is obscuring you don't use it into formular.

Could you test it please.

thanks 
bye
["patch40.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_canvas.cc
===================================================================
RCS file: /home/kde/koffice/kspread/kspread_canvas.cc,v
retrieving revision 1.147
diff -u -p -r1.147 kspread_canvas.cc
--- kspread_canvas.cc	2000/08/31 07:52:35	1.147
+++ kspread_canvas.cc	2000/08/31 18:39:41
@@ -543,8 +543,20 @@ void KSpreadCanvas::chooseGotoLocation( 
   KSpreadCell* cell = table->cellAt( x, y );
   if ( cell->isObscured() && cell->isObscuringForced() )
   {
-    y = cell->obscuringCellsRow();
-    x = cell->obscuringCellsColumn();
+    int moveX=cell->obscuringCellsColumn();
+    int moveY=cell->obscuringCellsRow();
+    cell = table->cellAt( moveX, moveY );
+    QRect extraCell;
+    extraCell.setCoords(moveX,moveY,moveX+cell->extraXCells(),moveY+cell->extraYCells());
+    if( (x-chooseMarkerColumn())!=0 && extraCell.contains(chooseMarker()))
+        x=cell->extraXCells()+x;
+    else if((y-chooseMarkerRow())!=0 && extraCell.contains(chooseMarker()))
+        y=cell->extraYCells()+y;
+    else
+        {
+        y = moveY;
+        x = moveX;
+        }
   }
 
   int xpos = table->columnPos( x, this );
Index: kspread_interpreter.cc
===================================================================
RCS file: /home/kde/koffice/kspread/kspread_interpreter.cc,v
retrieving revision 1.47
diff -u -p -r1.47 kspread_interpreter.cc
--- kspread_interpreter.cc	2000/08/10 22:41:04	1.47
+++ kspread_interpreter.cc	2000/08/31 18:39:47
@@ -2104,7 +2104,7 @@ bool KSpreadInterpreter::processExtensio
       return false;
     }
 
-    if ( cell->isDefault() )
+    if ( cell->isDefault() || (cell->isObscured() && cell->isObscuringForced()))
       context.setValue( new KSValue( 0.0 ) );
     else if ( cell->isValue() )
       context.setValue( new KSValue( cell->valueDouble() ) );
@@ -2169,8 +2169,8 @@ bool KSpreadInterpreter::processExtensio
           c = new KSValue( 0.0 );
         else
           c = new KSValue( cell->valueString() );
-
-        l->listValue().append( c );
+        if ( !(cell->isObscured() && cell->isObscuringForced()) )
+                l->listValue().append( c );
       }
       v->listValue().append( l );
     }
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