You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by li...@apache.org on 2012/09/25 07:53:48 UTC
svn commit: r1389719 -
/incubator/ooo/trunk/main/sc/source/filter/excel/xlpivot.cxx
Author: lijiany
Date: Tue Sep 25 05:53:47 2012
New Revision: 1389719
URL: http://svn.apache.org/viewvc?rev=1389719&view=rev
Log:
#119514#:Item lists are incorrectly imported
Reported by: Terry Yang
Reviewed by: sunying
Patched by: Jianyuan Li
Modified:
incubator/ooo/trunk/main/sc/source/filter/excel/xlpivot.cxx
Modified: incubator/ooo/trunk/main/sc/source/filter/excel/xlpivot.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sc/source/filter/excel/xlpivot.cxx?rev=1389719&r1=1389718&r2=1389719&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sc/source/filter/excel/xlpivot.cxx (original)
+++ incubator/ooo/trunk/main/sc/source/filter/excel/xlpivot.cxx Tue Sep 25 05:53:47 2012
@@ -91,9 +91,19 @@ void XclPCItem::SetInteger( sal_Int16 nV
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