summaryrefslogtreecommitdiff
path: root/connectivity/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-10-16 15:06:23 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-10-17 07:28:49 +0200
commit8b4719c29fc9bd7e198ad6ced301e1ff7a350f16 (patch)
treed3ec594b343f56c76056418d835d3bc7b696a9ab /connectivity/source
parentf51cd77bcecc5134e0e04c398bfb7b34eb65d68d (diff)
Rename OUStringLiteral1 to OUStringChar
It started out as a wrapper around character literals, but has by now become a wrapper around arbitrary single characters. Besides updating the documentation, this change is a mechanical for i in $(git grep -Fl OUStringLiteral1); do sed -i -e s/OUStringLiteral1/OUStringChar/g "$i"; done Change-Id: I1b9eaa4b3fbc9025ce4a4bffea3db1c16188b76f Reviewed-on: https://gerrit.libreoffice.org/80892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'connectivity/source')
-rw-r--r--connectivity/source/drivers/evoab2/NStatement.cxx6
-rw-r--r--connectivity/source/drivers/firebird/Util.cxx2
-rw-r--r--connectivity/source/drivers/flat/ETable.cxx2
3 files changed, 5 insertions, 5 deletions
diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx
index 8f6d7959f222..e7f9dd6b794e 100644
--- a/connectivity/source/drivers/evoab2/NStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NStatement.cxx
@@ -361,7 +361,7 @@ EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree )
OUString aMatchString = pAtom->getTokenValue();
// Determine where '%' character is...
- if( aMatchString == OUStringLiteral1(WILDCARD) )
+ if( aMatchString == OUStringChar(WILDCARD) )
{
// String containing only a '%' and nothing else matches everything
pResult = createTest( aColumnName, E_BOOK_QUERY_CONTAINS,
@@ -381,7 +381,7 @@ EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree )
}
else if( aMatchString.indexOf ( WILDCARD ) == aMatchString.lastIndexOf ( WILDCARD ) )
{ // One occurrence of '%' matches...
- if ( aMatchString.startsWith(OUStringLiteral1(WILDCARD)) )
+ if ( aMatchString.startsWith(OUStringChar(WILDCARD)) )
pResult = createTest( aColumnName, E_BOOK_QUERY_ENDS_WITH, aMatchString.copy( 1 ) );
else if ( aMatchString.indexOf ( WILDCARD ) == aMatchString.getLength() - 1 )
pResult = createTest( aColumnName, E_BOOK_QUERY_BEGINS_WITH, aMatchString.copy( 0, aMatchString.getLength() - 1 ) );
@@ -389,7 +389,7 @@ EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree )
m_xConnection->throwGenericSQLException(STR_QUERY_LIKE_WILDCARD,*this);
}
else if( aMatchString.getLength() >= 3 &&
- aMatchString.startsWith(OUStringLiteral1(WILDCARD)) &&
+ aMatchString.startsWith(OUStringChar(WILDCARD)) &&
aMatchString.indexOf ( WILDCARD, 1) == aMatchString.getLength() - 1 ) {
// one '%' at the start and another at the end
pResult = createTest( aColumnName, E_BOOK_QUERY_CONTAINS, aMatchString.copy (1, aMatchString.getLength() - 2) );
diff --git a/connectivity/source/drivers/firebird/Util.cxx b/connectivity/source/drivers/firebird/Util.cxx
index 0c63c048d32e..c4d6eeece4d1 100644
--- a/connectivity/source/drivers/firebird/Util.cxx
+++ b/connectivity/source/drivers/firebird/Util.cxx
@@ -395,7 +395,7 @@ OUString firebird::escapeWith( const OUString& sText, const char aKey, const cha
while( (aIndex = sRet.indexOf(aKey, aIndex)) > 0 &&
aIndex < sRet.getLength())
{
- sRet = sRet.replaceAt(aIndex, 1, OUStringLiteral1(aEscapeChar) + OUStringLiteral1(aKey) );
+ sRet = sRet.replaceAt(aIndex, 1, OUStringChar(aEscapeChar) + OUStringChar(aKey) );
aIndex+= 2;
}
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index 0e2290dddc91..05ac29b79ff2 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -673,7 +673,7 @@ bool OFlatTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool
else
{
if ( cThousandDelimiter )
- aStrConverted = aStr.replaceAll(OUStringLiteral1(cThousandDelimiter), "");
+ aStrConverted = aStr.replaceAll(OUStringChar(cThousandDelimiter), "");
else
aStrConverted = aStr;
}