Issue 113820 - TEXT function not working as expected - is broken
Summary: TEXT function not working as expected - is ...
Alias: None
Product: Calc
Classification: Application
Component: programming (show other issues)
Version: OOO330m3
Hardware: All All
: P2 Trivial (vote)
Target Milestone: ---
Assignee: oc
QA Contact: issues@sc
Keywords: regression
Depends on:
Blocks: 111112
  Show dependency tree
Reported: 2010-08-11 18:26 UTC by Oliver Brinzing
Modified: 2017-05-20 10:33 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

test_format (7.92 KB, application/vnd.oasis.opendocument.spreadsheet)
2010-08-12 10:13 UTC, Oliver Brinzing
no flags Details
test cases, augmented from issue 108385 (8.97 KB, application/vnd.oasis.opendocument.spreadsheet)
2010-08-18 15:43 UTC, ooo
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Oliver Brinzing 2010-08-11 18:26:02 UTC
steps to reproduce: 

run macro provided below

OO 1.1.5/3.2/3.2.1 will show "--04" 
OOO330m3 will show "4"

so i think this is a regression ...

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

Sub Main

	Dim oService as Object
	Dim mArgs(1)
	Dim res as Variant
	oService = createUNOService("")

	mArgs(0) = "4"
        mArgs(1) = "--0#"
	' example: convert the given value to a "xs:gMonth" ...
        res = oService.callFunction("TEXT", mArgs())
	MsgBox res
End Sub
Comment 1 Oliver Brinzing 2010-08-12 10:12:57 UTC
noticed: " mArgs(0) = 4 "will work, so there is a problem 
with text/number conversion ?

btw: attached "test_format.ods" will show, that =TEXT(xVal, Format) function
still accepts number/string values for xVal parameter ...
Comment 2 Oliver Brinzing 2010-08-12 10:13:42 UTC
Created attachment 71050 [details]
Comment 3 ooo 2010-08-12 11:52:27 UTC
There were changes in the TEXT function, see
Erroneously a text string passed as argument is treated differently from textual
cell content, i.e. =TEXT("4";"--0#") is different from =TEXT(B1;"--0#") with B1:'4
Comment 4 ooo 2010-08-18 15:43:10 UTC
Created attachment 71168 [details]
test cases, augmented from issue 108385
Comment 5 ooo 2010-08-18 15:54:41 UTC
In cws calc58:

changeset 64f1e0baf188
M sc/source/core/tool/interpr1.cxx

You can observe the progress and possible integration date of CWS calc58 at
Comment 6 ooo 2010-08-23 11:33:06 UTC
Reassigning to QA for verification.
Comment 7 oc 2010-08-25 12:22:56 UTC
verified in internal build cws_calc58