Download it now!
Bug 97448 - Create a helper to generate an AddOns.xcu for an extension
Summary: Create a helper to generate an AddOns.xcu for an extension
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyMedium, easyHack, skillPython, skillScript
Depends on:
Blocks:
 
Reported: 2016-01-30 11:05 UTC by Björn Michaelsen
Modified: 2020-07-22 15:10 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Michaelsen 2016-01-30 11:05:19 UTC
The AddOns.xcu file in an extension describes what menus or toolbars an extension adds/modifies/removes. Well-commented examples for it can be found in the sdk-examples repository at:

 https://gerrit.libreoffice.org/gitweb?p=sdk-examples.git;a=summary

e.g. the TuesdayPython/Addons.xcu.

The XML format of these is pretty verbose and cumbersome -- and handwriting these can be errorprone. It would be nice to have script (in Python or somesuch) wizard that can generate these.
Comment 1 Robinson Tryon (qubit) 2016-02-18 14:52:01 UTC Comment hidden (obsolete)
Comment 2 Siddhartha Gairola 2017-01-03 12:37:36 UTC
Hi, I would like to work on this bug.
Comment 3 jani 2017-02-09 06:51:58 UTC Comment hidden (obsolete)
Comment 4 jani 2017-05-14 07:43:26 UTC Comment hidden (obsolete)
Comment 5 Xisco Faulí 2017-06-14 02:22:24 UTC Comment hidden (obsolete)
Comment 6 Xisco Faulí 2017-07-15 02:31:39 UTC Comment hidden (obsolete)
Comment 7 Siddhartha Gairola 2017-07-15 07:14:53 UTC
Hi, sorry for the delayed response. Yes, I would like to continue working on this. But was a bit preoccupied lately. If anyone wants to continue, you are welcome to do so.
Thank you.
Comment 8 Xisco Faulí 2017-08-15 02:23:35 UTC Comment hidden (obsolete)
Comment 9 Xisco Faulí 2017-09-15 15:27:49 UTC Comment hidden (obsolete)
Comment 10 Xisco Faulí 2017-09-16 02:04:46 UTC Comment hidden (obsolete)
Comment 11 Xisco Faulí 2017-09-17 02:04:38 UTC Comment hidden (obsolete)
Comment 12 codetronaut 2020-02-14 14:41:02 UTC
Hello, I would like to work on this Bug.
Comment 13 codetronaut 2020-02-17 11:34:02 UTC
Please provide me little guidance to proceed.
thank you.
Comment 14 Buovjaga 2020-02-17 12:05:55 UTC
(In reply to codetronaut from comment #13)
> Please provide me little guidance to proceed.
> thank you.

Where are you stuck at the moment? What did you try and research so far?
Comment 15 codetronaut 2020-02-17 15:01:08 UTC
one thing, can I take reference to this:https://blog.mdda.net/oss/2011/10/07/python-libreoffice

also, I saw .xcu is somewhat like .xml so should I create python script for the same?
Comment 16 Buovjaga 2020-02-17 15:53:55 UTC
(In reply to codetronaut from comment #15)
> one thing, can I take reference to
> this:https://blog.mdda.net/oss/2011/10/07/python-libreoffice
> 
> also, I saw .xcu is somewhat like .xml so should I create python script for
> the same?

The .xcu files contain XML. Björn's proposal was to create a wizard-like script to help with their generation.

I assume the idea was to simply have the script ask questions on the command line about what menu or toolbar items should be modified. In other words, I don't believe the idea was to create a LibreOffice *extension*.
Comment 17 codetronaut 2020-02-17 20:56:27 UTC
okay, so the task is to create a wizard-like script which first generates the logs(i.e adds/modifies/removes) of extension in .xcu (i.e in XML) and then converts it to some human-readable format. Right?
Comment 18 codetronaut 2020-02-17 20:59:07 UTC
my bad *not logs I mean description of.
Comment 19 Buovjaga 2020-02-18 07:53:12 UTC
(In reply to codetronaut from comment #17)
> okay, so the task is to create a wizard-like script which first generates
> the logs(i.e adds/modifies/removes) of extension in .xcu (i.e in XML) and
> then converts it to some human-readable format. Right?

Right, except skip the last part, because Björn did not mention any conversion to a human-readable format.

The TuesdayPython Addons.xcu refers to this document, which is helpful: https://wiki.openoffice.org/wiki/Framework/Article/Addon_Menu_Toolbar_Merging
Comment 20 codetronaut 2020-02-18 18:13:26 UTC
From where should I take reference for the generation of logs/descriptions I tried to implement a script for the generation of .xml file, i.e from where should this script will take data from.  

Please bear with me I am a little beginner.
Comment 21 Buovjaga 2020-02-18 19:08:53 UTC
(In reply to codetronaut from comment #20)
> From where should I take reference for the generation of logs/descriptions I
> tried to implement a script for the generation of .xml file, i.e from where
> should this script will take data from.  
> 
> Please bear with me I am a little beginner.

Björn would be the best one to comment, but from what I understand:

1. Have template fragments based on what is listed at https://wiki.openoffice.org/wiki/Framework/Article/Addon_Menu_Toolbar_Merging
2. Take the data to fill the template fragments from command line, asking questions from the script user
Comment 22 codetronaut 2020-02-19 09:49:47 UTC
okay, please have a look if I am going right,

https://pastebin.com/pcSijHwx

what I did is created a script that forms an XML file and later I will be giving the user to enter according to the particular bug.
Comment 23 Xisco Faulí 2020-07-22 15:10:46 UTC
Dear codetronaut,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assign it back to yourself if you're still working on this.