Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / setup_native / source / win32 / customactions / reg4msdoc / registrationcontextinformation.hxx
blob1ba9a4d99a366c9c8e08dd106a7c897f600d8d8c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 // MsOfficeDocumentInformation.h: Schnittstelle f�r die Klasse MsOfficeDocumentInformation.
3 //
4 //////////////////////////////////////////////////////////////////////
6 #ifndef _REGISTRATIONCONTEXTINFORMATION_HXX_
7 #define _REGISTRATIONCONTEXTINFORMATION_HXX_
9 #ifdef _MSC_VER
10 #pragma warning(push, 1) /* disable warnings within system headers */
11 #endif
12 #define WIN32_LEAN_AND_MEAN
13 #include <windows.h>
14 #include <msi.h>
15 #ifdef _MSC_VER
16 #pragma warning(pop)
17 #endif
19 #include <string>
21 /** A simple implementation class that returns the
22 appropriate display names for the Microsoft
23 Office document types.
24 Under Windows 9x this class checks if the
25 document display name is convertable to an ANSI
26 string and if not returns an english default.
27 So we avoid garbage if soemone for instance
28 installs an japanese StarOffice/OpenOffice
29 under a German Windows 98 for instance.
31 class RegistrationContextInformation
33 public:
35 enum SHELL_COMMAND {New, Open, Print, Printto};
36 enum OFFICE_APPLICATION {Office, Writer, Calc, Impress};
38 RegistrationContextInformation(MSIHANDLE hMsi, const std::wstring& OpenOfficeExecutablePath);
40 /** Word document information
41 The icon index is the index of the icon
42 in soffice.exe to be associated with
43 word document files
45 std::wstring GetWordDocumentDisplayName() const;
46 std::wstring GetWordDocumentFileExtension() const;
47 std::wstring GetWordDocumentDefaultIconEntry() const;
48 std::wstring GetWordDocumentDefaultShellCommand() const;
50 /** MOOX Word document information
51 The icon index is the index of the icon
52 in soffice.exe to be associated with
53 word document files
55 std::wstring GetMOOXWordDocumentDisplayName() const;
56 std::wstring GetMOOXWordDocumentFileExtension() const;
58 /** Word template information
59 The icon index is the index of the icon
60 in soffice.exe to be associated with
61 word template files
63 std::wstring GetWordTemplateDisplayName() const;
64 std::wstring GetWordTemplateFileExtension() const;
65 std::wstring GetWordTemplateDefaultIconEntry() const;
66 std::wstring GetWordTemplateDefaultShellCommand() const;
68 /** Rtf document information
69 The icon index is the index of the icon
70 in soffice.exe to be associated with
71 rtf document files
73 std::wstring GetRtfDocumentDisplayName() const;
74 std::wstring GetRtfDocumentFileExtension() const;
75 std::wstring GetRtfDocumentDefaultIconEntry() const;
76 std::wstring GetRtfDocumentDefaultShellCommand() const;
78 /** Excel sheet information
79 The icon index is the index of the icon
80 in soffice.exe to be associated with
81 Excel sheets
83 std::wstring GetExcelSheetDisplayName() const;
84 std::wstring GetExcelSheetFileExtension() const;
85 std::wstring GetExcelSheetDefaultIconEntry() const;
86 std::wstring GetExcelSheetDefaultShellCommand() const;
88 std::wstring GetMOOXExcelSheetDisplayName() const;
89 std::wstring GetMOOXExcelSheetFileExtension() const;
91 /** Excel template information
92 The icon index is the index of the icon
93 in soffice.exe to be associated with
94 Excel template files
96 std::wstring GetExcelTemplateDisplayName() const;
97 std::wstring GetExcelTemplateFileExtension() const;
98 std::wstring GetExcelTemplateDefaultIconEntry() const;
99 std::wstring GetExcelTemplateDefaultShellCommand() const;
101 /** PowerPoint document information
102 The icon index is the index of the icon
103 in soffice.exe to be associated with
104 PowerPoint document files
106 std::wstring GetPowerPointDocumentDisplayName() const;
107 std::wstring GetPowerPointDocumentFileExtension() const;
108 std::wstring GetPowerPointDocumentDefaultIconEntry() const;
109 std::wstring GetPowerPointDocumentDefaultShellCommand() const;
111 std::wstring GetMOOXPowerPointDocumentDisplayName() const;
112 std::wstring GetMOOXPowerPointDocumentFileExtension() const;
114 /** PowerPoint template information
115 The icon index is the index of the icon
116 in soffice.exe to be associated with
117 PowerPoint template files
119 std::wstring GetPowerPointTemplateDisplayName() const;
120 std::wstring GetPowerPointTemplateFileExtension() const;
121 std::wstring GetPowerPointTemplateDefaultIconEntry() const;
122 std::wstring GetPowerPointTemplateDefaultShellCommand() const;
124 /** PowerPoint Show information
126 std::wstring GetPowerPointShowDisplayName() const;
127 std::wstring GetPowerPointShowFileExtension() const;
128 std::wstring GetPowerPointShowDefaultIconEntry() const;
129 std::wstring GetPowerPointShowDefaultShellCommand() const;
131 /** The string for the "New" command that should appear
132 in the Explorer context menu when someone right
133 clicks a Microsoft document
135 std::wstring ShellNewCommandDisplayName() const;
137 /** The string for the "Edit" command that should
138 appear in the Explorer context menu when someone
139 right clicks a document
141 std::wstring ShellEditCommandDisplayName() const;
143 /** A friendly name for the application
145 std::wstring GetOpenOfficeFriendlyAppName() const;
147 /** The path to the StarOffice/OpenOffice executable
149 std::wstring GetOpenOfficeExecutablePath() const;
151 /** The name of the executable (currently "soffice.exe"
152 but may change in the future, who knows)
154 std::wstring GetOpenOfficeExecutableName() const;
156 /** A command line for the specified shell command
158 std::wstring GetOpenOfficeCommandline(SHELL_COMMAND ShellCommand,
159 OFFICE_APPLICATION OfficeApp) const;
161 private:
162 void ExtractOpenOfficeExecNameFromPath();
164 private:
165 MSIHANDLE msihandle_;
166 std::wstring m_OOExecPath;
167 std::wstring m_OOExecName;
168 std::wstring m_OOIconPath;
171 #endif
173 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */