update credits
[LibreOffice.git] / udm / source / html / htmlitem.cxx
blob3b392c3049fe812d6ca90949557daed502650640
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 #include <precomp.h>
21 #include <udm/html/htmlitem.hxx>
23 // NOT FULLY DECLARED SERVICES
26 namespace csi
28 namespace html
31 using namespace csi::xml;
33 template <class ELEM>
34 inline ELEM &
35 PushElem( Element & i_rMain,
36 DYN ELEM * let_dpSub,
37 DYN Item * let_dpItem )
39 i_rMain << let_dpSub;
40 if ( let_dpItem != 0 )
41 *let_dpSub << let_dpItem;
42 return *let_dpSub;
46 bool
47 Body::LineBreakAfterBeginTag() const
49 return true;
52 bool
53 Paragraph::LineBreakAfterEndTag() const
55 return true;
58 const char *
59 Headline::sTags[6] = { "h1", "h2", "h3", "h4", "h5", "h6" };
61 bool
62 Headline::LineBreakAfterEndTag() const
64 return true;
67 bool
68 TableCell::LineBreakAfterEndTag() const
70 return true;
73 bool
74 TableRow::LineBreakAfterBeginTag() const
76 return true;
80 Table::Table( const String & i_sBorder,
81 const String & i_sWidth,
82 const String & i_sCellPadding,
83 const String & i_sCellSpacing )
84 : csi::xml::AnElement("table")
86 if ( i_sBorder.length() > 0 )
87 *this << new AnAttribute(String("border"),i_sBorder);
88 if ( i_sBorder.length() > 0 )
89 *this << new AnAttribute(String("width"),i_sWidth);
90 if ( i_sBorder.length() > 0 )
91 *this << new AnAttribute(String("cellpadding"),i_sCellPadding);
92 if ( i_sBorder.length() > 0 )
93 *this << new AnAttribute(String("cellspacing"),i_sCellSpacing);
96 TableRow &
97 Table::AddRow()
99 TableRow * ret = new TableRow;
100 *this << ret;
101 return *ret;
104 bool
105 Table::FinishEmptyTag_XmlStyle() const
107 return false;
110 bool
111 Table::LineBreakAfterBeginTag() const
113 return true;
118 bool
119 DefListTerm::LineBreakAfterEndTag() const
121 return true;
124 bool
125 DefListDefinition::LineBreakAfterEndTag() const
127 return true;
130 bool
131 DefList::LineBreakAfterBeginTag() const
133 return true;
136 bool
137 DefList::FinishEmptyTag_XmlStyle() const
139 return false;
142 bool
143 ListItem::LineBreakAfterEndTag() const
145 return true;
148 bool
149 NumeratedList::LineBreakAfterBeginTag() const
151 return true;
154 bool
155 SimpleList::LineBreakAfterBeginTag() const
157 return true;
162 } // namespace html
163 } // namespace csi
165 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */