Apache OpenOffice (AOO) Bugzilla – Issue 72807
Arrow style is not correctly shown in format dialog
Last modified: 2007-01-26 14:44:11 UTC
New writerdocument->Insert a line->set different arrow heads for both line ends->Format / Object /Line->Choose Tabpage 'Line' -> Bug:Arrow styles are set to <none>
->aw: The same bug in appears in Draw. Seems to be broken after integration of aw024. The polygon comparison in svx/source/dialog/tpline.cxx fails.
AW: The comparison fails since the loaded ArrowHeads are not closed. This happens since in SvxUnoXLineEndTable::getEntry the B2DPolyPolygon does not get closed. Investigating...
AW: SvxUnoXLineEndTable::getEntry closes the polygon as before. Must be something different. AW: rItemPolygon in SvxLineTabPage::Reset is not closed. That means that the item set at the object is not closed, so lets see where this comes from. AW: The drop-down line start/end window (see SvxLineEndWindow::SelectHdl) creates a correct XLineStartItem with a correct PolyPolygon, but then uses QueryValue() to convert it to UNO API definitions again and feed it to an any. It is then converted back to B2DPolyPolygon using XLineStartItem::PutValue() from the framework somehow. There, it is not forced to closed like in SvxUnoXLineEndTable::getEntry.
AW: A XLineStartItem::QueryValue() and XLineStartItem::PutValue() cycle will not preserve the closed state of the B2DPolyPolygon, since the converters SvxConvertB2DPolyPolygonToPolyPolygonBezier and SvxConvertPolyPolygonBezierToB2DPolyPolygon do not preserve the closed state, too. Need to discuss with CL next year.
AW: Next question is: Why are the line ends painted filled at all then? In createAreaGeometryForLineStartEnd(...) the return value gets explicitely closed. This should not be necessary with correct line start/ends and also prevents from defining non-closed line start/ends ATM.
AW: Discussed with CL, we will make the quick fix for now for safety reasons and a follow-up to eventually change all UNO API polygons to svg:d. Writing a follow-up task...
AW: Written #i73044# for AAPI change of polygons to svg:d. Changing ::PutValue() Polygon implementations to close the polygon...
*** Issue 72506 has been marked as a duplicate of this issue. ***
AW: Changed XLineStartItem::PutValue and XLineEndItem::PutValue and tested, works as expected. It is still possible thta more places with the Polygon turn-around loosing the closed state may come up; it also needs to be mentioned that we will not be able to foffere opened line start/end definitions for now (but at least support PolyPolygons now). AW: Checking in... AW: Okay, done.
AW->WG: Please verify. Just use draw/impress, create a line with an arrow end (from toolbar) and open line dialog.
AW: The fix was overestimated. It was not good to individually close polygons which were converted from api polygons. The necessary step is to correctly handle B2DPolygon creation in SvxConvertPolyPolygonBezierToB2DPolyPolygon. The api polygon uses the old start/endpoint-equal-is-closed definition, so it needs to apply basegfx::tools::checkClosed to the newly created B2DPolygons. Before aw024 exactly that happened: a XPolygon was created and when converted to B2DPolygon, basegfx::tools::checkClosed was used. This needs to be done now in SvxConvertPolyPolygonBezierToB2DPolyPolygon directly.
Verified in CWS.
Tested in m201. Closed.