Re: [api-dev] Copying sheets between documents

2008-08-15 Thread Andreas Schneider
Hi Niklas, this interface seems to be what I was looking for. I'll play around with it and see if it can suit my needs. Many thanks! Andreas. On Fri, 15 Aug 2008 17:39:21 +0200 Niklas Nebel <[EMAIL PROTECTED]> wrote: > On 08/14/08 16:47, Andreas Schneider wrote: > > The

Re: [api-dev] Copying sheets between documents

2008-08-15 Thread Andreas Schneider
Hi Steffen, thanks for that idea, but that would only be of use for predefined cases. The AddIn offers a lot of functions to query values and structural informations from a multi dimension database (a MOLAP server). Users should be able to create simple queries or even complex cockpit applications

[api-dev] Copying sheets between documents

2008-08-14 Thread Andreas Schneider
Hello mailing list, I'm writing a (java) extension which provides access to a database through Calc functions (a typical AddIn). Since this data can change in the background or a user has to go offline, I wanted to implement a "snapshot" functionality. The idea is, that the document is replicated

Re: [api-dev] Modal Swing JDialog

2007-09-24 Thread Andreas Schneider
Christian Andersson wrote: I'm interested a bit in how to do this, are there any examples on the net you can point to? I just implemented it that way: public void showModal(javax.swing.JDialog dialog) { try { Object tempDialogModel = multiComponentFactory.createInsta

Re: [api-dev] Modal Swing JDialog

2007-09-22 Thread Andreas Schneider
Wouter van Reeven wrote: Hi Andreas, I don't have an answer to your questions. But here is another approach that may work for you. The Java API contains a class called javax.swing.PopupFactory which allows you to register and show JPanels as popups. Basically you request an instance of the curre

[api-dev] Modal Swing JDialog

2007-09-22 Thread Andreas Schneider
Hi, my extension displays a dialog when certain Calc cells are double-clicked (which now works, thanks to the great support here :)). There should be no other interaction with the spreadsheet during this dialog is shown, so a modal JDialog comes to mind. That would require me to provide a jav

Re: [api-dev] Re: Communication between Calc Addin and Addon

2007-09-14 Thread Andreas Schneider
Andreas Saeger wrote: 1. objCell.getType() returns a c.s.s.sheet.CellContentType.EMPTY|VALUE|TEXT|FORMULA 2. objCell.getFormula() returns the formula string (not nesessarily a formula. It's the "stored english cell-content" like "=SUM(A1:B5)", "0.5" or "abcd"). 3. objCell.getError() = 0 if the

Re: [api-dev] Re: Communication between Calc Addin and Addon

2007-09-14 Thread Andreas Schneider
Andreas Saeger wrote: Hi Andreas, Just let me drop in my 2 cents: An addin-formula, returned by objCell.getFormula(), looks like this: =com.sun.star.sheet.addin.Analysis.getRandbetween(0;9) Property objCell.FormulaLocal is =RANDBETWEEN(0;9) or with German UI =ZUFALLSBEREICH(0;9) Andreas I see

Re: [api-dev] Communication between Calc Addin and Addon

2007-09-14 Thread Andreas Schneider
Mathias Bauer wrote: I hope that I remember that correctly: if you caught the Doubleclick by using the interfaces com.sun.star.awt.XUserInputInteraction (implemented at the Controller object) and com.sun.star.awt.XMouseClickHandler (retrieved by using the former interface) it could be possible th

[api-dev] Communication between Calc Addin and Addon

2007-09-13 Thread Andreas Schneider
Hi, I originally sent this to [EMAIL PROTECTED], but I guess that has been a bit misplaced. So here we go again: I have several problems integrating a Calc Addin and Addon to make them work together. 1. I catch double clicks on spreadsheet cells. When certain criteria are met, a dialog should

[api-dev] Calc AddIn with Hyperlink-like function

2007-05-18 Thread Andreas Schneider
Hi, I want to implement a Calc function via AddIn, which can also "listen" to events. I was not able to find anything about this subject and the function calls itself don't contain any reference to the cell it belongs to. Is there some way to implement a listener specific to certain cells like th