-
Notifications
You must be signed in to change notification settings - Fork 0
/
bodydestination.h
executable file
·62 lines (58 loc) · 1.9 KB
/
bodydestination.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*Copyright 2001
*
* bodydestination.h
*
* Author: Gregory Ford [email protected]
* RTF token parser based on:
* rtf2html by Dmitry Porapov <[email protected]>,
* based on earlier work of Chuck Shotton.
* distributed under BSD-style license
* RTF token lists and hashing algorithm based on
* RTF Tools, Release 1.10
* 6 April 1994
* Paul DuBois [email protected]
*
* Copying permitted under GNU licence (see COPYING)
*/
// bodydestination.h: interface for the BodyDestination class.
//
//////////////////////////////////////////////////////////////////////
class BodyDestination : public Destination
{
public:
LinkTracker * linkTracker;
void setLinkTracker ( LinkTracker * tracker );
StyleMap * styleMap;
void setStyleMap( StyleMap *map );
BodyDestination( CharOutput * out);
bool handleToken(Token* token);
BodyDestination();
void popAllTags();
virtual ~BodyDestination();
private:
void prepareCharContext();
void putHtmlChar( unsigned char c);
void handleRtfParAttr( ControlToken *token, DesiredGraphicState *desired);
int handleRtfTblAttr(ControlToken * token, DesiredGraphicState *desired);
int handleRtfSpecialChar(ControlToken * token, DesiredGraphicState *desired);
int handleRtfCharAttr(ControlToken * token, DesiredGraphicState *desired);
GraphicState activeState;
stack<Tag> tagStack;
stack<DesiredGraphicState> contextStack;
CharOutput * out;
void popTo( TagType stopTag );
void pushParagraph( TagType item);
void pushFormat( TagType format );
void reconcileStates(DesiredGraphicState& desired );
void pushTable();
void pushTableRow();
void pushTableCell();
char * *HTML_CODES;
bool handleEndGroup(Token * token);
bool handleStartGroup(Token * token);
bool handleControl (ControlToken *token);
int handleChar( CharToken *token);
bool handleGroup( GroupToken *token);
bool handleField( ControlToken *token );
stack<int> fieldStack;
};