[api-dev] Bug? - Closing OOo will close multiple documents

2008-12-04 Thread Tobias Krais
Hi together,

I have the following strange behaviour:
1. Open a document (e.g. an odt file) via API and then close the
document (only the document, not the OOo frame). Thus an empty OOo frame
remains (in OOo3 the OOo app chooser is loaded in the frame).
2. Open again a document via API. The document is not loaded in the
first frame - a new one is opened. Now close the remaining frame from
point 1. Closing it will also close our document of point 2!

This does not occur if you open the documents with a file explorer! It
only occurs when opening via API.

I do not know if issue 65942
(http://www.openoffice.org/issues/show_bug.cgi?id=65942) is related to
this thing here.

Do you think this is a bug?

Greetings, Tobias

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



Re: [api-dev] Calc with two tables

2008-12-04 Thread Rudolf Huber

Hallo Andrew,


thanks for the prompt answer. Instead of

   Tabelle31 = oTabellenListe.getByIndex(1)

I coded

 Print oTabellenListe.getCount()
 Print 
oTabellenDokument.getSheets().getCount()
 Tabelle31 = 
oTabellenDokument.getSheets().getByIndex(1)


the macro handled both printing statements. The statement for Tabelle31 is 
not executed anymore; the system throws an indexoutofboundexception. The 
sheet itself does not show on the buttom the sheet-id-numbers Tabelle11 und 
Tabelle31, but Tabelle1. One line below, the sheet shows Tabelle1/1. Maybe 
the code for ThisComponent and lockcontrollers  is incorrect?


Regards,

Rudi

- Original Message - 
From: Andrew Douglas Pitonyak [EMAIL PROTECTED]

To: dev@api.openoffice.org
Sent: Thursday, December 04, 2008 2:25 PM
Subject: Re: [api-dev] Calc with two tables



Rudolf Huber wrote:

Hallo,

the following sequence leads to an indexoutofboundexception. In the 
beginning I have the opening statements:

Dim Desktop As Object
Dim Platzhalter()
Dim Url As String
Dim oTabellenDokument As Object   Rem the entire 
Document
Dim oTabellenListe As Object   Rem 
Collection of sheets
Dim Tabelle11 As Object  Rem 
sheet
Dim Tabelle31 As Object  Rem 
sheet

thereafter a little further down: :

oTabellenDokument = ThisComponent
oTabellenDokument.lockcontrollers
EndSpalte = ZellenBereich.EndColumn
EndZeile = ZellenBereich.EndRow
Desktop = CreateUnoService(com.sun.star.frame.Desktop)
Url = file:///a:/test.ods
oTabellenDokument = Desktop.loadComponentFromURL(Url, _blank, 0, 
Platzhalter())

oTabellenListe = oTabellenDokument.getSheets()
Tabelle11  = oTabellenListe.getByIndex(0)

again further down, the table Tabelle31 throughs the index-error:
Tabelle31 = oTabellenListe.getByIndex(1)

Up version 2.4 I had no problem with a structure like this. Now, I have 
version ooO 3. The table-collection  oTabellenListe should allow various 
sheets, however, macro stops after one table. In the sheet itself 
Tabelle1 in the beginning; after the url the second sheet shows 
Tabelle1/1. Neither Tabelle11 nor the Tabelle31 - which I coded - appear 
on the sheet. I do not know, why the macro ignores the definitions for 
the tables Tabelle11 und Tabelle31.


You said that more than one sheet exists in the document. What happens if 
you do this?


Print oTabellenListe.getCount()
Print oTabellenDokument.getSheets().getCount()
Tabelle31 = oTabellenDokument.getSheets().getByIndex(1)

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


-
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]



Re: [api-dev] Netbeans OOo Plugin 2.0: How to add custom files for an option dialog to an add-on project?

2008-12-04 Thread Benjamin Vollmer

Hello,

I still have problems with the option handling in the extension context. 
The answers from the mailinglist were helpful, but I need more 
informations. The paths and identifiers are now correct.


Unsolved questions:
- Why does my .xdl-dialog not appear in the options dialog? I tried to 
debug my OptionsEventHandler, but when I click on  OK, the class isn't 
involved. 
- How can I access my own properties which I have defined in the 
ExtensionsData.xcs file? I implemented a generic ConfigReader class and 
now I can read the OOo properties but not my own? Error message is:
/org.openoffice.Office.ExtensionsData (and for locale de) could not be 
created. Unable to retrieve the node from the configuration server.

The backend returned the following error:
SchemaBuilder: Could not expand instances: Template not found 
[@/org.openoffice.Office.ExtensionsData/Leaves]


For a bigger extension it is important to set up the config environment 
properly, but unfortunately the documentation in the developers guide 
wasn't so helpful for me. And I still haven't found an existing 
opensource extension, which uses the options functionality. Can anybody 
here give me a complete working example?


Regards
Benjamin



Juergen Schmidt wrote:

Hi,

sure you need the appropriate modules with debug info. But i would 
first check the extension identifier. It is important that you use the 
correct identifier that you have defined in the project properties (or 
in the description.xml) in the OptionsDialog.xcu as well.


You can also debug your options handler object (the object that 
implements the XContainerWindowEventHandler) and can check if it gets 
instantiated. Set a breakpoint in the callHandlerMethod method


Juergen


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



Re: [api-dev] Netbeans OOo Plugin 2.0: How to add custom files for an option dialog to an add-on project?

2008-12-04 Thread Ariel Constenla-Haile
Hello Benjamin,

Benjamin Vollmer escribió:
 Hello,
 
 I still have problems with the option handling in the extension context.
 The answers from the mailinglist were helpful, but I need more
 informations. The paths and identifiers are now correct.
 
 Unsolved questions:
 - Why does my .xdl-dialog not appear in the options dialog? 

this can have several reasons, impossible to guess without looking at
your code.

 I tried to
 debug my OptionsEventHandler, but when I click on  OK, the class isn't
 involved. - How can I access my own properties which I have defined in
 the ExtensionsData.xcs file? I implemented a generic ConfigReader class
 and now I can read the OOo properties but not my own? Error message is:
 /org.openoffice.Office.ExtensionsData (and for locale de) could not be
 created. Unable to retrieve the node from the configuration server.
 The backend returned the following error:
 SchemaBuilder: Could not expand instances: Template not found
 [@/org.openoffice.Office.ExtensionsData/Leaves]

this is thrown in
http://svn.services.openoffice.org/ooo/trunk/configmgr/source/backend/schemabuilder.cxx
and means there is a problem with the configuration schema (the xcs
file) for your configuration data (the xcu).

 For a bigger extension it is important to set up the config environment
 properly, but unfortunately the documentation in the developers guide
 wasn't so helpful for me. And I still haven't found an existing
 opensource extension, which uses the options functionality. Can anybody
 here give me a complete working example?

I send a NB project to your mail (you may have to correct the library
dependency, as I'm working on a OOo 3.1).


Regards,
Ariel.


-- 
Ariel Constenla-Haile
La Plata, Argentina


Aus der Kriegsschule des Lebens
- Was mich nicht umbringt,
macht mich härter.
Nietzsche Götzendämmerung, Sprüche und Pfeile, 8.

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