My Project
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
rtfstyle.h
Go to the documentation of this file.
1
/******************************************************************************
2
*
3
*
4
*
5
*
6
* Copyright (C) 1997-2015 by Dimitri van Heesch.
7
*
8
* Permission to use, copy, modify, and distribute this software and its
9
* documentation under the terms of the GNU General Public License is hereby
10
* granted. No representations are made about the suitability of this software
11
* for any purpose. It is provided "as is" without express or implied warranty.
12
* See the GNU General Public License for more details.
13
*
14
* Documents produced by Doxygen are derivative works derived from the
15
* input used in their production; they are not affected by this license.
16
*
17
*/
18
19
#ifndef RTFSTYLE_H
20
#define RTFSTYLE_H
21
22
#include <qregexp.h>
23
#include <qdict.h>
24
25
// used for table column width calculation
26
const
int
rtf_pageWidth
= 8748;
27
28
extern
QCString
rtf_title
;
29
extern
QCString
rtf_subject
;
30
extern
QCString
rtf_comments
;
31
extern
QCString
rtf_company
;
32
extern
QCString
rtf_logoFilename
;
33
extern
QCString
rtf_author
;
34
extern
QCString
rtf_manager
;
35
extern
QCString
rtf_documentType
;
36
extern
QCString
rtf_documentId
;
37
extern
QCString
rtf_keywords
;
38
39
struct
RTFListItemInfo
40
{
41
bool
isEnum
;
42
int
number
;
43
};
44
45
const
int
rtf_maxIndentLevels
= 10;
46
47
extern
RTFListItemInfo
rtf_listItemInfo
[
rtf_maxIndentLevels
];
48
49
struct
Rtf_Style_Default
50
{
51
const
char
*
name
;
52
const
char
*
reference
;
53
const
char
*
definition
;
54
};
55
56
extern
char
rtf_Style_Reset
[];
57
extern
Rtf_Style_Default
rtf_Style_Default
[];
58
59
struct
StyleData
60
{
61
// elements of this type are stored in dictionary Rtf_Style
62
//
63
// to define a tag in the header reference + definition is required
64
// to use a tag in the body of the document only reference is required
65
66
unsigned
index
;
// index in style-sheet, i.e. number in s-clause
67
char
*
reference
;
// everything required to apply the style
68
char
*
definition
;
// additional tags like \snext and style name
69
70
StyleData
(
const
char
*
reference
,
const
char
*
definition
);
71
~StyleData
();
72
bool
setStyle
(
const
char
* s,
const
char
* styleName);
73
74
static
const
QRegExp
s_clause
;
75
};
76
77
extern
QDict<StyleData>
rtf_Style
;
78
79
void
loadExtensions
(
const
char
*name);
80
void
loadStylesheet
(
const
char
*name, QDict<StyleData>& dict);
81
82
#endif