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: htmlitem.cxx,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 ************************************************************************/
32 #include <udm/html/htmlitem.hxx>
34 // NOT FULLY DECLARED SERVICES
42 using namespace csi::xml
;
46 PushElem( Element
& i_rMain
,
48 DYN Item
* let_dpItem
)
51 if ( let_dpItem
!= 0 )
52 *let_dpSub
<< let_dpItem
;
58 Body::LineBreakAfterBeginTag() const
63 #ifndef COMPATIBLE_NETSCAPE_47
65 HorizontalLine::LineBreakAfterBeginTag() const
72 Image::Image( const String
& i_sSrc
,
73 const String
& i_sWidth
,
74 const String
& i_sHeight
,
75 const String
& i_sAlign
,
76 const String
& i_sBorder
)
77 : AnEmptyElement( "img" )
79 *this << new AnAttribute(String("src"),i_sSrc
)
80 << new AnAttribute(String("width"),i_sWidth
)
81 << new AnAttribute(String("height"),i_sHeight
)
82 << new AnAttribute(String("align"),i_sAlign
)
83 << new AnAttribute(String("border"),i_sBorder
);
87 Paragraph::LineBreakAfterEndTag() const
93 Headline::sTags
[6] = { "h1", "h2", "h3", "h4", "h5", "h6" };
96 Headline::LineBreakAfterEndTag() const
101 #ifndef COMPATIBLE_NETSCAPE_47
103 LineBreak::LineBreakAfterBeginTag() const
111 TableCell::LineBreakAfterEndTag() const
119 TableRow::AddCell( DYN Item
* let_dpItem
)
121 return PushElem( *this, new TableCell
, let_dpItem
);
125 TableRow::LineBreakAfterBeginTag() const
131 Table::Table( const String
& i_sBorder
,
132 const String
& i_sWidth
,
133 const String
& i_sCellPadding
,
134 const String
& i_sCellSpacing
)
135 : csi::xml::AnElement("table")
137 if ( i_sBorder
.length() > 0 )
138 *this << new AnAttribute(String("border"),i_sBorder
);
139 if ( i_sBorder
.length() > 0 )
140 *this << new AnAttribute(String("width"),i_sWidth
);
141 if ( i_sBorder
.length() > 0 )
142 *this << new AnAttribute(String("cellpadding"),i_sCellPadding
);
143 if ( i_sBorder
.length() > 0 )
144 *this << new AnAttribute(String("cellspacing"),i_sCellSpacing
);
150 TableRow
* ret
= new TableRow
;
156 Table::FinishEmptyTag_XmlStyle() const
162 Table::LineBreakAfterBeginTag() const
170 DefListTerm::LineBreakAfterEndTag() const
176 DefListDefinition::LineBreakAfterEndTag() const
186 DefList::AddTerm( DYN
csi::xml::Item
* let_dpItem
)
188 return PushElem( *this, new DefListTerm
, let_dpItem
);
192 DefList::AddDefinition( DYN
csi::xml::Item
* let_dpItem
)
194 return PushElem( *this, new DefListDefinition
, let_dpItem
);
198 DefList::LineBreakAfterBeginTag() const
204 DefList::FinishEmptyTag_XmlStyle() const
210 ListItem::LineBreakAfterEndTag() const
219 NumeratedList::AddItem( DYN
csi::xml::Item
* let_dpItem
)
221 return PushElem( *this, new ListItem
, let_dpItem
);
225 NumeratedList::LineBreakAfterBeginTag() const
232 SimpleList::AddItem( DYN
csi::xml::Item
* let_dpItem
)
234 return PushElem( *this, new ListItem
, let_dpItem
);
238 SimpleList::LineBreakAfterBeginTag() const