lok: calc - send other views our selection in their co-ordinates.
[LibreOffice.git] / include / svl / inettype.hxx
blob6d5d018520723676a9d822577ad72193bc52d147
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 .
20 #ifndef INCLUDED_SVL_INETTYPE_HXX
21 #define INCLUDED_SVL_INETTYPE_HXX
23 #include <svl/svldllapi.h>
24 #include <tools/inetmime.hxx>
27 /** Definitions for frequently used media type names.
29 #define CONTENT_TYPE_STR_APP_OCTSTREAM "application/octet-stream"
30 #define CONTENT_TYPE_STR_APP_PDF "application/pdf"
31 #define CONTENT_TYPE_STR_APP_RTF "application/rtf"
32 #define CONTENT_TYPE_STR_APP_VND_CALC "application/vnd.stardivision.calc"
33 #define CONTENT_TYPE_STR_APP_VND_CHART "application/vnd.stardivision.chart"
34 #define CONTENT_TYPE_STR_APP_VND_DRAW "application/vnd.stardivision.draw"
35 #define CONTENT_TYPE_STR_APP_VND_IMAGE "application/vnd.stardivision.image"
36 #define CONTENT_TYPE_STR_APP_VND_IMPRESSPACKED "application/vnd.stardivision.impress-packed"
37 #define CONTENT_TYPE_STR_APP_VND_IMPRESS "application/vnd.stardivision.impress"
38 #define CONTENT_TYPE_STR_APP_VND_MAIL "application/vnd.stardivision.mail"
39 #define CONTENT_TYPE_STR_APP_VND_MATH "application/vnd.stardivision.math"
40 #define CONTENT_TYPE_STR_APP_VND_NEWS "application/vnd.stardivision.news"
41 #define CONTENT_TYPE_STR_APP_VND_OUTTRAY "application/vnd.stardivision.outtray"
42 #define CONTENT_TYPE_STR_APP_VND_TEMPLATE "application/vnd.stardivision.template"
43 #define CONTENT_TYPE_STR_APP_VND_WRITER_GLOBAL "application/vnd.stardivision.writer-global"
44 #define CONTENT_TYPE_STR_APP_VND_WRITER_WEB "application/vnd.stardivision.writer-web"
45 #define CONTENT_TYPE_STR_APP_VND_WRITER "application/vnd.stardivision.writer"
46 #define CONTENT_TYPE_STR_APP_FRAMESET "application/x-frameset"
47 #define CONTENT_TYPE_STR_APP_GALLERY_THEME "application/x-gallery-theme"
48 #define CONTENT_TYPE_STR_APP_GALLERY "application/x-gallery"
49 #define CONTENT_TYPE_STR_APP_JAR "application/x-jar"
50 #define CONTENT_TYPE_STR_APP_MACRO "application/x-macro"
51 #define CONTENT_TYPE_STR_APP_MSEXCEL_TEMPL "application/x-msexcel-template"
52 #define CONTENT_TYPE_STR_APP_MSEXCEL "application/x-msexcel"
53 #define CONTENT_TYPE_STR_APP_MSPPOINT_TEMPL "application/x-mspowerpoint-template"
54 #define CONTENT_TYPE_STR_APP_MSPPOINT "application/x-mspowerpoint"
55 #define CONTENT_TYPE_STR_APP_MSWORD_TEMPL "application/x-msword-template"
56 #define CONTENT_TYPE_STR_APP_MSWORD "application/x-msword"
57 #define CONTENT_TYPE_STR_APP_STARCALC "application/x-starcalc"
58 #define CONTENT_TYPE_STR_APP_STARCHART "application/x-starchart"
59 #define CONTENT_TYPE_STR_APP_STARDRAW "application/x-stardraw"
60 #define CONTENT_TYPE_STR_APP_STARHELP "application/x-starhelp"
61 #define CONTENT_TYPE_STR_APP_STARIMAGE "application/x-starimage"
62 #define CONTENT_TYPE_STR_APP_STARIMPRESS "application/x-starimpress"
63 #define CONTENT_TYPE_STR_APP_STARMAIL_SDM "application/x-starmail-sdm"
64 #define CONTENT_TYPE_STR_APP_STARMAIL_SMD "application/x-starmail-smd"
65 #define CONTENT_TYPE_STR_APP_STARMATH "application/x-starmath"
66 #define CONTENT_TYPE_STR_APP_STARWRITER_GLOB "application/x-starwriter-global"
67 #define CONTENT_TYPE_STR_APP_STARWRITER "application/x-starwriter"
68 #define CONTENT_TYPE_STR_APP_CDE_CALENDAR_APP "application/x-sun-ae-file"
69 #define CONTENT_TYPE_STR_APP_ZIP "application/x-zip-compressed"
70 #define CONTENT_TYPE_STR_AUDIO_AIFF "audio/aiff"
71 #define CONTENT_TYPE_STR_AUDIO_BASIC "audio/basic"
72 #define CONTENT_TYPE_STR_AUDIO_MIDI "audio/midi"
73 #define CONTENT_TYPE_STR_AUDIO_VORBIS "audio/vorbis"
74 #define CONTENT_TYPE_STR_AUDIO_WAV "audio/wav"
75 #define CONTENT_TYPE_STR_AUDIO_WEBM "audio/webm"
76 #define CONTENT_TYPE_STR_X_CNT_FSYSBOX ".chaos/fsys-box"
77 #define CONTENT_TYPE_STR_X_CNT_FSYSFOLDER ".chaos/fsys-folder"
78 #define CONTENT_TYPE_STR_X_CNT_FSYSSPECIALFOLDER ".chaos/fsys-special-folder"
79 #define CONTENT_TYPE_STR_IMAGE_GENERIC "image/generic"
80 #define CONTENT_TYPE_STR_IMAGE_GIF "image/gif"
81 #define CONTENT_TYPE_STR_IMAGE_JPEG "image/jpeg"
82 #define CONTENT_TYPE_STR_IMAGE_PCX "image/pcx"
83 #define CONTENT_TYPE_STR_IMAGE_PNG "image/png"
84 #define CONTENT_TYPE_STR_IMAGE_TIFF "image/tiff"
85 #define CONTENT_TYPE_STR_IMAGE_BMP "image/x-MS-bmp"
86 #define CONTENT_TYPE_STR_INET_MSG_RFC822 "message/rfc822"
87 #define CONTENT_TYPE_STR_INET_MULTI_ALTERNATIVE "multipart/alternative"
88 #define CONTENT_TYPE_STR_INET_MULTI_DIGEST "multipart/digest"
89 #define CONTENT_TYPE_STR_INET_MULTI_MIXED "multipart/mixed"
90 #define CONTENT_TYPE_STR_INET_MULTI_PARALLEL "multipart/parallel"
91 #define CONTENT_TYPE_STR_INET_MULTI_RELATED "multipart/related"
92 #define CONTENT_TYPE_STR_TEXT_ICALENDAR "text/calendar"
93 #define CONTENT_TYPE_STR_TEXT_HTML "text/html"
94 #define CONTENT_TYPE_STR_TEXT_PLAIN "text/plain"
95 #define CONTENT_TYPE_STR_TEXT_XMLICALENDAR "text/x-icalxml"
96 #define CONTENT_TYPE_STR_TEXT_URL "text/x-url"
97 #define CONTENT_TYPE_STR_TEXT_VCALENDAR "text/x-vCalendar"
98 #define CONTENT_TYPE_STR_TEXT_VCARD "text/x-vCard"
99 #define CONTENT_TYPE_STR_VIDEO_MSVIDEO "video/x-msvideo"
100 #define CONTENT_TYPE_STR_VIDEO_THEORA "video/theora"
101 #define CONTENT_TYPE_STR_VIDEO_VDO "video/vdo"
102 #define CONTENT_TYPE_STR_VIDEO_WEBM "audio/webm"
103 #define CONTENT_TYPE_STR_X_STARMAIL "x-starmail"
104 #define CONTENT_TYPE_STR_X_VRML "x-world/x-vrml"
105 #define CONTENT_TYPE_STR_APP_VND_SUN_XML_WRITER "application/vnd.sun.xml.writer"
106 #define CONTENT_TYPE_STR_APP_VND_SUN_XML_CALC "application/vnd.sun.xml.calc"
107 #define CONTENT_TYPE_STR_APP_VND_SUN_XML_IMPRESS "application/vnd.sun.xml.impress"
108 #define CONTENT_TYPE_STR_APP_VND_SUN_XML_DRAW "application/vnd.sun.xml.draw"
109 #define CONTENT_TYPE_STR_APP_VND_SUN_XML_CHART "application/vnd.sun.xml.chart"
110 #define CONTENT_TYPE_STR_APP_VND_SUN_XML_MATH "application/vnd.sun.xml.math"
111 #define CONTENT_TYPE_STR_APP_VND_SUN_XML_WRITER_GLOBAL "application/vnd.sun.xml.writer-global"
112 #define CONTENT_TYPE_STR_APP_VND_SUN_XML_IMPRESSPACKED "application/vnd.sun.xml.impress-packed"
115 /** Definitions for matching parts of URIs.
117 #define INETTYPE_URL_PROT_DATA "data"
118 #define INETTYPE_URL_PROT_FILE "file"
119 #define INETTYPE_URL_PROT_HTTP "http"
120 #define INETTYPE_URL_PROT_HTTPS "https"
121 #define INETTYPE_URL_PROT_MACRO "macro"
122 #define INETTYPE_URL_PROT_MAILTO "mailto"
123 #define INETTYPE_URL_PROT_PRIVATE "private"
125 enum INetContentType
127 CONTENT_TYPE_UNKNOWN,
128 CONTENT_TYPE_APP_OCTSTREAM,
129 CONTENT_TYPE_APP_PDF,
130 CONTENT_TYPE_APP_RTF,
131 CONTENT_TYPE_APP_MSWORD,
132 CONTENT_TYPE_APP_MSWORD_TEMPL,
133 CONTENT_TYPE_APP_STARCALC,
134 CONTENT_TYPE_APP_STARCHART,
135 CONTENT_TYPE_APP_STARDRAW,
136 CONTENT_TYPE_APP_STARHELP,
137 CONTENT_TYPE_APP_STARIMAGE,
138 CONTENT_TYPE_APP_STARIMPRESS,
139 CONTENT_TYPE_APP_STARMATH,
140 CONTENT_TYPE_APP_STARWRITER,
141 CONTENT_TYPE_APP_ZIP,
142 CONTENT_TYPE_AUDIO_AIFF,
143 CONTENT_TYPE_AUDIO_BASIC,
144 CONTENT_TYPE_AUDIO_MIDI,
145 CONTENT_TYPE_AUDIO_VORBIS,
146 CONTENT_TYPE_AUDIO_WAV,
147 CONTENT_TYPE_AUDIO_WEBM,
148 CONTENT_TYPE_IMAGE_GIF,
149 CONTENT_TYPE_IMAGE_JPEG,
150 CONTENT_TYPE_IMAGE_PCX,
151 CONTENT_TYPE_IMAGE_PNG,
152 CONTENT_TYPE_IMAGE_TIFF,
153 CONTENT_TYPE_IMAGE_BMP,
154 CONTENT_TYPE_TEXT_HTML,
155 CONTENT_TYPE_TEXT_PLAIN,
156 CONTENT_TYPE_TEXT_URL,
157 CONTENT_TYPE_TEXT_VCARD,
158 CONTENT_TYPE_VIDEO_MSVIDEO,
159 CONTENT_TYPE_VIDEO_THEORA,
160 CONTENT_TYPE_VIDEO_VDO,
161 CONTENT_TYPE_VIDEO_WEBM,
162 CONTENT_TYPE_X_CNT_FSYSBOX,
163 CONTENT_TYPE_X_CNT_FSYSFOLDER,
164 CONTENT_TYPE_X_STARMAIL,
165 CONTENT_TYPE_X_VRML,
166 CONTENT_TYPE_APP_GALLERY,
167 CONTENT_TYPE_APP_GALLERY_THEME,
168 CONTENT_TYPE_APP_STARWRITER_GLOB,
169 CONTENT_TYPE_APP_STARMAIL_SDM,
170 CONTENT_TYPE_APP_STARMAIL_SMD,
171 CONTENT_TYPE_APP_VND_CALC,
172 CONTENT_TYPE_APP_VND_CHART,
173 CONTENT_TYPE_APP_VND_DRAW,
174 CONTENT_TYPE_APP_VND_IMAGE,
175 CONTENT_TYPE_APP_VND_IMPRESS,
176 CONTENT_TYPE_APP_VND_MAIL,
177 CONTENT_TYPE_APP_VND_MATH,
178 CONTENT_TYPE_APP_VND_WRITER,
179 CONTENT_TYPE_APP_VND_WRITER_GLOBAL,
180 CONTENT_TYPE_APP_VND_WRITER_WEB,
181 CONTENT_TYPE_APP_FRAMESET,
182 CONTENT_TYPE_APP_MACRO,
183 CONTENT_TYPE_X_CNT_FSYSSPECIALFOLDER,
184 CONTENT_TYPE_APP_VND_TEMPLATE,
185 CONTENT_TYPE_IMAGE_GENERIC,
186 CONTENT_TYPE_APP_VND_NEWS,
187 CONTENT_TYPE_APP_VND_OUTTRAY,
188 CONTENT_TYPE_APP_MSEXCEL,
189 CONTENT_TYPE_APP_MSEXCEL_TEMPL,
190 CONTENT_TYPE_APP_MSPPOINT,
191 CONTENT_TYPE_APP_MSPPOINT_TEMPL,
192 CONTENT_TYPE_TEXT_VCALENDAR,
193 CONTENT_TYPE_TEXT_ICALENDAR,
194 CONTENT_TYPE_TEXT_XMLICALENDAR,
195 CONTENT_TYPE_APP_CDE_CALENDAR_APP,
196 CONTENT_TYPE_INET_MESSAGE_RFC822,
197 CONTENT_TYPE_INET_MULTIPART_ALTERNATIVE,
198 CONTENT_TYPE_INET_MULTIPART_DIGEST,
199 CONTENT_TYPE_INET_MULTIPART_PARALLEL,
200 CONTENT_TYPE_INET_MULTIPART_RELATED,
201 CONTENT_TYPE_INET_MULTIPART_MIXED,
202 CONTENT_TYPE_APP_VND_IMPRESSPACKED,
203 CONTENT_TYPE_APP_JAR,
204 CONTENT_TYPE_APP_VND_SUN_XML_WRITER,
205 CONTENT_TYPE_APP_VND_SUN_XML_CALC,
206 CONTENT_TYPE_APP_VND_SUN_XML_IMPRESS,
207 CONTENT_TYPE_APP_VND_SUN_XML_DRAW,
208 CONTENT_TYPE_APP_VND_SUN_XML_CHART,
209 CONTENT_TYPE_APP_VND_SUN_XML_MATH,
210 CONTENT_TYPE_APP_VND_SUN_XML_WRITER_GLOBAL,
211 CONTENT_TYPE_APP_VND_SUN_XML_IMPRESSPACKED,
212 CONTENT_TYPE_LAST = CONTENT_TYPE_APP_VND_SUN_XML_IMPRESSPACKED
216 class SVL_DLLPUBLIC INetContentTypes
218 public:
219 static INetContentType GetContentType(OUString const & rTypeName);
221 static OUString GetContentType(INetContentType eTypeID);
223 static INetContentType GetContentType4Extension(OUString const & rExtension);
225 static INetContentType GetContentTypeFromURL(OUString const & rURL);
227 static bool GetExtensionFromURL(OUString const & rURL, OUString & rExtension);
229 static bool parse(OUString const & rMediaType, OUString & rType,
230 OUString & rSubType,
231 INetContentTypeParameterList * pParameters = nullptr);
234 #endif // INCLUDED_SVL_INETTYPE_HXX
236 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */