First of all, thank you !

On Fri, 2006-12-01 at 13:42 +0100, Niklas Nebel wrote:
> Mikaël De Bie wrote:
> > Maybe you've read that I'm trying to use the java eclipse plugin to 
> > create UNO component, but beside this, I'm also creating a calc addin in 
> > c++. And I need some help :
> > 
> > I'm trying to integrate a way to create and solve contraints 
> > satisfaction problems in a calc sheet. But I'm a beginner yet and need 
> > some help to know if what I plan to do is possible.
> 
> Will this overlap with Kohei's work 
> (http://wiki.services.openoffice.org/wiki/Optimization_Solver)?
> 

The Kohei's work is to create an add-on for optimization problems, what
I've planned to do as the final work of my computer science studies is
to find a way to use the gecode librairies (www.gecode.org) using a calc
sheet. So it's the same kind of work but I don't think it's overlaping
his work. I've already send a mail to kohei to inform myself of his
current work and also get some help ;-).

> > I've actually three questions about calc addin :
> > 
> > 1. Is there a way to get the reference to a cell rather than its 
> > content? The purpose is to be able to change a cell content using the 
> > cell in question as a parameter of the function.
> 
> You can get an object (use parameter type XCellRange), but you can't 
> modify the content during function calculation, because that wouldn't 
> work with the way formulas are calculated. If you want to modify cell 
> contents, you should use a component that is activated by a menu entry 
> or similar.

> > 2. Is there a way to get the formula of a function in a cell or only the 
> > value returned can be used?
> > 
> > Here's an exemple :
> >    If i use =testaddin(H1:H4) in cell A1, I would like that  either:
> >        a. my testaddin implementation is called with "H1:H4" as a 
> > parameter (or an object  abstracting a cell range).
> > 
> >        b. A macro is able to get the content of cell A1 as a formula 
> > string ( "=testaddin(H1:H4)" )  or (better) as a parsing tree or any 
> > abstraction which let me identify the functions used as well as their 
> > arguments.
> 
>  From an XCellRange parameter, you can get each cell's formula string 
> the normal way (XCell).
> 
> > 3. Is there a way to hide the returned value of a function? So that the 
> > value can be use by another function but isn't visible on the sheet.
> 
> You can always modify the cell format, or use hidden columns or rows, 
> but not from the function implementation.
> 

So, it seems that the way to be able to do such things is to create more
than only an add-in...
I'll see if I could create a menu item opening a windows to handle
constraints satisfaction problems. 

Thanks for your help,

Mikaël

> Niklas
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to