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 CSI_HTML_HTMLITEM_HXX
21 #define CSI_HTML_HTMLITEM_HXX
25 #include <udm/xml/xmlitem.hxx>
37 class Body
: public csi::xml::AnElement
41 : csi::xml::AnElement( "body" ) {}
43 virtual bool LineBreakAfterBeginTag() const;
48 class HorizontalLine
: public xml::XmlCode
52 : xml::XmlCode("<hr>\n") {}
57 class Label
: public csi::xml::AnElement
61 const ::csv::String
& i_sLabel
)
62 : csi::xml::AnElement("a")
63 { *this << new csi::xml::AnAttribute(String("name"), i_sLabel
); }
68 class Paragraph
: public csi::xml::AnElement
72 : csi::xml::AnElement("p") {}
74 virtual bool LineBreakAfterEndTag() const;
79 class Headline
: public csi::xml::APureElement
84 : csi::xml::APureElement(sTags
[i_nNr
-1]) { csv_assert(1 <= i_nNr AND i_nNr
< 7); }
86 static const char * sTags
[6];
87 virtual bool LineBreakAfterEndTag() const;
92 class LineBreak
: public xml::XmlCode
96 : xml::XmlCode("<br>\n") {}
101 class Bold
: public csi::xml::APureElement
105 : csi::xml::APureElement("b") {}
110 class Italic
: public csi::xml::APureElement
114 : csi::xml::APureElement("i") {}
119 class Strong
: public csi::xml::APureElement
123 : csi::xml::APureElement("strong") {}
128 class Emphasized
: public csi::xml::APureElement
132 : csi::xml::APureElement("em") {}
137 class Font
: public csi::xml::AnElement
141 : csi::xml::AnElement("font") {}
147 class Link
: public csi::xml::AnElement
151 const ::csv::String
&i_sDestinaton
)
152 : csi::xml::AnElement("a")
153 { *this << new csi::xml::AnAttribute(String("href"), i_sDestinaton
); }
156 class TableCell
: public csi::xml::AnElement
160 : csi::xml::AnElement("td") {}
162 virtual bool LineBreakAfterEndTag() const;
165 class TableRow
: public csi::xml::AnElement
169 : csi::xml::AnElement("tr") {}
172 virtual bool LineBreakAfterBeginTag() const;
177 class Table
: public csi::xml::AnElement
181 : csi::xml::AnElement("table") {}
183 const ::csv::String
& i_sBorder
,
184 const ::csv::String
& i_sWidth
,
185 const ::csv::String
& i_sCellPadding
,
186 const ::csv::String
& i_sCellSpacing
);
189 virtual bool FinishEmptyTag_XmlStyle() const;
190 virtual bool LineBreakAfterBeginTag() const;
195 class DefListTerm
: public csi::xml::AnElement
199 : csi::xml::AnElement("dt") {}
201 virtual bool LineBreakAfterEndTag() const;
204 class DefListDefinition
: public csi::xml::AnElement
208 : csi::xml::AnElement("dd") {}
210 virtual bool LineBreakAfterEndTag() const;
215 class DefList
: public csi::xml::AnElement
219 : csi::xml::AnElement("dl") {}
222 virtual bool LineBreakAfterBeginTag() const;
223 virtual bool FinishEmptyTag_XmlStyle() const;
227 class ListItem
: public csi::xml::AnElement
231 : csi::xml::AnElement("li") {}
233 virtual bool LineBreakAfterEndTag() const;
238 class NumeratedList
: public csi::xml::AnElement
242 : csi::xml::AnElement("ol") {}
244 virtual bool LineBreakAfterBeginTag() const;
249 class SimpleList
: public csi::xml::AnElement
253 : csi::xml::AnElement("ul") {}
256 virtual bool LineBreakAfterBeginTag() const;
260 class ClassAttr
: public csi::xml::AnAttribute
264 const ::csv::String
& i_sValue
)
265 : csi::xml::AnAttribute( String("class"), i_sValue
) {}
268 class StyleAttr
: public csi::xml::AnAttribute
272 const ::csv::String
& i_sValue
)
273 : csi::xml::AnAttribute( String("style"), i_sValue
) {}
276 class SizeAttr
: public csi::xml::AnAttribute
280 const ::csv::String
& i_sValue
)
281 : csi::xml::AnAttribute( String("size"), i_sValue
) {}
284 class ColorAttr
: public csi::xml::AnAttribute
288 const ::csv::String
& i_sValue
)
289 : csi::xml::AnAttribute( String("color"), i_sValue
) {}
292 class BgColorAttr
: public csi::xml::AnAttribute
296 const ::csv::String
& i_sValue
)
297 : csi::xml::AnAttribute( String("bgcolor"), i_sValue
) {}
300 class AlignAttr
: public csi::xml::AnAttribute
304 const ::csv::String
& i_sValue
)
305 : csi::xml::AnAttribute( String("align"), i_sValue
) {}
308 class VAlignAttr
: public csi::xml::AnAttribute
312 const ::csv::String
& i_sValue
)
313 : csi::xml::AnAttribute( String("valign"), i_sValue
) {}
316 class WidthAttr
: public csi::xml::AnAttribute
320 const ::csv::String
& i_sValue
)
321 : csi::xml::AnAttribute( String("width"), i_sValue
) {}
326 class Sbr
: public csi::xml::XmlCode
// Sourcefile lineBreak
330 : csi::xml::XmlCode("\n") {}
337 namespace Html
= csi::html
;
342 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */