Issue 58749

Summary: does not match
Product: App Dev Reporter: villeroy <villeroy>
Component: apiAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues
Version: 3.3.0 or older (OOo)   
Target Milestone: ---   
Hardware: All   
OS: Unix, all   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

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 "".