[Libreoffice-commits] .: dbaccess/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Jan 7 05:53:39 PST 2013
dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
New commits:
commit 36e1e0ce128a25ce63743bed18a599a6915f3ec3
Author: Marcos Paulo de Souza <marcos.souza.org at gmail.com>
Date: Mon Jan 7 07:45:44 2013 -0200
fdo#57950: Remove some chained appends in dbaccess
Also simplify logic a little bit.
Change-Id: I342f8d1d22e70023d23c6c8ca3976d501e18fb90
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org at gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/1559
Reviewed-by: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Tested-by: LuboÅ¡ LuÅák <l.lunak at suse.cz>
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index aff9dde..f398a46 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -765,25 +765,17 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr
bCase = m_xMetaData->supportsMixedCaseQuotedIdentifiers();
aSelectColumns = m_aSqlIterator.getSelectColumns();
- ::rtl::OUStringBuffer aSQL;
- aSQL.append( m_aPureSelectSQL );
- aSQL.append( STR_WHERE );
+ OUStringBuffer aSQL( m_aPureSelectSQL + STR_WHERE + " ( 0 = 1 )");
// preserve the original WHERE clause
// #i102234#
- ::rtl::OUString sOriginalWhereClause = getSQLPart( Where, m_aSqlIterator, sal_False );
+ OUString sOriginalWhereClause = getSQLPart( Where, m_aSqlIterator, sal_False );
if ( !sOriginalWhereClause.isEmpty() )
{
- aSQL.appendAscii( " ( 0 = 1 ) AND ( " );
- aSQL.append( sOriginalWhereClause );
- aSQL.appendAscii( " ) " );
- }
- else
- {
- aSQL.appendAscii( " ( 0 = 1 ) " );
+ aSQL.append( " AND ( " + sOriginalWhereClause + " ) " );
}
- ::rtl::OUString sGroupBy = getSQLPart( Group, m_aSqlIterator, sal_True );
+ OUString sGroupBy = getSQLPart( Group, m_aSqlIterator, sal_True );
if ( !sGroupBy.isEmpty() )
aSQL.append( sGroupBy );
More information about the Libreoffice-commits
mailing list