Search/Replace in Basic IDE

When I search for something and leave the Replace With field empty
(meaning that I will replace something with nothing), replace will not
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. Is this a bug or is it only me? Can someone confirm
this?

If it's supposed to work like this, why is that?

LibreOffice 3.3.3, Ubuntu 10.10.

Regards

Johnny Rosenberg
ジョニー・ローゼンバーグ

...
Works for me. LibreOffice 3.3.3 (US English), Ubuntu 10.10.

LibreOffice 3.3.3
OOO330m19 (Build:301)
tag libreoffice-3.3.2.2

When I search for something and leave the Replace With field empty
(meaning that I will replace something with nothing), replace will not
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. Is this a bug or is it only me? Can someone confirm
this?

If it's supposed to work like this, why is that?

LibreOffice 3.3.3, Ubuntu 10.10.

...
Works for me. LibreOffice 3.3.3 (US English), Ubuntu 10.10.

And you tried it in the BASIC IDE?

Kind regards

Johnny Rosenberg
ジョニー・ローゼンバーグ

...

Woops, no I didn't. I'll have to figure out how to use the BASIC IDE
first :slight_smile:

What you describe is also what I get in OpenOffice on Fedora 14.
Searching for a string and having nothing in the replace field causes
the dialog to just search and do no replacements.

- --
Bill Gradwohl
Roatan, Honduras

Figured it out. No it doesn't work & does as you describe in 3.3.3.

Now trying in 3.4.2 (Final): Same results.

FWIW: same results in OOo 3.2.1 (Ubuntu go-oo build), OOo 3.3.0
(standard build), and OOo-Dev 3.4.0.

Thanks for confirming. Time for a bug report, I presume…!

Kind regards

Johnny Rosenberg
ジョニー・ローゼンバーグ

Reported it here:
https://bugs.freedesktop.org/show_bug.cgi?id=40152

I was going to report it to OpenOffice.org too, but for some reason I
failed to login there, even though I know I entered user name and
password correctly. I don't use OpenOffice.org anyway, so I don't
care, but if someone else want to do it, feel free. You can copy my
report if you like, or link to it. If copying, just remember that
”LibreOffice” sometimes should be replaced by ”OpenOffice.org” in the
text, not everywhere though…

Kind regards

Johnny Rosenberg
ジョニー・ローゼンバーグ

Hi.

When I search for something and leave the Replace With field empty
(meaning that I will replace something with nothing), replace will not
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. Is this a bug or is it only me? Can someone confirm
this?

If it's supposed to work like this, why is that?

LibreOffice 3.3.3, Ubuntu 10.10.
              

...
Works for me. LibreOffice 3.3.3 (US English), Ubuntu 10.10.
            

And you tried it in the BASIC IDE?
          

...

Woops, no I didn't. I'll have to figure out how to use the BASIC IDE
first :slight_smile:
        

Figured it out. No it doesn't work & does as you describe in 3.3.3.

Now trying in 3.4.2 (Final): Same results.
      

FWIW: same results in OOo 3.2.1 (Ubuntu go-oo build), OOo 3.3.0
(standard build), and OOo-Dev 3.4.0.
    

Thanks for confirming. Time for a bug report, I presume…!

What if you try the search for something and the replace with "" (2
quotes, empty string.) I have a couple of editors needing a quoted empty
string to replace something with nothing.
steve

Bill Gradwohl wrote (16-08-11 21:13)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

When I search for something and leave the Replace With field empty
(meaning that I will replace something with nothing), replace will not
take place.

What you describe is also what I get in OpenOffice on Fedora 14.
Searching for a string and having nothing in the replace field causes
the dialog to just search and do no replacements.

Replace all however, does work
  (Ubuntu, LibreOffice 3.4.2)

Yes, I also mentioned that in my bug report.

I wonder why it works differently in the BASIC IDE than in a document
or a spreadsheet. Couldn't they just use the same code in all cases? I
though that was one of the points with objective oriented programming,
not having to invent the wheel over and over again…

I remember I reported another bug some years ago, I think it was about
searching and replacing in the BASIC IDE using regular expressions.
The feature using $1, $2 and so on, in the replace with field, didn't
work as described here:
http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Regular_Expressions_in_Writer#The_.27Replace_with.27_box_.5Ct_.5Cn_.26_.241_.242
It still doesn't work. Maybe I should report it too. I know I did, as
I said, but that was to OpenOffice.org, not LibreOffice… Or did
LibreOffice ”inherit” OpenOffice.org's bug reports?

Kind regards

Johnny Rosenberg
ジョニー・ローゼンバーグ

Then it replaces the string with the two ”quotes” (which by the way
are not quotes, but rather Inch-characters or something – the
following character, within the brackets, is a real quote character:
[”] – U+201D).

Kind regards

Johnny Rosenberg
ジョニー・ローゼンバーグ

And when I was real young there was a left one and a right one (opening/closing), but that was before keyboards.

I think it's different in different countries too. I think (but can
not be sure) that we used the same one on both sides like forever
here, but I was born as late as 1966, so what do I know…?

Kind regards

Johnny Rosenberg
ジョニー・ローゼンバーグ

Hi Johnny,
Johnny Rosenberg wrote (17-08-11 10:47)

Replace all however, does work
  (Ubuntu, LibreOffice 3.4.2)

Yes, I also mentioned that in my bug report.

Sorry, didn't read that. But since you wrote about using a different editor for the replacement in your initial mail, I could not imagine that you referred to single occurrences of a string :slight_smile:

I wonder why it works differently in the BASIC IDE than in a document
or a spreadsheet. Couldn't they just use the same code in all cases?
[...]

AFAIK, many in the search & replace is shared. But not all.
And well, possibly people working with code are expected to use the key board, in any case for single replacements.
But indeed, bit strange though.

Cheers,

Hi Johnny,
Johnny Rosenberg wrote (17-08-11 10:47)

Replace all however, does work
 (Ubuntu, LibreOffice 3.4.2)

Yes, I also mentioned that in my bug report.

Sorry, didn't read that. But since you wrote about using a different editor
for the replacement in your initial mail, I could not imagine that you
referred to single occurrences of a string :slight_smile:

Well, to be honest, I didn't try ”Replace all” until I wrote the bug report…
:slight_smile:

Kind regards

Johnny Rosenberg
ジョニー・ローゼンバーグ

Hi :slight_smile:
I think there is a single key to produce " marks but a lot of programs 'cleverly
just know' whether they are opening or closing. Of course that makes it tricky
if you need to use speech marks inside a quoted speech so they generally expect
you to use the quotes twice. It all gets a bit confusing and messy until you
think of how sub-headings work in wiki pages. ie a single = is a main heading
and a == is a sub-heading and === is even lower than that

Regards from
Tom :slight_smile:

Hi :slight_smile:
I think there is a single key to produce " marks but a lot of programs 'cleverly
just know' whether they are opening or closing.  Of course that makes it tricky
if you need to use speech marks inside a quoted speech so they generally expect
you to use the quotes twice.  It all gets a bit confusing and messy until you
think of how sub-headings work in wiki pages.  ie a single = is a main heading
and a == is a sub-heading and === is even lower than that

Well, we can always make a mess if we want to, like this classical (?)
example in C:
a=b+++++c

which makes a bit more sense with a few spaces:
a=b++ + ++c

Or with parentheses:
a=(b++)+(++c)

Or this way:
a=++c+b++

For you who are not familiar with C, C++ or similar, the ”++” operator
means that the variable is incremented, ”--” means the opposite of
course. If it precedes the variable it means that the incrementing is
performed before the expression is calculated, otherwise that the
incrementing happens afterwards.

Kind regards

Johnny Rosenberg
ジョニー・ローゼンバーグ

Hey, don't you love it. I just noticed LO is clever like this. It replaced my " " with 66 an 99 quotes like the old days.
steve