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?