Tag: cws_src680_dba24a
User: oj      
Date: 2007-08-03 08:12:53+0000
Modified:
   dba/dbaccess/source/ui/misc/DExport.cxx

Log:
 #i73710# be mor error prone when update row

File Changes:

Directory: /dba/dbaccess/source/ui/misc/
========================================

File [changed]: DExport.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/misc/DExport.cxx?r1=1.37.54.1&r2=1.37.54.2
Delta lines:  +26 -20
---------------------
--- DExport.cxx 2007-07-23 11:59:03+0000        1.37.54.1
+++ DExport.cxx 2007-08-03 08:12:50+0000        1.37.54.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: DExport.cxx,v $
  *
- *  $Revision: 1.37.54.1 $
+ *  $Revision: 1.37.54.2 $
  *
- *  last change: $Author: fs $ $Date: 2007/07/23 11:59:03 $
+ *  last change: $Author: oj $ $Date: 2007/08/03 08:12:50 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -395,7 +395,7 @@
                     sal_Int32 nNumberFormat = 0;
                     double fOutNumber = 0.0;
                     OSL_ENSURE((nNewPos) < 
static_cast<sal_Int32>(m_vColumnTypes.size()),"Illegal index for vector");
-                    if (m_vColumnTypes[nNewPos] != DataType::VARCHAR)
+                    if (m_vColumnTypes[nNewPos] != DataType::VARCHAR && 
m_vColumnTypes[nNewPos] != DataType::CHAR && m_vColumnTypes[nNewPos] != 
DataType::LONGVARCHAR )
                     {
                         Reference< XNumberFormatsSupplier >  xSupplier = 
m_xFormatter->getNumberFormatsSupplier();
                         Reference<XPropertySet> xNumberFormatSettings = 
xSupplier->getNumberFormatSettings();
@@ -403,6 +403,7 @@
                         
xNumberFormatSettings->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NullDate")))
 >>= aNullDate;
 
                         ensureFormatter();
+                        bool bNumberFormatError = false;
                         if ( m_pFormatter && m_sNumToken.Len() )
                         {
                             LanguageType eNumLang;
@@ -437,9 +438,13 @@
                             }
                             catch(Exception&)
                             {
+                                bNumberFormatError = true;
+                                
m_pUpdateHelper->updateString(nPos,m_sTextToken);
                                 OSL_ENSURE(0,"Could not convert to number!");
                             }
                         }
+                        if ( !bNumberFormatError )
+                        {
                         try
                         {
                             Reference< XNumberFormats >         xFormats = 
xSupplier->getNumberFormats();
@@ -461,6 +466,7 @@
                         {
                             m_pUpdateHelper->updateString(nPos,m_sTextToken);
                         }
+                        }
 
                     }
                     else




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to