diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2010-09-28 15:45:48 +0200 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2010-09-28 15:45:48 +0200 |
commit | c7cd474ea28b4923c0b520815c071dee2ebc8918 (patch) | |
tree | 3356895dac6c2173282ffbe2ae14cd78ca237109 /forms/source/component/Filter.cxx | |
parent | 05e178629a416b8c087099c2840ae7c2bffa2733 (diff) | |
parent | f7c9efe9c6253d809ccbe157c2ef66ff6821522f (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.cxx | 16 |
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; |