Update ooo320-m1
[ooovba.git] / setup_native / source / win32 / customactions / reg4msdoc / register.hxx
blob841d86faebae4a71398a1a848ad80e7ac4391d9c
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: register.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _REGISTER_HXX_
32 #define _REGISTER_HXX_
34 #ifndef _CONSTANTS_HXX_
35 #include "constants.hxx"
36 #endif
38 #ifdef _MSC_VER
39 #pragma warning(push, 1) /* disable warnings within system headers */
40 #endif
41 #define WIN32_LEAN_AND_MEAN
42 #include <windows.h>
43 #include <msi.h>
44 #ifdef _MSC_VER
45 #pragma warning(pop)
46 #endif
48 #include <string>
50 const int MOD_WRITER = 0x1;
51 const int MOD_CALC = 0x2;
52 const int MOD_IMPRESS = 0x4;
53 const int MOD_ACTIVEX = 0x40;
55 /* registers StarOffice for MS document
56 types and as default HTML editor if
57 specified */
58 void Register4MsDoc(MSIHANDLE handle, int Register);
60 void Unregister4MsDoc(MSIHANDLE handle, int Unregister);
62 /* restores the entries for the selected
63 registry entries */
64 void Unregister4MsDocAll(MSIHANDLE handle);
66 /* restores lost settings formerly made
67 with Register4MsDoc */
68 void RepairRegister4MsDocSettings(MSIHANDLE handle);
70 /** Returns whether we are registered for */
71 bool IsRegisteredFor(MSIHANDLE handle, int State);
73 /** Returns whether we should preselect the
74 registration checkbox for a certain
75 application type or not */
76 bool query_preselect_registration_for_ms_application(
77 MSIHANDLE handle, int Register);
79 // StarOffice 6.0 saved the registration
80 // state in HKEY_LOCAL_MACHINE\Software\
81 // Microsoft\Windows\CurrentVersion\Uninstall\
82 // StarOffice 6.0\Reg4MsdocState we move this
83 // value if available to the new registry
84 // location
85 int FixReturnRegistrationState(MSIHANDLE handle);
87 #endif