To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=88491
Issue #|88491
Summary|optional string parameter default value is "0" and is
|missing not working
Component|Spreadsheet
Version|OOo 2.4.0
Platform|All
URL|
OS/Version|All
Status|UNCONFIRMED
Status whiteboard|
Keywords|
Resolution|
Issue type|DEFECT
Priority|P3
Subcomponent|programming
Assigned to|spreadsheet
Reported by|bijugc
------- Additional comments from [EMAIL PROTECTED] Sun Apr 20 15:34:28 +0000
2008 -------
When a macro function is called from Calc as formula not all time the
"ismissing" on a optional string parameter yield true when missing.
and the default value is zero.
Steps:-
1. add following list2array macro to "My Macro" module
2. put a break point on "if ismissing(separator) or " .... line
3. come back to Calc to enter formula
4. enter =LIST2ARRAY("aaa,bbb,ccc";;2)
5. press shift+ctrl+enter key to enter as array
6. go to macro editor to debug
7. check
* value of separator
* value of ismissing(separator)
Actual
* value of separator = "0"
* value of ismissing(separator) = false
Expected
* value of separator = ""
* value of ismissing(separator) = true
=== list2array macro ====
function list2array( _
optional list as string, _
optional separator as string, _
optional max as integer)
if ismissing(list) then
list = ""
end if
if ismissing(separator) or separator = "" or separator = "0" then
separator = ","
end if
dim a()
a = split(list, separator)
if ismissing(max) then
'nothing
elseif max < 1 then
'nothing
else
redim preserve a(max-1)
end if
list2array = a
end function
---------------------------------------------------------------------
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]