diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-07-19 01:31:53 -0500 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2013-07-19 09:45:01 +0000 |
commit | 8529e885186dc1f5aef83cc089ddf5c843acd3d0 (patch) | |
tree | b73baa4ce4be72feed3b6422134b69e84dea28ab /connectivity/source/drivers/file/fcode.cxx | |
parent | Re-set bitmap mask after applying the duotone filter. (diff) | |
download | core-8529e885186dc1f5aef83cc089ddf5c843acd3d0.tar.gz core-8529e885186dc1f5aef83cc089ddf5c843acd3d0.zip |
Cleanup String in connectivity
Change-Id: Ica1cf0ac9e9da9c943e50ba77b1ce4a9dc7f8300
Reviewed-on: https://gerrit.libreoffice.org/4895
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
Diffstat (limited to 'connectivity/source/drivers/file/fcode.cxx')
-rw-r--r-- | connectivity/source/drivers/file/fcode.cxx | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx index 8caa506ee7b7..fb3883cb572b 100644 --- a/connectivity/source/drivers/file/fcode.cxx +++ b/connectivity/source/drivers/file/fcode.cxx @@ -22,7 +22,6 @@ #include "connectivity/sqlparse.hxx" #include <i18nlangtag/mslangid.hxx> #include <tools/debug.hxx> -#include <tools/string.hxx> #include "TConnection.hxx" #include <com/sun/star/sdb/SQLFilterOperator.hpp> #include <comphelper/types.hxx> @@ -123,10 +122,10 @@ OOperandParam::OOperandParam(OSQLParseNode* pNode, sal_Int32 _nPos) OSL_ENSURE(pNode->count() > 0,"Fehler im Parse Tree"); OSQLParseNode *pMark = pNode->getChild(0); - String aParameterName; - if (SQL_ISPUNCTUATION(pMark,"?")) - aParameterName = '?'; - else if (SQL_ISPUNCTUATION(pMark,":")) + OUString aParameterName; + if (SQL_ISPUNCTUATION(pMark, "?")) + aParameterName = "?"; + else if (SQL_ISPUNCTUATION(pMark, ":")) aParameterName = pNode->getChild(1)->getTokenValue(); else { @@ -158,29 +157,27 @@ OOperandConst::OOperandConst(const OSQLParseNode& rColumnRef, const OUString& aS SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OOperandConst::OOperandConst" ); switch (rColumnRef.getNodeType()) { - case SQL_NODE_STRING: - m_aValue = aStrValue; - m_eDBType = DataType::VARCHAR; - m_aValue.setBound(sal_True); - return; - case SQL_NODE_INTNUM: - case SQL_NODE_APPROXNUM: - { - m_aValue = aStrValue.toDouble(); - m_eDBType = DataType::DOUBLE; - m_aValue.setBound(sal_True); - return; - } - default: - break; + case SQL_NODE_STRING: + m_aValue = aStrValue; + m_eDBType = DataType::VARCHAR; + m_aValue.setBound(sal_True); + return; + case SQL_NODE_INTNUM: + case SQL_NODE_APPROXNUM: + m_aValue = aStrValue.toDouble(); + m_eDBType = DataType::DOUBLE; + m_aValue.setBound(sal_True); + return; + default: + break; } - if (SQL_ISTOKEN(&rColumnRef,TRUE)) + if (SQL_ISTOKEN(&rColumnRef, TRUE)) { m_aValue = 1.0; m_eDBType = DataType::BIT; } - else if (SQL_ISTOKEN(&rColumnRef,FALSE)) + else if (SQL_ISTOKEN(&rColumnRef, FALSE)) { m_aValue = 0.0; m_eDBType = DataType::BIT; |