This can be fixed.
The following macro splits a text table cell into two horizontally according to the position of the visible cursor.
Sub SplitCellByCarePos()
Dim oDoc As Object, oDisp As Object, oFrame As Object, cmd As String
Dim oCell As Object, oViewCursor As Object, oTableCursor As Object
Dim args(1) as new com.sun.star.beans.PropertyValue, oPropst
oDoc = ThisComponent
oDisp = createUnoService("com.sun.star.frame.DispatchHelper")
oFrame = oDoc.CurrentController.Frame
oViewCursor = oDoc.CurrentController.ViewCursor
On Error GoTo ErrLabel
oCell = oViewCursor.Cell
On Error GoTo 0
If oCell Is Nothing Then Exit Sub
For Each cmd In Array("EndOfDocumentSel", "Copy", "Delete", "GoDown", "Paste")
If cmd = "GoDown" Then
oTableCursor = oViewCursor.TextTable.createCursorByCellName(oCell.CellName)
oTableCursor.splitRange(1, True)
args(0).Name = "Count" : args(0).Value = 1
args(1).Name = "Select" : args(1).Value = False
oProps = args
Else
oProps = Array()
End If
oDisp.executeDispatch oFrame, ".uno:" & cmd, "", 0, oProps
Next cmd
ErrLabel:
End Sub