User:Blue.painting/LibreOffice Impress macro development reference

This is a OOo Basic macro development reference for LibreOffice Impress. It includes useful links, template examples for getting started, and an object model which helps you easily identify relevant attributes and methods that an object has. Please read the mission statement below for more information.

Mission statement
Although there exists already Pitonyak's macro reference and the com::sun::star Module Reference and the XrayTool, in my opinion there is no straight-forward ultra-clear Visual Basic macro development reference for LibreOffice Impress that currently exists for intermediate programmers like myself.

As a intermediate programmer who wants to write a macro, one should be able to easily find one's object of interest in the docs, and its relevant attributes and functions. As an example, say I want to loop through all the  objects on my current slide, and change their arrow-head type. Then I should be able to find this object in the docs, and find quickly that indeed the  string is the relevant attribute.

When I was getting started some years ago it was even hard to find how to get the current slide object... Therefore the aim of this doc is to have template examples for getting started, and an ultra-clear object model. The object model in this doc will not include all the attributes & functions for all objects, but rather only the most relevant ones.

Say I'm considering a rectangle object. Then probably I'm interested in its color, linewidth, position, size, Z order, and things like that. But actually at the moment it's quite tricky to deduce even these basic attributes from the current docs (unless one is expert).

Who am I?
I am Nathan Ullberg. My main background is in materials physics but I am an "intermediate programmer" who enjoys using GNU/Linux and among other things programming macros for LibreOffice for better productivity. I have some background also working with documentation at a healthcare tech company.

Useful links

 * wiki.documentfoundation.org/Macros
 * Andrew Pitonyak's OpenOffice.org Macro Information
 * XrayTool resource (program to let you inspect properties & methods of objects)
 * TDF Impress Macros wiki (empty...)
 * com::sun::star Module Reference
 * MS Office VBA Reference/PowerPoint/Object model/Shape object (Shape object example from MS Office VBA Reference)

Export & Import position and size of an object
The purpose of the below macros is to copy the position & size of a selected object to clipboard, followed by implementing those same parameters to a different selected object by pasting from clipboard. This can be a real time-saver. For example, often one needs to have two different images on two different slides with the same position & size, and this macro acheive this much faster than manually right-clicking and copying X & Y and size, etc.

Simply select an object, execute  which allows you to copy position & size to clipboard, then select a different object and execute   which allows you to paste the parameters.

ThisComponent.CurrentController.CurrentPage
(This is the slide object.)

com.sun.star.drawing.EllipseShape
Foo

com.sun.star.drawing.CustomShape
Foo

com.sun.star.SOMETHING_ELSE
Foo

com.sun.star.ET_CETERA
Foo.