1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 <rtl/ustring.hxx>
23 #include <o3tl/typed_flags_set.hxx>
26 #define MIMETYPE_VND_SUN_XML_WRITER_ASCII "application/vnd.sun.xml.writer"
27 #define MIMETYPE_VND_SUN_XML_WRITER_WEB_ASCII "application/vnd.sun.xml.writer.web"
28 #define MIMETYPE_VND_SUN_XML_WRITER_GLOBAL_ASCII "application/vnd.sun.xml.writer.global"
29 #define MIMETYPE_VND_SUN_XML_DRAW_ASCII "application/vnd.sun.xml.draw"
30 #define MIMETYPE_VND_SUN_XML_IMPRESS_ASCII "application/vnd.sun.xml.impress"
31 #define MIMETYPE_VND_SUN_XML_CALC_ASCII "application/vnd.sun.xml.calc"
32 #define MIMETYPE_VND_SUN_XML_CHART_ASCII "application/vnd.sun.xml.chart"
33 #define MIMETYPE_VND_SUN_XML_MATH_ASCII "application/vnd.sun.xml.math"
34 #define MIMETYPE_VND_SUN_XML_BASE_ASCII "application/vnd.sun.xml.base"
36 // template formats of SO6/7
37 #define MIMETYPE_VND_SUN_XML_WRITER_TEMPLATE_ASCII "application/vnd.sun.xml.writer.template"
38 #define MIMETYPE_VND_SUN_XML_DRAW_TEMPLATE_ASCII "application/vnd.sun.xml.draw.template"
39 #define MIMETYPE_VND_SUN_XML_IMPRESS_TEMPLATE_ASCII "application/vnd.sun.xml.impress.template"
40 #define MIMETYPE_VND_SUN_XML_CALC_TEMPLATE_ASCII "application/vnd.sun.xml.calc.template"
43 #define MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII "application/vnd.oasis.opendocument.text"
44 #define MIMETYPE_OASIS_OPENDOCUMENT_TEXT_WEB_ASCII "application/vnd.oasis.opendocument.text-web"
45 #define MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_ASCII "application/vnd.oasis.opendocument.text-master"
46 #define MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_ASCII "application/vnd.oasis.opendocument.graphics"
47 #define MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_ASCII "application/vnd.oasis.opendocument.presentation"
48 #define MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII "application/vnd.oasis.opendocument.spreadsheet"
49 #define MIMETYPE_OASIS_OPENDOCUMENT_CHART_ASCII "application/vnd.oasis.opendocument.chart"
50 #define MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_ASCII "application/vnd.oasis.opendocument.formula"
51 #define MIMETYPE_OASIS_OPENDOCUMENT_DATABASE_ASCII "application/vnd.oasis.opendocument.base"
52 #define MIMETYPE_OASIS_OPENDOCUMENT_REPORT_ASCII "application/vnd.sun.xml.report"
53 #define MIMETYPE_OASIS_OPENDOCUMENT_REPORT_CHART_ASCII "application/vnd.sun.xml.report.chart"
55 // template formats of SO8
56 #define MIMETYPE_OASIS_OPENDOCUMENT_TEXT_TEMPLATE_ASCII "application/vnd.oasis.opendocument.text-template"
57 #define MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_TEMPLATE_ASCII "application/vnd.oasis.opendocument.text-master-template"
58 #define MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_TEMPLATE_ASCII "application/vnd.oasis.opendocument.graphics-template"
59 #define MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_TEMPLATE_ASCII "application/vnd.oasis.opendocument.presentation-template"
60 #define MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_TEMPLATE_ASCII "application/vnd.oasis.opendocument.spreadsheet-template"
61 #define MIMETYPE_OASIS_OPENDOCUMENT_CHART_TEMPLATE_ASCII "application/vnd.oasis.opendocument.chart-template"
62 #define MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_TEMPLATE_ASCII "application/vnd.oasis.opendocument.formula-template"
66 #define ODFVER_010_TEXT "1.0"
67 #define ODFVER_011_TEXT "1.1"
68 #define ODFVER_012_TEXT "1.2"
71 // TODO/LATER: The flags should be part of the UNO specification
73 // http://www.mail-archive.com/dev@openoffice.org/msg05047.html says:
75 // I can just sum up what comes into my mind, hope I don't miss one:
77 // Import - should be self explaining
78 // Export - should be self explaining
79 // Template - deprecated
80 // TemplatePath - filter for a documenttemplate
81 // Own - one of the OOo file formats
82 // Alien - no zip container based format
83 // Preferred - preferred filter for a particular type
84 // 3rdPartyFilter - implemented as a UNO component
85 // Default - default filter for this document type
87 // (The 3rdPartyFilter flag is here called StarONE)
89 enum class SfxFilterFlags
94 TEMPLATE
= 0x00000004L
,
95 INTERNAL
= 0x00000008L
,
96 TEMPLATEPATH
= 0x00000010L
,
100 DEFAULT
= 0x00000100L
,
101 SUPPORTSSELECTION
= 0x00000400L
,
102 NOTINFILEDLG
= 0x00001000L
,
104 OPENREADONLY
= 0x00010000L
,
105 MUSTINSTALL
= 0x00020000L
,
106 CONSULTSERVICE
= 0x00040000L
,
107 STARONEFILTER
= 0x00080000L
,
108 PACKED
= 0x00100000L
,
109 COMBINED
= 0x00800000L
,
111 ENCRYPTION
= 0x01000000L
,
112 PASSWORDTOMODIFY
= 0x02000000L
,
113 PREFERED
= 0x10000000L
,
114 STARTPRESENTATION
= 0x20000000L
,
115 SUPPORTSSIGNING
= 0x40000000L
,
119 template<> struct typed_flags
<SfxFilterFlags
> : is_typed_flags
<SfxFilterFlags
, 0x739f157fL
> {};
122 #define SFX_FILTER_NOTINSTALLED (SfxFilterFlags::MUSTINSTALL | SfxFilterFlags::CONSULTSERVICE)
125 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */