diff options
author | Noel Grandin <noel@peralex.com> | 2015-07-08 15:02:31 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-07-10 08:09:00 +0000 |
commit | 54013188b24a1a02491a2853f731461253065424 (patch) | |
tree | 45078e1deb8bdfdde79a431daa81fde7c47621ad /connectivity | |
parent | fd2749455fe25e24b448a44f9ada6113e5ac0d13 (diff) |
cleanup some unnecessary direct usage of the OString/OUString C API.
Change-Id: I6edee95aae1c169ce70063562a0c1b287e0c4735
Reviewed-on: https://gerrit.libreoffice.org/16861
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/file/fcode.cxx | 7 | ||||
-rw-r--r-- | connectivity/source/drivers/postgresql/pq_tools.cxx | 16 |
2 files changed, 5 insertions, 18 deletions
diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx index 96793912a33e..e4c14261fa2d 100644 --- a/connectivity/source/drivers/file/fcode.cxx +++ b/connectivity/source/drivers/file/fcode.cxx @@ -305,12 +305,7 @@ bool OOp_COMPARE::operate(const OOperand* pLeft, const OOperand* pRight) const case DataType::LONGVARCHAR: { OUString sLH = aLH, sRH = aRH; - sal_Int32 nRes = rtl_ustr_compareIgnoreAsciiCase_WithLength - ( - sLH.pData->buffer, - sLH.pData->length, - sRH.pData->buffer, - sRH.pData->length ); + sal_Int32 nRes = sLH.compareToIgnoreAsciiCase(sRH); switch(aPredicateType) { case SQLFilterOperator::EQUAL: bResult = (nRes == 0); break; diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx index 4d75e8c3bc57..ae9b304ad2af 100644 --- a/connectivity/source/drivers/postgresql/pq_tools.cxx +++ b/connectivity/source/drivers/postgresql/pq_tools.cxx @@ -769,9 +769,7 @@ OString extractSingleTableFromSelect( const OStringVector &vec ) token ++; } - if( token < vec.size() && rtl_str_compare_WithLength( - vec[token].getStr(), vec[token].getLength(), - RTL_CONSTASCII_STRINGPARAM("(") ) ) + if( token < vec.size() && vec[token] == "(" ) { // it is a table or a function name OStringBuffer buf(128); @@ -783,9 +781,7 @@ OString extractSingleTableFromSelect( const OStringVector &vec ) if( token < vec.size() ) { - if( rtl_str_compare_WithLength( - vec[token].getStr(), vec[token].getLength(), - RTL_CONSTASCII_STRINGPARAM( "." ) ) == 0 ) + if( vec[token] == "." ) { buf.append( vec[token] ); token ++; @@ -803,9 +799,7 @@ OString extractSingleTableFromSelect( const OStringVector &vec ) ret = buf.makeStringAndClear(); // now got my table candidate - if( token < vec.size() && rtl_str_compare_WithLength( - vec[token].getStr(), vec[token].getLength(), - RTL_CONSTASCII_STRINGPARAM( "(" ) ) == 0 ) + if( token < vec.size() && vec[token] == "(" ) { // whoops, it is a function ret.clear(); @@ -823,9 +817,7 @@ OString extractSingleTableFromSelect( const OStringVector &vec ) if( token < vec.size() ) { - if( rtl_str_compare_WithLength( - vec[token].getStr(), vec[token].getLength(), - RTL_CONSTASCII_STRINGPARAM( "," ) ) == 0 ) + if( vec[token] == "," ) { // whoops, multiple tables are used ret.clear(); |