Re: [api-dev] Disable Commands transient

2006-03-13 Thread Tobias Krais
Hi Carsten, thanks for the hint. Since some days I read and try these chapters. If I understand right, to make such changes transient I have to disble the menu items, toolbar icons and shortcut keys transient concerning this special commandurl. And I have to hope that a user does not add a

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

2006-03-13 Thread Tobias Krais
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 Dispatching and Add-Ons.

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

2006-03-09 Thread Tobias Krais
Hi Andreas, 1. adding a menu and toolbar item with the commandURL vnd.twc.oo.oocom:SaveACopy (I did this already and the menu item is grey - it is not known up to now). The menu item is gray, because there is no code bound to this command. You have to register a ProtocolHandler or establish

Re: [api-dev] Disable Commands transient

2006-03-08 Thread Tobias Krais
Hi Carsten at the moment I try to disable a command, but transient. I found an example in the Dev-Guide. In this example I find two methods - one for disabling the commands and the other for enabling them again. I would like to make the disabling transient. Up to now I learned from Carsten,

[api-dev] [code snippet] Convert Documents

2006-03-07 Thread Tobias Krais
Hi ML, thanks for your help! I added the sample application. The convertDocument() method is the real snippet that contains the conversion. Greetings, Tobias ?xml version=1.0? !-- $RCSfile: $ last change: $Revision: $ $Author: $ $Date: $ (c)2003 by the copyright holders listed with the

[api-dev] Disable Commands transient

2006-03-07 Thread Tobias Krais
Hi together once again, at the moment I try to disable a command, but transient. I found an example in the Dev-Guide. In this example I find two methods - one for disabling the commands and the other for enabling them again. I would like to make the disabling transient. Up to now I learned from

Re: [api-dev] [code snippet] Convert Documents

2006-03-07 Thread Tobias Krais
Hi Tom, http://codesnippets.services.openoffice.org/Office/Office.ConvertDocuments.snip Maybe you can rethink and brake the snippet into small logical parts and link them together like i described it in my reply to Java Snippet Suggestion: how to convert documents - please review At

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

2006-03-06 Thread Tobias Krais
Hi Andreas, You shouldnt post a complete application as code snippet. It's better to show some parts of you approach only. yes and no. For one part I agree. If you are an expert, it is useful for you to see only the relevant part of an application. But I disagree because I am a newbie. And I

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

2006-03-06 Thread Tobias Krais
Hi Stephan, 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 URLs. You have to

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

2006-03-03 Thread Tobias Krais
Hi Martin, 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? 1.) Could it be that FS1800 is not the right printer name? If you give an

[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
keywordtransient/keyword /keywords authors author id=tobiaskrais initial=false email=[EMAIL PROTECTED]Tobias Krais/author /authors question heading=Open Document and Transient Remove Toolbar entriesHow to start OpenOffice, load a document and remove toolbar entries transient? /question answer pThis code

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

[api-dev] Re: [SOLVED] [api-dev] Java: transient changes really temporary?

2006-02-28 Thread Tobias Krais
Hi Carsten, your posting in the other thread solved my problem. I have one more questions understanding UNO. I tried to make transient changes to the menubar as you might have read on this list. And it works (due to your help). My question now is: if I open a OOo with transient changes and

[api-dev] [code snippet] Remove iterative and transient menubar items

2006-02-28 Thread Tobias Krais
keywordmenubar/keyword keywordtransient/keyword keywordremove/keyword keywordsearch menubar/keyword /keywords authors author id=tobiaskrais initial=false email=[EMAIL PROTECTED] copyright=Copy it, use it, distribute it, but contribute to OpenOffice.org!Tobias Krais/author /authors question heading

[api-dev] [SOLVED] Java: Getting Access to a menu in menubar

2006-02-28 Thread Tobias Krais
Hi Carsten, Because attachFrame() is automatically called by loadComponentFromURL(), you can remove this line without any problem. Normally attachFrame() is not used by developers. There are some special situations where one can use attachFrame(), e.g. if you dynamically want to use a

[api-dev] Renaming menu entries: changes don't apply

2006-02-27 Thread Tobias Krais
Hi together, again a question from me... I want to rename a menu entry, e.g. the entry Save as... to Secure Copy. Please see the code below (esp. the comment). -%- /** * This method renames menu items.The given Vector contains a * XIndexContainer at first position (the menu containing

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

2006-02-21 Thread Tobias Krais
Hi Tom, after I created successfully a new menu and menu item I now want to add functionality to the menu item. The functionality should be implemented in Java. Can you tell me where to start to learn doing this, or tell me some package- / interfacenames that are involved in doing this? My goal

Re: [api-dev] Java: Getting Access to a menu in menubar

2006-02-21 Thread Tobias Krais
Hi Carsten, please allow me a more detailed question. -%- PropertyValue[] oDateiMenuSettings = (PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class, oMenuBarSettings.getByIndex(0)); -%- I have now as you adviced a PropertyValue[] oFileMenuSettings.

[api-dev] Adding menus / menu items at Runtime

2006-02-20 Thread Tobias Krais
Hi Carsten, Yes, you can also use Java. The example uses a UNO API, therefore you can use any supported language. sounds very good. At the moment I am reading your document http://specs.openoffice.org/ui_in_general/api/ProgrammaticControlOfMenuAndToolbarItems.sxw and up to now it is easy

Re: [api-dev] Adding menus / menu items at Runtime

2006-02-20 Thread Tobias Krais
Hi Carsten, sounds very good. At the moment I am reading your document http://specs.openoffice.org/ui_in_general/api/ProgrammaticControlOfMenuAndToolbarItems.sxw You are right that examples are missing. The most important task of the document is to describe the design and the implementation

[api-dev] Re: [SOLVED] [api-dev] Adding menus / menu items at Runtime

2006-02-20 Thread Tobias Krais
Hi Carsten, For explanation: I create a menu called JUDAS and this menu is shown. Then I want to create a menu item called JUDAS_Test and I add it to the menu. But only a separator is shown. When I copy e.g. the File menu into the JUDAS menu (as a submenu), the item JUDAS_Test is suddenly

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

2006-02-20 Thread Tobias Krais
Hi all, after I created successfully a new menu and menu item I now want to add functionality to the menu item. The functionality should be implemented in Java. Can you tell me where to start to learn doing this, or tell me some package- / interfacenames that are involved in doing this? My goal

[api-dev] Java: Getting Access to a menu in menubar

2006-02-20 Thread Tobias Krais
Hi ML, in Java I try to get access to the file menu during runtime. Now I am able to create a new menu, but I don't get access the file menu to be able to change it, see comments -%- com.sun.star.ui.XUIElement myMenubar =

<    1   2   3   4