Re: [api-dev] XComponent events and OfficeDocument events...

2007-11-14 Thread Frank Schönheit - Sun Microsystems Germa ny
Hello ashok,

 Or can I simply use com.sun.star.document.XEventListener since that
 implements lang.XEventListener as a base interface... ?

Yes, you can.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] How to get the XStorable interface from a DataSource?

2007-11-13 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Willem,

 then when i try to register the datasource it tells me i need to store 
 it first using the XStorable Interface. The problem is however taht i 
 cant get the XStorable interface from the datasource. It doesn't seem to 
 implement it! Also when i look at the defined intefaces in the 
 developers guide for the DatabaseContext and Datasource services 
 (13.2.2) and the UML on p.895 i don't see the XStorable interface as 
 implemented.

Is it really the exception message which tells the data source has an
XStorable? I know that the Dev Guide talks about this - unfortunately,
the guide is wrong (I plan to update it in this matter as soon as it's
finally Wiki-fied.).

Actually, there is a duality between a DataSource and a DatabaseDocument
- each data source has exactly one database document associated with it,
and vice versa. The XStorable interface exists at the document only,
*not* at the data source.

So, you need to
- query your data source for the XDocumentDataSource interface
- use the getDatabaseDocument method to retrieve the associated
  database document
- query the document for the XStorable interface

(side note: When you query the document for the XOfficeDatabaseDocument
interface, you can use its getDataSource method to retrieve the data
source - which is the same as the one with which you started.)

HTH

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] New-style Service Constructors in Basic

2007-11-12 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Ariel,

 With a new-style service constructor, you can NOT call 
 createUnoService() and then initialize() passing to this last call the 
 constructor's parameters. In the example [1] initialize() fails == the 
 object returned by createUnoService() has no such method, i.e. has 
 already been initialized using the default constructor (I think :-( )

In fact, the example you use (PackageManagerDialog) has been implemented
without the XInitialization pattern - it does the constructor
initialization by other means. Which only hilights that in fact the
.initialize thing is an *implementation detail* which one cannot rely one.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] New-style Service Constructors in Basic

2007-11-09 Thread Frank Schönheit - Sun Microsystems Germa ny
Hello myself,

 createInstanceWithArgumentsAndContext is the way you have to go to 
 instantiate such a service in Basic.
 
 Not really.

Argh. Jürgen, you're right.

Actually I was confused by the service constructors use
XInitialization which I have in my head, and assumed they do this
*explicitly*.

In fact, it seems a service constructor implementation uses the
createInstanceWithArguments[AndContext] itself, which then uses
XInitialization.

Means that using createInstanceWithArguments[AndContext] is
future-proof, even if implementations of dedicated factories change.

Sorry for spreading the confusion.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Questions about com.sun.star.awt.MenuBar and com.sun.star.awt.PopupMenu

2007-10-09 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Ariel,

 FIRST of all, I would like to thank the one who wrote the code of the
 GUI examples on the new SDK
 (OpenOffice.org_2.3_SDK/examples/DevelopersGuide/GUI): it answers some
 questions I had for a long time! Thanks hr (I don't know your real name!)!

Hehe. hr (Jens-Heiner Rechtien) is a release engineer, who integrated
the child workspace where this was introduced. While he, as all our
release engineers, surely deserves thanks for the work he does, in this
particular case please direct your thank to Jürgen Schmidt (jsc, also to
be seen in the CVS history).


 But to my surprise, I used XComponentContext::getServiceManager() to get
 the XMultiComponentFactory, then used its method
 getAvailableServiceNames() and got a sequence that DOES contain these
 service names:
 
 com.sun.star.awt.MenuBar
 com.sun.star.awt.PopupMenu
 stardiv.vcl.MenuBar
 stardiv.vcl.PopupMenu
 
 And we can use any of the names:
 
 1. com.sun.star.awt.PopupMenu
 2. stardiv.vcl.PopupMenu
 3. stardiv.Toolkit.VCLXPopupMenu
 
 as they instantiate the same type.
 
 And again to my surprise, com.sun.star.awt.MenuBar and
 com.sun.star.awt.PopupMenu are not included on OOo2.3 SDK API
 reference, nor in the source/offapi/com/sun/star/awt IDL files.
 
 So, are they going to be included in the API? Is it safe to use them?
 What service name shall we use, out of the tree options? Since which OOo
 version can they be used?

The stardiv.* versions are in there for compatibility reasons only, and
should definitely not be used. com.sun.star.awt.* is the name to use, in
any case.

I am not sure why they're not documented in the IDL reference, I suppose
they easily could. You might want to submit an issue for this.

 The problem here: FIRST the context menu of the edit control is
 executed, THEN my pop up menu IF I right click on this context menu.
 What I really need here is an XContextMenuInterceptor, but how do I get
 the XContextMenuInterception for the edit control when it has no
 com.sun.star.frame.Controller ?

XContextMenuInterception is not implemented by UNO controls at all. I
did not yet read about this interface in the developer's guide, but I
suppose it can be implemented outside the frame/controller/model
paradigm - but this simply isn't done ATM.

Is the dialog whose screen shot you showed completely done in UNO?

For the timing problem:
Unfortunately, your mouse listeners, though called *first* (technically)
are notified asynchronously. That is, the edit control gets the mouse
click, starts the asynchronous notification of your mouse handler, and
then opens its own context menu. When this is already open, the
notification to your handler arrives.

I fear there's no way how to work around this, there's simply no
mechanism in the code AFAIK.

You might get tired of this suggestion you hear too often from me :),
but I in fact suggest submitting an RFE which requests the
implementation of XContextMenuInterception for UNO controls.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



[api-dev] Re: Check box in writer

2007-10-06 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Perry,


please note I answer your question in dev@api.openoffice.org, a place
better suiting such questions, than private mails do. This is a matter
of scaling, because more people can answer you, and more people can
learn from the answer.

 Do you have an example for me about how to set the status of a 'check
 box' in writer (not on dialog). An example with both writer and dialog
 checkbox also is ok with me.
 

Assuming that you have a logical form named Standard (the default
name), and your checkbox is named checkbox (see the Form Navigator for
the concrete names), then
  oForm = ThisComponent.DrawPage.Forms.getByName( Standard )
  oCheckBox = oForm.getByName( checkbox )
  oCheckBox.State = 0
'http://api.openoffice.org/docs/common/ref/com/sun/star/awt/UnoControlCheckBoxModel.html#State

 Btw, my project is almost finished and have to conclude that OpenOffice
 really is great stuff!!!

Great to hear this :)

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] AWT TREE: OOoBasic version of the ScriptSelector example

2007-09-22 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Bernard,

 I don't want to start a troll, but the service 
 com.sun.star.sheet.Spreadsheet is _unpublished_ since a long time, see
 http://api.openoffice.org/docs/common/ref/com/sun/star/sheet/Spreadsheet.html

Hmm, okay, and what does this tell us?


The concept of unpublished was introduced for cases such as the
Childs/Children: The interface has a flaw, which can be fixed easily,
and does not require substantial effort for the clients if fixed.

I much prefer doing this small innocent fix for the next release, at the
cost of some scripts to be adjusted, over being annoying by the current
spelling error for the next *years* (finally, it looks somewhat
unprofessional, doesn't it?).


Yes, we don't have a mechanism in place which ensures that APIs become
published after a while, which leads to APIs such as the one you
mentioned. On the other hand, I doubt that anybody will do a severe
incompatible change to Spreadsheet or Shape, I think people are
responsible enough to recognize that this would be a bad idea, after the
API has been there for years.


On yet another hand, I personally would not like to declare any service
as published as long as this forbids even minor and innocent changes
which do not cause any trouble to any client, but that's another story
which I perhaps should not start again, here :-\

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Moving CoceSnippets into the Wiki?

2007-08-19 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Juergen,

 with our codesnippets.services.openoffice.org we have useful resource to 
 find some useful snippets. But the contribution is from my point of view 
 not easy enough. Although Tom Schindl did a tremendous job to set up the 
 environment and infra structure and Paolo Mantovani who provides the 
 excellent Snippet Creator i would like to suggest that we move the 
 examples, snippets etc. into the wiki.

Wikis are a cool thing, but I'm actually not sure they're the best
solution for each and everything.

Rony already mentioned some things the Wiki is lacking, there certainly
are more.

One example: Try to copy'n'paste a macro from e.g. [1] to your Basic
editor - you'll find there are a lot of line numbers, and too much line
breaks. This means you need to manually adjust the macro before you can
use it. Now what is more expensive - somebody investing a little
additional effort while contributing, or everybody investing additional
effort while using?
I'm sure all those problems in the Wiki can be solved, but IMO we should
actually do so before migrating to the Wiki.

Alternatively (and perhaps better and less expensive in terms of work to
be invested), we should think about lowering the hurdles for
contribution with the existing snippet creator. What about some
semi-automated way to contribute, to bypass the bottle neck of a single
moderator? What about integrating a submit functionality into the
snippet creator? What about integrating the snippet creator into the
next OOo release?


In other words: Are we really sure migration to the Wiki is the best
way? I'm uncertain about it.

Ciao
Frank

[1] http://wiki.services.openoffice.org/wiki/Category:Logging

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] API Base Calc integration

2007-06-21 Thread Frank Schönheit - Sun Microsystems Germa ny
Hello Ray,

 * wait for OO API to support Connection and XConnection conversion
 
   Waiting period is uncertain.
   Waiting time is not likely on my side.

I meawhile even think this might be impossible. If you connect to a
running OOo instance, which may run in another process, then you have
two JVMs involved. Transporting the java.sql.Connection object from the
one JVM to the other might be completely impossible, architecture-wise.

 * temporarily directly access the database content in *.odb
   by circumventing sdbc.XConnection
 ...
 * eliminate OO Base *.odb from the integration list
 ...
 * switch to MS platform (MS Access, C#, etc.)

No good ideas :)

 * any other paths?

Marc's idea with a HSQLDB server, which can be connected from both Base
and other applications, sounds like a good idea to me. You loose the
all-in-one-file then, of course, not sure how much this is a limitation
in your scenario. Also, it still means you have two separate connections
to the DB, while in your original sketch, you would have had one
connection only. Again, not sure how much this is a limitation for you.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



[api-dev] transporting non-UNO Java interfaces via the Java UNO bridge (was: [api-dev] Base data source)

2007-06-13 Thread Frank Schönheit - Sun Microsystems Germa ny
Hello Ray,

 java.sql.Connection   jj_cnct;
 com.sun.star.sdbc.XConnection oo_cnct;
 oo_cnct = ...; // require *.odb ZIP decompression
 jj_cnct = UnoRuntime.queryInterface( java.sql.Connection.class, oo_cnct
 );
 jj_cnct = oo_cnct.getJDBCconnection();
 // Would the polymorphism notion work as an alternative?
 // do_universal_JDBC_SQL_processing( jj_cnct, jdbc_cnct_1, jdbc_rdbms_2,
 ... );
 oo_cnct.close();   // require *.odb ZIP compression
 
 Is there a way to accomplish this conversion?


No there isn't at all.

The SDBC connections are C++ implementations which implement some
abstract UNO interfaces. Those interfaces are the only concepts which
have a counterpart in Java - if you have a css.sdbc.XConnection in Java,
this is merely a proxy (implementing a Java-equivalent of this
interface) to the real implementation on the C++ side. Thus, you
cannot cast to, or otherwise obtain, the java.sql.Connection, since this
interface is completely unknown to the bridge between your Java UNO
interfaces and the C++ UNO implementations.

At least this is my understanding. There might be ways (I changed the
summary to catch the attention of people with more knowledge about
Java/UNO), but I strongly suppose they would require explicit coding on
OOo side before they work - at least in the Base part, perhaps also in
the bridges.

Also, we would need to think about which leaks we would open with such
an approach. Currently, the JDBC connection is wrapped into its SDBC
counterparts, and there might be scenarios where modifying the former
without the latter noticing it might be destructive. I can't think of
such scenarios at the moment, but this would need closer examination.

 Imagine telling colleagues to learn Base GUI for report generation.
 They much prefer spreadsheet environment for analysis and report.

For this, you might be delighted to hear that the Report designer, whose
development was announced recently, allows to generate reports as Open
Document Spreadsheet :)

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Base data source

2007-06-11 Thread Frank Schönheit - Sun Microsystems Germa ny
Hello Ray,

 Is it possible in Java API to load existing *.odb files (or other types
 of databases) without defining data sources?  Pointer to example code is
 appreciated.  Thanks.

This is possible with the usual XComponentLoader.loadComponentFromURL
call, issued at the css.frame.Desktop object. I don't have any sample
code at hand, but I'm pretty sure you'll find a lot if you search the
net for it.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] BASE text-importfilter

2007-05-03 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Fernand,

 Needs some information about how the columns from a text-database are 
 defined when linking to a csv file
 
 until OO 1.  the text-importfilter  whas looking at row 2   and  gives 
 evry column a format  coresponding to the  caharacters where been found 
 in the csv file
 
  becames  text
0.00becames decimale with 2 digits after the comma.
00/00/  becames a date  etc..
 
 with 002.0  this behaviour is changed and all colums endup as text
 
 is this a bug our is their a other way to define  a format for a column ?

There was no (intentional) change in this area which I know of, so it
sounds like a bug. Mind submitting an issue with a sample CSV attached?

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] AWT Table in OpenOffice.org

2007-05-03 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Cedric,

 I'ld like to create a table to present some data in an OpenOffice.org
 dialog. I'ld like to know which service(s) should be used to create a
 table like the one in the Options  Fonts page.

There is no AWT table control available (yet), sorry. I suppose the only
chance is to add a lot of single controls in a table-like layout, and
manage them (including scrolling and the like) manually. Not really
convincing, admittedly.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Remove control from Dlg with code ?

2007-04-12 Thread Frank Schönheit - Sun Microsystems Germa ny
Hello Cor,

i supose you have to dispose first te object  ???
ocontrl.dispose
oDocDlg.removeControl(oContrl)
 
 But this does work.

That's somewhat weird, as manual disposal should never be necessary.

Your original code was correct - removing the control model from the
dialog model should automatically also remove the control from the
dialog. If this isn't the case, please submit an issue. Thanks.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] How to remove a shape from a Draw Page

2007-04-04 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Andrew,

not having an answer to your question, but ...

 Assume a draw document with a single shape selected.
 I want to delete the single shape.
 The code shown below obtains a reference to the selected shape from the 
 current controller (because it is selected).
 
 So, if I have a reference to a shape that is inserted into a draw page, 
 how can I delete it?
 I tried oShape.Dispose(), which crashed OOo.
 I tried oShape.getParent().Remove(oShape), which crashed OOo.

... for both of the crashes I would like to see issues in IssueZilla, if
possible :)

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] How to remove a shape from a Draw Page

2007-04-04 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Andrew,

 No Problem. I will enter an issue for both.
 
 http://www.openoffice.org/issues/show_bug.cgi?id=76084

Thanks.

 I will also assume that this is how I should remove a graphic.

I'd say yes ...

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



[api-dev] extension's max supported OOo version (was: [api-dev] external application getting OOo version number)

2007-03-22 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Stephan,

 There is only a min version, see 
 http://udk.openoffice.org/servlets/ReadMsg?list=featuresmsgNo=40. 
 The rationale for not having a max version is that OOo's UNO interface 
 should generally be backward compatible.

which implies that UNO extensions can/should not use unpublished API,
right? Isn't this is somewhat too strong restriction?

Also, the restriction for our configuration isn't as strong as for UNO
API, so if an extension expects a certain configuration to work with,
and this changes in a future major update of OOo, then the extension
will break, too.

I suppose one can think of more things which contribute to an
extension's required environment, but are not guaranteed to be stable
over major OOo upgrades.

So: Shouldn't we introduce a max version?

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] ImageURL in a UnoControlImageControlModel

2007-03-19 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Fernand,

 Did you find the respective property, or was this property really
 not-NULL? I.e., is the object returned from getGraphFromStream not-NULL?
 If so, does XRay also tell you a valid Type property value of the
 Graphic object? If so, 
 Xray gives me exactly the same property value's !!

Hmm, I'm clueless then. Perhaps submitting a document to reproduce this
in IssueZilla is a good idea now.

 One more question: why can i paint  in dialogwindow and not the 
 ImageControlModel window ?

What does I cannot mean here, in which place does in break? In
general, it should be possible in both the dialog and the image control
(*not* the image control model!).

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] ImageURL in a UnoControlImageControlModel

2007-03-15 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Fernand,

 Need to show Embeded Images in a UnoControlImageControlModel.
 
 Giving a normal URL  to the ImageURL property works  fine,  but 
 Internal URL's (from embedded Images) do not works
 
 Is there a workaround ?
 
 Can a internal URL been transformed to a normal URL ?
 
  Tryed to use the Graphic-object of the Imagecontrol, but no luck, btw 
 wathts te purpouse of the Graphic-propterty ?

The ImageURL property can only work with external images (and, IIRC,
with some weird URLs to images embedded into resource files).

The Graphic property is more powerful in that you can give *any* graphic
object, as long as you have an XGraphic interface for it, to the
control. For instance, there's a GraphicProvider service which is able
to load graphics from the images.zip file in your installation.

I am not sure, though, whether Writer has a possibility to obtain
XGraphics from embedded images.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Problem: Changing the work path setting affects only the Save dialog

2007-03-05 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Reinhold,

 Doing so, i noticed that the new path is only set in the Save dialog but not 
 in the Open dialog. This seems a little bit strange to me.
 Even changing the path manually in the Tools-Options-OpenOffice.org-Paths tab 
 page has the same effect.

This is probably issue 4019. Point here is that the file-open dialog
tries to be smart, and remembers the directory where you last left it.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Constants com.sun.star.sdb.application.DatabaseObject

2007-02-26 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Bernard,

 I have developed a small application which scans idl files of the SDK to
 collect all enums and constants. All worked well for years until I ran
 my application on SDK 2.1 and it bugged on two constants:
 com.sun.star.sdb.application.DatabaseObject.TABLE
 com.sun.star.sdb.application.DatabaseObject.QUERY
 
 Looking at the idl, I see that they are defined as equal to another
 constant in another IDL, respectively :
   com::sun::star::sdb::CommandType::TABLE
   com::sun::star::sdb::CommandType::QUERY

I did this intentionally to indicate that the DatabaseObject is, in some
sense, a superset of CommandType.

 This is the first (and only) case I found in the idl files.
 I think it is not wise to create a dependency to another IDL, since the
 other constants FORM and REPORT have fixed values (respectively 2 and
 3), which means that the designer knows very well what are the values
 for TABLE and QUERY.
 Also, I understood that for compatibility reasons an API constant should
 not change its value on successive versions of OpenOffice.org.

With the same argueing, I'd say that defining DatabaseObjects as
CommandTypes is safe, too - they're guaranteed to not change as well.

 So, why not simply define these constants as value 0 and 1 ? And
 possibly add a comment in the IDL description.

Personally, I find comments too ... hidden sometimes. Comments in IDL
are very tolerating, you can write there whatever you want, and you can
change it anytime without anybody noticing. So I always prefer making
things as explicit as possible. That's my personal point of view only,
of course.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Constants com.sun.star.sdb.application.DatabaseObject

2007-02-26 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Bernard,

 My program scans all Idl files to create a Delphi unit containing all 
 constants (adapting constant names and declarations to Delphi syntax). 
 My program did not expect these constructs in the Idl file:
 
 const long TABLE = com::sun::star::sdb::CommandType::TABLE;
 const long QUERY = com::sun::star::sdb::CommandType::QUERY;
 
 Of course it is possible (but more complex) to recognize a constant from 
 another Idl, but what would you do if it refers to an Idl file that you 
 have not yet scanned ? Forward reference may become a real problem if 
 this kind of dependency is widely used.

There should be an include directive in the file, pointing to
CommandType.idl. So your tool probably should scan included files, too.
This shouldn't be a problem, since cyclic references should not happen
(else the regular IDL compiler would already complain).

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Databasesource Connections Problems

2007-02-14 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Fernand,

 - When after redoing my coding homework , a connection is still left 
 open  due  to a usermachine who chrashes how can i close all 
 conections ? instead of sending a mail to the  users and asking to 
 restart OO :-)

In this case, we need to talk about the definition of locked :)

If there is a .lck file besides the .odb file, this doesn't mean the
database is locked in a file system sense. Instead, it just means that
either somebody has an open connection to this database, or the last
instance which had an open connection did not shutdown properly.

HSQLDB, the engine used in Base, is able to cope with the latter case
automatically. That is, upon next connection, it will recognize that the
previous connection did not properly shut down, and recover the database.

However, I now seem to understand that you're trying to access a shared
.odb file, with embedded HSQLDB, simultaneously with multiple users. Is
this correct? If so, then your locked probably means that the second
user cannot connect to the .odb file at all. This is since Base with
embedded HSQL currently simply does not support this scenario at all.
Such databases are strictly single-user at the moment.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Databasesource Connections Problems

2007-02-14 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Fernand,

 Oh... that explains a lot, we uses an embedded HSQLDB with 100 users but 
 only for Reading some information and that works fine. I stupidly went a 

not really stupidly, that's something fine to expect ... unfortunately
it's just not yet supported :-\

 step to far and tryed to Store some information. Puting the Tables on 
 our MSQL will sove the problem

Yes, that'd be a better alternative for multi-user write access, for the
moment.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Base   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Databasesource Connections Problems

2007-02-13 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Fernand,

 - what is the differens between getConnection and 
 getIsolatedConnection  (who seams to funcytion better)

getIsolatedConnection retrieves a, well, isolated connection :)
With the normal getConnection, you actually get a proxy object. All
proxys obtained via this method share the same physical connection. As a
consequence, operations done via one proxy might lead to visible results
in the other.

Using isolated connections is more expensive (since more physical
connections are opened), but sometimes desired.

 - how do i can control the open or used connections to a datasource, 
 ,we found  hasConnections  but no way to uses this service

Sadly, there's currently no way to control those.
(XDatabaseAccess::hasConnections is specified, but actually not
implemented anywhere.)

 - why and when turns a conncetion into read-only

Normally, a read-only connection indicates that you tried to establish a
connection where another connection already has exclusive access to the
database. Isolated connections are a good candidate here: If you open
two isolated connections, chances are good that the second of them is
read-only.

Also, read-only-ness often happens when you open a connection, somehow
forget to close it, and later open another connection (whether isolated
or not, there are various side conditions). So, I suggest you check your
code whether you have a connection leak somewhere.

Ciao
Frank

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



Re: [api-dev] How update options/configuration without restart

2006-12-14 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Andrew,

 Use Tools  Options  OpenOffice.org calc  General  Press enter to 
 move selection, and set a new value. Close the dialog, and the change 
 is immediate.
 
 If I use the API, however, I must restart OOo before the change is seen. 
 For example,

That's because OOo internally uses a number of caches for often-used
configuration settings (originally for performance reasons, not sure if
this still holds). Unfortunately, those caches do not notify changes of
a third party. Vote and lobby for
http://www.openoffice.org/issues/show_bug.cgi?id=51626 to change this :)

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Creating Form Controls in ooimpress

2006-12-05 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Zeeshan,

 I actually read at http://www.oooforum.org/forum/viewtopic.phtml?p=32361#32361
   that Alas, Draw on Linux does not work because Draw's Controller does not
 implement the getControl() method. I'm going to file an enhancement request
 for this.

As far as I know, this hasn't been implemented, yet.

 I want to know if this request has been entertained. If not please guide me
 how can I get the functionality similar to being notified in the
 actionPerformed when a button is pressed in ooimpress on a slide.

I don't know other ways how to obtain the control, sorry, but perhaps
others know more ...

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] check visible state of a control

2006-11-28 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Cor,

I would like to
encourage you to submit an issue for this missing API :)
 
 I thought about that. But I'm a little afraid that one issue is so 
 isolated, only one fragment, since there probably will be quite some 
 missing methods for various controls...

Well, yes, might be. I just thought visibility in general is badly
covered, for instance, models are missing a visibility property, so it
could have justified a dedicated issue.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] check visible state of a control

2006-11-28 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Berend,

 One problem I ran into regarding setVisible() is that the visibility 
 of an UnoControl is not set persistently when you switch the steps of 
 the dialog.
 
 In the following code
 
   oControl = oDialog.getControl(TextField1)
   oControl.setVisible(false)
   oDialog.Model.Step = 1
   oDialog.Model.Step = 0  
   oDialog.execute()
 
 the control TextField1 will not be invisible, because the steps of the 
   dialog have been set back and forth afterwards.

which is one reason why I think the visibility problem deserves
dedicated attention. Tampering with the visibility of the control is a
hack, at best (which is fine, as long as there is no other solution).
But the fact that this control-visibility is also used by other
components - e.g. by a dialog, which implements its step-handling by
adjusting visibilities - strongly supports that we need a better
solution. Which would be a model-property Visible (as you have a model
property Enabled, instead of calling setEnable at the control).

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Problems with User text fields

2006-11-16 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Andreas,

 The basic property ThisComponent is'nt a realy stable feature.
 It referrs to the current document ... and that can be the problem 
 here. Do you realy know which of your documents is the current one at 
 the time you call ThisComponent.getTextFields() ?
 
 In general ThisComponent should be used only in the following case:
 (my personal opinion !)
 
 a) You have one document containing macros.
 b) You register these macros to the event OnLoad, so they are started
 automaticly.
 c) Then ThisComponent referrs to THESE document.
 d) You dont open any other document or do any action, which can set 
 ThisComponent to other currently open documents. E.g. a 
 Frame.ControllerWindow.ToFront(true) (which set the focus to this 
 window) can make trouble. Because the ThisComponent will be changed to 
 the document owned by this frame .-)

As far as I know, in case of macros contained in a document,
ThisComponent *always* refers to the document itself. Only if your macro
is part of some global (application-wide) Basic library, then
ThisComponent follows the current document.

This would mean that your above description is way too strict.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Button on ooimpress slide

2006-11-01 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Tabish,

 I've a code which create my own customized slide in ooimpress. What I want
 is that a button be placed on every slide and I need to handle the click
 event of the button. On every click of the button I need to call my own
 function.

You need to register as com.sun.star.awt.XActionListener at the button
*control* (not the button model). How this is done depends on which
language you use.

 Also I read in the developer guide about Protocol Handler and Jobs, are they
 related to such scenario as well

Not at all.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Calc: Switch DesignMode On/Off

2006-10-16 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Mathias,

Why is this strange? It's more on the level of, say, the background
color, than, say, the zoom level: It's an aspect of the document which
its designer describes how to look like.
 
 I consider it to be strange as it isn't relevant if you access the
 document by its API, it is something you only need if you view the
 document in an editor.

Well, if the document is in design mode, controls will behave different
- even at API level. For instance, there will be no connection with a
database.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Calc: Switch DesignMode On/Off

2006-10-11 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Mathias,

 I'm a little bit unclear about an API for the design mode. First IMHO
 this isn't an API that you would expect to have at the model. It looks
 like something UI related. Maybe we can see this as a view setting?
 Where is it stored in the file format?

It's definitely a view setting, so it would probably belong to the
controller.

It's not persistent at all. What's persistent is the setting which is
reflected in the ApplyFormDesignMode property of the model: Whether or
not the design mode should be initially on or off when the document has
been loaded.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Calc: Switch DesignMode On/Off

2006-10-10 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Mathias,

 Switching off the design mode with the dispatch API is done in the
 following way: (quote signs to avoid line breaks)
 
sub designmodeoff

  document   = ThisComponent.CurrentController.Frame
  dispatcher = createUnoService(com.sun.star.frame.DispatchHelper)
  dim args(0) as new com.sun.star.beans.PropertyValue
  args(0).Name = SwitchControlDesignMode
  args(0).Value = false
  dispatcher.executeDispatch(document, .uno:SwitchControlDesignMode, , 0, 
 args1())

end sub
 
 For switching it on you must change one line:
 
   args(0).Value = true

Didn't know we have *that* cool helpers meanwhile, thanks for pointing out!

Ciao
Frank


-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



[api-dev] public vs. published (was: [api-dev] Unpublished UNO API)

2006-08-18 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Stephan,

 See http://www.martinfowler.com/ieeeSoftware/published.pdf for the 
 source of that term.

Interesting reading, thanks for the pointer.

However, I think Fowler uses the term published in a different meaning
than we do. While he doesn't clearly define the terms and their
difference, the sentence closest to a definition for published
(public should be unmbiguous for anyone knowing Java or C++ or ...) is:

cite
However, things rapidly change if I put that software out on the Web as
a component, and other people, whom I don't know, start building
applications on top of it.
/cite

That is, he considers an interface published as soon as he loses control
over (read: comprehensive knowledge about) who / which component uses
it. Makes sense, IMO.

But, with this definition, all our interfaces are published, even those
not tagged with the published keyword. Thus I continue to think that
our usage of published is unfortunate.

 (Frank, I always implicitly assumed you do like 
 what Fowler writes, as you two look so ... similar.)  :)

ROTFL :)

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Problem to create a predefined Query

2006-06-08 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Stefan,

 I want to add a new QueryDefinition to the DefenitionContainer. It's an
 example from the OOo Developer Guide (12.2.2 DataSources - Adding and
 Editing Predefined Queries)
 
 The Method createQuerydefinition() which I'm using is one-to-one from
 the CodeSamples.java (see code below)
 
 The Problem is that the last-but-one command returns null (= the xStore
 variable is null).

Those last two lines look like nonsense, the query container is not
storable. At the very moment you do an insertByName, the query is part
of the query container.
However, for persistence of your change, you need to store the *database
document*, which in fact has the XStorable interface (I suppose this is
where the XStorable in the example wrongly came from). For this, query
the data source for XDocumentDataSource, obtain the document, and ask it
for its XStorable interface.

Could you please write an issue for this bug in the DevGuide and assign
it to me ([EMAIL PROTECTED])? Thanks.

 I have read in the api reference that XSingleServiceFactory is
 deprecated and it is recommended to use the XSingleComponentFactory
 instead.

Deprecation doesn't mean all implementations using it are already
migrated. (I'm not even sure the deprecation is meant for the particular
way how we use the interface here, but that might be another story.) It
just means that you are encouraged to use the new interface if it's
present - but here it isn't. So, just stick with the
XSingleServiceFactory, and everything should be fine :)

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] use of css.awt.UnoControlScrollBarModel

2006-05-15 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Paolo,

 Before run it create an empty dialog and place on it an horizontal scrollbar 
 with sufficient dimensions (f.e. 100x100).
 
 As you will see in the code I've put a control inside the scrollbar window.

Perhaps the documentation is misleading here. What the property really
controls is how often the XAdjustmentListener which you can register at
the UnoControlScrollBar is called. The code to handle those events -
e.g. by scrolling an associated window - is still up to you.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] use of css.awt.UnoControlScrollBarModel

2006-05-15 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Laurent,

controls is how often the XAdjustmentListener which you can register at
the UnoControlScrollBar is called. The code to handle those events -
e.g. by scrolling an associated window - is still up to you.
 
 would it be difficult to make this generic ?

Depends on a more precise definition of this aka scroll the
associated window :)

If your to-be-scrolled window contained sub controls, you'd probably
only need to move those - which perhaps could be done in a generic way.
If the to-be-scrolled window also contained own content (say, and
image), I doubt there's currently an UNO API for this. On the other
hand, in such a case you'd probably have own painting code, anyway -
this would need to care for the current scroll pos then, not much
possibility for generic code then, I suppose.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] XNameContainer.insertByName() causes sheet to become 'dirty'

2006-03-29 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Tim,

 I can understand that inserting this object changes the worksheet, but is
 there a way to prevent it from marking the workbook as 'dirty' (so users
 don't get prompted to save the workbook merely because of this change?)

I suppose you're looking for XModifiable.setModified( false ) (at the
document).

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Impossible to close a Base document

2006-03-15 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Mathias,

 I think that this is an API misuse. A view never should veto closing the
 document and in fact all other documents in OOo will not behave this
 way. It doesn't matter how the view was created.

After reading the DevGuide chapter about closing documents (to which
Bernard pointed me), I share your opinion :)

 What you describe can be done by the model itself in its close()
 implementation.

That's what I'll while fixing the respective issue (for 2.0.3).

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Impossible to close a Base document

2006-03-14 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Bernard,

 ...
 dbDoc.close(True)
 
 The document usine.odb shows up, but the close instruction receives an 
 exception.

what kind of exception?

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Impossible to close a Base document

2006-03-14 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Laurent,

 com.sun.star.util.CloseVetoException

That's okay :), and it was a bug that this exception wasn't thrown
before. (Hmm. Thinking about it, do the other document types behave the
same way?)

The idea is that as long as a view to the document exists, you cannot
close the document - the view will veto is. This is because there's no
possibility to decide that the view was created (with your
'loadComponentFromURL( ..., _blank, ... )') by the same script which
is now trying to close the document - it could also be a view created by
the user via File|Open.

So, if you want to close the view (I suppose this is what you really
want: get rid of the window displaying the document), then obtain the
CurrentController of the model, and close the frame this controller
lives in.

If this was the last frame, the document should be closed automatically
(if not, it's a bug). If there are more frames, you can iterate through
them (CurrentController will point to the controller in the next frame,
after you closed the previous one). However, this is rather unlikely for
database documents, which to not have the multiple views per document
(Window|New window) feature, at least not in the usual sense.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Impossible to close a Base document

2006-03-14 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Laurent,

 dbdoc.currentController.Frame.close(false)

any reason you used false here? This means that if the close fails,
you're still responsible for it ...

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Impossible to close a Base document

2006-03-14 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Laurent,

 hum, the method of the object that created it is called
 so there is a way to know that we want to close the views dependanding of it
 
 are you saying taht views are not attached to their creators ?

They're bound to the model, but that's not necessarily the same as
creator.

For instance, you could load a model without any view, by retrieving the
DataSource at the DatabaseContext (getByName( URL ) ), and asking this
DataSource for its Document (.getDatabaseDocument). In this case, you'd
have a model, but no view at all.

Now if the user does a File|Open with the very same file you specified
in the URL, the the document is not loaded, again ('cause it already
*is*), but only a new view is created. Also, if you (or another script)
does a loadComponentFromURL with the URL in question, the document is
reused, and only a new view for it is created.

So, while the document knows that there exists a view for it, it cannot
know who's the owner of this view.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Impossible to close a Base document

2006-03-14 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Laurent,

 Would it be possible to identify controllers that are loaded by 
 different ways ?

Hmm, not that I know. Basically, a controller is (almost) always loaded
by a loadComponentFromURL, but nobody knows who called this method.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Impossible to close a Base document

2006-03-14 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Bernard,

 No. If I load a text document for example, no problem to close it.
 ...

The idea is that as long as a view to the document exists, you cannot
close the document - the view will veto is. 
 
 This is not the case for documents other than odb.

Hmm. Do you mind submitting an issue for this (and assigning it to me)?
Not sure how it could be solved, since database documents are a little
bit different (as you can obtain them without loading, via the
  DatabaseContext.getByName( url ).getDatabaseDocument()
way, as described in another mail). But we should try to be consistent here.

Thanks  Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Impossible to close a Base document

2006-03-14 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Laurent,

 in fact, what about the datasource that seems to load the file without 
 displaying it as frank said
 
 We then end with 2 loads of the document
 one for the datasource ( maSource.DatabaseDocument)
 one for the loadComponentFromURL

Effectively, it's loaded once only, but you have two clients of it: the
script which (implicitly) loaded it via maSource.DatabaseDocument, and
the user (or script) which (explicitly) loaded it.

That's why it's hard to tell who has the ownership of the document. If
it were the frame (opened by the user), and the frame would close it,
then the script would break. If it were the script, and the script would
close the doc, then the frame would silently be closed, too, even if the
user doesn't want this.

Thus, the idea was that any client obtaining a database document must
register as CloseVetoListener. Frames (resp. the Controller for a DBDoc)
do this automatically, speaking strictly, your script would need to do
this, too, to be on the safe side against closes by foreign parties.

However, this interpretation might be too strict (and the scenario too
esoteric). Should probably discuss this with the people who implemented
the closing mechanism for the other document types, they must have had
reasons to do it the way they did :)

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Impossible to close a Base document

2006-03-14 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Bernard,

 Issue filed : http://www.openoffice.org/issues/show_bug.cgi?id=63162

Thanks.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] C++ and Exeptions: No message-text?!

2006-02-22 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Stephan,

 (Even if, unfortunately, no 
 message is set in a given case, you might get more information by 
 inspecting what subclass of com::sun::star::uno::Exception is actually 
 thrown, by either using C++ RTTI

Since I tried this myself some time ago: It doesn't work. No matter what
exception is caught, C++ RTTI always tells it's an css.uno.Exception. As
I've learned, this is because our Exception hierarchy is not
polymorphic, thus all those classes aren't different from RTTI's
perspective.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] C++ and Exeptions: No message-text?!

2006-02-22 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Martin,

 So could somebody confirm this behaviour before I raise the issue?

Actually, I used getCaughtException in quite some places, and it worked
fine for me. So, in the generic form as you describe it, I cannot
reproduce the problem. Probably really something about your
compiler/VisualStudio versions.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Optional Parameters in Starbasic function call

2006-01-05 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Andrew,

 But Bernard has a very valid point also. ...

I didn't question this, but wrote

I can't talk about the concrete issue here, but let me say a general
word about those other 74 ...

Honestly, I simple didn't follow the whole thread, only Bernard's last
mail sprung to my attention because of this statement about
resolved-lated issue.

I absolutely believe that there are resolved-later issues which better
go into some 2.0.x, but I didn't even attempt to judge this concrete case :)

 If I might make a suggestion, when weighing the risk/benefit factors -
 length of time that the issue has been open be taken into account.
 In a situation like this if a fix is deemed to risky for release - at
 least try and see if a reasonable target can be set. The ambiguity of
 OOLater for an 18 month fix is a bit much.

My personal opinion here (again without having judged the concrete case)
is that if an issue is annoying people for that long time, and this is
shown by votes, constant complaints, whatever, it should get some points
on the pro-include-in-2.0.x side - it might be considered a customer
escalation then :).

 Final point, they are called maintanence releases because they
 incorporate fixes to known defects.

Well, but that definition is to broad ... The number of known defects
(just query IZ) is much higher than we will fixed for even OOo Much Later.

Thanks  Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Optional Parameters in Starbasic function call

2006-01-05 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Andrew,


 I would think that if the defect merited the allocation of the developrs
 time to implement the fix it merits the time to be tested to the extent
 needed for release. The fact will remain that only the development
 staff involved can judge what that effort really is.
 
 Look at it this way, was it really the best allocation of the developers
 time - a very tight resource, I hae no doubt, if the resoures to do what
 is necessary to get the fruits of their effort out to the users is not
 also made available?

I could imagine various reason why a bug is fixed though it's targeted
for Later, amongst them
- it was fun, and I still needed my weekly fun on Friday :)
- while investigating how serious this issue is, I immediately found a
  fix, and it would have been waste to not check it in
- I stumbled upon this during completely unrelated work, and fixed it
  by passing

All of this may justify that the fix is still *made*, but not yet that
it's include in 2.0.x.

 But - Speaking of useful allocation of time, - enough of this subject
 for me perhaps. Just slip on into
 Issuzilla and target it for 2.0.3..no one will notice that you did it...
 ;-)

:)
I doubt that. You don't imagine how strict 2.0.x targets can be handled
by some people ;)

(not to mention that I still didn't look at the issue which caused all
this, still just dicussing the more general aspects)

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] Optional Parameters in Starbasic function call

2006-01-04 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Bernard,

 I can't understand this. If it's fixed it should be integrated ASAP, why 
 keep it OOo Later ? It was fixed in August 2005, and could have been 
 integrated in 2.0.1.
 I queried IssueZilla for : RESOLVED and FIXED and OOo Later and Creation 
 date between 2005-01-01 and now. Result : 75 issues ! What are you 
 developers waiting for ? More duplicate reports ? More disappointed users ?

I can't talk about the concrete issue here, but let me say a general
word about those other 74 ...
Every bug fix has the potential of a regression. While we all try our
best to avoid this, reality shows that a certain percentage of bug fixes
causes a new bug. Because of this, there are restrictions on what kind
(and how many) fixes we put into the maintainance releases such as
2.0.x. Those releases are expected to improve the product, not to
decrease its quality. We simply do not want to take the risk associated
with all the bug fixes we could have (and potentially, we *could* have
much more than those 75, if we wanted to), at least not for 2.0.x.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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



Re: [api-dev] registering script events

2006-01-03 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Marc,

 The IDL reference tells me about css.script.registerScriptEvent:
 ...
 registers one event for an object identified by its index. 
 
 If any object is attached under this index, then this event is
 attached automatically. 
 ...
 
 I do not understand what object is in this context. Is it the main form
 (Standard) or is it the control aka. my button?

it's your button. More precise, it's the index of the button within its
containing form. So,
  oForm.registerScriptEvent(0, oEvents(0))
registers events for the first child (because of the first 0) of oForm
- which may or may not be your button.

Normally, you'd expect some getIndexInParent (or so) method at your
objects (buttons), but there is none (IIRC, there is some RFE requesting
this).
So, the algorithm would normally be (pidgin-Basic only)
  Function getIndexInParent( oContainer, oObject )
For ( i = 0 to oContainer.getCount() )
  If ( oContainer.getByIndex( i ) = oObject ) Then
getIndexInParent = i
Exit Function
  End If
Next i
getIndexInParent = -1
  End Function

However, I am not sure how to test equality of UNO objects in Basic, I'd
suppose that = might not really work here. Perhaps there's a dedicated
function for this.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


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



Re: [api-dev] Xforms and API

2005-10-17 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Laurent,

 is the XForm api available through UNO ?

Sure.

 is it possible to script some formulars for example creating dynamically 
 one and submit it ?

Just throwing in some pointers:
- Instead of creating an empty text document, you need to create a text
  document with a special parameter (which I don't remember right now
  :-\) to create an XML form document
- XForm documents are usual form documents, so building them on the fly
  should be difficult, if you ever built database forms (IIRC, you did
  ...)
- To access the logical XForms in a XML form document,
  css.xforms.XFormsSupplier is your entry point - it's supported by your
  newly created document
- Conceptually, binding form controls to XForms nodes is done via
  abstract css.form.binding.ValueBinding mechanisms. The whole
  css.form.binding namespace describes the binding concept.
  css.xforms.Binding, in turn, describes a XForms-related ValueBinding
  which can be associated with a form control.
  (unrelated side note: Another implementation of the ValueBinding
  service is used to bind form controls to spreadsheet cells)
- Additionally, css.form.validation describes concepts for validating
  form control content on-the-fly, which is also used by
  css.xforms.Binding.

The IDL reference for OOo 2.0 does not seem to be online, yet - at least
not at
http://api.openoffice.org/docs/common/ref/com/sun/star/module-ix.html.
Not sure if there's another place, else, you might need to read IDL
files (ugly) or generate your own documentation from the source tree
(autodoc is the key here, see tools.openoffice.org).

Ciao
Frank
-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


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



Re: [api-dev] Xforms and API

2005-10-17 Thread Frank Schönheit - Sun Microsystems Germa ny
 - Instead of creating an empty text document, you need to create a text
   document with a special parameter (which I don't remember right now
   :-\) to create an XML form document

private:factory/swriter?slot=21053

Urghs.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


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



Re: [api-dev] multiple-inheritance interafces and method name clashes

2005-10-13 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Darragh,

 I am slightly disturbed by this, 2 interfaces with the same function names.
 Has any consideration being given to language-bindings that do not use
 the query-interface mechanism ? I.e pyuno where all interfaces for a
 service are returned ? How would pyuno or language_bindings that do not
 use the query-interface mechanism resolve which method to use?

There is the same problem in Basic, which long ago arose with
XTabController::getModel and XFormController::getModel, which also
clashed [1]. AFAIK, in the Basic-UNO-binding, this has been resolved by
adding an extra syntactic element to specify which interface the
to-be-called method belongs to (which of course usually is not needed by
the scripter).

I fear that this is finally the only way: Extend the UNO binding for the
language in question. Even if we would guarantee that there are no teo
methods with the same name in all UNO interfaces in the OOo source tree
(which would be difficult enough to maintain), there could be external
components with new types which still bear name clashes.

So, in practice, we can only *recommend* to not create name clashes when
defining interfaces, but we cannot technically prevent it. Which means
your language's binding needs to be prepared for it.

Ciao
Frank

[1] they even clashed in the implementation, since their signature
differs by return type only.

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


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



Re: [api-dev] Wrinting text to Database, Best practices ?

2005-09-27 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Fernand,

 Must save some pieces of text (mostly paragraphs) from in a
 OOwriterDocument into a Database.
 I, as non pro coder, looked at different sources found different
 solutions but have still some questions about the best way to do save to
 a database
 
 - What type of datasourse is the most convieniend , DB, OObase, MySQL ?

Uhm - hard to answer without knowing your requirements. I'll ignore this
for the moment (hoping for others to answer :), and pick your second
question.

 - Whats the best way to save a new record: a SQL statement like

oRowSet = createUnoService( com.sun.star.sdb.RowSet )
oRowSet.DataSourceName = testDB
oRowSet.CommandType = com.sun.star.sdb.CommandType.TABLE
oRowSet.Command = table
oRowSet.execute

oColumn = oRowSet.Columns( colname )

oRowSet.moveToInsertRow()
oColumn.updateBinaryStream( ... )
oRowSet.insertRow()

(out of my head, might not work out of the box, but give you an idea :)

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


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



Re: [api-dev] 2.0 and changing JAVA-Settings

2005-08-29 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Stephan,

in case of jdbc-drivers you could try to pack your jdbc-driver in a zip 
file and then add it calling unopkg add yourzipfile ... unopkg might 
complain that the zip doesn't contain a uno-package, but as far as I 
know will copy the jar-file and adjust the classpath, so that the driver 
should work.
 
 On CWS sb36, targeting OOo Later, I changed the loading of Java UNO 
 components to no longer use the global Java classpath, so that the above 
 hack will no longer work there.  (IIRC, the way new database drivers are 
 integrated into OOo will change then, too; Ocke or Frank on 
 dev@dba.openoffice.org should know more.)

Hmm. What we will do in DBA is that instead of using the office-wide
classpath (Tools|Options|Java|Classpath), we will allow to have a
per-database classpath. However, users will still expect that the
Tools|Options classpath does work, too. (As they will expect that the
system's class path does work, which unfortunately isn't the case even
today.)

I don't know which changes exactly you plan, but will a UNO component
(e.g. database driver) loading a (arbitrary, non-UNO) Java class still
use the Tools|Options (or perhaps even the system's) classpath? This is
desirable since there might be multiple JDBC-based databases using the
same Java class, and of course user's don't want to enter the same
classpath again and again.

Also, even if what Stephan describes is a hack, it sounds like a
convenient way to deploy a Java class into a OOo installation. Shouldn't
we continue to offer this convenience, the one way or the other?

The more since programmatic manipulation of the office-wide classpath is
not possible, since no API (not even configuration API) exists for it.
This means that in order to deploy a Java class into a office
installation, users would be required to manually add this class to the
class path of all of it's clients (which as said could be multiple
databases), instead of simply announcing the class *once* to the office
installation as a whole.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


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



Re: [api-dev] 2.0 and changing JAVA-Settings

2005-08-29 Thread Frank Schönheit - Sun Microsystems Germa ny
Hi Stephan,

Also, even if what Stephan describes is a hack, it sounds like a
convenient way to deploy a Java class into a OOo installation. Shouldn't
we continue to offer this convenience, the one way or the other?
 
 Especially in the context of UNO components, yes, we will have to think 
 about how to handle the dependencies of a UNO component---dependencies 
 on other UNO components as well as dependencies on other kinds of 
 entities like dynamic libraries or JAR files.  Expect something for post 
 OOo 2.0 in this area...

/me sighs with relief.

Thanks  Ciao
Frank

-- 
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems  http://www.sun.com/staroffice -
- OpenOffice.org Database   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


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