summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2018-09-09 12:25:08 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2018-09-09 21:08:00 +0200
commit7ce0fbe7e71cfde8a73f359fac5dd9ed02587be7 (patch)
tree909197324a3aa1e5a4f42be5580c384b9a230746 /dbaccess
parent0da6e8800b8188caae60707ed2c609d9a17c1dd8 (diff)
Reduce OUString operations
Change-Id: Ia95ced36201ee78d511604a33992be0eff4810df
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index c99cfd24b64d..97848337ffa4 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -190,12 +190,9 @@ void OSelectionBrowseBox::initialize()
for (IParseContext::InternationalKeyCode eFunction : eFunctions)
{
- m_aFunctionStrings += ";";
- m_aFunctionStrings += OStringToOUString(rContext.getIntlKeywordAscii(eFunction),
- RTL_TEXTENCODING_UTF8);
+ m_aFunctionStrings += ";" + OStringToOUString(rContext.getIntlKeywordAscii(eFunction), RTL_TEXTENCODING_UTF8);
}
- m_aFunctionStrings += ";";
- m_aFunctionStrings += sGroup;
+ m_aFunctionStrings += ";" + sGroup;
// Aggregate functions in general available only with Core SQL
// We slip in a few optionals one, too.
@@ -697,13 +694,12 @@ bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRef co
bool bQuote = ( nPass <= 2 );
bool bInternational = ( nPass % 2 ) == 0;
- OUString sSql;
+ OUString sSql {"SELECT "};
if ( bQuote )
sSql += sQuotedFullFieldName;
else
sSql += sFullFieldName;
- sSql = "SELECT " + sSql;
if ( !sFieldAlias.isEmpty() )
{ // always quote the alias name: there cannot be a function in it
sSql += " " + ::dbtools::quoteName( xMetaData->getIdentifierQuoteString(), sFieldAlias );