diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-06-23 20:00:36 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2013-06-23 20:05:55 +0200 |
commit | f76cedf1d61da5fcca788864fe659c4157534696 (patch) | |
tree | c2943830648b87fd79c0d2652d7e236b84900484 | |
parent | ListBox: when LISTSOURCETYPE changes, need to (un)lock BOUNDCOLUMN (diff) | |
download | core-f76cedf1d61da5fcca788864fe659c4157534696.tar.gz core-f76cedf1d61da5fcca788864fe659c4157534696.zip |
Data-aware ListBox: fix case ListSourceType==TableFields
Change-Id: I9a89374fd1cc56c8185753f5959275a0a2d841ff
-rw-r--r-- | extensions/source/propctrlr/formcomponenthandler.cxx | 3 | ||||
-rw-r--r-- | forms/source/component/ListBox.cxx | 12 |
2 files changed, 13 insertions, 2 deletions
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 2f0ad2287b13..aaa0e94c38ff 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -1841,8 +1841,7 @@ namespace pcr OSL_VERIFY( impl_getPropertyValue_throw( PROPERTY_LISTSOURCETYPE ) >>= eLSType ); _rxInspectorUI->enablePropertyUI( PROPERTY_BOUNDCOLUMN, - ( eLSType != ListSourceType_TABLEFIELDS ) - && ( eLSType != ListSourceType_VALUELIST ) + ( eLSType != ListSourceType_VALUELIST ) ); } break; // case PROPERTY_ID_BOUNDCOLUMN diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index 3ac34f89cb45..e2d800a98d37 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -937,6 +937,18 @@ namespace frm seqNames.getConstArray() + seqNames.getLength(), ::std::insert_iterator< ValueList >( aDisplayList, aDisplayList.end() ) ); + if(*aBoundColumn == -1) + { + // the type of i matters! It will be the type of the ORowSetValue pushed to aValueList! + for(sal_Int16 i=0; i < aDisplayList.size(); ++i) + { + aValueList.push_back(i); + } + } + else + { + aValueList = aDisplayList; + } } } break; |