summaryrefslogtreecommitdiff
path: root/forms/source/component/Filter.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'forms/source/component/Filter.cxx')
-rw-r--r--forms/source/component/Filter.cxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx
index bd9b640f1ce3..c59139d0f5d7 100644
--- a/forms/source/component/Filter.cxx
+++ b/forms/source/component/Filter.cxx
@@ -412,18 +412,16 @@ namespace frm
const Reference< XDatabaseMetaData > xMeta( xConnection->getMetaData(), UNO_SET_THROW );
const OUString sQuoteChar = xMeta->getIdentifierQuoteString();
- aStatement.append( "SELECT DISTINCT " );
- aStatement.append( sQuoteChar );
- aStatement.append( sRealFieldName );
- aStatement.append( sQuoteChar );
+ aStatement.append(
+ "SELECT DISTINCT "
+ + sQuoteChar
+ + sRealFieldName
+ + sQuoteChar );
// if the field had an alias in our form's statement, give it this alias in the new statement, too
if ( !sFieldName.isEmpty() && ( sFieldName != sRealFieldName ) )
{
- aStatement.append(" AS ");
- aStatement.append( sQuoteChar );
- aStatement.append( sFieldName );
- aStatement.append( sQuoteChar );
+ aStatement.append(" AS "+ sQuoteChar + sFieldName + sQuoteChar );
}
aStatement.append( " FROM " );