Re: [api-dev] XComponentLoader.ComponentFromURL throws IllegalArgumentException: URL seems to be an unsupported one.

2009-01-13 Thread Andreas Schlüns
Hi Albert, I've debugged your problem and found out (as I've already mentioned) that some detection services dont work correctly in case pure input stream is provided only .-) An issue was filed by me so you can track if and when it will be fixed.

Re: [api-dev] XComponentLoader.ComponentFromURL throws IllegalArgumentException: URL seems to be an unsupported one.

2009-01-09 Thread Andreas Schlüns
Hi Albert, Why do you load the file using private:stream instead of using the original file:///-URL ? Let OOo do that stream stuff internaly. Loading via stream is supported but detection of pure streams without any hint about the URL or the mime type will fail very often ... especialy if

Re: [api-dev] Re: Intercepting commands .uno.xxx...

2008-11-05 Thread Andreas Schlüns
Hi Paolo, Hi, Andreas Schlüns ha scritto: Hi Carlos, (I'm using Automation Bridge to communicate with OOo) After reading again all the stuff and trying to digest the java sample, this is what I conluded: I need to implement my own DispatchProvider as a COM object an pass

Re: [api-dev] Where to register MouseClickHandler in an Add-On?

2008-11-04 Thread Andreas Schlüns
created using the OO plugin with NetBeans, which only implements the XAsyncJob interface. And I copied the related information from the example AsyncJob provided by the developer guide. If you have time, would you please help review the project? I much appreciate your help. Andreas Schlüns-2 wrote

Re: [api-dev] Where to register MouseClickHandler in an Add-On?

2008-11-03 Thread Andreas Schlüns
wheelsdong wrote: Hi Carsten, Thank you very much for your advice. I followed the links you provided and tried to run the example, but I failed. My steps are below. I read the chapters on Jobs of the developer guide. Then I tried the example JobsAddon provided by SDK. The path is

Re: [api-dev] Getting the document name displayed in the title bar of the window

2008-10-23 Thread Andreas Schlüns
Hello Stefan, Hi, a year ago Matthias B. helped me out, by pointing me to ThisComponent.CurrentController.Frame.Title Unfortunately things have changed in OOo 3.0, so that the title of the frame is no longer equal to the name of an unsaved document, that OOo would pass to the printer

Re: [api-dev] About XDispatchProviderInterceptor and XFrameActionListener:frameAction()

2008-05-05 Thread Andreas Schlüns
Hello Giuseppe, Hi all, I implemented an XDispatchProviderInterceptor (as a Java object not a UNO one) it's instantiated when a XJob (synchronous job) is fired by an OnViewCreated event. The interceptor works correctly and and it unregisters as frame event listener and as interceptor when it

Re: [api-dev] Can I use XDispatchProviderInterceptor in an extension?

2008-04-28 Thread Andreas Schlüns
Hi Giuseppe, with the Job component implemented and configured it seems to work, thanks. In the meantime, reading the documentation I found this sentence in the DevGuide [1], at the beginning: ... If both are available, the synchronous service AsyncJob is preferred by the job execution

Re: [api-dev] OO 2.4rc1 disposing(EventObject) on XTerminationListener

2008-02-19 Thread Andreas Schlüns
Hello Cornelis, Hello Andreas, We need to restart the office from our code, but the process will deadlock when we bootstrap while another office process is terminating. So we need a reliable way to determine wether the office is terminated. By the disposing call, we could know that. Is

Re: [api-dev] OO 2.4rc1 disposing(EventObject) on XTerminationListener

2008-02-18 Thread Andreas Schlüns
Hello Cornelis, Hi, When I connect to OpenOffice.org 2.4 RC1, with the Java UNO bridge (Bootstrap.bootstrap()), I can get the XDesktop and store it in a variable. Now, I add a XTerminateListener to the desktop. After that, I call XDesktop.terminate(). This returns true. At the termination

Re: [api-dev] Consume event OnPrepareUnload

2007-12-03 Thread Andreas Schlüns
Hello Robert, Hallo, is there a way how to consume event receieved from document's XEventListenrr? I can listen for events, but I have no idea how to consume them. The goal is simple - when I have non-modal JFrame opened, I would like to remove possibility to close document until my JFrame

Re: [api-dev] Document reflow and updating the ToC

2007-09-21 Thread Andreas Schlüns
Hello Sander, Hello, I am using OOo in headless mode together with PyODConverter (http://www.artofsolving.com/node/26). I made a little change to the script so it will update the Table of Contents before outputting the resulting document: document =

Re: [api-dev] Print Listeners in OOo 2.0.2 (Solved?)

2007-09-12 Thread Andreas Schlüns
Hello Hal Vaughan, Oh, and I am using XCloseable.close(true) to close a document. mmm ... in my last mail I've mentioned to use close(false) .-) It's always better to errors on closing documents by yourself instead of delivering the owner ship to any other and ignore errors here. Lates on

Re: [api-dev] Print Listeners in OOo 2.0.2 (Solved?)

2007-09-12 Thread Andreas Schlüns
Hello Hal , 2) How can I keep the Document Recovery Window from popping up and get Java to throw an error instead? You can disable the whole recovery stuff be passing an option -norecovery to your command line if you start the office. Okay. What happens then? Does it throw an error

Re: [api-dev] Print Listeners in OOo 2.0.2 (Solved?)

2007-09-12 Thread Andreas Schlüns
Hello Hal, Here's the weird part: On this client's computer, when I get the recovery window, OOo is STILL running and if I close that window, my program can still connect to OOo. You must differ between the crash save and the recover files dialog. First one is shown directly after the crash

Re: [api-dev] Print Listeners in OOo 2.0.2 (Urgent!)

2007-09-11 Thread Andreas Schlüns
Hello Tobias Hal I think I've been told, and likely here, that in 2.0.x, print listeners like this are no longer necessary, but I'm having a bit of a problem searching and finding this comment and what the background is. In 2.0.x, can I print, then close the document without listening for

Re: [api-dev] Print Listeners in OOo 2.0.2 (Urgent!)

2007-09-11 Thread Andreas Schlüns
Hello Hal, The real problem you have ... printing is by default an asynchronous operation. And of course - if you try to dispose a document which is currently in printing state it can crash (at least it shouldnt ... but it can). The best solution: start the printing job with a well documented

Re: [api-dev] executeDispatch from java UNO client

2007-08-07 Thread Andreas Schlüns
Hello ashok, you forgot to define the needed set of properties. Where InsertText should retrieve the text for inserting ? BTW: Using the dispatch API in combination with .uno: URLs isnt a stable feature. Means the dispatch API itself will be stable ... but the implementation of such .uno:

Re: [api-dev] Interrupt document loading if it takes too long?

2007-08-06 Thread Andreas Schlüns
Hello Mirko, Hi, I was wondering if there is any way to tell OOo to stop loading a document - i.e. XComponentLoader.loadComponentFromURL() - after starting the operation? I drive OOo from Java/Uno, but some documents can take a very long time to load - see e.g.

Re: [api-dev] Interrupt document loading if it takes too long?

2007-08-06 Thread Andreas Schlüns
Hello Mirko, Hi Andreas, Andreas Schlüns wrote: I was wondering if there is any way to tell OOo to stop loading a document - i.e. XComponentLoader.loadComponentFromURL() - after starting the operation? You are right - it would be nice to have such feature in OOo ... but currently OOo does

Re: [api-dev] problem removing XDispatchProviderInterceptor ...

2007-07-31 Thread Andreas Schlüns
Hello Oliver, I had a look on your example (because dispatch interception is more my area then Carsten ones). One question ... is the demo you sent the real application or a demo only ? The problem is that your main() method does the following one: a) bootstrap an office b) retrieving the

Re: [api-dev] Writer: canceling dispose event

2007-05-11 Thread Andreas Schlüns
Hello Michael, Hi, I have a listener on a Writer document, which gets triggered, when the document gets closed by the user. The file should then be transferred to a database, but it is still locked by OpenOffice. When I try to manually dispose Writer in the event, OpenOffice crashes, which is

Re: [api-dev] Closing OO after the last document was closed

2007-04-24 Thread Andreas Schlüns
Mathias Bauer schrieb: OOo 1.0 did exactly what you want: shut down OOo when the last document is closed. If you are interested I can look up the configuration setting you have to set. That would be an interesting alternative! Would be very nice, if you look up. Andreas, do you remember how

Re: [api-dev] Closing OO after the last document was closed

2007-04-24 Thread Andreas Schlüns
Hello Reinhold , Hi Mathias, Hi Andreas, thanks for your great help! After making some tests, i agree that terminating the office is the wrong way in this case... i haven't taken this 'side effect' into consideration. Now i have to start over. I won't annoy you, but let me once again get

Re: [api-dev] Closing OO after the last document was closed

2007-04-23 Thread Andreas Schlüns
Mathias Bauer schrieb: Reinhold Merk wrote: Hi again, assuming several documents re opened. To prevent the user close *all* documents at once i can disable the exit menu item. So the user must use the close menu item to close the docs one after the other. After closing the last document an

Re: [api-dev] Closing OO after the last document was closed

2007-04-23 Thread Andreas Schlüns
Hello Reinhold, Hi again, assuming several documents re opened. To prevent the user close *all* documents at once i can disable the exit menu item. So the user must use the close menu item to close the docs one after the other. After closing the last document an empty application window

Re: [api-dev] officebean : NoRestore Property and document Recovery

2007-01-08 Thread Andreas Schlüns
news.gmane.org schrieb: Hello, I'm using the OfficeBean in a java project in windows, and I'd like to disable document recovery after a crash for some documents. I've tried to use the NoRestore Property, with no success. If I close the application after loading the document, and then I

Re: [api-dev] Protocol handler and Thread.sleep()

2007-01-08 Thread Andreas Schlüns
Tobias Krais schrieb: Hi together again, I implemented a protocol handler for the CommandURL .Judas:PrintTrays. The target of this new protocol is to print a document on different printer trays (page one on tray with letter paper, the others on the tray with normal paper). After sending the

Re: [api-dev] Adding a new URL Protocol without wildcards

2006-12-18 Thread Andreas Schlüns
Tobias Krais schrieb: Hi together, one more question: I already succeeded adding a new URL Protocol with wildcards (CommandURL was .Judas:). Now I would like to add a URL Protocol without a wildcard. The CommandURLs should be .Judas:Saveto and .Judas:PrintTrays. Here is the relevant part of

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

2006-11-16 Thread Andreas Schlüns
Cedric Bosdonnat schrieb: Hi Christoph, Oliver, Christoph Neumann a écrit : The property is MacroExecutionMode: PropertyValue[] DocArgs = new PropertyValue[1]; PropertyValue DocArg = new PropertyValue(); DocArg.Name = MacroExecutionMode;

Re: [api-dev] Document title

2006-11-13 Thread Andreas Schlüns
Paolo Mantovani schrieb: Hi Bernard, Alle 19:37, domenica 12 novembre 2006, Bernard Marcelly ha scritto: Bonjour Paolo There is a solution, using getArgs() from the document. Please note: The property Title of the list of arguments of a model isnt better (means more stable) then using the

Re: [api-dev] Server inside a Protocol Handler

2006-11-13 Thread Andreas Schlüns
Tabish F. Mufti schrieb: You can avoid these problems, if you write your protocol handler as a multi-instance service. So how can I write a multi-instance service ? The difference between multi-instance and one instance service (singleton) will be made on creation time. Every java

Re: [api-dev] Jobs

2006-11-09 Thread Andreas Schlüns
Tabish F. Mufti schrieb: I read in the developer guide Chapter 4 under Jobs: A central problem of external components in OpenOffice.org is their lifetime control. Every external component must deal with the possibility that the environment will terminate. It is not efficient to implement

Re: [api-dev] Server inside a Protocol Handler

2006-11-09 Thread Andreas Schlüns
Tabish F. Mufti schrieb: I have an Addon in Java and using the ProtocolHandler scheme I start a Socket Server. Once the protocol handler is executed the server is created inside a Thread and left on the jvm to be executed but I think I lose a reference to this server as the ProtocolHandler will

Re: [api-dev] Server inside a Protocol Handler

2006-11-09 Thread Andreas Schlüns
Hello Tabish, Solution: implement an asynchronous job (where the job execution service make sure that OOo doesnt terminate) ... or register a listener inside OOo to be notified in case the frame or the whole office will be closed. If I use asynchronous job can I reference my Server class and

Re: [api-dev] Enable toolbar items if dynamic protocol handler

2006-11-08 Thread Andreas Schlüns
Hello Julien, What about my other proposed solution? Use a job and register your service before any UI is visible. I will remember this solution. I have set it aside for the time being, because a job must be registered again in some OO configuration file (typically in the .xcu of a

Re: [api-dev] CloseVetoException vs. TerminateVetoException

2006-11-08 Thread Andreas Schlüns
Hello Mathias, Andreas Schlüns wrote: snip Yes ... that's wrong - but it's public. An yes: there is no guarantee that these frames wont be closed by other objects (other then the desktop). As you said: it isn't a good solution anyway as it doesn't help in all cases

Re: [api-dev] Jobs

2006-11-08 Thread Andreas Schlüns
Tabish F. Mufti schrieb: I read in the developer guide Chapter 4 under Jobs: A central problem of external components in OpenOffice.org is their lifetime control. Every external component must deal with the possibility that the environment will terminate. It is not efficient to implement

Re: [api-dev] CloseVetoException vs. TerminateVetoException

2006-11-07 Thread Andreas Schlüns
Mathias Bauer schrieb: Hi Andreas, Andreas Schlüns wrote: I wrote a little cute java program that is converting documents via OOo. This conversion machine is running hidden. It will fail, even crash down if someone uses OOo in foreground and closes the last opened window. For this reason I

Re: [api-dev] CloseVetoException vs. TerminateVetoException

2006-11-06 Thread Andreas Schlüns
Tobias Krais schrieb: Hi together, I wrote a little cute java program that is converting documents via OOo. This conversion machine is running hidden. It will fail, even crash down if someone uses OOo in foreground and closes the last opened window. For this reason I registered a

Re: [api-dev] OnCloseApp not dispatched by OO 2.0.1

2006-10-16 Thread Andreas Schlüns
Julien Galand schrieb: Hi, I have noticed with an add-on I have written that the global event OnCloseApp is not dispatched by OO 2.0.1 (or maybe OO disconnects global event listeners too early when quitting). With the same add-on and OO 2.0.3, this event is correctly received. I have

Re: [api-dev] how to dispatch .uno:ClosePreview from java ?

2006-08-10 Thread Andreas Schlüns
Oliver Brinzing wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Andreas, thanks for the detailed explanation ... I always try to avoid using dispatches ... Next possible solutions: a) close these preview using another API but I can not find an api for closing the calc preview ...

Re: [api-dev] how to dispatch .uno:ClosePreview from java ?

2006-08-07 Thread Andreas Schlüns
Oliver Brinzing wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, at the moment I am trying to convert some of my basic macros into a java component :-) but get stuck with the following problem: dispatching .uno:ClosePreview from java seems not to work in all cases, if I open a

Re: [api-dev] OOo 2.0.3 (Linux Windows), OOoBean, printing does not work when doc loaded with loadFromByteArray()

2006-07-27 Thread Andreas Schlüns
Mathias Bauer wrote: Harald Weyhing wrote: Hi all, I still can't print with OOo 2.0.3 using the OOoBean, when documents are loaded via loadFromByteArray(). There is no error message, printing silently fails. A workaround for that is calling storeAsURL(url,null) on the document (which is a

Re: [api-dev] Regarding XJobExecutor.

2006-07-20 Thread Andreas Schlüns
bharathy b wrote: Hi Andreas thank you, i tried the solution you specified. In the Addons.xcu i made the following changes. node oor:name=m1 oor:op=replace prop oor:name=URL oor:type=xs:string valueservice:name.vojta.openoffice.wavelet.Wavelet?button1/value /prop node

Re: [api-dev] Regarding XJobExecutor.

2006-07-18 Thread Andreas Schlüns
bharathy b wrote: Hi i wanted to know if the following is possible using the XJobExecutor. Is it possible to have more than one trigger method for an XJobExecutor? At present i have added a toolbar button to the writer document using an Addon. (Using an UNO Component in Java).

Re: [api-dev] How to tell a component the current XComponent?

2006-03-27 Thread Andreas Schlüns
Tobias Krais wrote: Hi together, I created my first component and have now a big problem: -%- private XComponent openDocument = null; [...] // Querying for the interface XPrintable on the loaded document XPrintable xPrintable = (XPrintable)

Re: [api-dev] DocumentConfiguration

2006-03-27 Thread Andreas Schlüns
Tuomas Räsänen wrote: Hi again, My goal is to prevent user from using default styles in textdocs. Apparently those default styles cannot be disabled, so I need to make everything manually. One thing I have to do is to remove accelerators modifying styles. (e.g. CTRL + 1 = Heading 1). I tried

Re: [api-dev] XComponentLoader event onload

2006-03-23 Thread Andreas Schlüns
Antoine POURCHEZ wrote: Hello, I want to load and next update an ODT in a java program. To do that, i write this code : Object vDesktop = OoBootstrap.createDesktop(); XComponentLoader vCompLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class,

Re: [api-dev] Java: adding functionality to newly created menu item

2006-03-17 Thread Andreas Schlüns
Tobias Krais wrote: Hallo Andreas, To make OOo call such external code you have to use commands with your own naming scheme and implement and install a so called protocol handler that handles commands using the scheme. All this is described in the Developers Guide in the chapters about

Re: [api-dev] Connecting two OpenOffice Process

2006-03-07 Thread Andreas Schlüns
Vincenzo Giuliano wrote: Hi ALL, this is my problem: I started up OpenOfficeProcess on remote host, then I started up OpenOfficeProcess on my computer. I load a file on remote host and I take the XModel reference. I want seen on my computer the document, how can I do? I try to do this

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

Re: [api-dev] Re:Re: Re: Load Excel file (.xls)

2006-02-20 Thread Andreas Schlüns
Vincenzo Giuliano wrote: Hi ALL, I come to a conclusion. This code start a .xls file (if it exists). I accept any advice. public class LoadExcel { /[EMAIL PROTECTED] null if url don't exists*/ public static XModel startExcelFile(String urlExcelFile)throws java.lang.Exception{

Re: [api-dev] Re: Load Excel file (.xls)

2006-02-16 Thread Andreas Schlüns
Vincenzo Giuliano wrote: Vincenzo Giuliano wrote: Hi ALL, my name is Vincenzo. I have a problem. I try to load excel file (.xls) via java code: PropertyValue[] props = new PropertyValue[2]; props[0] = new PropertyValue(); props[0].Name = FilterName;

Re: [api-dev] quickstarter / storeToURL problem (python)

2006-01-19 Thread Andreas Schlüns
Daniela Garling wrote: snip I don't quite know how to. What I do with python is a try: something except ErrorCodeIOException: do something else. Now, how would i catch the exception in order to get to its ErrCode? My debugger tells me that ErrorCodeIOException is a class-object consisting of

Re: [api-dev] problem with OfficeBean and JInternalFrame

2006-01-18 Thread Andreas Schlüns
Markus Plessing wrote: Hello Roberto, Roberto Battistoni schrieb: I'm trying to add an OfficeBean to a JInternalFrame, but Oo start in a without-frame window in a full-screen mode, not in the JInternalFrame. Why this? [...] The Java-Window has to provide a system window handle using a

Re: [api-dev] quickstarter / storeToURL problem (python)

2006-01-18 Thread Andreas Schlüns
Daniela Garling wrote: Please dump the URL you created on demand to the console. May be it will be generated wrong in such case. As next try you should dump the error message given by the catched exception. May be it shows the problem already. Regards Andreas Hello list, I have encountered

Re: [api-dev] Simple question - How to maximize a window

2005-10-17 Thread Andreas Schlüns
Andrew Jensen wrote: .-) My code snippet was an example only ... and I've shown you a way, which isnt the preferred one for myself .-) The problem behind getActiveFrame() / getCurrentController() is the dependenc against the focus. If the application is loosing it's focus it can happen that

Re: [api-dev] Crash after detach and attach toolbar using XStorable

2005-07-26 Thread Andreas Schlüns
Hello Bob ! Regarding, Do you remember, how often the error report dialog cames up for one crash? - one time. ??? The stacktrace show another sceanrio. Regarding, sending the error report to our VCL team - thanks Andreas. But fixing of this bug needs some time ... so I cant say anything

Re: [api-dev] Crash after detach and attach toolbar using XStorable

2005-07-25 Thread Andreas Schlüns
Hello Bob! snip Regarding, Please send the error report so we can have a look on that. Of course you should fill out crash report formular, so we know that this error report is related to this problem here. - I sent a report about 9:40 A.M. July 15, 2005. I have also pasted the report into

Re: [api-dev] Programming OOo as a Groupware App

2005-07-15 Thread Andreas Schlüns
Jürgen Schmidt wrote: Hi, see my comments inline Bradley Bolen wrote: Hello. I asked the following on dev@udk.openoffice.org about programming OOo as a groupware app. There is a reply that I received that I pasted below as well. The responder (btw thanks Stephan Bergmann) suggested

Re: [api-dev] IDL for the TextDocument service

2005-05-11 Thread Andreas Schlüns
Christian Junker wrote: A text document does support the XMultiServiceFactory indirectly. Directly the XMultiServiceFactory interface is supported by the DrawingDocumentFactory which is a service that every document - that contains a drawing page - has. This includes the text document. About the