Class name for certain LO Impress objects in macro

classic Classic list List threaded Threaded
3 messages Options
Blue Upsilon Blue Upsilon
Reply | Threaded
Open this post in threaded view
|

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
--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Jean-Francois Nifenecker Jean-Francois Nifenecker
Reply | Threaded
Open this post in threaded view
|

Re: Class name for certain LO Impress objects in macro

Hi!

Le 16/07/2019 à 18:26, Blue Upsilon a écrit :
>
> 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 :)


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,
--
Jean-Francois Nifenecker, Bordeaux


--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Blue Upsilon Blue Upsilon
Reply | Threaded
Open this post in threaded view
|

Re: Class name for certain LO Impress objects in macro

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 ‐‐‐‐‐‐‐
On Thursday, July 18, 2019 7:20 PM, jean-francois <[hidden email]> wrote:

> Hi!
>
> Le 16/07/2019 à 18:26, Blue Upsilon a écrit :
>
> > 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 :)
>
> 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,
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Jean-Francois Nifenecker, Bordeaux



--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy