Issue 38284 - API: sw.SwXTextRange::com::sun::star::text::XTextRange
Summary: API: sw.SwXTextRange::com::sun::star::text::XTextRange
Status: CLOSED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: ---
Assignee: chne
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-02 08:26 UTC by chne
Modified: 2013-02-24 21:08 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description chne 2004-12-02 08:26:45 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
Comment 1 chne 2004-12-02 08:27:09 UTC
.
Comment 2 thomas.lange 2004-12-08 10:18:23 UTC
.
Comment 3 thomas.lange 2004-12-09 11:02:54 UTC
.
Comment 4 thomas.lange 2004-12-09 11:04:16 UTC
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.
Comment 5 chne 2005-01-31 14:26:08 UTC
the UNO-API test must be adopt to this behavior. For the bad documenation in the
IDL a new bug is written: i41723
Comment 6 chne 2005-01-31 15:43:07 UTC
fixed in qadev21
Comment 7 chne 2005-03-15 17:01:02 UTC
ok in src680_m85