1 diff --git toolkit/source/layout/vcl/wfield.cxx toolkit/source/layout/vcl/wfield.cxx
2 index d9e2443..a792d47 100644
3 --- toolkit/source/layout/vcl/wfield.cxx
4 +++ toolkit/source/layout/vcl/wfield.cxx
5 @@ -358,7 +358,8 @@ public:
7 uno::Sequence< rtl::OUString> aItems( mxComboBox->getItems() );
8 rtl::OUString rKey( rStr );
9 - for (unsigned int i = 0; aItems.getLength(); i++)
10 + sal_Int32 n = aItems.getLength();
11 + for (unsigned int i = 0; i < n; i++)
13 if ( aItems[ i ] == rKey )
14 return sal::static_int_cast< sal_uInt16 >( i );
15 @@ -543,7 +544,8 @@ public:
17 uno::Sequence< rtl::OUString> aItems( mxListBox->getItems() );
18 rtl::OUString rKey( rStr );
19 - for (unsigned int i = 0; aItems.getLength(); i++)
20 + sal_Int32 n = aItems.getLength();
21 + for (unsigned int i = 0; i < n; i++)
23 if ( aItems[ i ] == rKey )
24 return sal::static_int_cast< sal_uInt16 >( i );