[Libreoffice-commits] core.git: sc/source

Jianyuan Li lijiany at apache.org
Tue Mar 26 17:25:25 PDT 2013


 sc/source/filter/excel/xlpivot.cxx |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

New commits:
commit c52851bf5603136fb58b828ff9e848aa0cdfbef0
Author: Jianyuan Li <lijiany at apache.org>
Date:   Tue Sep 25 04:53:47 2012 +0000

    Fix #119514#:Item lists are incorrectly imported
    
    Reported by: Terry Yang
    Reviewed by: sunying
    Patched by: Jianyuan Li
    Conflicts:
    	sc/source/filter/excel/xlpivot.cxx
    
    Change-Id: Ib33fc4da3d190cfafb534f22d140de5b2f830dd5

diff --git a/sc/source/filter/excel/xlpivot.cxx b/sc/source/filter/excel/xlpivot.cxx
index 84a6042..8a902e0 100644
--- a/sc/source/filter/excel/xlpivot.cxx
+++ b/sc/source/filter/excel/xlpivot.cxx
@@ -86,9 +86,19 @@ void XclPCItem::SetInteger( sal_Int16 nValue )
 void XclPCItem::SetError( sal_uInt16 nError )
 {
     meType = EXC_PCITEM_ERROR;
-    //! TODO convert error to string
     maText = rtl::OUString();
     mnError = nError;
+    switch( nError )
+    {
+    case 0x00: maText = "#NULL!"; break;
+    case 0x07: maText = "#DIV/0!"; break;
+    case 0x0F: maText = "#VALUE!"; break;
+    case 0x17: maText = "#REF!"; break;
+    case 0x1D: maText = "#NAME?"; break;
+    case 0x24: maText = "#NUM!"; break;
+    case 0x2A: maText = "#N/A"; break;
+    default: break;
+    }
 }
 
 void XclPCItem::SetBool( bool bValue )
@@ -125,7 +135,7 @@ bool XclPCItem::IsEmpty() const
 
 const rtl::OUString* 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


More information about the Libreoffice-commits mailing list