Bug 40152 - Replace with empty string doesn't work in the BASIC IDE ("Replace all" does).
Summary: Replace with empty string doesn't work in the BASIC IDE ("Replace all" does).
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
(earliest affected)
Hardware: All All
: medium minor
Assignee: Not Assigned
Whiteboard: target:3.7.0 target:3.6.1
Depends on:
Reported: 2011-08-16 16:14 UTC by Johnny Rosenberg
Modified: 2012-08-10 19:54 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Johnny Rosenberg 2011-08-16 16:14:50 UTC
Replace with empty string doesn't work in the BASIC IDE.

This issue was discussed here:

When I search for something and leave the Replace field empty
(meaning that I will replace something with nothing), no replace will take place. The only way I could find to do it, was to copy the text
to gEdit and quickly do the replace there and then move it back to the
Basic IDE again.

I have LibreOffice 3.3.3 (Swedish) and Ubuntu 10.10.

Note that this is Search/Replace in the BASIC IDE, which also have some other bugs, but they are reported, I think.

Some people replied and confirmed that the bug exists on:
LibreOffice 3.3.3 (US English), Ubuntu 10.10
LibreOffice 3.4.2 (Final)
OpenOffice.org 3.2.1 (Ubuntu go-oo build)
OpenOffice.org 3.3.0 (standard build)
OpenOffice.org-Dev 3.4.0
OpenOffice.org, Fedora 14 (I guess the version that comes with Fedora 14 by default, whichever version that is…)

Steps to verify the bug:
01. Start LibreOffice (for example Calc).
02. Click Tools → Macros → Organize macros → LibreOffice Basic…
03. Click Untitled 1.
04. Click the New button.
05. Leave the field as is (”Module1”), click OK.
06. Copy the following extremely meaningful code:

REM  *****  BASIC  *****

Option Explicit

Sub Main
	Dim MyInterestingVariable As Double
	Print MyInterestingVariable
End Sub

07. In the LibreOffice Basic IDE, press Ctrl+a, then Ctrl+v.
08. Place the cursor in the upper left corner.
09. Press Ctrl+f.
10. In the ”Search for” field, type ”Interesting”, don't type the quotes.
11. Make sure the ”Replace with” field is empty. Really empty, no spaces or anything.
12. Click ”Find”. The first occurrence of the string is found.
13. Click ”Replace”. Nothing happens, and this is the bug!
14. Click ”Replace all”, all occurrences are replaced, so it seems like the bug is limited to the Replace-button.
Comment 1 Jeffrey 2011-08-16 18:51:26 UTC
Confirmed for LibreOffice 3.4  340m1(Build:103) on OpenSuse Linux.

Thanks for the detailed steps.
Comment 2 Björn Michaelsen 2011-12-23 12:41:23 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 3 Not Assigned 2012-07-25 17:49:53 UTC
Uray M. Janos committed a patch related to this issue.
It has been pushed to "master":


fdo#40152 replace with empty string in Basic IDE
Comment 4 Not Assigned 2012-08-10 19:54:53 UTC
Uray M. Janos committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":


fdo#40152 replace with empty string in Basic IDE

It will be available in LibreOffice 3.6.1.