Update git submodules
[LibreOffice.git] / include / comphelper / documentconstants.hxx
blobc4372c20080960dc2e4afce030dc6ac7128e7dcb
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 .
19 #ifndef INCLUDED_COMPHELPER_DOCUMENTCONSTANTS_HXX
20 #define INCLUDED_COMPHELPER_DOCUMENTCONSTANTS_HXX
22 #include <o3tl/typed_flags_set.hxx>
23 #include <rtl/ustring.hxx>
25 // formats of SO6/7
26 inline constexpr OUString MIMETYPE_VND_SUN_XML_WRITER_ASCII = u"application/vnd.sun.xml.writer"_ustr;
27 inline constexpr OUString MIMETYPE_VND_SUN_XML_WRITER_WEB_ASCII = u"application/vnd.sun.xml.writer.web"_ustr;
28 inline constexpr OUString MIMETYPE_VND_SUN_XML_WRITER_GLOBAL_ASCII = u"application/vnd.sun.xml.writer.global"_ustr;
29 inline constexpr OUString MIMETYPE_VND_SUN_XML_DRAW_ASCII = u"application/vnd.sun.xml.draw"_ustr;
30 inline constexpr OUString MIMETYPE_VND_SUN_XML_IMPRESS_ASCII = u"application/vnd.sun.xml.impress"_ustr;
31 inline constexpr OUString MIMETYPE_VND_SUN_XML_CALC_ASCII = u"application/vnd.sun.xml.calc"_ustr;
32 inline constexpr OUString MIMETYPE_VND_SUN_XML_CHART_ASCII = u"application/vnd.sun.xml.chart"_ustr;
33 inline constexpr OUString MIMETYPE_VND_SUN_XML_MATH_ASCII = u"application/vnd.sun.xml.math"_ustr;
34 inline constexpr OUString MIMETYPE_VND_SUN_XML_BASE_ASCII = u"application/vnd.sun.xml.base"_ustr;
36 // template formats of SO6/7
37 inline constexpr OUString MIMETYPE_VND_SUN_XML_WRITER_TEMPLATE_ASCII = u"application/vnd.sun.xml.writer.template"_ustr;
38 inline constexpr OUString MIMETYPE_VND_SUN_XML_DRAW_TEMPLATE_ASCII = u"application/vnd.sun.xml.draw.template"_ustr;
39 inline constexpr OUString MIMETYPE_VND_SUN_XML_IMPRESS_TEMPLATE_ASCII = u"application/vnd.sun.xml.impress.template"_ustr;
40 inline constexpr OUString MIMETYPE_VND_SUN_XML_CALC_TEMPLATE_ASCII = u"application/vnd.sun.xml.calc.template"_ustr;
42 // formats of SO8
43 inline constexpr OUString MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII = u"application/vnd.oasis.opendocument.text"_ustr;
44 inline constexpr OUString MIMETYPE_OASIS_OPENDOCUMENT_TEXT_WEB_ASCII = u"application/vnd.oasis.opendocument.text-web"_ustr;
45 inline constexpr OUString MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_ASCII = u"application/vnd.oasis.opendocument.text-master"_ustr;
46 inline constexpr OUString MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_ASCII = u"application/vnd.oasis.opendocument.graphics"_ustr;
47 inline constexpr OUString MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_ASCII = u"application/vnd.oasis.opendocument.presentation"_ustr;
48 inline constexpr OUString MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII = u"application/vnd.oasis.opendocument.spreadsheet"_ustr;
49 inline constexpr OUString MIMETYPE_OASIS_OPENDOCUMENT_CHART_ASCII = u"application/vnd.oasis.opendocument.chart"_ustr;
50 inline constexpr OUString MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_ASCII = u"application/vnd.oasis.opendocument.formula"_ustr;
51 inline constexpr OUString MIMETYPE_OASIS_OPENDOCUMENT_DATABASE_ASCII = u"application/vnd.oasis.opendocument.base"_ustr;
52 inline constexpr OUString MIMETYPE_OASIS_OPENDOCUMENT_REPORT_ASCII = u"application/vnd.sun.xml.report"_ustr;
53 inline constexpr OUString MIMETYPE_OASIS_OPENDOCUMENT_REPORT_CHART_ASCII = u"application/vnd.sun.xml.report.chart"_ustr;
55 // template formats of SO8
56 inline constexpr OUString MIMETYPE_OASIS_OPENDOCUMENT_TEXT_TEMPLATE_ASCII = u"application/vnd.oasis.opendocument.text-template"_ustr;
57 inline constexpr OUString MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_TEMPLATE_ASCII = u"application/vnd.oasis.opendocument.text-master-template"_ustr;
58 inline constexpr OUString MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_TEMPLATE_ASCII = u"application/vnd.oasis.opendocument.graphics-template"_ustr;
59 inline constexpr OUString MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_TEMPLATE_ASCII = u"application/vnd.oasis.opendocument.presentation-template"_ustr;
60 inline constexpr OUString MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_TEMPLATE_ASCII = u"application/vnd.oasis.opendocument.spreadsheet-template"_ustr;
61 inline constexpr OUString MIMETYPE_OASIS_OPENDOCUMENT_CHART_TEMPLATE_ASCII = u"application/vnd.oasis.opendocument.chart-template"_ustr;
62 inline constexpr OUString MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_TEMPLATE_ASCII = u"application/vnd.oasis.opendocument.formula-template"_ustr;
65 // ODF versions
66 inline constexpr OUString ODFVER_010_TEXT = u"1.0"_ustr;
67 inline constexpr OUString ODFVER_011_TEXT = u"1.1"_ustr;
68 inline constexpr OUString ODFVER_012_TEXT = u"1.2"_ustr;
69 inline constexpr OUString ODFVER_013_TEXT = u"1.3"_ustr;
71 // filter flags
72 // TODO/LATER: The flags should be part of the UNO specification
74 // http://www.mail-archive.com/dev@openoffice.org/msg05047.html says:
76 // I can just sum up what comes into my mind, hope I don't miss one:
78 // Import - should be self explaining
79 // Export - should be self explaining
80 // Template - deprecated
81 // TemplatePath - filter for a documenttemplate
82 // Own - one of the OOo file formats
83 // Alien - no zip container based format
84 // Preferred - preferred filter for a particular type
85 // 3rdPartyFilter - implemented as a UNO component
86 // Default - default filter for this document type
87 // Exotic - an unusual/legacy file-format, we don't normally see
89 // (The 3rdPartyFilter flag is here called StarONE)
91 enum class SfxFilterFlags
93 NONE = 0,
94 IMPORT = 0x00000001,
95 EXPORT = 0x00000002,
96 TEMPLATE = 0x00000004,
97 INTERNAL = 0x00000008,
98 TEMPLATEPATH = 0x00000010,
99 OWN = 0x00000020,
100 ALIEN = 0x00000040,
102 DEFAULT = 0x00000100,
103 SUPPORTSSELECTION = 0x00000400,
104 NOTINFILEDLG = 0x00001000,
106 OPENREADONLY = 0x00010000,
107 MUSTINSTALL = 0x00020000,
108 CONSULTSERVICE = 0x00040000,
109 STARONEFILTER = 0x00080000,
110 PACKED = 0x00100000,
111 EXOTIC = 0x00200000,
112 COMBINED = 0x00800000,
114 ENCRYPTION = 0x01000000, // password encryption
115 PASSWORDTOMODIFY = 0x02000000,
116 GPGENCRYPTION = 0x04000000,
117 PREFERED = 0x10000000,
118 STARTPRESENTATION = 0x20000000,
119 SUPPORTSSIGNING = 0x40000000,
122 namespace o3tl
124 template<> struct typed_flags<SfxFilterFlags> : is_typed_flags<SfxFilterFlags, 0x77bf157f> {};
127 #define SFX_FILTER_NOTINSTALLED (SfxFilterFlags::MUSTINSTALL | SfxFilterFlags::CONSULTSERVICE)
129 #endif
130 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */