On 09/04/2017 07:18 AM, ZevSpitz wrote:
The following code (run under Windows Script Host):
var serviceManager = new ActiveXObject('com.sun.star.ServiceManager');
var desktop =
serviceManager.defaultContext.getByName('/singletons/com.sun.star.frame.theDesktop');
var document = desktop.loadComponentFromURL("private:factory/swriter",
"_blank", 0, []);
var textSections = new
VBArray(document.StyleFamilies.ElementNames).toArray();
WScript.Echo(textSections.length); // outputs 7 in my case
makes use of the protected function
com.sun.star.XStyleFamiliesSupplier::getStyleFamilies. This function is
described as protected in the
[GenericTextDocument](https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1text_1_1GenericTextDocument.html)
documentation.
Usually, protected means the member is only accessible from within a derived
class, but that doesn't seem to be the case here.
1. What does "protected" mean in this context?
UNOIDL does not have such a public/protected/private concept.
However, the documentation at
<https://api.libreoffice.org/docs/idl/ref/> is generated with a tool,
Doxygen, that is also used to generate documentation for other languages
besides UNOIDL (like C++ and Java).
Michael (on CC) extended Doxygen to also support UNOIDL. Looks like
there is a bug somewhere that causes the generated output to mention
"public" or "protected" where they don't make sense.
--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.