Kaydet (Commit) 919a50e3 authored tarafından Caolán McNamara's avatar Caolán McNamara

_bUseRowSetFilter and _bUseRowSetOrder are always true

üst b50405ef
...@@ -1302,8 +1302,7 @@ Reference< XDataSource> findDataSource(const Reference< XInterface >& _xParent) ...@@ -1302,8 +1302,7 @@ Reference< XDataSource> findDataSource(const Reference< XInterface >& _xParent)
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
Reference< XSingleSelectQueryComposer > getComposedRowSetStatement( const Reference< XPropertySet >& _rxRowSet, const Reference< XMultiServiceFactory>& _rxFactory, Reference< XSingleSelectQueryComposer > getComposedRowSetStatement( const Reference< XPropertySet >& _rxRowSet, const Reference< XMultiServiceFactory>& _rxFactory )
sal_Bool _bUseRowSetFilter, sal_Bool _bUseRowSetOrder )
SAL_THROW( ( SQLException ) ) SAL_THROW( ( SQLException ) )
{ {
Reference< XSingleSelectQueryComposer > xComposer; Reference< XSingleSelectQueryComposer > xComposer;
...@@ -1325,17 +1324,13 @@ Reference< XSingleSelectQueryComposer > getComposedRowSetStatement( const Refere ...@@ -1325,17 +1324,13 @@ Reference< XSingleSelectQueryComposer > getComposedRowSetStatement( const Refere
StatementComposer aComposer( xConn, sCommand, nCommandType, bEscapeProcessing ); StatementComposer aComposer( xConn, sCommand, nCommandType, bEscapeProcessing );
// append sort // append sort
if ( _bUseRowSetOrder ) aComposer.setOrder( getString( _rxRowSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Order" )) ) ) );
aComposer.setOrder( getString( _rxRowSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Order" )) ) ) );
// append filter // append filter
if ( _bUseRowSetFilter ) sal_Bool bApplyFilter = sal_True;
{ _rxRowSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ApplyFilter" )) ) >>= bApplyFilter;
sal_Bool bApplyFilter = sal_True; if ( bApplyFilter )
_rxRowSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ApplyFilter" )) ) >>= bApplyFilter; aComposer.setFilter( getString( _rxRowSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Filter" )) ) ) );
if ( bApplyFilter )
aComposer.setFilter( getString( _rxRowSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Filter" )) ) ) );
}
xComposer = aComposer.getComposer(); xComposer = aComposer.getComposer();
aComposer.setDisposeComposer( false ); aComposer.setDisposeComposer( false );
...@@ -1361,7 +1356,7 @@ Reference< XSingleSelectQueryComposer > getCurrentSettingsComposer( ...@@ -1361,7 +1356,7 @@ Reference< XSingleSelectQueryComposer > getCurrentSettingsComposer(
Reference< XSingleSelectQueryComposer > xReturn; Reference< XSingleSelectQueryComposer > xReturn;
try try
{ {
xReturn = getComposedRowSetStatement( _rxRowSetProps, _rxFactory, sal_True, sal_True ); xReturn = getComposedRowSetStatement( _rxRowSetProps, _rxFactory );
} }
catch( const SQLException& ) catch( const SQLException& )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment