/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* libwpd
 * Version: MPL 2.0 / LGPLv2.1+
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * Major Contributor(s):
 * Copyright (C) 2002 William Lachance (wrlach@gmail.com)
 * Copyright (C) 2002-2003 Marc Maurer (uwog@uwog.net)
 *
 * For minor contributions see the git repository.
 *
 * Alternatively, the contents of this file may be used under the terms
 * of the GNU Lesser General Public License Version 2.1 or later
 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
 * applicable instead of those above.
 *
 * For further information visit http://libwpd.sourceforge.net
 */

/* "This product is not manufactured, approved, or supported by
 * Corel Corporation or Corel Corporation Limited."
 */

#ifndef WP6FILESTRUCTURE_H
#define WP6FILESTRUCTURE_H

#include "libwpd_internal.h"

// size of the fixed length functiongroups 0xF0 to 0xFF
extern unsigned char WP6_FIXED_LENGTH_FUNCTION_GROUP_SIZE[16];

/* standard sizes */
#define WP6_NUM_LIST_LEVELS 8

/* header defines */
#define WP6_HEADER_DOCUMENT_SIZE_OFFSET 20
#define WP6_HEADER_INDEX_HEADER_POINTER_OFFSET 14

#define WP6_EXPECTED_MAJOR_VERSION 2
#define WP6_DOCUMENT_FILE_TYPE 10

/* index header information */

#define WP6_INDEX_HEADER_NUM_INDICES_POSITION 2
#define WP6_INDEX_HEADER_INDICES_POSITION 14
#define WP6_INDEX_HEADER_ELEMENT_CHILD_PACKET_BIT 1

#define WP6_INDEX_HEADER_DOCUMENT_SETTINGS_DESCRIPTOR_POOL 0x02
#define WP6_INDEX_HEADER_HYPERLINK 0x07
#define WP6_INDEX_HEADER_GENERAL_WORDPERFECT_TEXT 0x08
#define WP6_INDEX_HEADER_NEXT_TOTAL_PAGE_COUNT_DESCRIPTOR_POOL 0x10
#define WP6_INDEX_HEADER_COMMENT_ANNOTATION 0x1B
#define WP6_INDEX_HEADER_PRINTER_SELECTION_DESCRIPTOR_POOL 0x23
#define WP6_INDEX_HEADER_INITIAL_FONT 0x25
#define WP6_INDEX_HEADER_SYLE_DATA_DESCRIPTOR_POOL 0x30
#define WP6_INDEX_HEADER_SHARED_PERSONAL_FILE_DATES_DESCRIPTOR_POOL 0x34
#define WP6_INDEX_HEADER_GRAPHICS_FILENAME 0x40
#define WP6_INDEX_HEADER_GRAPHICS_BOX_STYLE 0x41
#define WP6_INDEX_HEADER_FILL_STYLE 0x43
#define WP6_INDEX_HEADER_CHECK_AS_YOU_GO_DESCRIPTOR_POOL 0x4E
#define WP6_INDEX_HEADER_DESIRED_FONT_DESCRIPTOR_POOL 0x55
#define WP6_INDEX_HEADER_PREFIX_TIME_STAMP_DESCRIPTOR_POOL 0x5E
#define WP6_INDEX_HEADER_TABLE_STYLE 0x69
#define WP6_INDEX_HEADER_GRAPHICS_CACHED_FILE_DATA 0x6F
#define WP6_INDEX_HEADER_UNDO_INFORMATION_DESCRIPTOR_POOL 0x77 /* WordPerfect 6.1 */
#define WP6_INDEX_HEADER_WORLD_WIDE_WEB_DESCRIPTOR_POOL 0x6D

#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY 0x12
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_AUTHOR 5
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_SUBJECT 46
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_PUBLISHER 33
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_CATEGORY 10
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_KEYWORDS 26
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_LANGUAGE 27
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_ABSTRACT 1
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_DESCRIPTIVE_NAME 17
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_DESCRIPTIVE_TYPE 18

#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_CREATION_DATE 0x0E
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_DATE_COMPLETED 0x0F

#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_ACCOUNT 2
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_ADDRESS 3
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_ATTACHMENTS 4
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_AUTHORIZATION 6
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_BILL_TO 7
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_BLIND_COPY 8
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_CARBON_COPY 9
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_CHECKED_BY 11
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_CLIENT 12
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_COMMENTS 13
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_DEPARTMENT 16
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_DESTINATION 19
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_DISPOSITION 20
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_DIVISION 21
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_DOCUMENT_NUMBER 22
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_EDITOR 23
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_FORWARD_TO 24
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_GROUP 25
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_MAIL_STOP 28
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_MATTER 29
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_OFFICE 30
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_OWNER 31
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_PROJECT 32
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_PURPOSE 34
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_RECEIVED_FROM 35
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_RECORDED_BY 36
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_RECORDED_DATE 37
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_REFERENCE 38
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_REVISION_DATE 39 /* unused and blank */
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_REVISION_NOTES 40
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_REVISION_NUMBER 41
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_SECTION 42
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_SECURITY 43
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_SOURCE 44
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_STATUS 45
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_TELEPHONE_NUMBER 47
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_TYPIST 48
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_VERSION_DATE 49
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_VERSION_NOTES 50
#define WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY_VERSION_NUMBER 51

#define WP6_INDEX_HEADER_OUTLINE_STYLE 0x31
#define WP6_INDEX_HEADER_OUTLINE_STYLE_ARABIC_NUMBERING 0
#define WP6_INDEX_HEADER_OUTLINE_STYLE_LOWERCASE_NUMBERING 1
#define WP6_INDEX_HEADER_OUTLINE_STYLE_UPPERCASE_NUMBERING 2
#define WP6_INDEX_HEADER_OUTLINE_STYLE_LOWERCASE_ROMAN_NUMBERING 3
#define WP6_INDEX_HEADER_OUTLINE_STYLE_UPPERCASE_ROMAN_NUMBERING 4

#define WP6_VARIABLE_GROUP_PREFIX_ID_BIT 128 /* bit 7 */

/* Main function group list  */

#define WP6_TOP_SOFT_SPACE 0x80
#define WP6_TOP_HARD_SPACE 0x81
#define WP6_TOP_SOFT_HYPHEN_IN_LINE 0x82
#define WP6_TOP_SOFT_HYPHEN_AT_EOL 0x83
#define WP6_TOP_HARD_HYPHEN 0x84
#define WP6_TOP_AUTO_HYPHEN 0x85
#define WP6_TOP_DORMANT_HARD_RETURN 0x87

#define WP6_TOP_DELETABLE_HARD_EOP 0xB4
#define WP6_TOP_DELETABLE_HARD_EOC_AT_EOP 0xB5
#define WP6_TOP_DELETABLE_HARD_EOC 0xB6
#define WP6_TOP_DELETABLE_HARD_EOL_AT_EOC_AT_EOP 0xB7
#define WP6_TOP_DELETABLE_HARD_EOL_AT_EOC 0xB8
#define WP6_TOP_DELETABLE_HARD_EOL 0xB9
#define WP6_TOP_DELETABLE_SOFT_EOL_AT_EOC_AT_EOP 0xBA
#define WP6_TOP_DELETABLE_SOFT_EOL_AT_EOC 0xBB
#define WP6_TOP_DELETABLE_SOFT_EOL 0xBC

#define WP6_TOP_TABLE_OFF_AT_EOC_AT_EOP 0xBD
#define WP6_TOP_TABLE_OFF_AT_EOC 0xBE
#define WP6_TOP_TABLE_OFF 0xBF
#define WP6_TOP_TABLE_ROW_AT_HARD_EOP 0xC0
#define WP6_TOP_TABLE_ROW_AT_HARD_EOC_AT_HARD_EOP 0xC1
#define WP6_TOP_TABLE_ROW_AT_HARD_EOC 0xC2
#define WP6_TOP_TABLE_ROW_AT_EOC_AT_EOP 0xC3
#define WP6_TOP_TABLE_ROW_AT_EOC 0xC4
#define WP6_TOP_TABLE_ROW 0xC5
#define WP6_TOP_TABLE_CELL 0xC6

#define WP6_TOP_HARD_EOP 0xC7
#define WP6_TOP_HARD_EOC_AT_EOP 0xC8
#define WP6_TOP_HARD_EOC 0xC9
#define WP6_TOP_HARD_EOL_AT_EOC_AT_EOP 0xCA
#define WP6_TOP_HARD_EOL_AT_EOC 0xCB
#define WP6_TOP_HARD_EOL 0xCC
#define WP6_TOP_SOFT_EOL_AT_EOC_AT_EOP 0xCD
#define WP6_TOP_SOFT_EOL_AT_EOC 0xCE
#define WP6_TOP_SOFT_EOL 0xCF

#define WP6_TOP_EOL_GROUP 0xD0
#define WP6_TOP_PAGE_GROUP 0xD1
#define WP6_TOP_COLUMN_GROUP 0xD2
#define WP6_TOP_PARAGRAPH_GROUP 0xD3
#define WP6_TOP_CHARACTER_GROUP 0xD4
#define WP6_TOP_CROSSREFERENCE_GROUP 0xD5
#define WP6_TOP_HEADER_FOOTER_GROUP 0xD6
#define WP6_TOP_FOOTNOTE_ENDNOTE_GROUP 0xD7
#define WP6_TOP_SET_NUMBER_GROUP 0xD8
#define WP6_TOP_NUMBERING_METHOD_GROUP 0xD9
#define WP6_TOP_DISPLAY_NUMBER_REFERENCE_GROUP 0xDA
#define WP6_TOP_INCREMENT_NUMBER_GROUP 0xDB
#define WP6_TOP_DECREMENT_NUMBER_GROUP 0xDC
#define WP6_TOP_STYLE_GROUP 0xDD
#define WP6_TOP_MERGE_GROUP 0xDE
#define WP6_TOP_BOX_GROUP 0xDF
#define WP6_TOP_TAB_GROUP 0xE0
#define WP6_TOP_PLATFORM_GROUP 0xE1
#define WP6_TOP_FORMATTER_GROUP 0xE2

#define WP6_TOP_EXTENDED_CHARACTER 0xF0
#define WP6_TOP_UNDO_GROUP 0xF1
#define WP6_TOP_ATTRIBUTE_ON 0xF2
#define WP6_TOP_ATTRIBUTE_OFF 0xF3
#define WP6_TOP_HIGHLIGHT_ON 0xFB
#define WP6_TOP_HIGHLIGHT_OFF 0xFC

/* Page Group */
#define WP6_PAGE_GROUP_TOP_MARGIN_SET 0x00
#define WP6_PAGE_GROUP_BOTTOM_MARGIN_SET 0x01
#define WP6_PAGE_GROUP_SUPPRESS_PAGE_CHARACTERISTICS 0x02
#define WP6_PAGE_GROUP_PAGE_NUMBER_POSITION 0x03
#define WP6_PAGE_GROUP_FORM 0x11

// breaking style here so our symbols aren't (as) ridiculously long
#define WP6_PAGE_GROUP_SUPPRESS_PAGE_NUMBER 1
#define WP6_PAGE_GROUP_SUPPRESS_CURRENT_PAGE_NUMBERING_AND_PRINT_NUMBER_AT_BOTTOM_CENTER 2
#define WP6_PAGE_GROUP_SUPPRESS_HEADER_A 4
#define WP6_PAGE_GROUP_SUPPRESS_HEADER_B 8
#define WP6_PAGE_GROUP_SUPPRESS_FOOTER_A 16
#define WP6_PAGE_GROUP_SUPPRESS_FOOTER_B 32
#define WP6_PAGE_GROUP_SUPPRESS_WATERMARK_A 64
#define WP6_PAGE_GROUP_SUPPRESS_WATERMARK_B 128

/* EOL Group */
#define WP6_EOL_GROUP_SOFT_EOL 0x01
#define WP6_EOL_GROUP_SOFT_EOC 0x02
#define WP6_EOL_GROUP_SOFT_EOC_AT_EOP 0x03
#define WP6_EOL_GROUP_HARD_EOL 0x04
#define WP6_EOL_GROUP_HARD_EOL_AT_EOC 0x05
#define WP6_EOL_GROUP_HARD_EOL_AT_EOP 0x06
#define WP6_EOL_GROUP_HARD_EOC 0x07
#define WP6_EOL_GROUP_HARD_EOC_AT_EOP 0x08
#define WP6_EOL_GROUP_HARD_EOP 0x09
#define WP6_EOL_GROUP_TABLE_CELL 0x0A
#define WP6_EOL_GROUP_TABLE_ROW_AND_CELL 0x0B
#define WP6_EOL_GROUP_TABLE_ROW_AT_EOC 0x0C
#define WP6_EOL_GROUP_TABLE_ROW_AT_EOP 0x0D
#define WP6_EOL_GROUP_TABLE_ROW_AT_HARD_EOC 0x0E
#define WP6_EOL_GROUP_TABLE_ROW_AT_HARD_EOC_AT_HARD_EOP 0x0F
#define WP6_EOL_GROUP_TABLE_ROW_AT_HARD_EOP 0x10
#define WP6_EOL_GROUP_TABLE_OFF 0x11
#define WP6_EOL_GROUP_TABLE_OFF_AT_EOC 0x12
#define WP6_EOL_GROUP_TABLE_OFF_AT_EOC_AT_EOP 0x13
#define WP6_EOL_GROUP_DELETABLE_SOFT_EOL 0x14
#define WP6_EOL_GROUP_DELETABLE_SOFT_EOC 0x15
#define WP6_EOL_GROUP_DELETABLE_SOFT_EOC_AT_EOP 0x16
#define WP6_EOL_GROUP_DELETABLE_HARD_EOL 0x17
#define WP6_EOL_GROUP_DELETABLE_HARD_EOL_AT_EOC 0x18
#define WP6_EOL_GROUP_DELETABLE_HARD_EOL_AT_EOP 0x19
#define WP6_EOL_GROUP_DELETABLE_HARD_EOC 0x1A
#define WP6_EOL_GROUP_DELETABLE_HARD_EOC_AT_EOP 0x1B
#define WP6_EOL_GROUP_DELETABLE_HARD_EOP 0x1C
#define WP6_EOL_GROUP_ROW_INFORMATION 128
#define WP6_EOL_GROUP_ROW_INFORMATION_SIZE 5
#define WP6_EOL_GROUP_CELL_FORMULA 129 // cell_formula size is variable
#define WP6_EOL_GROUP_TOP_GUTTER_SPACING 130
#define WP6_EOL_GROUP_TOP_GUTTER_SPACING_SIZE 4
#define WP6_EOL_GROUP_BOTTOM_GUTTER_SPACING 131
#define WP6_EOL_GROUP_BOTTOM_GUTTER_SPACING_SIZE 4
#define WP6_EOL_GROUP_CELL_INFORMATION 132
#define WP6_EOL_GROUP_CELL_INFORMATION_SIZE 9
#define WP6_EOL_GROUP_CELL_SPANNING_INFORMATION 133
#define WP6_EOL_GROUP_CELL_SPANNING_INFORMATION_SIZE 4
#define WP6_EOL_GROUP_CELL_FILL_COLORS 134
#define WP6_EOL_GROUP_CELL_FILL_COLORS_SIZE 10
#define WP6_EOL_GROUP_CELL_LINE_COLOR 135
#define WP6_EOL_GROUP_CELL_LINE_COLOR_SIZE 6
#define WP6_EOL_GROUP_CELL_NUMBER_TYPE 136
#define WP6_EOL_GROUP_CELL_NUMBER_TYPE_SIZE 6
#define WP6_EOL_GROUP_CELL_FLOATING_POINT_NUMBER 137
#define WP6_EOL_GROUP_CELL_FLOATING_POINT_NUMBER_SIZE 11
#define WP6_EOL_GROUP_CELL_PREFIX_FLAG 139
#define WP6_EOL_GROUP_CELL_PREFIX_FLAG_SIZE 3
#define WP6_EOL_GROUP_CELL_RECALCULATION_ERROR_NUMBER 140
#define WP6_EOL_GROUP_CELL_RECALCULATION_ERROR_NUMBER_SIZE 3
#define WP6_EOL_GROUP_DONT_END_A_PARAGRAPH_STYLE_FOR_THIS_HARD_RETURN 141
#define WP6_EOL_GROUP_DONT_END_A_PARAGRAPH_STYLE_FOR_THIS_HARD_RETURN_SIZE 1

/* Style Group */
#define WP6_STYLE_GROUP_PARASTYLE_BEGIN_ON_PART1 0x04
#define WP6_STYLE_GROUP_PARASTYLE_BEGIN_OFF_PART1 0x05
#define WP6_STYLE_GROUP_PARASTYLE_BEGIN_ON_PART2 0x06
#define WP6_STYLE_GROUP_PARASTYLE_BEGIN_OFF_PART2 0x07
#define WP6_STYLE_GROUP_PARASTYLE_END_ON 0x08
#define WP6_STYLE_GROUP_PARASTYLE_END_OFF 0x09
#define WP6_STYLE_GROUP_GLOBAL_ON 0x0A
#define WP6_STYLE_GROUP_GLOBAL_OFF 0x0B

#define WP6_SYSTEM_STYLE_FOOTNOTE 36
#define WP6_SYSTEM_STYLE_ENDNOTE 37

/* Paragraph Group */
#define WP6_PARAGRAPH_GROUP_LINE_SPACING 0x01
#define WP6_PARAGRAPH_GROUP_TAB_SET 0x04
#define WP6_PARAGRAPH_GROUP_JUSTIFICATION 0x05
#define WP6_PARAGRAPH_GROUP_SPACING_AFTER_PARAGRAPH 0x0A
#define WP6_PARAGRAPH_GROUP_INDENT_FIRST_LINE_OF_PARAGRAPH 0x0B
#define WP6_PARAGRAPH_GROUP_LEFT_MARGIN_ADJUSTMENT 0x0C
#define WP6_PARAGRAPH_GROUP_RIGHT_MARGIN_ADJUSTMENT 0x0D
#define WP6_PARAGRAPH_GROUP_OUTLINE_DEFINE 0x0E
#define WP6_PARAGRAPH_GROUP_OUTLINE_DEFINE_BULLETED_NUMBERING 0
#define WP6_PARAGRAPH_GROUP_OUTLINE_DEFINE_ARABIC_NUMBERING 256
#define WP6_PARAGRAPH_GROUP_OUTLINE_DEFINE_LOWERCASE_NUMBERING 3
#define WP6_PARAGRAPH_GROUP_OUTLINE_DEFINE_LOWERCASE_ROMAN_NUMBERING 769

#define WP6_PARAGRAPH_JUSTIFICATION_LEFT 0x00
#define WP6_PARAGRAPH_JUSTIFICATION_FULL 0x01
#define WP6_PARAGRAPH_JUSTIFICATION_CENTER 0x02
#define WP6_PARAGRAPH_JUSTIFICATION_RIGHT 0x03
#define WP6_PARAGRAPH_JUSTIFICATION_FULL_ALL_LINES 0x04
#define WP6_PARAGRAPH_JUSTIFICATION_RESERVED 0x05

/* Character Group */
#define WP6_CHARACTER_GROUP_SET_ALIGNMENT_CHARACTER 0x00
#define WP6_CHARACTER_GROUP_COLOR 0x18
#define WP6_CHARACTER_GROUP_CHARACTER_SHADING_CHANGE 0x19
#define WP6_CHARACTER_GROUP_FONT_FACE_CHANGE 0x1A
#define WP6_CHARACTER_GROUP_FONT_SIZE_CHANGE 0x1B
#define WP6_CHARACTER_GROUP_COMMENT 0x1D
#define WP6_CHARACTER_GROUP_SET_DOT_LEADER_CHARACTERS 0x1E
#define WP6_CHARACTER_GROUP_PARAGRAPH_NUMBER_ON 0x32
#define WP6_CHARACTER_GROUP_PARAGRAPH_NUMBER_OFF 0x33
#define WP6_CHARACTER_GROUP_TABLE_DEFINITION_ON 0x2A
#define WP6_CHARACTER_GROUP_TABLE_DEFINITION_OFF 0x2B
#define WP6_CHARACTER_GROUP_TABLE_COLUMN 0x2C

/* Footnote/endnote Group */
#define WP6_FOOTNOTE_ENDNOTE_GROUP_FOOTNOTE_ON 0x00
#define WP6_FOOTNOTE_ENDNOTE_GROUP_ENDNOTE_ON 0x02
#define WP6_FOOTNOTE_ENDNOTE_GROUP_FOOTNOTE_OFF 0x01
#define WP6_FOOTNOTE_ENDNOTE_GROUP_ENDNOTE_OFF 0x03

/* Header/footer Group */
#define WP6_HEADER_FOOTER_GROUP_HEADER_A 0x00
#define WP6_HEADER_FOOTER_GROUP_HEADER_B 0x01
#define WP6_HEADER_FOOTER_GROUP_FOOTER_A 0x02
#define WP6_HEADER_FOOTER_GROUP_FOOTER_B 0x03
#define WP6_HEADER_FOOTER_GROUP_WATERMARK_A 0x04
#define WP6_HEADER_FOOTER_GROUP_WATERMARK_B 0x05

#define WP6_HEADER_FOOTER_GROUP_ODD_BIT 0x01
#define WP6_HEADER_FOOTER_GROUP_EVEN_BIT 0x02

/* Set Number Functions */
#define WP6_SET_NUMBER_GROUP_SET_USER_DEFINED_COUNTER 0x00
#define WP6_SET_NUMBER_GROUP_SET_BOX_NUMBER 0x01
#define WP6_SET_NUMBER_GROUP_SET_PAGE_NUMBER 0x02
#define WP6_SET_NUMBER_GROUP_SET_SECONDARY_PAGE_NUMBER 0x03
#define WP6_SET_NUMBER_GROUP_SET_CHAPTER_NUMBER 0x04
#define WP6_SET_NUMBER_GROUP_SET_VOLUME_NUMBER 0x05
#define WP6_SET_NUMBER_GROUP_SET_PARAGRAPH_NUMBER 0x06
#define WP6_SET_NUMBER_GROUP_SET_FOOTNOTE_NUMBER 0x07
#define WP6_SET_NUMBER_GROUP_SET_ENDNOTE_NUMBER 0x08
#define WP6_SET_NUMBER_GROUP_SET_LINE_NUMBER 0x09

/* Numbering Functions */

#define WP6_NUMBERING_METHOD_GROUP_SET_USER_DEFINED_COUNTER_NUMBERING_MODE 0x00
#define WP6_NUMBERING_METHOD_GROUP_SET_BOX_NUMBERING_MODE 0x01
#define WP6_NUMBERING_METHOD_GROUP_SET_PAGE_NUMBERING_MODE 0x02
#define WP6_NUMBERING_METHOD_GROUP_SET_SECONDARY_PAGE_NUMBERING_MODE 0x03
#define WP6_NUMBERING_METHOD_GROUP_SET_CHAPTER_NUMBERING_MODE 0x04
#define WP6_NUMBERING_METHOD_GROUP_SET_VOLUME_NUMBERING_MODE 0x05
#define WP6_NUMBERING_METHOD_GROUP_SET_PARAGRAPH_NUMBERING_MODE 0x06
#define WP6_NUMBERING_METHOD_GROUP_SET_FOOTNOTE_NUMBERING_MODE 0x07
#define WP6_NUMBERING_METHOD_GROUP_SET_ENDNOTE_NUMBERING_MODE 0x08
#define WP6_NUMBERING_METHOD_GROUP_SET_LINE_NUMBERING_MODE 0x09

#define WP6_NUMBERING_METHOD_GROUP_PAGE_NUMBERING_ARABIC 0
#define WP6_NUMBERING_METHOD_GROUP_PAGE_NUMBERING_LOWERCASE 1
#define WP6_NUMBERING_METHOD_GROUP_PAGE_NUMBERING_UPPERCASE 2
#define WP6_NUMBERING_METHOD_GROUP_PAGE_NUMBERING_LOWERCASE_ROMAN 3
#define WP6_NUMBERING_METHOD_GROUP_PAGE_NUMBERING_UPPERCASE_ROMAN 4

/* Display Number Functions */

#define WP6_DISPLAY_NUMBER_REFERENCE_GROUP_USER_DEFINED_NUMBER_DISPLAY_ON 0x00
#define WP6_DISPLAY_NUMBER_REFERENCE_GROUP_USER_DEFINED_NUMBER_DISPLAY_OFF 0x01
#define WP6_DISPLAY_NUMBER_REFERENCE_GROUP_BOX_NUMBER_DISPLAY_ON 0x02
#define WP6_DISPLAY_NUMBER_REFERENCE_GROUP_BOX_NUMBER_DISPLAY_OFF 0x03
#define WP6_DISPLAY_NUMBER_REFERENCE_GROUP_PAGE_NUMBER_DISPLAY_ON 0x04
#define WP6_DISPLAY_NUMBER_REFERENCE_GROUP_PAGE_NUMBER_DISPLAY_OFF 0x05
#define WP6_DISPLAY_NUMBER_REFERENCE_GROUP_SECONDARY_PAGE_NUMBER_DISPLAY_ON 0x06
#define WP6_DISPLAY_NUMBER_REFERENCE_GROUP_SECONDARY_PAGE_NUMBER_DISPLAY_OFF 0x07
#define WP6_DISPLAY_NUMBER_REFERENCE_GROUP_CHAPTER_NUMBER_DISPLAY_ON 0x08
#define WP6_DISPLAY_NUMBER_REFERENCE_GROUP_CHAPTER_NUMBER_DISPLAY_OFF 0x09
#define WP6_DISPLAY_NUMBER_REFERENCE_GROUP_VOLUME_NUMBER_DISPLAY_ON 0x0A
#define WP6_DISPLAY_NUMBER_REFERENCE_GROUP_VOLUME_NUMBER_DISPLAY_OFF 0x0B
#define WP6_DISPLAY_NUMBER_REFERENCE_GROUP_PARAGRAPH_NUMBER_DISPLAY_ON 0x0C
#define WP6_DISPLAY_NUMBER_REFERENCE_GROUP_PARAGRAPH_NUMBER_DISPLAY_OFF 0x0D
#define WP6_DISPLAY_NUMBER_REFERENCE_GROUP_FOOTNOTE_NUMBER_DISPLAY_ON 0x0E
#define WP6_DISPLAY_NUMBER_REFERENCE_GROUP_FOOTNOTE_NUMBER_DISPLAY_OFF 0x0F
#define WP6_DISPLAY_NUMBER_REFERENCE_GROUP_ENDNOTE_NUMBER_DISPLAY_ON 0x10
#define WP6_DISPLAY_NUMBER_REFERENCE_GROUP_ENDNOTE_NUMBER_DISPLAY_OFF 0x11
#define WP6_DISPLAY_NUMBER_REFERENCE_GROUP_LINE_NUMBER_DISPLAY_ON 0x12
#define WP6_DISPLAY_NUMBER_REFERENCE_GROUP_LINE_NUMBER_DISPLAY_OFF 0x13
#define WP6_DISPLAY_NUMBER_REFERENCE_GROUP_TOTAL_NUMBER_OF_PAGES_DISPLAY_ON 0x14
#define WP6_DISPLAY_NUMBER_REFERENCE_GROUP_TOTAL_NUMBER_OF_PAGES_DISPLAY_OFF 0x15

/* Increment Number Functions */

#define WP6_INCREMENT_NUMBER_GROUP_INCREMENT_USER_DEFINED_NUMBER 0x00
#define WP6_INCREMENT_NUMBER_GROUP_INCREMENT_BOX_NUMBER 0x01
#define WP6_INCREMENT_NUMBER_GROUP_INCREMENT_PAGE_NUMBER 0x02
#define WP6_INCREMENT_NUMBER_GROUP_INCREMENT_SECONDARY_PAGE_NUMBER 0x03
#define WP6_INCREMENT_NUMBER_GROUP_INCREMENT_CHAPTER_NUMBER 0x04
#define WP6_INCREMENT_NUMBER_GROUP_INCREMENT_VOLUME_NUMBER 0x05
#define WP6_INCREMENT_NUMBER_GROUP_INCREMENT_PARAGRAPH_NUMBER 0x06
#define WP6_INCREMENT_NUMBER_GROUP_INCREMENT_FOOTNOTE_NUMBER 0x07
#define WP6_INCREMENT_NUMBER_GROUP_INCREMENT_ENDNOTE_NUMBER 0x08
#define WP6_INCREMENT_NUMBER_GROUP_INCREMENT_LINE_NUMBER 0x09

/* Decrement Number Functions */

#define WP6_DECREMENT_NUMBER_GROUP_DECREMENT_USER_DEFINED_NUMBER 0x00
#define WP6_DECREMENT_NUMBER_GROUP_DECREMENT_BOX_NUMBER 0x01
#define WP6_DECREMENT_NUMBER_GROUP_DECREMENT_PAGE_NUMBER 0x02
#define WP6_DECREMENT_NUMBER_GROUP_DECREMENT_SECONDARY_PAGE_NUMBER 0x03
#define WP6_DECREMENT_NUMBER_GROUP_DECREMENT_CHAPTER_NUMBER 0x04
#define WP6_DECREMENT_NUMBER_GROUP_DECREMENT_VOLUME_NUMBER 0x05
#define WP6_DECREMENT_NUMBER_GROUP_DECREMENT_PARAGRAPH_NUMBER_0x06
#define WP6_DECREMENT_NUMBER_GROUP_DECREMENT_FOOTNOTE_NUMBER 0x07
#define WP6_DECREMENT_NUMBER_GROUP_DECREMENT_ENDNOTE_NUMBER 0x08
#define WP6_DECREMENT_NUMBER_GROUP_DECREMENT_LINE_NUMBER 0x09

/* Column Group */
#define WP6_COLUMN_GROUP_LEFT_MARGIN_SET 0
#define WP6_COLUMN_GROUP_RIGHT_MARGIN_SET 1

#define WP6_COLUMN_TYPE_NEWSPAPER 0x00
#define WP6_COLUMN_TYPE_NEWSPAPER_VERTICAL_BALANCE 0x01
#define WP6_COLUMN_TYPE_PARALLEL 0x02
#define WP6_COLUMN_TYPE_PARALLEL_PROTECT 0x03

/* Attribute Group */
#define WP6_ATTRIBUTE_EXTRA_LARGE 0
#define WP6_ATTRIBUTE_VERY_LARGE 1
#define WP6_ATTRIBUTE_LARGE 2
#define WP6_ATTRIBUTE_SMALL_PRINT 3
#define WP6_ATTRIBUTE_FINE_PRINT 4
#define WP6_ATTRIBUTE_SUPERSCRIPT 5
#define WP6_ATTRIBUTE_SUBSCRIPT 6
#define WP6_ATTRIBUTE_OUTLINE 7
#define WP6_ATTRIBUTE_ITALICS 8
#define WP6_ATTRIBUTE_SHADOW 9
#define WP6_ATTRIBUTE_REDLINE 10
#define WP6_ATTRIBUTE_DOUBLE_UNDERLINE 11
#define WP6_ATTRIBUTE_BOLD 12
#define WP6_ATTRIBUTE_STRIKE_OUT 13
#define WP6_ATTRIBUTE_UNDERLINE 14
#define WP6_ATTRIBUTE_SMALL_CAPS 15
#define WP6_ATTRIBUTE_BLINK 16

/* Box Group */
#define WP6_BOX_GROUP_CHARACTER_ANCHORED_BOX 0x00
#define WP6_BOX_GROUP_PARAGRAPH_ANCHORED_BOX 0x01
#define WP6_BOX_GROUP_PAGE_ANCHORED_BOX 0x02
#define WP6_BOX_GROUP_GRAPHICS_RULE 0x03

#define WP6_BOX_GROUP_BOX_COUNTER_DATA_BIT 0x8000
#define WP6_BOX_GROUP_BOX_POSITIONING_DATA_BIT 0x4000
#define WP6_BOX_GROUP_BOX_CONTENT_DATA_BIT 0x2000
#define WP6_BOX_GROUP_BOX_CAPTION_DATA_BIT 0x1000
#define WP6_BOX_GROUP_BOX_BORDER_DATA_BIT 0x0800
#define WP6_BOX_GROUP_BOX_FILL_DATA_BIT 0x0400
#define WP6_BOX_GROUP_BOX_BOX_WRAPPING_DATA_BIT 0x0200
#define WP6_BOX_GROUP_BOX_BOX_HYPERTEXT_WRAPPING_DATA_BIT 0x0100
#define WP6_BOX_GROUP_BOX_HTML_BIT 0x0080
#define WP6_BOX_GROUP_BOX_GROUPING_DATA_BIT 0x0040
#define WP6_BOX_GROUP_BOX_DRAW_OBJECT_DATA_BIT 0x0020

/* Tab Group */
// these elements are defined in terms of bits 3-8 of the tab group
#define WP6_TAB_GROUP_BACK_TAB 0x00
#define WP6_TAB_GROUP_TABLE_TAB 0x01
#define WP6_TAB_GROUP_LEFT_TAB 0x02
#define WP6_TAB_GROUP_BAR_TAB 0x04
#define WP6_TAB_GROUP_LEFT_INDENT 0x06
#define WP6_TAB_GROUP_LEFT_RIGHT_INDENT 0x07
#define WP6_TAB_GROUP_CENTER_ON_MARGINS 0x08
#define WP6_TAB_GROUP_CENTER_ON_CURRENT_POSITION 0x09
#define WP6_TAB_GROUP_CENTER_TAB 0x0A
#define WP6_TAB_GROUP_FLUSH_RIGHT 0x10
#define WP6_TAB_GROUP_RIGHT_TAB 0x12
#define WP6_TAB_GROUP_DECIMAL_TAB 0x1A

/* Platform Group */
#define WP6_PLATFORM_GROUP_DYNAMIC_DATA_EXCHANGE_START 0x00
#define WP6_PLATFORM_GROUP_DYNAMIC_DATA_EXCHANGE_END 0x01
#define WP6_PLATFORM_GROUP_PUBLISH_DATA_START 0x02
#define WP6_PLATFORM_GROUP_PUBLISH_DATA_END 0x03
#define WP6_PLATFORM_GROUP_SUBSCRIBE_DATA_START 0x04
#define WP6_PLATFORM_GROUP_SUBSCRIBE_DATA_END 0x05
#define WP6_PLATFORM_GROUP_SUBTITLE_MARK 0x06
#define WP6_PLATFORM_GROUP_SUBTITLE_TEXT 0x07
#define WP6_PLATFORM_GROUP_SUBTITLE_OPTION 0x08
#define WP6_PLATFORM_GROUP_SUBTITLE_TEXT_OPTIONS 0x09
#define WP6_PLATFORM_GROUP_SUPPRESS_SUBTITLE Ox0A
#define WP6_PLATFORM_GROUP_THIRD_PARTY 0x0B
#define WP6_PLATFORM_GROUP_PEN_FOREGROUND_COLOR_32BIT 0x0C
#define WP6_PLATFORM_GROUP_PEN_FOREGROUND_COLOR_64BIT 0x0D
#define WP6_PLATFORM_GROUP_PEN_BACKGROUND_COLOR_32BIT 0x0E
#define WP6_PLATFORM_GROUP_PEN_BACKGROUND_COLOR_64BIT 0x0F
#define WP6_PLATFORM_GROUP_PEN_STYLE 0x10
#define WP6_PLATFORM_GROUP_PEN_PATTERN 0x11
#define WP6_PLATFORM_GROUP_PEN_SIZE_16BIT 0x12
#define WP6_PLATFORM_GROUP_PEN_SIZE_32BIT 0x13
#define WP6_PLATFORM_GROUP_BRUSH_GRADIENT_32BIT 0x14
#define WP6_PLATFORM_GROUP_BRUSH_GRADIENT_64BIT 0x15
#define WP6_PLATFORM_GROUP_BRUSH_FOREGROUND_COLOR_32BIT 0x16
#define WP6_PLATFORM_GROUP_BRUSH_FOREGROUND_COLOR_64BIT 0x17
#define WP6_PLATFORM_GROUP_BRUSH_BACKGROUND_COLOR_32BIT 0x18
#define WP6_PLATFORM_GROUP_BRUSH_BACKGROUND_COLOR_64BIT 0x19
#define WP6_PLATFORM_GROUP_BRUSH_PATTERN 0x1A
#define WP6_PLATFORM_GROUP_MISCELLANEOUS_ATTRIBUTES 0x1B
#define WP6_PLATFORM_GROUP_PRESENTATIONS_SLIDE_OPTIONS 0x1C
#define WP6_PLATFORM_GROUP_PRESENTATIONS_ORGANIZATION_CHART_NODE_OPTIONS 0x1D
#define WP6_PLATFORM_GROUP_HIDE_FOR_CONVERSIONS 0x1E
#define WP6_PLATFORM_GROUP_HIDE_OFF_FOR_CONVERSIONS 0x1F
#define WP6_PLATFORM_GROUP_SGML_START_TAG 0x20
#define WP6_PLATFORM_GROUP_SGML_START_TAG_END 0x21
#define WP6_PLATFORM_GROUP_SGML_END_TAG 0x22
#define WP6_PLATFORM_GROUP_SGML_END_TAG_END 0x23
#define WP6_PLATFORM_GROUP_SGML_CHARACTER_REFERENCE 0x24
#define WP6_PLATFORM_GROUP_SGML_END_CHARACTER_REFERENCE 0x25
#define WP6_PLATFORM_GROUP_SGML_ENTITY_REFERENCE 0x26
#define WP6_PLATFORM_GROUP_SGML_END_ENTITY_REFERENCE 0x27
#define WP6_PLATFORM_GROUP_SGML_IGNORE_ON 0x28
#define WP6_PLATFORM_GROUP_SGML_IGNORE_OFF 0x29
#define WP6_PLATFORM_GROUP_SGML_MARKED_SECTION_ON 0x2A
#define WP6_PLATFORM_GROUP_SGML_MARKED_SECTION_OFF 0x2B
#define WP6_PLATFORM_GROUP_SGML_PROCESSING_INSTRUCTION_ON 0x2C
#define WP6_PLATFORM_GROUP_SGML_PROCESSING_INSTRUCTION_OFF 0x2D

/* Set number group */
#define WP6_SET_NUMBER_GROUP_SET_PAGE_NUMBER 0x02

/* Extended Character */
#define WP6_MULTINATIONAL_CHARACTER_SET 1
#define WP6_PHONETIC_SYMBOL_CHARACTER_SET 2
#define WP6_BOX_DRAWING_CHARACTER_SET 3
#define WP6_TYPOGRAPHIC_SYMBOL_CHARACTER_SET 4
#define WP6_ICONIC_SYMBOL_CHARACTER_SET 5
#define WP6_MATH_SCIENTIFIC_CHARACTER_SET 6
#define WP6_MATH_SCIENTIFIC_EXTENDED_CHARACTER_SET 7
#define WP6_GREEK_CHARACTER_SET 8
#define WP6_HEBREW_CHARACTER_SET 9
#define WP6_CYRILLIC_CHARACTER_SET 10
#define WP6_JAPANESE_CHARACTER_SET 11
#define WP6_TIBETAN_CHARACTER_SET 12
#define WP6_ARABIC_CHARACTER_SET 13
#define WP6_ARABIC_SCRIPT_CHARACTER_SET 14

/* Undo Group */
#define WP6_UNDO_GROUP_INVALID_TEXT_START 0
#define WP6_UNDO_GROUP_INVALID_TEXT_END 1
#define WP6_UNDO_GROUP_VALID_TEXT_START 2
#define WP6_UNDO_GROUP_VALID_TEXT_END 3

#endif /* WP6FILESTRUCTURE_H */
/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
