[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libreoffice-users] Class name for certain LO Impress objects in macro


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:
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:

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

Jean-Francois Nifenecker, Bordeaux

To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
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

Re: [libreoffice-users] Class name for certain LO Impress objects in macroBlue Upsilon <blue.upsilon@protonmail.com>
[libreoffice-users] Class name for certain LO Impress objects in macroBlue Upsilon <blue.upsilon@protonmail.com>
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.