To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=77246
------- Additional comments from [EMAIL PROTECTED] Mon May 14 08:13:58 +0000 2007 ------- This is not my macro but a simpler one which will create a rectangle shape with a relative glue point with coordonate (0,0) wich is upper-left corner.After saving and reloading the odg document, the gluepoint moved to the centre. Sub Main Dim oDoc As Object Dim oPage As Object Dim Size As New com.sun.star.awt.Size Dim Point As New com.sun.star.awt.Point Dim oRectangleShape As Object Dim oGluePoints As Object Dim oGluePoint As Object 'Retrive Doc and Page oDoc = ThisComponent oPage = oDoc.drawPages(0) 'Create rectangle shape in the center of the page Size.Width = 5000 Size.Height = 3000 Point.x = oPage.Width/2 - Size.Width/2 Point.y = oPage.Height/2 - Size.Height/2 oRectangleShape = oDoc.createInstance( "com.sun.star.drawing.RectangleShape" ) oRectangleShape.Position = Point oRectangleShape.Size = Size oRectangleShape.FillStyle = com.sun.star.drawing.FillStyle.NONE oPage.add(oRectangleShape) 'Create a relative glue point at position (0,0) oGluePoints = oRectangleShape.getGluePoints() Point.x = 0 Point.y = 0 oGluePoint = createUnoStruct( "com.sun.star.drawing.GluePoint2" ) With oGluePoint .IsRelative = True .Position = Point .Escape = com.sun.star.drawing.EscapeDirection.LEFT .IsUserDefined = False End With oGluePoints.insertByIndex( oGluePoints.getCount(), oGluePoint ) End Sub --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]