1 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
2 
3 /* AbiSource
4  *
5  * Copyright (C) 2007 Philippe Milot <PhilMilot@gmail.com>
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20  * 02110-1301 USA.
21  */
22 
23 #ifndef _OXML_TYPES_H_
24 #define _OXML_TYPES_H_
25 
26 
27 //There's probably a better way to do this...
28 #define ALTERNATEFORMAT_REL_TYPE "http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk"
29 #define COMMENTS_REL_TYPE "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments"
30 #define DOCSETTINGS_REL_TYPE "http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings"
31 #define DOCUMENT_REL_TYPE "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"
32 #define ENDNOTES_REL_TYPE "http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes"
33 #define FONTTABLE_REL_TYPE "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable"
34 #define FOOTER_REL_TYPE "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer"
35 #define FOOTNOTES_REL_TYPE "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes"
36 #define GLOSSARY_REL_TYPE "http://schemas.openxmlformats.org/officeDocument/2006/relationships/glossaryDocument"
37 #define HEADER_REL_TYPE "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header"
38 #define NUMBERING_REL_TYPE "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering"
39 #define STYLES_REL_TYPE "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles"
40 #define WEBSETTINGS_REL_TYPE "http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings"
41 #define IMAGE_REL_TYPE "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"
42 #define THEME_REL_TYPE "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme"
43 
44 enum OXML_PartType {
45 	ROOT_PART,
46 	ALTERNATEFORMAT_PART,
47 	COMMENTS_PART,
48 	DOCSETTINGS_PART,
49 	DOCUMENT_PART,
50 	ENDNOTES_PART,
51 	FONTTABLE_PART,
52 	FOOTER_PART,
53 	FOOTNOTES_PART,
54 	GLOSSARY_PART,
55 	HEADER_PART,
56 	NUMBERING_PART,
57 	STYLES_PART,
58 	WEBSETTINGS_PART,
59 	IMAGE_PART,
60 	THEME_PART //At the end because this part is outside of WordprocessorML specs
61 };
62 
63 enum OXML_ElementTag {
64 	P_TAG, 	//More to come
65 	R_TAG,
66 	T_TAG,
67 	PG_BREAK,
68 	CL_BREAK,
69 	LN_BREAK,
70 	TBL_TAG,
71 	TR_TAG,
72 	TC_TAG,
73 	LST_TAG,
74 	IMG_TAG,
75 	HYPR_TAG,
76 	BOOK_TAG,
77 	FLD_TAG,
78 	TXTBX_TAG,
79 	MATH_TAG
80 };
81 
82 enum OXML_ElementType {
83 	BLOCK,
84 	SPAN,
85 	TABLE,
86 	LIST,
87 	ROW,
88 	IMAGE,
89 	CELL,
90 	HYPRLNK,
91 	BOOKMRK,
92 	FIELD,
93 	TEXTBOX,
94 	MATH
95 };
96 
97 enum OXML_HeaderFooterType {
98 	DEFAULT_HDRFTR = 0, 	//Make sure to define values as these will be used as array indices
99 	FIRSTPAGE_HDRFTR = 1,
100 	EVENPAGE_HDRFTR = 2
101 };
102 
103 enum OXML_ColorName {
104 	DARK1 = 0, //Make sure to define starting value as these will be used as array indices
105 	LIGHT1,
106 	DARK2,
107 	LIGHT2,
108 	ACCENT1,
109 	ACCENT2,
110 	ACCENT3,
111 	ACCENT4,
112 	ACCENT5,
113 	ACCENT6,
114 	HYPERLINK,
115 	FOLLOWED_HYPERLINK
116 };
117 
118 enum OXML_FontLevel {
119 	UNKNOWN_LEVEL,
120 	MAJOR_FONT,
121 	MINOR_FONT
122 };
123 
124 enum OXML_CharRange {
125 	UNKNOWN_RANGE,
126 	ASCII_RANGE,
127 	HANSI_RANGE,
128 	COMPLEX_RANGE,
129 	EASTASIAN_RANGE
130 };
131 
132 enum OXML_SectionBreakType {
133 	NO_BREAK,
134 	NEXTPAGE_BREAK,
135 	CONTINUOUS_BREAK,
136 	EVENPAGE_BREAK,
137 	ODDPAGE_BREAK
138 };
139 
140 #endif //_OXML_TYPES_H_
141 
142