bump product version to 4.1.6.2
[LibreOffice.git] / fpicker / source / win32 / misc / WinImplHelper.hxx
blob52ed28dd15eed4b51ad409256d6379159502cd06
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #ifndef _WINIMPLHELPER_HXX_
22 #define _WINIMPLHELPER_HXX_
24 #include <sal/types.h>
25 #include <rtl/ustring.hxx>
27 #if defined _MSC_VER
28 #pragma warning(push, 1)
29 #endif
30 #include <windows.h>
31 #if defined _MSC_VER
32 #pragma warning(pop)
33 #endif
34 #include <com/sun/star/uno/Any.hxx>
35 #include <com/sun/star/lang/IllegalArgumentException.hpp>
37 bool SAL_CALL IsWindowsVistaOrNewer();
39 // set actions
40 void SAL_CALL ListboxAddItem(
41 HWND hwnd, const ::com::sun::star::uno::Any& aItem, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos )
42 throw( ::com::sun::star::lang::IllegalArgumentException );
44 void SAL_CALL ListboxAddItems(
45 HWND hwnd, const ::com::sun::star::uno::Any& aItemList, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos )
46 throw( ::com::sun::star::lang:: IllegalArgumentException );
48 void SAL_CALL ListboxDeleteItem(
49 HWND hwnd, const ::com::sun::star::uno::Any& aPosition, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos )
50 throw( ::com::sun::star::lang::IllegalArgumentException );
52 void SAL_CALL ListboxDeleteItems(
53 HWND hwnd, const ::com::sun::star::uno::Any& aUnused, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos )
54 throw( ::com::sun::star::lang::IllegalArgumentException );
56 void SAL_CALL ListboxSetSelectedItem(
57 HWND hwnd, const ::com::sun::star::uno::Any& aPosition, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos )
58 throw( ::com::sun::star::lang::IllegalArgumentException );
60 // get actions
61 ::com::sun::star::uno::Any SAL_CALL ListboxGetItems( HWND hwnd );
62 ::com::sun::star::uno::Any SAL_CALL ListboxGetSelectedItem( HWND hwnd );
63 ::com::sun::star::uno::Any SAL_CALL ListboxGetSelectedItemIndex( HWND hwnd );
65 // checkbox helper functions
66 ::com::sun::star::uno::Any SAL_CALL CheckboxGetState( HWND hwnd );
68 void SAL_CALL CheckboxSetState(
69 HWND hwnd, const ::com::sun::star::uno::Any& aState, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos )
70 throw( ::com::sun::star::lang::IllegalArgumentException );
72 // calculates the length of '\0' separated and '\0\0'
73 // ending strings used in some Win32 functions
74 // e.g. Filter\0*.txt\0\0
75 // the returned length excludes the last '\0'
76 sal_uInt32 SAL_CALL _wcslenex( const sal_Unicode* pStr );
79 // converts a soffice label to a windows label
80 // the following rules for character replacements
81 // will be done:
82 // '~' -> '&'
83 // '~~' -> '~'
84 // '&' -> '&&'
85 OUString SOfficeToWindowsLabel( const OUString& aSOLabel );
87 // converts a windows label to a soffice label
88 // the following rules for character replacements
89 // will be done:
90 // '&' -> '~'
91 // '&&' -> '&'
92 // '~' -> '~~'
93 OUString WindowsToSOfficeLabel( const OUString& aWinLabel );
95 #endif
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */