Issue 58749 - does not match
Summary: does not match
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All Unix, all
: P3 Trivial
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2005-12-01 18:22 UTC by villeroy
Modified: 2017-05-20 11:27 UTC (History)
1 user (show)

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


Note You need to log in before you can comment on or make changes to this issue.
Description villeroy 2005-12-01 18:22:12 UTC
Please run following basic code:
REM  *****  BASIC  *****
sub test_FormulaResult_ERROR
oDoc = StarDesktop.loadComponentFromURL( "private:factory/scalc", "_blank", 0,
Array() )
oCell = oDoc.getSheets.getByIndex(0).getCellByPosition(0,0)
printResult oCell
end sub
sub printResult(oCell)
lContentType = oCell.getType
lResultType = oCell.FormulaResultType
sFml = oCell.FormulaLocal
if lContentType = then
	sResult = sFml &" returning "
	if lResultType = then
		sResult = sResult & "an error"
		sResult = sResult & "NO error"
elseif lContentType = then
	sResult = "Text: "& oCell.getString
elseif lContentType = then
	sResult = "Number: "& oCell.getValue
msgbox sResult
end sub
Comment 1 villeroy 2005-12-01 19:04:45 UTC
Iforgot to mention:
A constant error-value (generated with paste special) pretends to be a
Comment 2 jsc 2005-12-02 08:05:44 UTC
jsc -> nn: it's one for you
Comment 3 niklas.nebel 2006-11-03 11:03:52 UTC
You can query for errors using getError (from XCell).
But FormulaResult contains the ERROR value, so FormulaResultType should be
changed to return it for errors.
Comment 4 niklas.nebel 2006-11-10 14:36:17 UTC
The documentation is wrong, FormulaResultType is of type CellContentType, an
enum that doesn't contain an ERROR value. Changing this might break existing
code. Since a workaround exists (getError), I'm changing this to LATER.
Comment 5 Marcus 2017-05-20 11:27:49 UTC
Reset assigne to the default "".