1 /************************************************************************/ 2 /* */ 3 /* The stylesheet of a document. */ 4 /* */ 5 /************************************************************************/ 6 7 # ifndef DOC_STYLE_H 8 # define DOC_STYLE_H 9 10 # include <utilPropMask.h> 11 12 # include "docSectProperties.h" 13 # include "docRowProperties.h" 14 # include "docParaProperties.h" 15 # include "docParaNumber.h" 16 # include "docDocumentAttributeMap.h" 17 18 /************************************************************************/ 19 /* */ 20 /* Styles in a document. */ 21 /* */ 22 /* dsBusy is used to prevent recursion when styles are expanded. */ 23 /* */ 24 /************************************************************************/ 25 26 typedef struct DocumentStyle 27 { 28 int dsStyleNumber; 29 30 int dsBasedOn; 31 32 int dsNext; 33 int dsLink; 34 int dsLevel; 35 36 unsigned char dsAdditive; 37 unsigned char dsAutoupd; 38 unsigned char dsHidden; 39 unsigned char dsLocked; 40 unsigned char dsSemiHidden; 41 unsigned char dsPersonal; 42 unsigned char dsBusy; 43 44 /** 45 * The outline level corresponding to this 46 * style. Used in TOC calculations and only 47 * set for styles in the stylesheet. 48 */ 49 unsigned char dsOutlineLevel; 50 51 SectionProperties dsSectProps; 52 RowProperties dsRowProps; 53 CellProperties dsCellProps; 54 ParagraphProperties dsParaProps; 55 TextAttribute dsTextAttribute; 56 57 char * dsName; 58 PropertyMask dsSectMask; 59 PropertyMask dsRowMask; 60 PropertyMask dsCellMask; 61 PropertyMask dsParaMask; 62 PropertyMask dsTextMask; 63 } DocumentStyle; 64 65 typedef enum DocumentStyleProperty 66 { 67 DSpropSTYLE_NUMBER= 0, 68 DSpropBASED_ON, 69 DSpropADDITIVE, 70 DSpropNEXT, 71 DSpropLINK, 72 DSpropLEVEL, 73 DSpropAUTO_UPD, 74 DSpropHIDDEN, 75 DSpropLOCKED, 76 DSpropSEMI_HIDDEN, 77 DSpropPERSONAL, 78 DSpropNAME, 79 80 DSpropIGNORED, 81 82 DSprop_COUNT 83 } DocumentStyleProperty; 84 85 /************************************************************************/ 86 /* */ 87 /* Routine declarations. */ 88 /* */ 89 /************************************************************************/ 90 91 extern void docInitDocumentStyle( DocumentStyle * ds ); 92 extern void docCleanDocumentStyle( DocumentStyle * ds ); 93 94 extern int docCopyStyle( DocumentStyle * to, 95 const DocumentStyle * from, 96 const DocumentAttributeMap * dam ); 97 98 extern int docSetStyleProperty( DocumentStyle * ds, 99 int prop, 100 int arg ); 101 102 # endif /* DOC_STYLE_H */ 103