[api-dev] Range/Cell Address as Parameter for calc addin
Hi! I want to write a function with a rangeaddress as parameter. Is there a way to do this with java? The function should be part of an extension. (Which is written in java) The function does something like that: Public Function CSDRangeAddress(arg As Range) As String CSDRangeAddress = arg.Address End Function Or is there a way to put some Basic code into the extension? Thanks for Help, Martin - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] Using transformation matrices
Hello Ariel, Great example, I never thought to read SDK examples. The AffineTransform class seems to be promising. It could help me to understand how matrices operates. It is even possible that I convert my extension in Java to take advantage of this class. Thank you very much. Regards Thibault Vataire. - Mail Original - De: Ariel Constenla-Haile ariel.constenla.ha...@googlemail.com À: dev@api.openoffice.org Envoyé: Lundi 17 Mai 2010 04:01:56 Objet: Re: [api-dev] Using transformation matrices Hello Thibault, On Sunday 16 May 2010, 19:01, Thibault Vataire wrote: Hello Ariel, I have already take a look on this thread but I set it aside hoping to find a simpler solution than to analyze OOo source code. oh I didn't send you to read OOo source code, I'm not *that* mad... but this thread is quite informative, so I thought you could get something out of it. I'll try to do with that, but if someone has an example or something else, I'm interested. you have the Developer's Guide example: SDK inst dir/examples/DevelopersGuide/Drawing/ObjectTransformationDemo.java Regards -- Ariel Constenla-Haile La Plata, Argentina - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
[api-dev] Limiting the selection base of a combobox based on another
I'm trying to make a selection form for selecting a single customer from a database that contains quite a lot of customers. The end user will type either the birthdate of the customer, their first name or their surname; or a combination of these, any that can contain wildcards or be only partially specified. The birthdate, firstname and surname are stored in separate columns in the database. If I make 3 comboboxes, one for each of the 3 criteria, how can I make the 3 comboboxes dependent on the content of all 3? I mean, if I type a partial birthdate, how can I make it so that the firstname and surname box only show those customers whose birthdate starts with the date I've typed in the birthday combobox? Thanks /Janoch
Re: [api-dev] Range/Cell Address as Parameter for calc addin
On 05/18/10 12:53, Martin Dobiasch wrote: I want to write a function with a rangeaddress as parameter. Is there a way to do this with java? The function should be part of an extension. (Which is written in java) The function does something like that: Public Function CSDRangeAddress(arg As Range) As String CSDRangeAddress = arg.Address End Function An add-in function (see http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Spreadsheet_Add-Ins) can have a parameter of type XCellRange. The passed object is then a SheetCellRange implementation, which you can query for the XCellRangeAddressable interface. Niklas - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] Limiting the selection base of a combobox based on another
Johannes , I think you need to use a event who fire some macro's to change the SQL statement behind the comboboxes depending on the content of the others hope it helps Fernand I'm trying to make a selection form for selecting a single customer from a database that contains quite a lot of customers. The end user will type either the birthdate of the customer, their first name or their surname; or a combination of these, any that can contain wildcards or be only partially specified. The birthdate, firstname and surname are stored in separate columns in the database. If I make 3 comboboxes, one for each of the 3 criteria, how can I make the 3 comboboxes dependent on the content of all 3? I mean, if I type a partial birthdate, how can I make it so that the firstname and surname box only show those customers whose birthdate starts with the date I've typed in the birthday combobox? Thanks /Janoch - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
[api-dev] Regarding significant digits in cell
Hi, The getValue() function of a cell object returns the value with significant digits which are visible in that cell. Is there a way to get the actual value stored in the cell regardless of the significant digits consideration ? Thanks Madhur
AW: [api-dev] Range/Cell Address as Parameter for calc addin
Thanks for your help Niklas My problem is now to convert the Address Object back to a String public String CSDRangeAddress(XCellRange range) { XCellRangeAddressable xAdd= (XCellRangeAddressable)UnoRuntime.queryInterface( XCellRangeAddressable.class, range); CellRangeAddress address = xAdd.getRangeAddress(); //do something here like address.EndRow= 12; return ...; } Is there an API-way to convert CellRangeAddress to a String? -Ursprüngliche Nachricht- Von: niklas.ne...@sun.com [mailto:niklas.ne...@sun.com] Gesendet: Dienstag, 18. Mai 2010 14:28 An: dev@api.openoffice.org Betreff: Re: [api-dev] Range/Cell Address as Parameter for calc addin On 05/18/10 12:53, Martin Dobiasch wrote: I want to write a function with a rangeaddress as parameter. Is there a way to do this with java? The function should be part of an extension. (Which is written in java) The function does something like that: Public Function CSDRangeAddress(arg As Range) As String CSDRangeAddress = arg.Address End Function An add-in function (see http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets /Spreadsheet_Add-Ins) can have a parameter of type XCellRange. The passed object is then a SheetCellRange implementation, which you can query for the XCellRangeAddressable interface. Niklas - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: AW: [api-dev] Range/Cell Address as Parameter for calc addin
Hello, Martin Dobiasch schrieb: My problem is now to convert the Address Object back to a String public String CSDRangeAddress(XCellRange range) { XCellRangeAddressable xAdd= (XCellRangeAddressable)UnoRuntime.queryInterface( XCellRangeAddressable.class, range); CellRangeAddress address = xAdd.getRangeAddress(); //do something here like address.EndRow= 12; return ...; } Is there an API-way to convert CellRangeAddress to a String? You can use the AbsoluteName property of the range, but this will return the sheet name too. http://api.openoffice.org/docs/common/ref/com/sun/star/sheet/SheetCellRange.html#AbsoluteName If you want to parse that string to remove the sheet name, please take into account that sheet names may contain periods too, e.g. Sheet.1 where the AbsoluteName property gives $'Sheet.1'.$A$1:$B$2 and sheet names may contain apostroph characters, which are encoded by duplicating them, e.g. Sheet'1 where the AbsoluteName property gives $'Sheet''1'.$A$1:$B$2 Maybe it is better to build the range address by yourself. Here is some pseudo code to build the column name from a zero-based column index (perhaps needs some adjustments for Java): String getColumnName( int column ) { String name; while( column = 0 ) { name = String( 'A' + (column % 26) ) + name column = column / 26 - 1 } return name; } so you can build the range name with something like return getColumnName(address.StartColumn) + (address.StartRow+1) + : + getColumnName(address.EndColumn) + (address.EndRow+1); Regards Daniel - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: AW: [api-dev] Range/Cell Address as Parameter for calc addin
Il 18/05/2010 19:00, Daniel Rentz ha scritto: Hello, Martin Dobiasch schrieb: My problem is now to convert the Address Object back to a String public String CSDRangeAddress(XCellRange range) { XCellRangeAddressable xAdd= (XCellRangeAddressable)UnoRuntime.queryInterface( XCellRangeAddressable.class, range); CellRangeAddress address = xAdd.getRangeAddress(); //do something here like address.EndRow= 12; return ...; } Is there an API-way to convert CellRangeAddress to a String? You can use the AbsoluteName property of the range, but this will return the sheet name too. http://api.openoffice.org/docs/common/ref/com/sun/star/sheet/SheetCellRange.html#AbsoluteName There is also another way using the css.table.CellRangeAddressConversion service (and css.table.CellAddressConversion also) example: oSheet = ThisComponent.Sheets(0) aAddr = oSheet.getCellRangeByName(A15:F36).RangeAddress oCnv = _ ThisComponent.createInstance(com.sun.star.table.CellRangeAddressConversion) oCnv.Address = aAddr MsgBox oCnv.PersistentRepresentation MsgBox oCnv.UserInterfaceRepresentation ciao Paolo M - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org