Date: prev next · Thread: first prev next last
2019 Archives by date, by thread · List index


http://www.pitonyak.org/oo.php

Look for OOME (open office macros explained) and download the latest version. There is a section on 
draw and one on impress. 

⁣Sent from BlueMail ​

On Mar 5, 2019, 11:30 PM, at 11:30 PM, Mauricio Baeza <public@elmau.net> wrote:
On Wed, 6 Mar 2019 01:52:25 +0100, Nathan Ullberg
<nathan.ullberg@gmail.com> wrote:

Hi there,

I was wondering:  I am trying to write a Basic macro which inserts a 
rectangle in Impress in the current/active/selected slide.
But the closest I have gotten is to specify which slide# it will end
up 
on....
How do I get the current slide?  (No success after much
googling.....)

This is what I have:
========================
sub InsertRectangle
dim shapeGeometry(0) as new com.sun.star.beans.PropertyValue
dim oSize as new com.sun.star.awt.Size
dim oPosition as new com.sun.star.awt.Point
oSize.width = 6000
oSize.height = 3000
oDoc = ThisComponent
oSlide = oDoc.DrawPages(2)  'how do i get current/active/selected 


Hello...

Try...

Sub InsertRectangle()
Dim s As New com.sun.star.awt.Size

   doc = ThisComponent
   dp = doc.CurrentController.CurrentPage
   obj = doc.createInstance("com.sun.star.drawing.RectangleShape")

   s.Width = 2000
   s.Height = 1000
   obj.setSize(s)

   dp.add(obj)

End Sub
-- 
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

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

Context


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.