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;
33 extern QCString rtf_author;
34 extern QCString rtf_manager;
37 extern QCString rtf_keywords;
38 
40 {
41  bool isEnum;
42  int number;
43 };
44 
45 const int rtf_maxIndentLevels = 10;
46 
48 
50 {
51  const char *name;
52  const char *reference;
53  const char *definition;
54 };
55 
56 extern char rtf_Style_Reset[];
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
static QCString name
Definition: declinfo.cpp:673
The QRegExp class provides pattern matching using regular expressions or wildcards.
Definition: qregexp.h:46
QDict< StyleData > rtf_Style
QCString rtf_manager
Definition: rtfstyle.cpp:36
QCString rtf_comments
Definition: rtfstyle.cpp:32
QCString rtf_keywords
Definition: rtfstyle.cpp:39
const char * name
Definition: rtfstyle.h:51
void loadStylesheet(const char *name, QDict< StyleData > &dict)
Definition: rtfstyle.cpp:428
QCString rtf_documentType
Definition: rtfstyle.cpp:37
QCString rtf_subject
Definition: rtfstyle.cpp:31
QCString rtf_logoFilename
Definition: rtfstyle.cpp:34
char rtf_Style_Reset[]
Definition: rtfstyle.cpp:41
QCString rtf_title
Definition: rtfstyle.cpp:30
QCString rtf_documentId
Definition: rtfstyle.cpp:38
void loadExtensions(const char *name)
Definition: rtfstyle.cpp:475
const char * definition
Definition: rtfstyle.h:53
unsigned index
Definition: rtfstyle.h:66
RTFListItemInfo rtf_listItemInfo[rtf_maxIndentLevels]
Definition: rtfstyle.cpp:28
QCString rtf_company
Definition: rtfstyle.cpp:33
Rtf_Style_Default rtf_Style_Default[]
Definition: rtfstyle.cpp:43
const int rtf_pageWidth
Definition: rtfstyle.h:26
char * definition
Definition: rtfstyle.h:68
QCString rtf_author
Definition: rtfstyle.cpp:35
char * reference
Definition: rtfstyle.h:67
static const QRegExp s_clause
Definition: rtfstyle.h:74
const char * reference
Definition: rtfstyle.h:52
static QCString * s
Definition: config.cpp:1042
const int rtf_maxIndentLevels
Definition: rtfstyle.h:45