Re: [api-dev] Enable toolbar items if dynamic protocol handler
Julien Galand wrote: Hi to all, My add-on has a toolbar created by a .xcu file, with the right protocol handler declared (as a node org.openoffice.Office.ProtocolHandler/HandlerSet of the configuration file). But there is no component registration in the package; in particular no registration of the implementation of the service of the protocol handler. Instead, the service of the protocol handler is registered dynamically by the executable component of my add-on, therefore necessarily LATER than OO's reading of the .xcu file. = The toolbar items are shown disabled, probably because the protocol handler service couldn't be instanciated at the time the toolbar was created. Is there a way to ask OO to re-scan the toolbar items to bind them to the protocol handler, which will likely make them enabled ? Thank you if you have some hint... Hi Julien, I think the best solution would be to register your service before any user interface element is created. This can be done by a Job which will be activated on application startup. Nevertheless if you want to re-scan toolbar items, you can use the com.sun.star.ui.XUIElementSettings interface. It's available for all configurable user interface elements (menubar, toolbar, statusbar). See the following Basic macro REM * BASIC * Sub Main REM *** Set this macro to a toolbar button to execute it REM *** Retrieve the desktop service oDesktop = createUnoService(com.sun.star.frame.Desktop) REM *** Retrieve the current frame and layout manager REM *** Just for this example. oCurrFrame = oDesktop.getCurrentFrame() oLayoutManager = oCurrFrame.LayoutManager REM *** Refresh settings for all currently available toolbars oUIElements() = oLayoutManager.getElements() nStart = lbound(oUIElements()) nEnd = ubound(oUIElements()) for i = nStart to nEnd oUIElement = oUIElements(i) if oUIElement.Type = com.sun.star.ui.UIElementType.TOOLBAR then oUIElement.updateSettings() end if next i End Sub Regards, Carsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Enable toolbar items if dynamic protocol handler
Le 2 nov. 06, à 18:50, Tabish F. Mufti a écrit : So what you are trying to do is that you have your own wrapper app which creates a toolbar at run time and the component is never deployed into openoffice ? Yes, it may be a good description. It is rather an add-on (loaded into OO's process) than an external app. This component is not registered by a package, but dynamically. Only the toolbar and the protocol handler are declared in the user configuration (typically by a .xcu file deployed into OO). OO doesn't know where the protocol handler is implemented by reading only the configuration. It has this information (but later) when the component is dynamically registered. Julien Galand - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Enable toolbar items if dynamic protocol handler
Would you please like to share with me your solution after you are done. I would like to have your files and and how you are running them etc. only if you are working in java. I actually tried searching about doing such a thing and I thought its not possible in openoffice.org so later I had to resort to just installing my component into openoffice.org using the unopkg. On 11/3/06, Julien Galand [EMAIL PROTECTED] wrote: Le 2 nov. 06, à 18:50, Tabish F. Mufti a écrit : So what you are trying to do is that you have your own wrapper app which creates a toolbar at run time and the component is never deployed into openoffice ? Yes, it may be a good description. It is rather an add-on (loaded into OO's process) than an external app. This component is not registered by a package, but dynamically. Only the toolbar and the protocol handler are declared in the user configuration (typically by a .xcu file deployed into OO). OO doesn't know where the protocol handler is implemented by reading only the configuration. It has this information (but later) when the component is dynamically registered. Julien Galand - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Disable Registration Window of Open Office
Hi Tobias, I will try to alter the Setup.xcu maybe it can works. Thanks. Tobias Krais wrote: Hi Aloizio, How can I disable registration window of Open Office by OpenOffice API? Because my application doesn't work If I hadn't accessed OpenOffice first time. does soffice -help give you some information. May be you can have a look in the Linux program htop, with which options soffice starts if you bootstrap it. But I don't know a direct way to disable the registration screen via API. Please use also OO 2.0.2 or above, because OO is bootstrapped in a more silent way since that version. Greetings, Tobias - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Disable-Registration-Window-of-Open-Office-tf2514740.html#a7157193 Sent from the openoffice - api dev mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Enable toolbar items if dynamic protocol handler
Le 3 nov. 06, à 13:58, Tabish F. Mufti a écrit : Would you please like to share with me your solution after you are done. I would like to have your files and and how you are running them etc. only if you are working in java. I actually tried searching about doing such a thing and I thought its not possible in openoffice.org so later I had to resort to just installing my component into openoffice.org using the unopkg. My solution is specific to Windows, and my component is written in C++. Being a Windows executable, it is able (by some system hook) to inject itself into OO's process, and then to register itself dynamically to OO. Does this context still interest you ? Julien Galand - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Enable toolbar items if dynamic protocol handler
My solution is specific to Windows, and my component is written in C++. Being a Windows executable, it is able (by some system hook) to inject itself into OO's process, and then to register itself dynamically to OO. No :) On 11/3/06, Julien Galand [EMAIL PROTECTED] wrote: Le 3 nov. 06, à 13:58, Tabish F. Mufti a écrit : Would you please like to share with me your solution after you are done. I would like to have your files and and how you are running them etc. only if you are working in java. I actually tried searching about doing such a thing and I thought its not possible in openoffice.org so later I had to resort to just installing my component into openoffice.org using the unopkg. My solution is specific to Windows, and my component is written in C++. Being a Windows executable, it is able (by some system hook) to inject itself into OO's process, and then to register itself dynamically to OO. Does this context still interest you ? Julien Galand - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Enable toolbar items if dynamic protocol handler
I'm actually still in the process of writing a wrapper application on top of ooimpress. My UNO Component basically adds a new toolbar in the 3rd row of ooimpress but I want that this toolbar should only appear when my wrapper app starts ooimpress. So the way I was thinking around it was that I would make the toolbar unvisible whenever ooimpress is started through my app and before closing my app I would make it visible so that its not viewable when you open ooimpress normally. Seems like a do able strategy ? On 11/3/06, Tabish F. Mufti [EMAIL PROTECTED] wrote: My solution is specific to Windows, and my component is written in C++. Being a Windows executable, it is able (by some system hook) to inject itself into OO's process, and then to register itself dynamically to OO. No :) On 11/3/06, Julien Galand [EMAIL PROTECTED] wrote: Le 3 nov. 06, à 13:58, Tabish F. Mufti a écrit : Would you please like to share with me your solution after you are done. I would like to have your files and and how you are running them etc. only if you are working in java. I actually tried searching about doing such a thing and I thought its not possible in openoffice.org so later I had to resort to just installing my component into openoffice.org using the unopkg. My solution is specific to Windows, and my component is written in C++. Being a Windows executable, it is able (by some system hook) to inject itself into OO's process, and then to register itself dynamically to OO. Does this context still interest you ? Julien Galand - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] how to copy textsection from a writer document to another ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, is there a possibility to copy a textsection from a source document to a destination document using the api ? At the moment i am using copy paste but this has the disadvantage of loosing the paragraph format ... any hints ? Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFS3x8TiyrQM/QSkURAknJAJwMrfe6qesdVxwkD7KrqMQIoajHFQCggauk Ulwo9TZc+qazSRCWmBOSHDo= =iwGf -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] How can I insert a header only in the first page
How can I insert a header that appear only in the first page of the document? I am using OpenOffice API, Java. -- View this message in context: http://www.nabble.com/How-can-I-insert-a-header-only-in-the-first-page-tf2570760.html#a7166317 Sent from the openoffice - api dev mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] How can I insert a header only in the first page
aloizio wrote: How can I insert a header that appear only in the first page of the document? I am using OpenOffice API, Java. You need to use a different page style for the first page and a different page style for the rest. You then enable the special header only in the first page page style. Do you understand styles well enough to implement this in styles to perform manually? After you do, then it is pretty easy to implement using the API by setting the page style on the first page. (but the first page style should set the next style to your standard page style.) -- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.odt My Book: http://www.hentzenwerke.com/catalog/oome.htm Info: http://www.pitonyak.org/oo.php See Also: http://documentation.openoffice.org/HOW_TO/index.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] Suggestion: Google Group for OpenOffice.org
Hi, I was just thinking why not start a Google Group for this mailing list ? After the introduction of Google Groups beta they have really improved and provide a lot of nice features. Having a google group for this mailing list will benefit everyone and give more exposure to openoffice.org.