Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiFormatSave broken as GlobalScope.DialogLibraries.isLibraryLoaded(EXTENSION_NAME) not working #9

Open
ccheng opened this issue Feb 16, 2020 · 1 comment

Comments

@ccheng
Copy link
Contributor

@ccheng ccheng commented Feb 16, 2020

Not sure when this became an issue as it used to work. At some point LibreOffice must've updated to version 6.3.4.2 on Lubuntu 19.04 while I had MultiFormatSave 1.5.6 installed. Then it stopped working:

The error occurs on line 78 (or 76 if viewed in LO macro editor) in multiFormatSave.xba. Specifically GlobalScope.DialogLibraries.isLibraryLoaded(EXTENSION_NAME) throws a NoSuchElementException.

This problem occurs despite removing and re-adding the extension, with re-opening LO between each step.

I did figure out a work-around: open ~/.config/libreoffice/4/user/basic/dialog.xlc and ensure it's contents is:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE library:libraries PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "libraries.dtd">
<library:libraries xmlns:library="http://openoffice.org/2000/library" xmlns:xlink="http://www.w3.org/1999/xlink">
 <library:library library:name="multiFormatSave" xlink:href="$(USER)/uno_packages/cache/uno_packages/lu23853otd9xi.tmp_/multiFormatSave_v1-5-6.oxt/multiFormatSave/dialog.xlb/" xlink:type="simple" library:link="false"/>
</library:libraries>

The lu23853otd9xi.tmp_ must match where LO installed the multiFormatSave extension, of course.

Unfortunately, I'm not sure if that file existed before my bug hunting, or whether my debugging created that file since I created a Dialog in the LO macro editor as part of the bug hunt.

In any case, the key line xlink:href="$(USER)/uno_packages/cache/uno_packages/lu23853otd9xi.tmp_/multiFormatSave_v1-5-6.oxt/multiFormatSave/dialog.xlb/" seems to be the "active ingredient", letting LO know where to find the proper dialog.xlb file as it could've find it before.

Any ideas on how this problem occurred, and whether it could be fixed? Thanks!

@ertaiNL

This comment has been minimized.

Copy link
Owner

@ertaiNL ertaiNL commented Mar 8, 2020

HI,

I am using 6.3.5.2 on Ubuntu LTS 18.84.4 and it works for me. I don't really use the plugin myself anymore. But more people are getting issues with it. So I am not sure what goes wrong.

My own dialog.xlc contains:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE library:libraries PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "libraries.dtd">
<library:libraries xmlns:library="http://openoffice.org/2000/library" xmlns:xlink="http://www.w3.org/1999/xlink">
 <library:library library:name="Standard" xlink:href="$(USER)/basic/Standard/dialog.xlb/" xlink:type="simple" library:link="false"/>
</library:libraries>

If you insert that in yours. Does the plugin work then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.