1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef ARY_INFO_ALL_DTS_HXX
30 #define ARY_INFO_ALL_DTS_HXX
50 virtual ~DocuToken() {}
53 DocuDisplay
& o_rDisplay
) const;
57 virtual void do_StoreAt(
58 DocuDisplay
& o_rDisplay
) const = 0;
59 virtual bool inq_IsWhite() const = 0;
62 class DT_Text
: public DocuToken
66 const char * i_sText
)
69 const String
& Text() const { return sText
; }
72 virtual void do_StoreAt(
73 DocuDisplay
& o_rDisplay
) const;
74 virtual bool inq_IsWhite() const;
79 class DT_MaybeLink
: public DocuToken
87 bIsGlobal(i_bIsGlobal
),
88 bIsFunction(i_bIsFunction
) { }
90 const String
& Text() const { return sText
; }
91 bool IsAbsolute() const { return bIsGlobal
; }
92 bool IsFunction() const { return bIsFunction
; }
95 virtual void do_StoreAt(
96 DocuDisplay
& o_rDisplay
) const;
97 virtual bool inq_IsWhite() const;
104 class DT_Whitespace
: public DocuToken
109 : nLength( i_nLength
) {}
110 UINT8
Length() const { return nLength
; }
113 virtual void do_StoreAt(
114 DocuDisplay
& o_rDisplay
) const;
115 virtual bool inq_IsWhite() const;
121 class DT_Eol
: public DocuToken
123 virtual void do_StoreAt(
124 DocuDisplay
& o_rDisplay
) const;
125 virtual bool inq_IsWhite() const;
128 class DT_Xml
: public DocuToken
132 const char * i_sText
)
133 : sText( i_sText
) {}
135 const String
& Text() const { return sText
; }
138 virtual void do_StoreAt(
139 DocuDisplay
& o_rDisplay
) const;
140 virtual bool inq_IsWhite() const;
149 DocuToken::StoreAt( DocuDisplay
& o_rDisplay
) const
150 { do_StoreAt(o_rDisplay
); }
152 DocuToken::IsWhite() const
153 { return inq_IsWhite(); }
162 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */