Tag: cws_src680_rpt23fix02 User: lla Date: 2007-07-20 12:20:02+0000 Modified: dba/reportdesign/source/core/api/ReportEngineJFree.cxx
Log: #i79744# fix problems with empty group headers File Changes: Directory: /dba/reportdesign/source/core/api/ ============================================= File [changed]: ReportEngineJFree.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/api/ReportEngineJFree.cxx?r1=1.2&r2=1.2.4.1 Delta lines: +18 -11 --------------------- --- ReportEngineJFree.cxx 2007-07-09 11:56:14+0000 1.2 +++ ReportEngineJFree.cxx 2007-07-20 12:19:59+0000 1.2.4.1 @@ -4,9 +4,9 @@ * * $RCSfile: ReportEngineJFree.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.2.4.1 $ * - * last change: $Author: rt $ $Date: 2007/07/09 11:56:14 $ + * last change: $Author: lla $ $Date: 2007/07/20 12:19:59 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -288,8 +288,10 @@ xRowSetProp->setPropertyValue(PROPERTY_ACTIVECONNECTION,uno::makeAny(m_xActiveConnection)); ::rtl::OUString sOrder = getOrderStatement(); + if (sOrder.getLength() > 0) + { xRowSetProp->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Order")),uno::makeAny(sOrder)); - + } if ( m_xReport->getFilter().getLength() ) xRowSetProp->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ApplyFilter")),uno::makeAny(sal_True)); @@ -491,13 +493,18 @@ ::rtl::OUString sExpression = xGroup->getExpression(); if ( xColumns->hasByName(sExpression) ) sExpression = ::dbtools::quoteName( sQuote, sExpression ); + sExpression = sExpression.trim(); // Trim away white spaces + if (sExpression.getLength() > 0) + { aOrder.append( sExpression ); + if (aOrder.getLength() > 0) aOrder.appendAscii( " " ); if ( !xGroup->getSortAscending() ) aOrder.appendAscii( "DESC" ); if ( (i+1) < nCount ) aOrder.appendAscii( "," ); } + } return aOrder.makeStringAndClear(); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
