Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Relative glue points are messy after save and reload | ||
---|---|---|---|
Product: | App Dev | Reporter: | xat <xavier.thomas.1980> |
Component: | api | Assignee: | AOO issues mailing list <issues> |
Status: | CONFIRMED --- | QA Contact: | |
Severity: | Trivial | ||
Priority: | P3 | CC: | issues, rb.henschel |
Version: | 3.3.0 or older (OOo) | Keywords: | oooqa |
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Latest Confirmation in: | --- |
Developer Difficulty: | --- |
Description
xat
2007-05-11 14:09:50 UTC
It works without problem in the UI. Therefore please attach your macro. 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 jsc - sj: can you please check this I investigated a litle bit: If I create gluepoints with the UI and theirs coordinates varies between (-5000,-5000) and (5000,5000). Like I said if I create de gluepoints in a macro, It is displayed correctly only after a save and a reload. Can I force a refresh of the shape without saving (and overwriting the file)? Unfortunately, this issue blocks my company to switch from a propriatary draw soft to oodraw, but they (my bosses) will wait a little time before paying the lisence fees for next year. So I need a quick fix/workaround. Confirming with 2.2 on WinXP - as described. Repro steps: 1. run provided macro, display gluepoints with the button on toolbar - gluepoint is at the top left corner. 2. Save, close and reopen file. 3. Display gluepoints - gluepoint is in the middle of rectangle. |