Index: automation/source/server/statemnt.cxx =================================================================== --- automation/source/server/statemnt.cxx (revision 1367847) +++ automation/source/server/statemnt.cxx (working copy) @@ -5611,6 +5611,34 @@ } } break; + case M_Collapse : + if( nParams & PARAM_STR_1 ) + { + ReportError( aUId, GEN_RES_STR1( S_SELECT_DESELECT_VIA_STRING_NOT_IMPLEMENTED, MethodString( nMethodId ) ) ); + } + else + { + if ( ValueOK(aUId, MethodString( nMethodId ),nNr1,((SvLBox*)pControl)->GetVisibleCount()) ) + { + SvLBoxEntry *pEntry = (SvLBoxEntry*)((SvTreeListBox*)pControl)->GetEntryAtVisPos( nNr1-1 ); + ((SvTreeListBox*)pControl)->Collapse ( pEntry ); + } + } + break; + case M_Expand : + if( nParams & PARAM_STR_1 ) + { + ReportError( aUId, GEN_RES_STR1( S_SELECT_DESELECT_VIA_STRING_NOT_IMPLEMENTED, MethodString( nMethodId ) ) ); + } + else + { + if ( ValueOK(aUId, MethodString( nMethodId ),nNr1,((SvLBox*)pControl)->GetVisibleCount()) ) + { + SvLBoxEntry *pEntry = (SvLBoxEntry*)((SvTreeListBox*)pControl)->GetEntryAtVisPos( nNr1-1 ); + ((SvTreeListBox*)pControl)->Expand ( pEntry ); + } + } + break; case M_GetSelText : if ( ! (nParams & PARAM_USHORT_1) ) nNr1 = 1; Index: automation/source/inc/rcontrol.hxx =================================================================== --- automation/source/inc/rcontrol.hxx (revision 1367847) +++ automation/source/inc/rcontrol.hxx (working copy) @@ -285,6 +285,10 @@ #define M_IsItemEnabled ( M_WITH_RETURN | 59 ) +// TreeListBox +#define M_Collapse ( M_WITH_RETURN | 60 ) +#define M_Expand ( M_WITH_RETURN | 61 ) + //#define M_SOFFICE 0x0800 // Command valid for Star/Open Office //#define M_MOZILLA 0x1000 // Command valid for Mozilla