1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: cx_docu2.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef DSAPI_CX_DOCU2_HXX
32 #define DSAPI_CX_DOCU2_HXX
36 #include <tokens/tkpcont2.hxx>
39 #include <s2_dsapi/tk_xml.hxx>
53 class Cx_Base
: public ::TkpContext
56 virtual bool PassNewToken();
62 Token_Receiver
& o_rReceiver
,
63 TkpContext
& i_rFollowUpContext
)
64 : rReceiver(o_rReceiver
),
65 pFollowUpContext(&i_rFollowUpContext
)
70 DYN Token
* let_dpToken
)
71 { pNewToken
= let_dpToken
; }
72 void Handle_DocuSyntaxError(
73 CharacterSource
& io_rText
);
77 Token_Receiver
& rReceiver
;
78 TkpContext
* pFollowUpContext
;
83 class Cx_EoHtml
: public Cx_Base
88 Token_Receiver
& o_rReceiver
,
89 TkpContext
& i_rFollowUpContext
)
90 : Cx_Base(o_rReceiver
, i_rFollowUpContext
) {}
92 virtual void ReadCharChain(
93 CharacterSource
& io_rText
);
94 void SetIfIsStartOfParagraph(
95 bool i_bNextTokenProperty
)
96 { bToken_IsStartOfParagraph
= i_bNextTokenProperty
; }
99 bool bToken_IsStartOfParagraph
;
102 class Cx_EoXmlConst
: public Cx_Base
107 Token_Receiver
& o_rReceiver
,
108 TkpContext
& i_rFollowUpContext
)
109 : Cx_Base(o_rReceiver
, i_rFollowUpContext
) {}
111 virtual void ReadCharChain(
112 CharacterSource
& io_rText
);
114 lux::Enum
< Tok_XmlConst::E_TokenId
>
116 { eTokenId
= i_eTokenId
; }
118 Tok_XmlConst::EV_TokenId
122 class Cx_EoXmlLink_BeginTag
: public Cx_Base
126 Cx_EoXmlLink_BeginTag(
127 Token_Receiver
& o_rReceiver
,
128 TkpContext
& i_rFollowUpContext
)
129 : Cx_Base(o_rReceiver
, i_rFollowUpContext
) {}
131 virtual void ReadCharChain(
132 CharacterSource
& io_rText
);
134 Tok_XmlLink_BeginTag::EV_TokenId
136 { eTokenId
= i_eTokenId
; }
138 Tok_XmlLink_BeginTag::EV_TokenId
142 class Cx_EoXmlLink_EndTag
: public Cx_Base
147 Token_Receiver
& o_rReceiver
,
148 TkpContext
& i_rFollowUpContext
)
149 : Cx_Base(o_rReceiver
, i_rFollowUpContext
) {}
151 virtual void ReadCharChain(
152 CharacterSource
& io_rText
);
154 Tok_XmlLink_EndTag::EV_TokenId
156 { eTokenId
= i_eTokenId
; }
158 Tok_XmlLink_EndTag::E_TokenId
162 class Cx_EoXmlFormat_BeginTag
: public Cx_Base
166 Cx_EoXmlFormat_BeginTag(
167 Token_Receiver
& o_rReceiver
,
168 TkpContext
& i_rFollowUpContext
)
169 : Cx_Base(o_rReceiver
, i_rFollowUpContext
) {}
171 virtual void ReadCharChain(
172 CharacterSource
& io_rText
);
174 lux::Enum
< Tok_XmlFormat_BeginTag::E_TokenId
>
176 { eTokenId
= i_eTokenId
; }
178 lux::Enum
< Tok_XmlFormat_BeginTag::E_TokenId
>
182 class Cx_EoXmlFormat_EndTag
: public Cx_Base
186 Cx_EoXmlFormat_EndTag(
187 Token_Receiver
& o_rReceiver
,
188 TkpContext
& i_rFollowUpContext
)
189 : Cx_Base(o_rReceiver
, i_rFollowUpContext
) {}
191 virtual void ReadCharChain(
192 CharacterSource
& io_rText
);
194 lux::Enum
< Tok_XmlFormat_EndTag::E_TokenId
>
196 { eTokenId
= i_eTokenId
; }
198 lux::Enum
< Tok_XmlFormat_EndTag::E_TokenId
>
202 class Cx_CheckStar
: public Cx_Base
207 Token_Receiver
& o_rReceiver
,
208 TkpContext
& i_rFollowUpContext
)
209 : Cx_Base(o_rReceiver
, i_rFollowUpContext
),
210 bIsEnd(false), bEndTokenFound(false)
212 void Set_End_FolloUpContext(
213 TkpContext
& i_rEnd_FollowUpContext
)
214 { pEnd_FollowUpContext
= &i_rEnd_FollowUpContext
; }
216 virtual void ReadCharChain(
217 CharacterSource
& io_rText
);
220 { bIsEnd
= i_bIsEnd
; }
224 TkpContext
* pEnd_FollowUpContext
;