[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/kspread
From:       Sebastian Sauer <mail () dipe ! org>
Date:       2006-11-01 7:08:52
Message-ID: 1162364932.734841.32193.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 600873 by sebsauer:

I need a way to have access to the Function instance from
within the FunctionPtr to be able to store additional
function-details and be able to restore them at the
defined function-callback.

I hope it's ok to do it that way?

CC_MAIL: koffice-devel@kde.org



 M  +3 -0      Functions.cpp  
 M  +2 -0      Functions.h  


--- trunk/koffice/kspread/Functions.cpp #600872:600873
@@ -117,6 +117,9 @@
   if (!paramCountOkay (args.count()))
     return Value::errorVALUE();
 
+  if( extra )
+    extra->function = this;
+
   // do we need to perform array expansion ?
   bool mustExpandArray = false;
   if (!d->acceptArray)
--- trunk/koffice/kspread/Functions.h #600872:600873
@@ -33,6 +33,7 @@
 class Sheet;
 class Value;
 class ValueCalc;
+class Function;
 
 typedef QVector<Value> valVector;
 
@@ -41,6 +42,7 @@
 };
 struct FuncExtra {
   // here we'll add all the extras a function may need
+  Function* function;
   QVector<rangeInfo> ranges;
   Sheet *sheet;
   int myrow, mycol;
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic