https://bugs.documentfoundation.org/show_bug.cgi?id=168096
Bug ID: 168096
Summary: Calc UNO API: cell object's XText methods behave
erratically
Product: LibreOffice
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Calc
Assignee: [email protected]
Reporter: [email protected]
Consider this Basic code:
sub testCellXText
doc = StarDesktop.loadComponentFromURL("private:factory/scalc", "_blank", 0,
Array())
oCell = doc.Sheets(0).getCellByPosition(0,0)
oCell.getStart()
oCell.String = "b"
oCell.insertString(oCell.createTextCursor(), "c", false)
oCell.insertString(oCell.getStart(), "a", false)
oCell.insertString(oCell.getEnd(), "d", false)
oCell.insertString(oCell, "e", false)
oCell.insertString(oCell.createTextCursor(), " 1: ", false)
oField = doc.createInstance("com.sun.star.text.TextField.URL")
oField.URL = "http://www.example.org/"
oField.Representation = "h1"
oCell.insertTextContent(oCell.createTextCursor(), oField, false)
oCell.insertString(oCell.getEnd(), " 2: ", false)
oField = doc.createInstance("com.sun.star.text.TextField.URL")
oField.URL = "http://www.example.org/"
oField.Representation = "h2"
oCell.insertTextContent(oCell.createTextCursor(), oField, false)
oCell.insertString(oCell, " 3: ", false)
oField = doc.createInstance("com.sun.star.text.TextField.URL")
oField.URL = "http://www.example.org/"
oField.Representation = "h3"
oCell.insertTextContent(oCell.createTextCursor(), oField, false)
end sub
The expected result of the code is "abcde 1: h1 2: h2 3: h3" (with h1, h2, h3
hyperlinks).
In 25.8.0.4, it produces "abcd 1: h1 2: h3h2"; the problems are silently
failing call inserting "e" and " 3: ", and out-of-order insertion of "h3".
Silently failing insertion is related to bug 168073. However, after commits
a8ce5af575ea5e05eb7c349d50b4eb08cab983ff and
02c9a71ea5344178b2849d153d0b1d83a681e334, there still is the out-of-order
insertion problem: "abcde 1: h1 2: 3: h2h3".
--
You are receiving this mail because:
You are the assignee for the bug.