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?

-----

Also, the documentation for
[XStyleFamiliesSupplier](https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1style_1_1XStyleFamiliesSupplier.html)
lists getStyleFamilies as public, not as protected.

2. Shouldn't the public/protected access modifier be defined in the base
interface?



--
Sent from: http://nabble.documentfoundation.org/Users-f1639498.html

-- 
To unsubscribe e-mail to: [email protected]
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

Reply via email to