Not possible to edit the menu added by addons.xcu at runtime.
I have used to add a menu by addons.xcu with popup menu controller which can be edit while at runtime, see: https://github.com/hanya/BookmarksMenu
Search found 885 matches
- Fri Oct 11, 2019 3:21 pm
- Forum: Macros and UNO API
- Topic: [Solved] Addon - Manipulation of Menu added with addons.xcu
- Replies: 4
- Views: 2074
- Tue Mar 19, 2019 7:06 pm
- Forum: Extensions
- Topic: [Solved] Extension featuring Options Dialog
- Replies: 15
- Views: 6677
Re: [Solved] Extension featuring Options Dialog
I mean Id node in your node defined under OptionsDialog/Nodes.Leaves. If Id value is the same with the extension identifier of yoru extension package, the extension manager enables option button to show your options dialog.
- Tue Mar 19, 2019 6:12 pm
- Forum: Extensions
- Topic: [Solved] Extension featuring Options Dialog
- Replies: 15
- Views: 6677
Re: [Solved] Extension featuring Options Dialog
Hi,
Id value should be matched to extension identifier defiend in description.xml to show your options dialog in the extension manager.
Id value should be matched to extension identifier defiend in description.xml to show your options dialog in the extension manager.
- Tue Jan 01, 2019 2:15 pm
- Forum: Extensions
- Topic: [Solved]Toggle check mark in menu items for Python extension
- Replies: 2
- Views: 1843
Re: Toggle check mark in menu items for Python extension
Post by calling statusChanged with FeatureStateEvent.State = bool in your dispatch object.
So you need dispatch object and you have to receive object which implements css.frame.XStatusListener when your dispatch provider is called.
So you need dispatch object and you have to receive object which implements css.frame.XStatusListener when your dispatch provider is called.
- Tue Feb 20, 2018 7:05 pm
- Forum: Extensions
- Topic: [Solved] How to debug/fix my .oxt installation: can't remove
- Replies: 4
- Views: 4562
Re: How to debug/fix my .oxt installation: can't remove and
If you have "zip" file extension, the office recognize the package as regacy package. In that case, description.xml file is not used.
You have to add "oxt" file extension to your package name.
You have to add "oxt" file extension to your package name.
- Wed Feb 07, 2018 7:26 pm
- Forum: Code Snippets
- Topic: Alternative script organizer for Python macro
- Replies: 27
- Views: 92599
Re: Alternative script organizer for Python macro
Regarding embedded scripts in a document, I do not remember finding a way to do this for pythonpath. You mentioned that it's not impossible. Would you care to provide a link or more information? See code of checkForPythonPathBesideScript function in pythonscript.py file. To make built-in import fun...
- Fri Dec 08, 2017 4:41 pm
- Forum: Macros and UNO API
- Topic: [Solved] Horizontal large table inside a dialog
- Replies: 13
- Views: 9600
Re: Horizontal large table inside a dialog
Some properties of the grid are not implemented internally. You could not change font descriptor related properties on the grid control. These properties are not passed from the model to the internal grid implementation even you specify.
- Tue Dec 13, 2016 7:00 pm
- Forum: Macros and UNO API
- Topic: [Solved] Can't see the code window in MRI
- Replies: 9
- Views: 2879
Re: Can't see the code window in MRI
Push Ctrl + H while the listing window has focus to open or close the code window. This is described in help files of the MRI.
- Sat Oct 15, 2016 2:49 pm
- Forum: Macros and UNO API
- Topic: Adressing the Ok Button in the OptionsPage
- Replies: 6
- Views: 3018
Re: Adressing the Ok Button in the OptionsPage
Why don't you save data in your code? If your service supports callHandlerMethod method for the option page hander which implements com.sun.star.awt.XContainerWindowEventHandler interface, you can obtain event notification when user push OK button on the options page. Like the following in Python: d...
- Sun Sep 25, 2016 6:36 pm
- Forum: Macros and UNO API
- Topic: [Solved] I'd like to write simple macro in OpenOffice Basic
- Replies: 18
- Views: 8150
Re: I'd like to write a simple macro in OpenOffice Basic
Do you mean on LibreOffice 5.2.X? I can use MRI 1.3.3 on LibreOffice 5.2.0.4 with Xubuntu 16.04.1.Villeroy wrote:MRI does not work with recent versions of LibreOffice.
- Wed Sep 21, 2016 4:10 am
- Forum: Macros and UNO API
- Topic: [Solved] Maximize a dialog in Calc at runtime (OpenBASIC)
- Replies: 4
- Views: 4600
Re: Maximize a dialog in Calc at runtime (OpenBASIC)
It seems good.
APP_FONT unit contains both device resolution and zooming by the option. So you need some information to calculate it yourself without these methods. But we can use these methods to convert between pixcel and app_font units.
APP_FONT unit contains both device resolution and zooming by the option. So you need some information to calculate it yourself without these methods. But we can use these methods to convert between pixcel and app_font units.
- Tue Sep 20, 2016 5:03 pm
- Forum: Macros and UNO API
- Topic: [Solved] Maximize a dialog in Calc at runtime (OpenBASIC)
- Replies: 4
- Views: 4600
Re: Maximize a dialog in Calc at runtime (OpenBASIC)
The Width and Height properties are described in APPFONT unit but size of the dialog is in real pixels. See the following conversion between these units: Sub dialog1_test ' needs Dialog1 d = CreateUnoDialog(DialogLibraries.Standard.Dialog1) width = d.Model.Width size = CreateUnoStruct("com.sun....
- Fri Jul 22, 2016 10:50 am
- Forum: External Programs
- Topic: Compile [C++] example on command line
- Replies: 1
- Views: 2181
Re: Compile [C++] example on command line
Welcom to the forum.
You have to pass some flags to your compiler. See Makefile in the SDK examples and sdk/settings direcotry.
You have to pass some flags to your compiler. See Makefile in the SDK examples and sdk/settings direcotry.
- Wed Jul 20, 2016 3:34 pm
- Forum: Macros and UNO API
- Topic: Get locales / localized locale names
- Replies: 3
- Views: 2081
Re: Get locales / localized locale names
Locale data can be obtained by the interface is defined in /main/i18npool/source/localedata/data. These files contain only country data in English, so you can not obtained by the localized country name by the interface. In the case of el-GR, see the following file. I could not see the file for grc-G...
- Thu Jul 14, 2016 8:33 pm
- Forum: Macros and UNO API
- Topic: Incorporated RegEx engine: How to get full access?
- Replies: 11
- Views: 6357
Re: Incorporated RegEx engine: How to get full access?
There is com.sun.star.util.TextSearch service which provides way to use internal regular expression engine through the API. Substitution function can be written with it line the following in the Basic. I have not test the code well, so it might contain some bugs. Sub Main a = RegExSubst("ABCdef...
- Wed Jul 06, 2016 4:16 pm
- Forum: Macros and UNO API
- Topic: Incorporated RegEx engine: How to get full access?
- Replies: 11
- Views: 6357
Re: Incorporated RegEx engine: How to get full access?
Of course I know who writes this stuff. In most cases it's you. MS Office has millions of developers who are able to turn ideas into office add-ins. Just one question: I want LibreOffice to to handle hyperlinks with protocol vnd.sun.star.script: like OpenOffice does. Could I use your protocol handl...
- Tue Jul 05, 2016 12:51 pm
- Forum: Macros and UNO API
- Topic: Incorporated RegEx engine: How to get full access?
- Replies: 11
- Views: 6357
Re: Incorporated RegEx engine: How to get full access?
Another extension that came up today is AdjustRowHeight extension . I can read the source code. I can read the related documentation. I stare at it over and over again. For the life of me, I do not understand how it works or how one gets the idea to put things together like this. This is by far too...
- Fri May 27, 2016 9:17 pm
- Forum: Macros and UNO API
- Topic: OpenOffice Smarttags
- Replies: 7
- Views: 4824
Re: OpenOffice Smarttags
Here is an example extension written in Python. - Install through the extension manager. - Restart your office. - Create new Writer document. - Choose Tools - AutoCorrect Options... in the main menu. You can see Smart Tags tab in the opened dialog. You can switch to use or not to use registered reco...
- Fri May 27, 2016 7:46 pm
- Forum: Macros and UNO API
- Topic: OpenOffice Smarttags
- Replies: 7
- Views: 4824
Re: OpenOffice Smarttags
I tried to imagin a wrapper component of the smarttags for the Basic, but it would not so interesting. Because all smarttags require own registration of the component with own implementation name under smart tag service in the office component registry. The wrapper installed from an extension packag...
- Fri May 27, 2016 7:10 pm
- Forum: Macros and UNO API
- Topic: OpenOffice Smarttags
- Replies: 7
- Views: 4824
Re: OpenOffice Smarttags
I've tried to make small extension which uses SmartTags function in Python. It requires component impolementations, so it can not be implemented only with Basic.
- Wed May 04, 2016 5:53 pm
- Forum: Extensions
- Topic: [Solved] Sidebar for Developers
- Replies: 9
- Views: 10531
Re: [Solved] Sidebar for Developers
The attached SidebarHelperForMacros.oxt does not work on LO 5.1 or later (maybe LO 5.0 or later). Because com.sun.star.ui.XSidebarPanel::getMinimalWidth method has been added. No method on the instance of the UI element crashes the office. Here is the fixed extension package attached. Replace Sideba...
- Tue Nov 17, 2015 4:55 pm
- Forum: Macros and UNO API
- Topic: [Solved] Prevent a dialog to close with the x button
- Replies: 5
- Views: 7008
Re: Prevent a dialog to close with the x button
Welcom to the forum. With execute hack, making your dialog unclosable is hard. I've turned the closeable() property in UnoControlDialogModel to false but it didnt work. The Closeable property should be specified before the peer of the window is created. But if you instantiate your dialog with Create...
- Fri Nov 13, 2015 3:06 pm
- Forum: Extensions
- Topic: Need help with an Addon for AOO 4.1.2
- Replies: 5
- Views: 2425
Re: Need help with an Addon for AOO 4.1.2
Have you implemented and deproyed the service that provides your option page, which is defined in EventHandlerService prop of the Options configuration? If you have add the service but the page is not shown, you have to check your service. The service have to implement the following interfaces: - co...
- Wed Oct 28, 2015 5:49 pm
- Forum: External Programs
- Topic: [Solved] Pyuno: Document length
- Replies: 11
- Views: 4744
Re: [Solved] Pyuno: Document length
The API is well documented for other languages such as Java and Basic. Both language bindings are well match with Python's one. So most people do not need documents only for written in Python.
- Wed Oct 28, 2015 4:48 am
- Forum: Macros and UNO API
- Topic: [Solved] Use OpenOffice api with C++ program
- Replies: 2
- Views: 1192
Re: use openoffice api with c++ program
How about to call sal_detail_initialize function?See sdk/include/sal/main.h
Code: Select all
sal_detail_initialize(argc, argv);
// do something
sal_detail_deinitialize();
- Wed Oct 28, 2015 2:58 am
- Forum: Macros and UNO API
- Topic: [Solved] Create Python script
- Replies: 27
- Views: 14041
Re: Create Python script
Add namespace like following:
Code: Select all
<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest">
- Fri Oct 23, 2015 4:37 pm
- Forum: Extensions
- Topic: How can i add a new settings menu to openoffice 4.1.1?
- Replies: 12
- Views: 5088
Re: How can i add a new settings menu to openoffice 4.1.1?
So you want to add own configuration. See: https://wiki.openoffice.org/wiki/Docume ... ation_Data
Netbeans plugin might have the function to help you to define configuration schema, but I'm not really sure.
Netbeans plugin might have the function to help you to define configuration schema, but I'm not really sure.
- Fri Oct 23, 2015 2:45 pm
- Forum: Extensions
- Topic: How can i add a new settings menu to openoffice 4.1.1?
- Replies: 12
- Views: 5088
Re: How can i add a new settings menu to openoffice 4.1.1?
Do you mean Tools - Options dialog? If you say so, we have the document in the following page and its sub pages, click Next Page > link to see sub pages in the TOC.
https://wiki.openoffice.org/wiki/Docume ... ons_Dialog
https://wiki.openoffice.org/wiki/Docume ... ons_Dialog
- Wed Oct 21, 2015 4:10 am
- Forum: Macros and UNO API
- Topic: [Solved] Insert an image in a TextFrame
- Replies: 3
- Views: 906
Re: insert an image in a TextFrame
You have to work with css.text.XText interface taken from the text frame. rTextContent1->getAnchor() returns the text range which the same place where the text frame is there on the document. The range have to there in the frame. Here is the code written in Basic. Sub Snippet5 oTextFrames = ThisComp...
- Tue Oct 20, 2015 6:52 pm
- Forum: Macros and UNO API
- Topic: [Solved] Programming a Button for the Menu
- Replies: 19
- Views: 2685
Re: !!!Need Help with programming a Button for the Menu
Extensions which contains own menu elements has the following things in general: - /org.openoffice.Office.Addons configuration, aka Addons.xcu. Your menu entry have the URI to call your task through the protocol handler. - protocol handler component written in language you have choosen. In this case...