Class name for certain LO Impress objects in macro

Hi,

When I make macros in LO Impress,
I usually start with:
oDoc = ThisComponent
oSlide = oDoc.CurrentController.CurrentPage

and my questions are:
(1)
what is the class of oSlide in this case? is it com.sun.star.drawing.GenericDrawPage ?
(2)
what is the class of oDoc?

Thanks in advance,
Blue Upsilon

Hi!

When I make macros in LO Impress,
I usually start with:
oDoc = ThisComponent
oSlide = oDoc.CurrentController.CurrentPage

and my questions are:
(1)
what is the class of oSlide in this case? is it com.sun.star.drawing.GenericDrawPage ?

oSlide implements a com.sun.star.drawing.XDrawPage interface
and is a com.sun.star.drawing.DrawPage
inheriting from com.sun.star.drawing.GenericDrawPage

It also implements a com.sun.star.presentation.DrawPage

read here:
https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1drawing_1_1DrawPage.html

(2)
what is the class of oDoc?

oDoc has a SupportedServices string array property (like all LibO objects). Just set a breakpoint and a watch, then have a look :slight_smile:

PS : an introspection tool like XRay (1) or MRI (2) is a must-have when programming with the LibO API.

(1) XRay: https://berma.pagesperso-orange.fr/index2.html
(2) MRI: https://extensions.libreoffice.org/extensions/mri-uno-object-inspection-tool

Best,

Hi Jean-François,

Thank you very much for the response!
and I will certainly look into XRay & MRI.

Best regards,
Blue Upsilon

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐