Issue 81697 - Calling getString() during paragraphenumeration causes automatic scrolling of word processor to the point of the visible cursor
Summary: Calling getString() during paragraphenumeration causes automatic scrolling of...
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: programming (show other issues)
Version: OOo 2.2.1
Hardware: All All
: P2 Trivial (vote)
Target Milestone: ---
Assignee: michael.ruess
QA Contact: issues@sw
URL: http://api.openoffice.org/servlets/Re...
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-18 13:30 UTC by listmanster
Modified: 2013-08-07 14:42 UTC (History)
2 users (show)

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


Attachments
document contains macro that replicates the bug... (15.05 KB, application/vnd.oasis.opendocument.text)
2007-09-18 13:32 UTC, listmanster
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description listmanster 2007-09-18 13:30:31 UTC
Calling getString() on a text range while enumerating paragraphs causes the Writer to scroll 
automatically, to the point where the visible cursor was last placed. 

This is particularly apparent during repeated enumerations of document structure using a timer. 


<code>
Sub Main

While (1 = 1) 
	Run
	REM Wait 5 seconds...
	Wait (5000)
Wend

End Sub

Sub Run()

Dim oTextEnum as Object, oTextElement as Object
Dim  nHeadsFound as long

oText = ThisComponent.Text
nHeadsFound = -1
oTextEnum = oText.createEnumeration
While oTextEnum.hasMoreElements
	oTextElement = oTextEnum.nextElement
	If oTextElement.supportsService("com.sun.star.text.Paragraph") Then
		If oTextElement.ParaChapterNumberingLevel >= 0 then
			Dim strHeadingText as string
			REM IF YOU COMMMENT THE LINE BELOW, THE DOCUMENT DOES NOT SCROLL....
		    strHeadingText = oTextElement.getString()
			nHeadsFound = nHeadsFound + 1
		End If
	End If
Wend

End Sub

</code>
Comment 1 listmanster 2007-09-18 13:32:37 UTC
Created attachment 48306 [details]
document contains macro that replicates the bug...
Comment 2 michael.ruess 2007-09-18 14:45:35 UTC
Reassigned to JSK.
Comment 3 eric.savary 2007-10-08 11:05:29 UTC
@FME: as discussed, please have a look.
Comment 4 frank.meies 2007-10-16 11:49:04 UTC
fme: Fixed in cws swqbf105, shellio.cxx.
Comment 5 frank.meies 2007-10-22 13:59:29 UTC
FME: Ready for QA.
Comment 6 michael.ruess 2007-11-07 11:09:24 UTC
Verified fix in CWS swqbf105.
Comment 7 michael.ruess 2007-11-21 13:38:37 UTC
Checked fix in OO 2.4 dev build 680m237.
Comment 8 sgautier.ooo 2008-07-15 21:33:52 UTC
*** Issue 85534 has been marked as a duplicate of this issue. ***