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
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.
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
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,
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
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
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
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
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
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
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
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
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];
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
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
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
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
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
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.
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
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
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
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
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 =
301 - 324 of 324 matches
Mail list logo