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

Update Extension for Libreoffice 6.3/6.4 #2

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

ghost
Copy link

@ghost ghost commented Apr 22, 2020

Update Extension for Libreoffice 6.4

This PR makes the extension run on LibreOffice 6.4.
It does not change the actual checking code.
The extension shows up as additional sidebar
while the menubar button (still) doesn't do anything.

  • fix compile errors with newer API
  • fix sidebar visibility
  • define sidebarpanel in Sidebar.xcu instead of WriterWindowState.xcu
  • add icon for sidebar

This commit makes the extension run on LibreOffice 6.4.
It does not change the actual checking code.
The extension shows up as additional sidebar
while the menubar button (still) doesn't do anything.
- fix compile errors with newer API
- fix sidebar visibility
- define sidebarpanel in Sidebar.xcu instead of WriterWindowState.xcu
- add icon for sidebar
@bertfrees
Copy link
Owner

Hi! Thank you very much for the PR. I quickly skimmed through the changes and made a few minor remarks about comments in the code. The change itself looks good. I haven't tested it yet. I might do that when I find some time, but maybe I will just merge it because I trust you have tested it.

@ghost
Copy link
Author

ghost commented Apr 23, 2020

Thanks for your comments.
I removed the commented lines, as propably suspected those where leftovers.
I tested it so far that the extension is showing, does it's checking and shows warnings etc., however, I didn't verify the checks themselves work correctly. So far it seems plausible.

It seems there is also work going on to include accessibility checks in LibreOffice [1], which may render this extension useless, but nevertheless better to have it working with recent versions than not, i guess.

[1] https://git.libreoffice.org/core/+log/8a78de65b5472b933267601cd484f3ff5e75c2a3/svx/source/dialog/AccessibilityCheckDialog.cxx

Previously, exceptions in checks were caught and logged, but not shown to the
user. Instead, the "congratulations" message would appear suggesting successful
checks when in reality something crashed.
@bertfrees
Copy link
Owner

@kalinjul Thanks for the additions. Some questions:

Show error dialog if a check failed

Can you give an example of an exception that happened and resulted in "congratulations", or is this only theoretical?

Fix graphic traversal

Can you explain what exactly happened in this commit?

Fix detection of forms

Can you explain what exactly happened in this commit?

@ghost
Copy link
Author

ghost commented May 4, 2020

FYI, i went through translating the error messages and tried to reproduce the errors/warnings in my document. When i found checks are not working, I tried to fix them, so the extension should now work quite well in LO 6.3+.

@kalinjul Thanks for the additions. Some questions:

Show error dialog if a check failed

Can you give an example of an exception that happened and resulted in "congratulations", or is this only theoretical?

This happened when you included any image in your document - see next commit.
While i fixed this particular problem, others may occur, so i figured it would be better to show an error than to silently ignore everything and report success.

Fix graphic traversal

Can you explain what exactly happened in this commit?

The graphic object doesn't have a "GraphicURL" field anymore, so it throw an exception.
To be specific, the field is still there, but access is not allowed.
See https://tomazvajngerl.blogspot.com/2018/03/improving-image-handling-in-libreoffice.html

Fix detection of forms

Can you explain what exactly happened in this commit?

I had a sample document which reported xSuppForms.hasForms() = true, but didn't hat a form and xSuppForms.getForms().getElementNames().length was 0. So i added this line to the check.

Oh and also, if you really want to, i can change the commits to include the explanations. I merged them into my master without thinking about better description.

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

Successfully merging this pull request may close these issues.

2 participants