1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 29 #ifndef _WINIMPLHELPER_HXX_ 30 #define _WINIMPLHELPER_HXX_ 31 32 //------------------------------------------------------------------------ 33 // includes 34 //------------------------------------------------------------------------ 35 36 #include <sal/types.h> 37 38 #ifndef _RTL_USTRING_HXX_ 39 #include <rtl/ustring> 40 #endif 41 42 #include <windows.h> 43 #include <com/sun/star/uno/Any.hxx> 44 #include <com/sun/star/lang/IllegalArgumentException.hpp> 45 46 //------------------------------------------------------------------------ 47 // deklarations 48 //------------------------------------------------------------------------ 49 50 sal_Bool SAL_CALL IsWin2000( ); 51 52 // set actions 53 void SAL_CALL ListboxAddItem( 54 HWND hwnd, const ::com::sun::star::uno::Any& aItem, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos ) 55 throw( ::com::sun::star::lang::IllegalArgumentException ); 56 57 void SAL_CALL ListboxAddItems( 58 HWND hwnd, const ::com::sun::star::uno::Any& aItemList, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos ) 59 throw( ::com::sun::star::lang:: IllegalArgumentException ); 60 61 void SAL_CALL ListboxDeleteItem( 62 HWND hwnd, const ::com::sun::star::uno::Any& aPosition, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos ) 63 throw( ::com::sun::star::lang::IllegalArgumentException ); 64 65 void SAL_CALL ListboxDeleteItems( 66 HWND hwnd, const ::com::sun::star::uno::Any& aUnused, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos ) 67 throw( ::com::sun::star::lang::IllegalArgumentException ); 68 69 void SAL_CALL ListboxSetSelectedItem( 70 HWND hwnd, const ::com::sun::star::uno::Any& aPosition, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos ) 71 throw( ::com::sun::star::lang::IllegalArgumentException ); 72 73 // get actions 74 ::com::sun::star::uno::Any SAL_CALL ListboxGetItems( HWND hwnd ); 75 ::com::sun::star::uno::Any SAL_CALL ListboxGetSelectedItem( HWND hwnd ); 76 77 // checkbox helper functions 78 ::com::sun::star::uno::Any SAL_CALL CheckboxGetState( HWND hwnd ); 79 80 void SAL_CALL CheckboxSetState( 81 HWND hwnd, const ::com::sun::star::uno::Any& aState, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos ) 82 throw( ::com::sun::star::lang::IllegalArgumentException ); 83 84 // calculates the length of '\0' separated and '\0\0' 85 // ending strings used in some Win32 functions 86 // e.g. Filter\0*.txt\0\0 87 // the returned length excludes the last '\0' 88 sal_uInt32 SAL_CALL _wcslenex( const sal_Unicode* pStr ); 89 90 #endif 91