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: tk_xml.cxx,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 ************************************************************************/
32 #include <s2_dsapi/tk_xml.hxx>
35 // NOT FULLY DEFINED SERVICES
36 #include <s2_dsapi/tokintpr.hxx>
38 using csi::dsapi::Tok_XmlConst
;
39 using csi::dsapi::Tok_XmlLink_Tag
;
40 using csi::dsapi::Tok_XmlFormat_Tag
;
43 lux::EnumValueMap G_aTok_XmlConst_EV_TokenId_Values
;
44 Tok_XmlConst::EV_TokenId
ev_consts_none(Tok_XmlConst::e_none
,"");
45 Tok_XmlConst::EV_TokenId
ev_e_true(Tok_XmlConst::e_true
,"true");
46 Tok_XmlConst::EV_TokenId
ev_e_false(Tok_XmlConst::e_false
,"false");
47 Tok_XmlConst::EV_TokenId
ev_e_null(Tok_XmlConst::e_null
,"NULL");
48 Tok_XmlConst::EV_TokenId
ev_e_void(Tok_XmlConst::e_void
,"void");
50 lux::EnumValueMap G_aTok_XmlLink_Tag_EV_TokenId_Values
;
51 Tok_XmlLink_Tag::EV_TokenId
ev_linktags_none(Tok_XmlLink_Tag::e_none
,"");
52 Tok_XmlLink_Tag::EV_TokenId
ev_e_const(Tok_XmlLink_Tag::e_const
,"const");
53 Tok_XmlLink_Tag::EV_TokenId
ev_member(Tok_XmlLink_Tag::member
,"member");
54 Tok_XmlLink_Tag::EV_TokenId
ev_type(Tok_XmlLink_Tag::type
,"type");
56 lux::EnumValueMap G_aTok_XmlFormat_Tag_EV_TokenId_Values
;
57 Tok_XmlFormat_Tag::EV_TokenId
ev_formattags_none(Tok_XmlFormat_Tag::e_none
,"");
58 Tok_XmlFormat_Tag::EV_TokenId
ev_code(Tok_XmlFormat_Tag::code
,"code");
59 Tok_XmlFormat_Tag::EV_TokenId
ev_listing(Tok_XmlFormat_Tag::listing
,"listing");
60 Tok_XmlFormat_Tag::EV_TokenId
ev_atom(Tok_XmlFormat_Tag::atom
,"code");
66 template<> EnumValueMap
&
67 Tok_XmlConst::EV_TokenId::Values_() { return G_aTok_XmlConst_EV_TokenId_Values
; }
68 template<> EnumValueMap
&
69 Tok_XmlLink_Tag::EV_TokenId::Values_() { return G_aTok_XmlLink_Tag_EV_TokenId_Values
; }
70 template<> EnumValueMap
&
71 Tok_XmlFormat_Tag::EV_TokenId::Values_() { return G_aTok_XmlFormat_Tag_EV_TokenId_Values
; }
83 Tok_XmlConst::Trigger( TokenInterpreter
& io_rInterpreter
) const
85 io_rInterpreter
.Process_XmlConst(*this);
89 Tok_XmlConst::Text() const
95 Tok_XmlLink_BeginTag::Trigger( TokenInterpreter
& io_rInterpreter
) const
97 io_rInterpreter
.Process_XmlLink_BeginTag(*this);
101 Tok_XmlLink_BeginTag::Text() const
103 static StreamStr
ret(120);
105 if (sScope
.length() > 0)
123 Tok_XmlLink_EndTag::Trigger( TokenInterpreter
& io_rInterpreter
) const
125 io_rInterpreter
.Process_XmlLink_EndTag(*this);
129 Tok_XmlLink_EndTag::Text() const
131 static StreamStr
ret(120);
140 Tok_XmlFormat_BeginTag::Trigger( TokenInterpreter
& io_rInterpreter
) const
142 io_rInterpreter
.Process_XmlFormat_BeginTag(*this);
146 Tok_XmlFormat_BeginTag::Text() const
148 static StreamStr
ret(120);
157 Tok_XmlFormat_EndTag::Trigger( TokenInterpreter
& io_rInterpreter
) const
159 io_rInterpreter
.Process_XmlFormat_EndTag(*this);
163 Tok_XmlFormat_EndTag::Text() const
165 static StreamStr
ret(120);