Kaydet (Commit) b82b2622 authored tarafından Jianyuan Li's avatar Jianyuan Li

#119514#:Item lists are incorrectly imported

Reported by: Terry Yang
Reviewed by: sunying
Patched by: Jianyuan Li
üst da8df30d
......@@ -91,9 +91,19 @@ void XclPCItem::SetInteger( sal_Int16 nValue )
void XclPCItem::SetError( sal_uInt16 nError )
{
meType = EXC_PCITEM_ERROR;
//! TODO convert error to string
maText.Erase();
mnError = nError;
switch( nError )
{
case 0x00: maText = String::CreateFromAscii("#NULL!"); break;
case 0x07: maText = String::CreateFromAscii("#DIV/0!"); break;
case 0x0F: maText = String::CreateFromAscii("#VALUE!" ); break;
case 0x17: maText = String::CreateFromAscii("#REF!"); break;
case 0x1D: maText = String::CreateFromAscii("#NAME?"); break;
case 0x24: maText = String::CreateFromAscii("#NUM!" ); break;
case 0x2A: maText = String::CreateFromAscii("#N/A"); break;
default: break;
}
}
void XclPCItem::SetBool( bool bValue )
......@@ -130,7 +140,7 @@ bool XclPCItem::IsEmpty() const
const String* XclPCItem::GetText() const
{
return (meType == EXC_PCITEM_TEXT) ? &maText : 0;
return (meType == EXC_PCITEM_TEXT || meType == EXC_PCITEM_ERROR) ? &maText : NULL;
}
const double* XclPCItem::GetDouble() const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment