Kaydet (Commit) 29aabfa6 authored tarafından Vladimir Glazounov's avatar Vladimir Glazounov

INTEGRATION: CWS dba22b (1.36.10); FILE MERGED

2007/01/03 15:14:43 fs 1.36.10.2: #i10000#
2007/01/03 14:42:40 oj 1.36.10.1: #i69831# check any number format
üst ef3cd2cf
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: DExport.cxx,v $ * $RCSfile: DExport.cxx,v $
* *
* $Revision: 1.36 $ * $Revision: 1.37 $
* *
* last change: $Author: rt $ $Date: 2006-12-01 17:31:38 $ * last change: $Author: vg $ $Date: 2007-01-15 14:35:51 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -413,36 +413,32 @@ void ODatabaseExport::insertValueIntoColumn() ...@@ -413,36 +413,32 @@ void ODatabaseExport::insertValueIntoColumn()
else else
{ {
Reference<XNumberFormatTypes> xNumType(xSupplier->getNumberFormats(),UNO_QUERY); Reference<XNumberFormatTypes> xNumType(xSupplier->getNumberFormats(),UNO_QUERY);
sal_Int16 nFormats[] = { NumberFormat::DATETIME
try ,NumberFormat::DATETIME
{ ,NumberFormat::DATE
nNumberFormat = m_xFormatter->detectNumberFormat(xNumType->getStandardFormat(NumberFormat::DATETIME,m_aLocale),m_sTextToken); ,NumberFormat::TIME
} ,NumberFormat::NUMBER
catch(Exception&) ,NumberFormat::LOGICAL
};
for (size_t i = 0; i < sizeof(nFormats)/sizeof(nFormats[0]); ++i)
{ {
try try
{ {
nNumberFormat = m_xFormatter->detectNumberFormat(xNumType->getStandardFormat(NumberFormat::DATE,m_aLocale),m_sTextToken); nNumberFormat = m_xFormatter->detectNumberFormat(xNumType->getStandardFormat(nFormats[i],m_aLocale),m_sTextToken);
break;
} }
catch(Exception&) catch(Exception&)
{ {
try
{
nNumberFormat = m_xFormatter->detectNumberFormat(xNumType->getStandardFormat(NumberFormat::TIME,m_aLocale),m_sTextToken);
}
catch(Exception&)
{
try
{
nNumberFormat = m_xFormatter->detectNumberFormat(xNumType->getStandardFormat(NumberFormat::NUMBER,m_aLocale),m_sTextToken);
}
catch(Exception&)
{
}
}
} }
} }
fOutNumber = m_xFormatter->convertStringToNumber(nNumberFormat,m_sTextToken); try
{
fOutNumber = m_xFormatter->convertStringToNumber(nNumberFormat,m_sTextToken);
}
catch(Exception&)
{
OSL_ENSURE(0,"Could not convert to number!");
}
} }
try try
{ {
......
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