User: hr Date: 2007-11-01 15:32:35+0000 Modified: dba/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
Log: INTEGRATION: CWS dba24b (1.78.44); FILE MERGED 2007/10/04 09:01:52 oj 1.78.44.3: #i61061# handle or in and condition 2007/09/28 12:00:15 oj 1.78.44.2: RESYNC: (1.78-1.79); FILE MERGED 2007/08/24 07:11:26 oj 1.78.44.1: #i61059# set the visible flag for criteria File Changes: Directory: /dba/dbaccess/source/ui/querydesign/ =============================================== File [changed]: SelectionBrowseBox.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx?r1=1.79&r2=1.80 Delta lines: +18 -4 -------------------- --- SelectionBrowseBox.cxx 2007-09-26 14:52:56+0000 1.79 +++ SelectionBrowseBox.cxx 2007-11-01 15:32:32+0000 1.80 @@ -1819,7 +1819,7 @@ } } //------------------------------------------------------------------------------ -void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const String& rValue, const sal_uInt16 nLevel ) +void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const String& rValue, const sal_uInt16 nLevel,bool _bAddOrOnOneLine ) { Reference< XConnection> xConnection = static_cast<OQueryController*>(getDesignView()->getController())->getConnection(); if(!xConnection.is()) @@ -1850,15 +1850,29 @@ if(!m_bGroupByUnRelated && pEntry->IsGroupBy()) pEntry->SetVisible(sal_True); } - if (!pEntry->GetCriteria(nLevel).getLength()) + if (!pEntry->GetCriteria(nLevel).getLength() || _bAddOrOnOneLine ) { - pEntry->SetCriteria( nLevel, rValue); + String sCriteria = rValue; + if ( _bAddOrOnOneLine ) + { + String sOldCriteria = pEntry->GetCriteria( nLevel ); + if ( sOldCriteria.Len() ) + { + sCriteria = String(RTL_CONSTASCII_USTRINGPARAM("(")); + sCriteria += sOldCriteria; + sCriteria += String(RTL_CONSTASCII_USTRINGPARAM(" OR ")); + sCriteria += rValue; + sCriteria += String(RTL_CONSTASCII_USTRINGPARAM(")")); + } + } + pEntry->SetCriteria( nLevel, sCriteria); if(nLevel == (m_nVisibleCount-BROW_CRIT1_ROW-1)) { RowInserted( GetRowCount()-1, 1, TRUE ); m_bVisibleRow.push_back(sal_True); ++m_nVisibleCount; } + m_bVisibleRow[BROW_CRIT1_ROW + nLevel] = sal_True; break; } } @@ -2150,7 +2164,7 @@ { DBG_CHKTHIS(OSelectionBrowseBox,NULL); long nErg=0,i; - long nCount = m_bVisibleRow.size(); + const long nCount = m_bVisibleRow.size(); for(i=0;i < nCount; ++i) { if(m_bVisibleRow[i]) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
