To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=66590
Issue #:|66590
Summary:|OOo-Calc String Function: Find
Component:|Spreadsheet
Version:|OOo 2.0.2
Platform:|All
URL:|
OS/Version:|All
Status:|UNCONFIRMED
Status whiteboard:|
Keywords:|
Resolution:|
Issue type:|DEFECT
Priority:|P3
Subcomponent:|code
Assigned to:|spreadsheet
Reported by:|discoleo
------- Additional comments from [EMAIL PROTECTED] Tue Jun 20 05:25:41 -0700
2006 -------
The motto for OOo should be innovation and implementation of brilliant ideas
instead of copying MS Office. Only in this way it can surpass its rivals.
One issue where OOo continues to copy the bad quirks of MS Office is the string
search/find function in Calc.
As an example: lets type in an arbitrary cell in Calc:
=find('string_to_find','cell where to find')
IF 'the string_to_find' isn't found, this function returns an error code
(#VALUE!), that breaks any further Calc function (i.e. it cannot be used as an
argument in any other operation).
WHY???
Why does it not return (int) 0. This seems the logical return value if the
string is NOT found. As the the target string starts at position 1, a value of 0
does not interfere in any way with other results AND would permit to use the
return value as a normal operand in any other operation.
Another example: I would like to search if either 'str1' OR 'str2' is present:
=(find("str1";A1;1) OR find("str2";A1;1)) => it DOES NOT work, because it
returns an error if one of the strings is not found. This is definitely wrong
behaviour!!!
NOT finding a string is NOT an error, it should be just reporting a value beyond
the normal string positions. A good example comes from the member function find
from the C++ basic_string template class (basic_string::find). When the string
is NOT found, it returns basic_string::npos, which is the SAME TYPE as any other
search result (most often (unsigned int) (-1) ). It DOES NOT generate an error
or raise an exception.
This is the normal behaviour and is fully logical.
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]