After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 167304 - Replace cannot turn some strings into expressions
Replace cannot turn some strings into expressions
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: General
git master
Other All
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2005-02-13 22:42 UTC by Helmut Wollmersdorfer
Modified: 2006-04-05 19:55 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Helmut Wollmersdorfer 2005-02-13 22:42:06 UTC
Version details: 1.4.2-2 Debian/Sarge

If an expression contains a leading SINGLE QUOTE character, this cannot be found
or replaced with option "Search text is" "Plain text".

E.g. the expression

'=Sheet3!A1

cannot be replaced to

=Sheet3!A1
Comment 1 Morten Welinder 2005-02-14 14:29:37 UTC
The single quote isn't part of the cell content: if you asked for the left-most
character it would be "=", not the quote.  The single quote serves only as a
marker to prevent strings from being interpreted.

And therein lies the trouble: in general we want to keep strings as string and
not have them interpreted.

Suppose we have two cells:

A1: =sum(1,2,3)                       [an expression]
A2: '=sum(1,2,3)                      [a string]

and replace 3 by 4.  I don't think we want A2 to become an expression.

If we have

A3: BLUE

and replace "BL" by "TR", then currently we change A3 to a boolean-valued
cell.  That doesn't feel right.
Comment 2 Helmut Wollmersdorfer 2005-02-14 15:21:51 UTC
Any user explicitely replacing the leading single quote knows what he is doing.

But nobody will understand, why he can see, add, remove the leading quote in the
edit line, i.e. it is part of the cell content from the users point of view, but
it is not possible to find/replace it.
Comment 3 Morten Welinder 2005-02-14 15:34:43 UTC
Don't get me wrong: we need to improve something, but it isn't clear exactly what.

The problem with the single quote is that it is not part of the cell contents.
Type 'xxx and Gnumeric will eat the quote.  For strings that would be
interpreted differently without a quote, we tag a single quote back on when
displaying in the edit line.

Ok, you say, for search and replace simply pretend the single quote is real.

That breaks other things, such as searching for all cells starting with a
minus.  I cannot think of a reason we would want to break that.

We need to find a solution that works for as many reasonable things as we
can.
Comment 4 Morten Welinder 2006-04-05 19:55:24 UTC
Fixed in cvs.

The dialog's "Advanced" tab now has an extra check button "Keep strings as
strings".  It is checked by default.

You still cannot search and replace the single quote, but you get the same
effect by replacing "=" by "=" (or the empty string by the empty string).

In the BLUE->TRUE case above, TRUE will now be a string unless you uncheck
the new button.