Hey Volker,
teste mal die Folgende Zeile:
oConn.StartGluePointIndex = oRect(i).GluePoints.insert(oGlue)+ 1
Wäre das Dein erwartetes Eegebnis? Ich denke, die Indices der GluePoints
beginnen bei 1 und nicht bei 0.
Könnte dann natürlich auch ein Fehler der Api sein...
VG
Thomas
Am 16.01.2018 um 14:28 schrieb Volker Lenhardt:
Sub DrawConnector()
Dim oDoc, oPage, oRect(2), oConn, oGlue
Dim oSize As New com.sun.star.awt.Size
Dim oPos As New com.sun.star.awt.Point
Dim i%
oDoc = StarDesktop.loadComponentFromUrl("private:factory/sdraw",
"_blank", 0, Array())
oPage = oDoc.DrawPages.getByIndex(0)
oSize.Width = 1500
oSize.Height = 1000
For i = 0 To 2
oRect(i) = oDoc.createInstance("com.sun.star.drawing.RectangleShape")
oPage.add(oRect(i))
oRect(i).Size = oSize
Next
For i = 0 To 2
oPos.X = (i + 1) * 4000
oPos.Y = 2000 + ((i + 1) Mod 3) * 2000
oRect(i).Position = oPos
oConn = oDoc.createInstance("com.sun.star.drawing.ConnectorShape")
oPage.add(oConn)
oConn.StartShape = oRect(i)
oConn.EndShape = oRect((i + 1) Mod 3)
oConn.EdgeKind = com.sun.star.drawing.ConnectorType.STANDARD
oGlue = CreateUnoStruct("com.sun.star.drawing.GluePoint2")
oGlue.IsRelative = False
oGlue.Escape = com.sun.star.drawing.EscapeDirection.SMART
oGlue.PositionAlignment = com.sun.star.drawing.Alignment.CENTER
oGlue.IsUserDefined = True
oGlue.Position.X = oRect(i).Position.X + 750
oGlue.Position.Y = oRect(i).Position.Y + 500
oConn.StartGluePointIndex = oRect(i).GluePoints.insert(oGlue)
Next
End Sub
--
Liste abmelden mit E-Mail an: users+unsubscribe@de.libreoffice.org
Probleme? https://de.libreoffice.org/hilfe-kontakt/mailing-listen/abmeldung-liste/
Tipps zu Listenmails: https://wiki.documentfoundation.org/Netiquette/de
Listenarchiv: https://listarchives.libreoffice.org/de/users/
Alle E-Mails an diese Liste werden unlöschbar öffentlich archiviert
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.