summaryrefslogtreecommitdiff
path: root/forms/source/component/Filter.cxx
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2010-09-28 15:45:48 +0200
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2010-09-28 15:45:48 +0200
commitc7cd474ea28b4923c0b520815c071dee2ebc8918 (patch)
tree3356895dac6c2173282ffbe2ae14cd78ca237109 /forms/source/component/Filter.cxx
parent05e178629a416b8c087099c2840ae7c2bffa2733 (diff)
parentf7c9efe9c6253d809ccbe157c2ef66ff6821522f (diff)
Automated merge with http://hg-lan.germany.sun.com/ooo/DEV300
Diffstat (limited to 'forms/source/component/Filter.cxx')
-rw-r--r--forms/source/component/Filter.cxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx
index 9cbc5237cf95..f4aa133a44f4 100644
--- a/forms/source/component/Filter.cxx
+++ b/forms/source/component/Filter.cxx
@@ -57,6 +57,7 @@
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <com/sun/star/awt/XItemList.hpp>
/** === end UNO includes === **/
#include <comphelper/numbers.hxx>
@@ -342,11 +343,16 @@ namespace frm
case FormComponentType::LISTBOX:
{
- Sequence< ::rtl::OUString> aValueSelection;
- Reference< XPropertySet > aPropertyPointer(getModel(), UNO_QUERY);
- aPropertyPointer->getPropertyValue(PROPERTY_VALUE_SEQ) >>= aValueSelection;
- if (rEvent.Selected <= aValueSelection.getLength())
- aText.append( aValueSelection[ rEvent.Selected ] );
+ try
+ {
+ const Reference< XItemList > xItemList( getModel(), UNO_QUERY_THROW );
+ const ::rtl::OUString sItemText( xItemList->getItemText( rEvent.Selected ) );
+ aText.append( sItemText );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
break;