summaryrefslogtreecommitdiff
path: root/forms/source/component/Filter.cxx
diff options
context:
space:
mode:
authorOcke Janssen [oj] <Ocke.Janssen@sun.com>2010-01-22 08:14:22 +0100
committerOcke Janssen [oj] <Ocke.Janssen@sun.com>2010-01-22 08:14:22 +0100
commit80f468de1e670de020ae4ac6ab15baefbd905a71 (patch)
tree17ddcb06b316d176b4dbf9a7117ad5035dc3a1af /forms/source/component/Filter.cxx
parentfad7c8d823d0a451874616e19334e76ca93385b8 (diff)
dba33f: #i108548# extend SingleSelectQueryComposer appendFilterByColumn with additonal parameter
Diffstat (limited to 'forms/source/component/Filter.cxx')
-rw-r--r--forms/source/component/Filter.cxx15
1 files changed, 4 insertions, 11 deletions
diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx
index 0ff3faca8beb..6e2eb5d1d049 100644
--- a/forms/source/component/Filter.cxx
+++ b/forms/source/component/Filter.cxx
@@ -400,17 +400,10 @@ namespace frm
const Reference< XPropertySet > xFormProps( xForm, UNO_QUERY_THROW );
// create a query composer
- const Reference< XConnection > xConnection( ::dbtools::getConnection( xForm ), UNO_SET_THROW );
- const Reference< XSQLQueryComposerFactory > xFactory( xConnection, UNO_QUERY_THROW );
- const Reference< XSQLQueryComposer > xComposer( xFactory->createQueryComposer(), UNO_SET_THROW );
-
- // set the statement on the composer
- ::rtl::OUString sStatement;
- xFormProps->getPropertyValue( PROPERTY_ACTIVECOMMAND ) >>= sStatement;
- xComposer->setQuery( sStatement );
+ Reference< XColumnsSupplier > xSuppColumns;
+ xFormProps->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SingleSelectQueryComposer"))) >>= xSuppColumns;
- // the field we're bound to
- const Reference< XColumnsSupplier > xSuppColumns( xComposer, UNO_QUERY_THROW );
+ const Reference< XConnection > xConnection( ::dbtools::getConnection( xForm ), UNO_SET_THROW );
const Reference< XNameAccess > xFieldNames( xSuppColumns->getColumns(), UNO_SET_THROW );
if ( !xFieldNames->hasByName( sFieldName ) )
return;
@@ -420,7 +413,7 @@ namespace frm
xComposerFieldProps->getPropertyValue( PROPERTY_TABLENAME ) >>= sTableName;
// obtain the table of the field
- const Reference< XTablesSupplier > xSuppTables( xComposer, UNO_QUERY_THROW );
+ const Reference< XTablesSupplier > xSuppTables( xSuppColumns, UNO_QUERY_THROW );
const Reference< XNameAccess > xTablesNames( xSuppTables->getTables(), UNO_SET_THROW );
const Reference< XNamed > xNamedTable( xTablesNames->getByName( sTableName ), UNO_QUERY_THROW );
sTableName = xNamedTable->getName();