diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2012-07-14 18:00:06 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-07-16 11:33:05 +0100 |
commit | df645a2bd8a9b5463c74f261268f0d2de7245ccc (patch) | |
tree | 25d5df125c50111828d1e1f62edd47b716c11489 /connectivity | |
parent | 0dde6d4a2d14dcb09187d476c4fbb80b6e008315 (diff) |
There is not need to allocate memory just for getting the 'indexOf'
a literal within a OUString.
Change-Id: I01ca30c68228f81b3d313dfca5b975448f3c4fc7
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/commontools/AutoRetrievingBase.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/odbcbase/OStatement.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/parse/sqliterator.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/parse/sqlnode.cxx | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/connectivity/source/commontools/AutoRetrievingBase.cxx b/connectivity/source/commontools/AutoRetrievingBase.cxx index 3015830a90c4..e88fe4160214 100644 --- a/connectivity/source/commontools/AutoRetrievingBase.cxx +++ b/connectivity/source/commontools/AutoRetrievingBase.cxx @@ -41,7 +41,7 @@ namespace connectivity nIndex = sStatement.indexOf(sTable,nIndex); if ( -1 != nIndex ) { // we need a table name - sal_Int32 nIntoIndex = sStmt.indexOf(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INTO "))); + sal_Int32 nIntoIndex = sStmt.indexOf("INTO "); sStmt = sStmt.copy(nIntoIndex+5); do { diff --git a/connectivity/source/drivers/odbcbase/OStatement.cxx b/connectivity/source/drivers/odbcbase/OStatement.cxx index f2973b8ac41d..ce92dee3fc0f 100644 --- a/connectivity/source/drivers/odbcbase/OStatement.cxx +++ b/connectivity/source/drivers/odbcbase/OStatement.cxx @@ -269,7 +269,7 @@ sal_Bool OStatement_Base::lockIfNecessary (const ::rtl::OUString& sql) throw( SQ // Now, look for the FOR UPDATE keywords. If there is any extra white // space between the FOR and UPDATE, this will fail. - sal_Int32 index = sqlStatement.indexOf(::rtl::OUString(" FOR UPDATE")); + sal_Int32 index = sqlStatement.indexOf(" FOR UPDATE"); // We found it. Change our concurrency level to ensure that the // row can be updated. diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx index 7c3bb8e0f5a0..f30aca2fe41f 100644 --- a/connectivity/source/parse/sqliterator.cxx +++ b/connectivity/source/parse/sqliterator.cxx @@ -2126,7 +2126,7 @@ void OSQLParseTreeIterator::impl_appendError( IParseContext::ErrorCode _eError, sErrorMessage = sErrorMessage.replaceAt( sErrorMessage.indexOf( sPlaceHolder1 ), sPlaceHolder1.getLength(), *_pReplaceToken1 ); if ( _pReplaceToken2 ) - sErrorMessage = sErrorMessage.replaceAt( sErrorMessage.indexOf( ::rtl::OUString("#2") ), 2, *_pReplaceToken2 ); + sErrorMessage = sErrorMessage.replaceAt( sErrorMessage.indexOf( "#2" ), 2, *_pReplaceToken2 ); } impl_appendError( SQLException( diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index e2afd6a4ebff..6996638eba08 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -976,7 +976,7 @@ sal_Int16 OSQLParser::buildLikeRule(OSQLParseNode*& pAppend, OSQLParseNode*& pLi break; default: m_sErrorMessage = m_pContext->getErrorMessage(IParseContext::ERROR_VALUE_NO_LIKE); - m_sErrorMessage = m_sErrorMessage.replaceAt(m_sErrorMessage.indexOf(::rtl::OUString("#1")),2,pLiteral->getTokenValue()); + m_sErrorMessage = m_sErrorMessage.replaceAt(m_sErrorMessage.indexOf("#1"),2,pLiteral->getTokenValue()); break; } } |