Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / setup_native / source / win32 / customactions / reg4msdoc / register.hxx
blob964c4be894df86c13a3b66084d1908e9080e84f1
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef _REGISTER_HXX_
30 #define _REGISTER_HXX_
32 #include "constants.hxx"
34 #ifdef _MSC_VER
35 #pragma warning(push, 1) /* disable warnings within system headers */
36 #endif
37 #define WIN32_LEAN_AND_MEAN
38 #include <windows.h>
39 #include <msi.h>
40 #ifdef _MSC_VER
41 #pragma warning(pop)
42 #endif
44 #include <string>
46 const int MOD_WRITER = 0x1;
47 const int MOD_CALC = 0x2;
48 const int MOD_IMPRESS = 0x4;
49 const int MOD_ACTIVEX = 0x40;
51 /* registers StarOffice for MS document
52 types and as default HTML editor if
53 specified */
54 void Register4MsDoc(MSIHANDLE handle, int Register);
56 void Unregister4MsDoc(MSIHANDLE handle, int Unregister);
58 /* restores the entries for the selected
59 registry entries */
60 void Unregister4MsDocAll(MSIHANDLE handle);
62 /* restores lost settings formerly made
63 with Register4MsDoc */
64 void RepairRegister4MsDocSettings(MSIHANDLE handle);
66 /** Returns whether we are registered for */
67 bool IsRegisteredFor(MSIHANDLE handle, int State);
69 /** Returns whether we should preselect the
70 registration checkbox for a certain
71 application type or not */
72 bool query_preselect_registration_for_ms_application(
73 MSIHANDLE handle, int Register);
75 // StarOffice 6.0 saved the registration
76 // state in HKEY_LOCAL_MACHINE\Software\
77 // Microsoft\Windows\CurrentVersion\Uninstall\
78 // StarOffice 6.0\Reg4MsdocState we move this
79 // value if available to the new registry
80 // location
81 int FixReturnRegistrationState(MSIHANDLE handle);
83 #endif
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */