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)?

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.

Niklas

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

Reply via email to