From f87b4ff50797bda9dbc54a8123b9474132009e79 Mon Sep 17 00:00:00 2001 From: RĂ¼diger Timm Date: Fri, 1 Dec 2006 15:54:42 +0000 Subject: INTEGRATION: CWS dba22a (1.9.16); FILE MERGED 2006/10/25 20:25:14 fs 1.9.16.1: #i70672# correct looping through the result set when creating the proposal list --- forms/source/component/Filter.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'forms/source/component/Filter.cxx') diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx index 500ff3b4ab1d..2bd4e96b02d1 100644 --- a/forms/source/component/Filter.cxx +++ b/forms/source/component/Filter.cxx @@ -4,9 +4,9 @@ * * $RCSfile: Filter.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: obo $ $Date: 2006-09-16 23:49:21 $ + * last change: $Author: rt $ $Date: 2006-12-01 16:54:42 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -534,7 +534,7 @@ namespace frm Reference< XDatabaseMetaData > xMeta = xConnection->getMetaData(); ::rtl::OUString aQuote = xMeta->getIdentifierQuoteString(); ::rtl::OUStringBuffer aStatement; - aStatement.appendAscii( "SELECT DISTINCT" ); + aStatement.appendAscii( "SELECT DISTINCT " ); aStatement.append( ::dbtools::quoteName( aQuote, sName ) ); if ( sFieldName.getLength() && ( sName != sFieldName ) ) @@ -582,12 +582,10 @@ namespace frm sal_Int16 nKeyType = ::comphelper::getNumberFormatType(m_xFormatter->getNumberFormatsSupplier()->getNumberFormats(), nFormatKey); - while (!xListCursor->isAfterLast() && i++ < SHRT_MAX) // max anzahl eintraege + while ( xListCursor->next() && ( i++ < SHRT_MAX) ) { aStr = ::dbtools::DBTypeConversion::getValue(xDataField, m_xFormatter, aNullDate, nFormatKey, nKeyType); - aStringList.push_back(aStr); - xListCursor->next(); } Sequence< ::rtl::OUString> aStringSeq(aStringList.size()); -- cgit