Apache OpenOffice (AOO) Bugzilla – Issue 106665
basic-ide: find & replace: cannot replace text with empty
Last modified: 2017-05-20 09:32:06 UTC
it seems not to be possible anymore to find text and replace it with an empty string. - open basic ide - open a basic module - open Edit - Find & Replace - enter searchtext in "Search for" - leave "Replace with" blank - press "replace" in addition: "replace all" seems to work
Andreas, please have a look ...
STARTED, needs to be evaluated ab->tl: Are you aware of any changes in the Text Engine that could have caused this problem?
tl->ab: No. I don't even remember when the text engine was modified the last time.
-> OOo 3.x
Nothing happen to call TextView::InsertNewText with empty string method to replace selected string. It was introduced by issue 87633, insertion of long string.
Created attachment 79736 [details] Patch to replace selection with string even it is empty
Attached patch introduce the condition if passed string is zero lenght and replace current selection even the string is empty.
Hi Hanya, thank you for you patch. While it works, there is a number of actions that don't take place as a result of that while loop being skipped (for example the ImpSetSelection function doesn't get called). Wouldn't it be better to convert that while loop into a do-while loop so that it runs at least once? Also are the others here still alive? Andreas? Thomas?
"hanya" committed SVN revision 1557329 into trunk: #i106665# fix failed to replace with empty string on text view
Fixed on trunk.