From b8c71accae047011513ed885e334e18bf292417c Mon Sep 17 00:00:00 2001 From: Tino Rachui Date: Wed, 14 Nov 2001 15:43:47 +0000 Subject: #94499#added method ListboxGetSelectedItemIndex --- fpicker/source/win32/misc/WinImplHelper.cxx | 20 ++++++++++++++++++-- fpicker/source/win32/misc/WinImplHelper.hxx | 5 +++-- 2 files changed, 21 insertions(+), 4 deletions(-) (limited to 'fpicker') diff --git a/fpicker/source/win32/misc/WinImplHelper.cxx b/fpicker/source/win32/misc/WinImplHelper.cxx index e0037fb4c1e6..9bee6af08b5c 100644 --- a/fpicker/source/win32/misc/WinImplHelper.cxx +++ b/fpicker/source/win32/misc/WinImplHelper.cxx @@ -2,9 +2,9 @@ * * $RCSfile: WinImplHelper.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: tra $ $Date: 2001-08-10 12:27:57 $ + * last change: $Author: tra $ $Date: 2001-11-14 16:43:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -363,6 +363,22 @@ Any SAL_CALL ListboxGetSelectedItem( HWND hwnd ) // //------------------------------------------------------------ +Any SAL_CALL ListboxGetSelectedItemIndex( HWND hwnd ) +{ + OSL_ASSERT( IsWindow( hwnd ) ); + + LRESULT idxItem = SendMessageW( hwnd, CB_GETCURSEL, 0, 0 ); + + Any aAny; + aAny <<= static_cast< sal_Int32 >( idxItem ); + + return aAny; +} + +//------------------------------------------------------------ +// +//------------------------------------------------------------ + Any SAL_CALL CheckboxGetState( HWND hwnd ) { OSL_ASSERT( IsWindow( hwnd ) ); diff --git a/fpicker/source/win32/misc/WinImplHelper.hxx b/fpicker/source/win32/misc/WinImplHelper.hxx index 78ed40f34643..cd93816eeced 100644 --- a/fpicker/source/win32/misc/WinImplHelper.hxx +++ b/fpicker/source/win32/misc/WinImplHelper.hxx @@ -2,9 +2,9 @@ * * $RCSfile: WinImplHelper.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: tra $ $Date: 2001-08-10 12:27:57 $ + * last change: $Author: tra $ $Date: 2001-11-14 16:43:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -115,6 +115,7 @@ void SAL_CALL ListboxSetSelectedItem( // get actions ::com::sun::star::uno::Any SAL_CALL ListboxGetItems( HWND hwnd ); ::com::sun::star::uno::Any SAL_CALL ListboxGetSelectedItem( HWND hwnd ); +::com::sun::star::uno::Any SAL_CALL ListboxGetSelectedItemIndex( HWND hwnd ); // checkbox helper functions ::com::sun::star::uno::Any SAL_CALL CheckboxGetState( HWND hwnd ); -- cgit