Ask Your Question
0

Unsupported operations in ProtocolHandler sdk example

asked 2019-07-17 16:04:05 +0200

Toniy gravatar image

updated 2019-07-17 16:08:07 +0200

I have built a ProtocolHandler_cpp example from libreoffice-6.2.5.2 sdk via Makefile provided and installed it via Extension Manager. According to source code in addon.cxx it should show some message boxes according to Addon's button being pressed, e.g. "Function 1 activated" and so on.

But on Oracle RHEL7 and Ubuntu 18.04 LTS it shows message box instead that says: "This operation is not supported on this operation system". I tried to modify source code of addon.cxx and component.cxx to get some stdout or std::ofstream output to understand that at least I've entered addon's methods but got nothing. Recursive grep-ing text of that error in Libreoffice and its SDK directories gave nothing.

So the question is: what is this operation, is that addon-related or LibreOffice itself-related, and why is it unsupported or what to do to enable supporting of it. Or at least where in SDK documentation can I find system-dependent caveats' description? It would be also great to know how can I track these queries to know what part of framework generates this kind of message if it is possible.

Here is an image that shows this problem: Not supported operation

Toolbar that invokes Addon's functions is on the left, and message itself is on the right. Any toolbar's button causes this message.

LibreOffice has been installed via RPMs and DEBs from official site, Makefile was patched a bit: -o-key was replaced to the end of compiler-invoking line -- from 82th line to the end of 84th one, because compiler used to give an error without this fix. I'll be glad to provide it if necessary.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2019-07-18 10:39:53 +0200

Toniy gravatar image

updated 2019-07-18 10:41:15 +0200

Solved.

Point is that I used to compile this example in sudo mode, passing appropriate environment variables via command line, and this addon needed appropriate permissions to work.

To fix that -- it is essential to set environment variables not manually but via automated script /opt/libreoffice6.2/sdk/setsdkenv_unix: it knows how to do it properly. After that it is enough to reload your system. After that making an addon may be performed via make in normal -- not sudo -- mode and without passing any environment variables to command line. Output will be directed to a folder that was specified during setsdkenv_unix execution (it is usually a folder within /home directory)

edit flag offensive delete link more

Comments

Lesson learned: never develop / build / compile as root. You were lucky.

erAck gravatar imageerAck ( 2019-07-18 21:35:14 +0200 )edit

Well, it is two lessons actually. Second one is to read manuals carefully without rush.

Toniy gravatar imageToniy ( 2019-07-19 16:59:00 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-07-17 16:04:05 +0200

Seen: 12 times

Last updated: Jul 18