summaryrefslogtreecommitdiff
path: root/forms/source/component/Filter.cxx
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-04-16 13:55:24 +0200
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-04-16 13:55:24 +0200
commit69929004c60c78e8022f89b002128f551dc0f8c7 (patch)
tree6d5c4439769b27f8c5fcbae0595bf20b09465542 /forms/source/component/Filter.cxx
parent1b192bd38a3695cc2965ece438d47d6f74958289 (diff)
parent6c07c7cad453e4ebb447577c7313323764d50ea9 (diff)
dba33f: merge with m76-branch
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 b4c7eddf81d8..9cbc5237cf95 100644
--- a/forms/source/component/Filter.cxx
+++ b/forms/source/component/Filter.cxx
@@ -397,17 +397,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;
@@ -417,7 +410,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();