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: all_dts.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 ARY_INFO_ALL_DTS_HXX
32 #define ARY_INFO_ALL_DTS_HXX
52 virtual ~DocuToken() {}
55 DocuDisplay
& o_rDisplay
) const;
59 virtual void do_StoreAt(
60 DocuDisplay
& o_rDisplay
) const = 0;
61 virtual bool inq_IsWhite() const = 0;
64 class DT_Text
: public DocuToken
68 const char * i_sText
)
71 const String
& Text() const { return sText
; }
74 virtual void do_StoreAt(
75 DocuDisplay
& o_rDisplay
) const;
76 virtual bool inq_IsWhite() const;
81 class DT_MaybeLink
: public DocuToken
89 bIsGlobal(i_bIsGlobal
),
90 bIsFunction(i_bIsFunction
) { }
92 const String
& Text() const { return sText
; }
93 bool IsAbsolute() const { return bIsGlobal
; }
94 bool IsFunction() const { return bIsFunction
; }
97 virtual void do_StoreAt(
98 DocuDisplay
& o_rDisplay
) const;
99 virtual bool inq_IsWhite() const;
106 class DT_Whitespace
: public DocuToken
111 : nLength( i_nLength
) {}
112 UINT8
Length() const { return nLength
; }
115 virtual void do_StoreAt(
116 DocuDisplay
& o_rDisplay
) const;
117 virtual bool inq_IsWhite() const;
123 class DT_Eol
: public DocuToken
125 virtual void do_StoreAt(
126 DocuDisplay
& o_rDisplay
) const;
127 virtual bool inq_IsWhite() const;
130 class DT_Xml
: public DocuToken
134 const char * i_sText
)
135 : sText( i_sText
) {}
137 const String
& Text() const { return sText
; }
140 virtual void do_StoreAt(
141 DocuDisplay
& o_rDisplay
) const;
142 virtual bool inq_IsWhite() const;
151 DocuToken::StoreAt( DocuDisplay
& o_rDisplay
) const
152 { do_StoreAt(o_rDisplay
); }
154 DocuToken::IsWhite() const
155 { return inq_IsWhite(); }