Ask Your Question
0

How to reset main menus but not custom menus

asked 2018-10-02 06:09:23 +0200

lomacar gravatar image

updated 2018-10-02 06:28:51 +0200

I upgraded LibreOffice from 5 to 6, but I have a document with a custom menu for running some macros. When I load that document the window arrangements revert to the version 5 layout. I can go to Customize and reset the menu, but that wipes out the custom menu(s) I have made. Isn't there some way to preserve the custom ones while reseting the default ones? I don't see even a way to export or custom import menus.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2018-10-02 06:46:23 +0200

Ratslinger gravatar image

updated 2018-10-02 18:25:50 +0200

Hello,

There are dozens of places menus are stored within LO. Menus do have a default location and locations for customized menus depending upon type and module. Default menus are stored in folders with the installed LO application. A menu customized at the application level is stored in the appropriate folder in the User Profile. A custom menu for a specific document is stored in an appropriate folder in the compressed file of the document. When dealing with base and some other specifics within other documents there are special menus which can be modified and those are in their own folders.

So in order to give any specific help, it is necessary to know some more information. What specific version of LO are you using? What OS? What document menu are you talking about - Writer, Calc etc.? Is the menu at the application or document level?

There are certainly ways to have custom menus at the document level while have default menus at the application level (new documents). In Base you can have a different menu for every Form. It all depends upon the setup performed.

If you want to do some of your own checking the default folders are in the directory where LO was installed under:

..libreofficeX.X/share/config/soffice.cfg/modules

where X.X is the installed version of LO.

For customized menus at the application level they are in the User Profile folders under (hidden folder):

.config/libreoffice/4/user/config/soffice.cfg/modules

And for customized menus at the document level they are within the compressed file in :

/Configurations2/menubar/

Each of these have sub-directories for the specific module and further sub-directories for the type of mod (menubar, popupmenu, statusbar, etc.)

The actual files typically all have the same name - menubar.xml. So where they are located is critical.

Bottom line, it sounds as if you created custom menus at the application level when you probably should have created them at the document level - this is the Scope choice when creating the custom menu.

Edit 2018-10-02:

Custom menus are not always clear cut. Don't know what type of document you are dealing with but let's use Writer as an example.

When you set a custom menu while this document is open, the dialog presents a choice as to what menu will be changed: this is the Scope setting. The choices in the Scope dropdown are for LibreOffice Writer and any xxxx.odt files you have open at the time. If you choose LibreOffice Writer you are setting the menu at the application level which overrides the default menu. Choosing xxx.odt will change the menu only for that document. Any menu changes made should be realized immediately upon closing the dialog - no need to close the .odt & re-open.

When you set the custom menu at the application level, in the above case ALL Writer documents now will show this new menu. If you have a custom menu set at the xxxx ... (more)

edit flag offensive delete link more

Comments

Thanks. Sorry, when I said "custom menu" I just assumed document level. Well, I did say "I have a document with a custom menu..." in my question.

It seems like a bug to me that having a custom menu in a document would interfere with all the other menus and cause them to not update when you update LibreOffice... Anyway, I guess you are saying that if I want to preserve or transfer menus from a document I should unzip it and copy out the menubar.xml and then inject it into another document?

lomacar gravatar imagelomacar ( 2018-10-02 13:19:16 +0200 )edit

(or into the same document after resetting the menus?)

lomacar gravatar imagelomacar ( 2018-10-02 13:19:47 +0200 )edit

Oh, maybe if I reset the menus and then just re-open the document, the custom menus will return?

lomacar gravatar imagelomacar ( 2018-10-02 13:21:15 +0200 )edit

If menus are set properly when created, there is nothing to change or copy when upgrading a version of LO. Please see my edit in the answer.

I have been using custom menus for years without a problem.

Ratslinger gravatar imageRatslinger ( 2018-10-02 18:28:59 +0200 )edit

What may be helpful is knowing if you have a menubar.xml file in:

.config/libreoffice/4/user/config/soffice.cfg/modules/xxxx/menubar/

where xxxx = swriter if Writer doc, or scalc if Cal doc. Then if there is another in the compressed file under /Configurations2/menubar/.

You still have not given ANY details about what you are dealing with as asked in the original answer.

Ratslinger gravatar imageRatslinger ( 2018-10-02 19:40:36 +0200 )edit

I already said the menu is at the document level. And I already said I was upgrading from 5 to 6. It is in Writer, but I don't think that matters. I am using Windows 10, but I don't think that matters.

lomacar gravatar imagelomacar ( 2018-10-17 12:05:43 +0200 )edit

Anyway, it is impossible to test any solution now, because I already reset the menus in LO and they all look correct now, no matter what document I open. I had to rebuild the custom DOCUMENT LEVEL menus in my problem document. Or at least I thought I had to. But maybe if I had just opened a blank and reset the menus from there, then I could have opened my problem document and the standard menus would be updated without losing the custom menus in my document.

lomacar gravatar imagelomacar ( 2018-10-17 12:07:26 +0200 )edit

But that still leaves the question of why the document didn't show the updated menus in the first place, after I updated LO.

lomacar gravatar imagelomacar ( 2018-10-17 12:08:05 +0200 )edit

@lomacar It is good you now have acceptable menus. Unfortunately, answering you question cannot be done without knowing in which folder that custom menubar.xml file was located. You may not completely comprehend, but knowing which module was being used & on which OS does have a bearing on where this file may be stored.

Ratslinger gravatar imageRatslinger ( 2018-10-17 17:53:20 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-10-02 06:09:23 +0200

Seen: 51 times

Last updated: Oct 02 '18