Kaydet (Commit) 7ce0fbe7 authored tarafından Matteo Casalin's avatar Matteo Casalin

Reduce OUString operations

Change-Id: Ia95ced36201ee78d511604a33992be0eff4810df
üst 0da6e880
...@@ -190,12 +190,9 @@ void OSelectionBrowseBox::initialize() ...@@ -190,12 +190,9 @@ void OSelectionBrowseBox::initialize()
for (IParseContext::InternationalKeyCode eFunction : eFunctions) 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 // Aggregate functions in general available only with Core SQL
// We slip in a few optionals one, too. // We slip in a few optionals one, too.
...@@ -697,13 +694,12 @@ bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRef co ...@@ -697,13 +694,12 @@ bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRef co
bool bQuote = ( nPass <= 2 ); bool bQuote = ( nPass <= 2 );
bool bInternational = ( nPass % 2 ) == 0; bool bInternational = ( nPass % 2 ) == 0;
OUString sSql; OUString sSql {"SELECT "};
if ( bQuote ) if ( bQuote )
sSql += sQuotedFullFieldName; sSql += sQuotedFullFieldName;
else else
sSql += sFullFieldName; sSql += sFullFieldName;
sSql = "SELECT " + sSql;
if ( !sFieldAlias.isEmpty() ) if ( !sFieldAlias.isEmpty() )
{ // always quote the alias name: there cannot be a function in it { // always quote the alias name: there cannot be a function in it
sSql += " " + ::dbtools::quoteName( xMetaData->getIdentifierQuoteString(), sFieldAlias ); sSql += " " + ::dbtools::quoteName( xMetaData->getIdentifierQuoteString(), sFieldAlias );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment