Apache OpenOffice (AOO) Bugzilla – Issue 38284
API: sw.SwXTextRange::com::sun::star::text::XTextRange
Last modified: 2013-02-24 21:08:46 UTC
The method setString() does not work as expected. Please see the macro: Sub Main oDoc = StarDesktop.loadComponentFromURL("private:factory/swriter", "Test", 40, dimArray()) oObj = oDoc.getText().createTextCursor().getStart() print oObj.GetImplementationName oObj.setString("MiddleEnd") oStartRange = oObj.getStart() oStartRange.setString("Start") print oObj.getText().getString() oObj.setString("StartMiddle") print oObj.getText().getString() End Sub At the last print I expect "StartMiddle" but I get "StartStartMiddle". Please check also: start your office with parameter "-accept=socket,host=0,port=8100;urp;" and call inside a solar shell: checkapi -o sw.SwXTextRange::com::sun::star::text::XTextRange
.
Everything is just fine because the call to getText for a XTextRange does *not* return an XText interface that represents only that text range but the XText interface to the documents text.
the UNO-API test must be adopt to this behavior. For the bad documenation in the IDL a new bug is written: i41723
fixed in qadev21
ok in src680_m85