To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=47724
Issue #:|47724
Summary:|adding #Div/0! error in calc
Component:|Spreadsheet
Version:|680m90
Platform:|All
URL:|
OS/Version:|All
Status:|UNCONFIRMED
Status whiteboard:|
Keywords:|
Resolution:|
Issue type:|PATCH
Priority:|P3
Subcomponent:|code
Assigned to:|spreadsheet
Reported by:|muthusuba
------- Additional comments from [EMAIL PROTECTED] Tue Apr 19 03:15:09 -0700
2005 -------
we need to throw more friendly #div/0 error when user tries to divide by zero
instead of more generic Err: 503
depends on i#47644 - # improved error/value compatibility
heres a simple patch for it:
--- sc/source/core/tool/interpr5.cxx 2005-04-14 09:50:06.000000000 +0530
+++ sc/source/core/tool/interpr5.cxx 2005-04-19 11:49:19.127898368 +0530
@@ -2024,7 +2024,12 @@
PushError();
}
else
- PushDouble(fVal1 / fVal2);
+ {
+ if( fVal2 == 0 )
+ SetError( errDivisionByZero );
+ else
+ PushDouble( fVal1 / fVal2 );
+ }
if ( nFmtCurrencyType == NUMBERFORMAT_CURRENCY && nFmtCurrencyType2 !=
NUMBERFORMAT_CURRENCY )
{ // auch DM/DM ist nicht DM bzw. DEM/EUR nicht DEM
nFuncFmtType = nFmtCurrencyType;
---------------------------------------------------------------------
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]