[api-dev] Java Snippet Suggestion: how to convert documents - please review

2006-03-02 Thread Tobias Krais
Hi ML, I want to add another code snippet. This snippet bootstraps an OpenOffice and converts a specified document to a specified format. Here the code. If noone has suggestions, I will post it as a snippet next week. Greetings, Tobias -%- package de.twc.oocom.snippets; import

[api-dev] [code snippet] Open Document and Transient Remove Toolbar entries

2006-03-02 Thread Tobias Krais
Hi API-ML, due to your help with the menubar, I used the same for toolbars. Greetings, Tobias ?xml version=1.0? !-- $RCSfile: $ last change: $Revision: $ $Author: $ $Date: $ (c)2003 by the copyright holders listed with the author-tags. If no explicit copyright holder is mentioned with a certain

Re: [api-dev] OOoBean correct termination

2006-03-02 Thread Joachim Lingner
Hi, there is a bug concerning the termination of the bean (60473). What you could to is to modify the OOoBean code yourself. You could for example add a function to OOoBean that removes the event listener (private class EventListener in com/sun/star/comp/beans/OOoBean.java). after calling this

Re: [api-dev] FollowStyle Next Style

2006-03-02 Thread Jürgen Schmidt
Kent Gibson wrote: Does FollowStyle correspond to Next Style in the user interface? And there is an error in the documentation at: http://api.openoffice.org/docs/common/ref/com/sun/star/style/Style.html there is no way unless I am really whacked out that FollowStyle could be a boolean.

[api-dev] Selecting Printer always uses default Printer

2006-03-02 Thread Tobias Krais
Hello ML, I have one more question. I use following code for printing (I have it from the Dev-Guide): -%- XPrintable xPrintable = (XPrintable) UnoRuntime.queryInterface(XPrintable.class, xDoc); PropertyValue[] printerDesc = new PropertyValue[1];

Re: [api-dev] Java Snippet Suggestion: how to convert documents - please review

2006-03-02 Thread Andreas Schlüns
Hello Tobias, You shouldnt post a complete application as code snippet. It's better to show some parts of you approach only. E.g. loading a CSV file, exporting any file to PDF etcpp. See my further comments inline ... Hi ML, I want to add another code snippet. This snippet bootstraps an

[api-dev] How to set print to file

2006-03-02 Thread Alexandro Colorado
I got a macro which prints a document: dispatcher.executeDispatch(document, .uno:PrintDefault, , 0, Array()) However I was unable to find an interface for printing to a document, doing some research on the reference I found the FileName which is used in case of printing to a file but I

RE: [api-dev] Selecting Printer always uses default Printer

2006-03-02 Thread Martin Thoma
Hi Tobias, When I start OpenOffice and open the print dialog is shown. Default printer is KyoFS3800. Another printer is displayed, called FS1800. But: using the code above prints always on the default printer. Why? 2 suggestions: 1.) Could it be that FS1800 is not the right printer name?

Re: [api-dev] Selecting Printer always uses default Printer

2006-03-02 Thread Tom Schindl
Tobias Krais wrote: Hello ML, I have one more question. I use following code for printing (I have it from the Dev-Guide): -%- XPrintable xPrintable = (XPrintable) UnoRuntime.queryInterface(XPrintable.class, xDoc); PropertyValue[] printerDesc = new

Re: [api-dev] Java Snippet Suggestion: how to convert documents - please review

2006-03-02 Thread Stephan Bergmann
Andreas Schlüns wrote: [...] b) Construction of URL's isnt realy platform independend here. You should the JAVA classes File/URL/URI to create real URL's. But be aware of a bug inside these JAVA classes. They construct file URL's like file:/test/file.txt, which does not represent valid file

Re: [api-dev] How to close the quickstarter

2006-03-02 Thread Mathias Bauer
Didier Dorange-Pattoret wrote: Declare Function GetActiveWindow Lib quot;user32quot; () As Long Declare Sub ExitProcess Lib quot;kernel32quot; (ByVal uExitCode As Long) Sub Essai rem getting the active windowapos;s handle. hWnd = GetActiveWindow() rem closing all active windows

Re: [api-dev] How to set print to file

2006-03-02 Thread Mathias Bauer
Alexandro Colorado wrote: I got a macro which prints a document: dispatcher.executeDispatch(document, .uno:PrintDefault, , 0, Array()) However I was unable to find an interface for printing to a document, doing some research on the reference I found the FileName which is used in case