Creating singleton UNO components in C++
Dennis Francis
dennisfrancis.in at gmail.com
Tue Nov 1 15:49:36 UTC 2016
Hello all
I tried creating a very simple singleton UNO component which just gets/sets
a boolean value. The code is hosted at
https://github.com/niocs/SingletonComponent . This was created based on
http://opengrok.libreoffice.org/xref/core/framework/source/jobs/jobexecutor.cxx#66
. The component is packaged as an extension and unopkg was used to install
it. The oxt file is also provided in the repo for easy testing.
I tried to instantiate this singleton using macro sub named "TestSingleton"
inside the document TestSingleton.ods provided in the same repo. The vba
code is also provided in the file TestSingleton.vba for convenience. When
the macro is executed, it shows a msgbox with the string
"com.sun.star.uno.RuntimeExceptioncannot get environments".
I suppose there is something wrong with my singleton instantiation, but I
could not find any solution either by googling or by using opengrok. Could
someone please give a hint where I am wrong ?
Thanks in advance.
Regards,
Dennis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20161101/97d13bb1/attachment.html>
More information about the LibreOffice
mailing list