summaryrefslogtreecommitdiff
path: root/extensions/source
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2009-10-29 14:32:52 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2009-10-29 14:32:52 +0100
commit8d170f0fbb64bc973257e56eccbb214039deb53b (patch)
treedcd264d213b39e4b228e5f33b5327fc6343618d2 /extensions/source
parent3681c262bd150fc60fd51b3473873e45c8314dd9 (diff)
uhm ... who's doing that the old way?
Diffstat (limited to 'extensions/source')
-rw-r--r--extensions/source/bibliography/datman.cxx30
1 files changed, 10 insertions, 20 deletions
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index fa2b4c094fb3..7794cd8783ed 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -1091,20 +1091,16 @@ void BibDataManager::setFilter(const ::rtl::OUString& rQuery)
return;
try
{
- m_xParser->setFilter(rQuery);
- ::rtl::OUString aQuery=m_xParser->getFilter();
- Reference< XPropertySet > aPropertySet( m_xForm, UNO_QUERY );
- Any aVal; aVal <<= aQuery;
- aPropertySet->setPropertyValue(C2U("Filter"), aVal);
- BOOL bVal = sal_True;
- aVal.setValue(&bVal, ::getBooleanCppuType());
- aPropertySet->setPropertyValue(C2U("ApplyFilter"), aVal);
+ m_xParser->setFilter( rQuery );
+ ::rtl::OUString aQuery = m_xParser->getFilter();
+ Reference< XPropertySet > xFormProps( m_xForm, UNO_QUERY_THROW );
+ aPropertySet->setPropertyValue( C2U( "Filter" ), makeAny( aQuery ) );
+ aPropertySet->setPropertyValue( C2U( "ApplyFilter" ), makeAny( sal_True ) );
reload();
}
catch(Exception& e )
{
- (void) e; // make compiler happy
- DBG_ERROR("::setFilterOnActiveDataSource: something went wrong !");
+ DBG_UNHANDLED_EXCEPTION();
}
@@ -1116,18 +1112,12 @@ void BibDataManager::setFilter(const ::rtl::OUString& rQuery)
::rtl::OUString aQueryString;
try
{
- Reference< XPropertySet > aPropertySet( m_xForm, UNO_QUERY );
- Any aQuery=aPropertySet->getPropertyValue(C2U("Filter"));
-
- if(aQuery.getValueType() == ::getCppuType((::rtl::OUString*)0))
- {
- aQueryString=*(::rtl::OUString*)aQuery.getValue();
- }
+ Reference< XPropertySet > xFormProps( m_xForm, UNO_QUERY_THROW );
+ OSL_VERIFY( xFormProps->getPropertyValue( C2U( "Filter" ) ) >>= aQueryString );
}
- catch(Exception& e )
+ catch( const Exception& )
{
- (void) e; // make compiler happy
- DBG_ERROR("::getFilterOnActiveDataSource: something went wrong !");
+ DBG_UNHANDLED_EXCEPTION();
}