Draw: convert line to connector

Is it possible to convert a Line to a Connector either programmatically or through the user interface in LibreOffice 6? If yes, then what would be the process or approach?

I’m exporting SVG from another program. The original drawings prior to SVG export have objects connected with lines similar to the LibreOffice Draw connector/gluepoint concept. So, the SVG line ends to be converted are geometrically close to the object connection point.

The closest information that I’ve found so far is the 2014 OpenOffice Forum “[Solved] Change a line to a connector programmatically” discussion. The OpenOffice approach was to replace the selected line with a connection; and, use some logic to find nearest candidate glue points.

Sub Line2Connector
   Dim oDoc As Object
   Dim oConnector As Object
   Dim oShapes(0) As Object, oShape As Object
   Dim oDP As Object
   Dim oSelection As Object, oLine As Object
   Dim i As Long, j As Long, k As Long, n As Long
   Dim oCoords, PolyPoints
   Dim EndPoints(1) As New com.sun.star.awt.Point
   Dim MinDistance As Double, MinShapeIndex(1) As Long, MinGlueIndex(1) As Long
REM ... just some of code shown

Could the current LibreOffice 6 API support some approach to replace a line with connector?

Some “convert line to connector” capability would be a useful feature or extension for LibreOffice Draw. (Key to help migrate some legacy documents into LibreOffice.) Does this type of functionality already exist for LibreOffice? If not, would the approach as mentioned for OpenOffice likely be implementable as a LibreOffice python macro?

No, you can’t change type of line between simple Line and any Connector. It’s hard coded

With the understanding that Line and Connectors are distinct different types, might the approach discussed in the OpenOffice forum snippets to replace a line with a connector have any chance of being implementable? For example, are the LibreOffice Draw objects (selected and not-selected) possibly accessible via the LibreOffice 6 API?