Bug 45252

Summary: Improvement for Range.replaceText()
Product: POI Reporter: N. Hira <nhira>
Component: HWPFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.0-dev   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X 10.4   
Bug Depends on: 45001    
Bug Blocks:    
Attachments: Patch to Range.replaceText() to allow replace-all and updated unit test

Description N. Hira 2008-06-22 23:13:42 UTC
Created attachment 22157 [details]
Patch to Range.replaceText() to allow replace-all and updated unit test

The SVN version for Range.replaceText() does not permit the caller to replace all instances of a piece of text.  It also forces the caller to rebuild the Range after each call.

The supplied patch is an improved version of replaceText() that permits the caller to continue working with the Range, an overloaded version that replaces all instances, and an update to the relevant unit test.
Comment 1 Nick Burch 2008-06-28 11:58:30 UTC
Thanks for this fix and test, applied to svn trunk