[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - extensions/source forms/source

Lionel Elie Mamane lionel at mamane.lu
Wed Jun 26 01:46:41 PDT 2013


 extensions/source/propctrlr/formcomponenthandler.cxx |    3 +--
 forms/source/component/ListBox.cxx                   |   12 ++++++++++++
 2 files changed, 13 insertions(+), 2 deletions(-)

New commits:
commit 898119906a915700a6bc313c3579c78b2fce55fe
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Sun Jun 23 20:00:36 2013 +0200

    Data-aware ListBox: fix case ListSourceType==TableFields
    
    Change-Id: I9a89374fd1cc56c8185753f5959275a0a2d841ff
    Reviewed-on: https://gerrit.libreoffice.org/4464
    Reviewed-by: Miklos Vajna <vmiklos at suse.cz>
    Tested-by: Miklos Vajna <vmiklos at suse.cz>

diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index 72127df..b91055f 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 d4e46eb..14569f5 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -938,6 +938,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;


More information about the Libreoffice-commits mailing list