LibreOffice Module comphelper (master)  1
documentconstants.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #ifndef INCLUDED_COMPHELPER_DOCUMENTCONSTANTS_HXX
20 #define INCLUDED_COMPHELPER_DOCUMENTCONSTANTS_HXX
21 
22 #include <o3tl/typed_flags_set.hxx>
23 #include <rtl/ustring.hxx>
24 
25 // formats of SO6/7
26 inline constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_WRITER_ASCII = u"application/vnd.sun.xml.writer";
27 inline constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_WRITER_WEB_ASCII = u"application/vnd.sun.xml.writer.web";
28 inline constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_WRITER_GLOBAL_ASCII = u"application/vnd.sun.xml.writer.global";
29 inline constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_DRAW_ASCII = u"application/vnd.sun.xml.draw";
30 inline constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_IMPRESS_ASCII = u"application/vnd.sun.xml.impress";
31 inline constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_CALC_ASCII = u"application/vnd.sun.xml.calc";
32 inline constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_CHART_ASCII = u"application/vnd.sun.xml.chart";
33 inline constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_MATH_ASCII = u"application/vnd.sun.xml.math";
34 inline constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_BASE_ASCII = u"application/vnd.sun.xml.base";
35 
36 // template formats of SO6/7
37 inline constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_WRITER_TEMPLATE_ASCII = u"application/vnd.sun.xml.writer.template";
38 inline constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_DRAW_TEMPLATE_ASCII = u"application/vnd.sun.xml.draw.template";
39 inline constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_IMPRESS_TEMPLATE_ASCII = u"application/vnd.sun.xml.impress.template";
40 inline constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_CALC_TEMPLATE_ASCII = u"application/vnd.sun.xml.calc.template";
41 
42 // formats of SO8
43 inline constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII = u"application/vnd.oasis.opendocument.text";
44 inline constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_TEXT_WEB_ASCII = u"application/vnd.oasis.opendocument.text-web";
45 inline constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_ASCII = u"application/vnd.oasis.opendocument.text-master";
46 inline constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_ASCII = u"application/vnd.oasis.opendocument.graphics";
47 inline constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_ASCII = u"application/vnd.oasis.opendocument.presentation";
48 inline constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII = u"application/vnd.oasis.opendocument.spreadsheet";
49 inline constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_CHART_ASCII = u"application/vnd.oasis.opendocument.chart";
50 inline constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_ASCII = u"application/vnd.oasis.opendocument.formula";
51 inline constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_DATABASE_ASCII = u"application/vnd.oasis.opendocument.base";
52 inline constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_REPORT_ASCII = u"application/vnd.sun.xml.report";
53 inline constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_REPORT_CHART_ASCII = u"application/vnd.sun.xml.report.chart";
54 
55 // template formats of SO8
56 inline constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_TEXT_TEMPLATE_ASCII = u"application/vnd.oasis.opendocument.text-template";
57 inline constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_TEMPLATE_ASCII = u"application/vnd.oasis.opendocument.text-master-template";
58 inline constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_TEMPLATE_ASCII = u"application/vnd.oasis.opendocument.graphics-template";
59 inline constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_TEMPLATE_ASCII = u"application/vnd.oasis.opendocument.presentation-template";
60 inline constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_TEMPLATE_ASCII = u"application/vnd.oasis.opendocument.spreadsheet-template";
61 inline constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_CHART_TEMPLATE_ASCII = u"application/vnd.oasis.opendocument.chart-template";
62 inline constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_TEMPLATE_ASCII = u"application/vnd.oasis.opendocument.formula-template";
63 
64 
65 // ODF versions
66 inline constexpr OUStringLiteral ODFVER_010_TEXT = u"1.0";
67 inline constexpr OUStringLiteral ODFVER_011_TEXT = u"1.1";
68 inline constexpr OUStringLiteral ODFVER_012_TEXT = u"1.2";
69 inline constexpr OUStringLiteral ODFVER_013_TEXT = u"1.3";
70 
71 // filter flags
72 // TODO/LATER: The flags should be part of the UNO specification
73 //
74 // http://www.mail-archive.com/dev@openoffice.org/msg05047.html says:
75 //
76 // I can just sum up what comes into my mind, hope I don't miss one:
77 //
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
88 //
89 // (The 3rdPartyFilter flag is here called StarONE)
90 //
91 enum class SfxFilterFlags
92 {
93  NONE = 0,
94  IMPORT = 0x00000001,
95  EXPORT = 0x00000002,
96  TEMPLATE = 0x00000004,
97  INTERNAL = 0x00000008,
98  TEMPLATEPATH = 0x00000010,
99  OWN = 0x00000020,
100  ALIEN = 0x00000040,
101 
102  DEFAULT = 0x00000100,
103  SUPPORTSSELECTION = 0x00000400,
104  NOTINFILEDLG = 0x00001000,
105 
106  OPENREADONLY = 0x00010000,
107  MUSTINSTALL = 0x00020000,
108  CONSULTSERVICE = 0x00040000,
109  STARONEFILTER = 0x00080000,
110  PACKED = 0x00100000,
111  EXOTIC = 0x00200000,
112  COMBINED = 0x00800000,
113 
114  ENCRYPTION = 0x01000000,
115  PASSWORDTOMODIFY = 0x02000000,
116  GPGENCRYPTION = 0x04000000,
117  PREFERED = 0x10000000,
118  STARTPRESENTATION = 0x20000000,
119  SUPPORTSSIGNING = 0x40000000,
120 };
121 
122 namespace o3tl
123 {
124  template<> struct typed_flags<SfxFilterFlags> : is_typed_flags<SfxFilterFlags, 0x77bf157f> {};
125 }
126 
127 #define SFX_FILTER_NOTINSTALLED (SfxFilterFlags::MUSTINSTALL | SfxFilterFlags::CONSULTSERVICE)
128 
129 #endif
130 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_TEMPLATE_ASCII
constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_CALC_ASCII
constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_ASCII
constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_REPORT_CHART_ASCII
constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_ASCII
constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_TEMPLATE_ASCII
constexpr OUStringLiteral ODFVER_011_TEXT
constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_TEMPLATE_ASCII
constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_WRITER_ASCII
constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_DRAW_TEMPLATE_ASCII
constexpr OUStringLiteral ODFVER_012_TEXT
constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_CHART_TEMPLATE_ASCII
constexpr OUStringLiteral ODFVER_013_TEXT
constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_TEXT_TEMPLATE_ASCII
constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_MATH_ASCII
constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII
constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_WRITER_TEMPLATE_ASCII
constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_TEXT_WEB_ASCII
float u
constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII
constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_ASCII
constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_IMPRESS_TEMPLATE_ASCII
constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_REPORT_ASCII
constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_WRITER_WEB_ASCII
constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_DRAW_ASCII
constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_WRITER_GLOBAL_ASCII
#define EXPORT
constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_TEMPLATE_ASCII
constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_IMPRESS_ASCII
constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_BASE_ASCII
constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_DATABASE_ASCII
constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_ASCII
constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_CHART_ASCII
constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_TEMPLATE_ASCII
constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_CALC_TEMPLATE_ASCII
constexpr OUStringLiteral MIMETYPE_VND_SUN_XML_CHART_ASCII
constexpr OUStringLiteral ODFVER_010_TEXT
SfxFilterFlags