I have translated the steps to C++ with createInstance => new
and keeping setPropertyValue or using method MergeDefaultAttributes.
The custom shape is generated, but the faulty method (for which I have
the patch) is not touched.
It seems, it is needed, that the custom shape is generated with the mouse.
At least I now know, how to generate a custom shape in a Basic macro. :)
Mauricio Baeza schrieb am 11.02.2021 um 19:26:
On Thu, 2021-02-11 at 19:08 +0100, Regina Henschel wrote:
does someone has a basic macro snippet for to insert a custom shape
(e.g. a smiley) into a page?
Background: For a unit test I need to insert a custom shape via code
similar to as it is done via mouse. But I have no idea how to code
macro might give me an initial stage for a solution.
For Calc, for example:
Dim size As New com.sun.star.awt.Size
Dim args(0) As New com.sun.star.beans.PropertyValue
doc = ThisComponent
sheet = doc.getCurrentController.getActiveSheet()
dp = sheet.getDrawPage()
size.Width = 5000
size.Height = 5000
args(0).Name = "Type"
args(0).Value = "smiley"
To unsubscribe e-mail to: firstname.lastname@example.org
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Impressum (Legal Info)
: 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