1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef ARY_INFO_ALL_DTS_HXX
21 #define ARY_INFO_ALL_DTS_HXX
41 virtual ~DocuToken() {}
44 DocuDisplay
& o_rDisplay
) const;
48 virtual void do_StoreAt(
49 DocuDisplay
& o_rDisplay
) const = 0;
50 virtual bool inq_IsWhite() const = 0;
53 class DT_Text
: public DocuToken
57 const char * i_sText
)
60 const String
& Text() const { return sText
; }
63 virtual void do_StoreAt(
64 DocuDisplay
& o_rDisplay
) const;
65 virtual bool inq_IsWhite() const;
70 class DT_MaybeLink
: public DocuToken
78 bIsGlobal(i_bIsGlobal
),
79 bIsFunction(i_bIsFunction
) { }
81 const String
& Text() const { return sText
; }
82 bool IsAbsolute() const { return bIsGlobal
; }
83 bool IsFunction() const { return bIsFunction
; }
86 virtual void do_StoreAt(
87 DocuDisplay
& o_rDisplay
) const;
88 virtual bool inq_IsWhite() const;
95 class DT_Whitespace
: public DocuToken
100 : nLength( i_nLength
) {}
101 UINT8
Length() const { return nLength
; }
104 virtual void do_StoreAt(
105 DocuDisplay
& o_rDisplay
) const;
106 virtual bool inq_IsWhite() const;
112 class DT_Eol
: public DocuToken
114 virtual void do_StoreAt(
115 DocuDisplay
& o_rDisplay
) const;
116 virtual bool inq_IsWhite() const;
119 class DT_Xml
: public DocuToken
123 const char * i_sText
)
124 : sText( i_sText
) {}
126 const String
& Text() const { return sText
; }
129 virtual void do_StoreAt(
130 DocuDisplay
& o_rDisplay
) const;
131 virtual bool inq_IsWhite() const;
140 DocuToken::StoreAt( DocuDisplay
& o_rDisplay
) const
141 { do_StoreAt(o_rDisplay
); }
143 DocuToken::IsWhite() const
144 { return inq_IsWhite(); }
153 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */