diff options
author | Nikolai Pretzell <np@openoffice.org> | 2002-03-08 13:32:38 +0000 |
---|---|---|
committer | Nikolai Pretzell <np@openoffice.org> | 2002-03-08 13:32:38 +0000 |
commit | 1710683406e72de5458733231636e8fdb2c2c0bc (patch) | |
tree | df25bf37d37eb1edb00165da07c8529458be562b /udm/source/html | |
parent | 8913e1e75efa377a107fa37d22680ec223cb043c (diff) |
Moving Autodoc to OpenOffice.org, module udm: UnifiedDataModel
Diffstat (limited to 'udm/source/html')
-rw-r--r-- | udm/source/html/htmlitem.cxx | 284 | ||||
-rw-r--r-- | udm/source/html/makefile.mk | 91 |
2 files changed, 375 insertions, 0 deletions
diff --git a/udm/source/html/htmlitem.cxx b/udm/source/html/htmlitem.cxx new file mode 100644 index 000000000000..751eea39cc9b --- /dev/null +++ b/udm/source/html/htmlitem.cxx @@ -0,0 +1,284 @@ +/************************************************************************* + * + * $RCSfile: htmlitem.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: np $ $Date: 2002-03-08 14:32:37 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include <precomp.h> +#include <udm/html/htmlitem.hxx> + +// NOT FULLY DECLARED SERVICES + + +namespace csi +{ +namespace html +{ + +using namespace csi::xml; + +template <class ELEM> +inline ELEM & +PushElem( Element & i_rMain, + DYN ELEM * let_dpSub, + DYN Item * let_dpItem ) +{ + i_rMain << let_dpSub; + if ( let_dpItem != 0 ) + *let_dpSub << let_dpItem; + return *let_dpSub; +} + + +bool +Body::LineBreakAfterBeginTag() const +{ + return true; +} + +#ifndef COMPATIBLE_NETSCAPE_47 +bool +HorizontalLine::LineBreakAfterBeginTag() const +{ + return true; +} +#endif + + +Image::Image( const csv::String & i_sSrc, + const csv::String & i_sWidth, + const csv::String & i_sHeight, + const csv::String & i_sAlign, + const csv::String & i_sBorder ) + : AnEmptyElement( "img" ) +{ + *this << new AnAttribute("src",i_sSrc) + << new AnAttribute("width",i_sWidth) + << new AnAttribute("height",i_sHeight) + << new AnAttribute("align",i_sAlign) + << new AnAttribute("border",i_sBorder); +} + +bool +Label::LineBreakAfterEndTag() const +{ + return true; +} + +bool +Paragraph::LineBreakAfterEndTag() const +{ + return true; +} + +const char * +Headline::sTags[6] = { "h1", "h2", "h3", "h4", "h5", "h6" }; + +bool +Headline::LineBreakAfterEndTag() const +{ + return true; +} + +#ifndef COMPATIBLE_NETSCAPE_47 +bool +LineBreak::LineBreakAfterBeginTag() const +{ + return true; +} +#endif + + +bool +TableCell::LineBreakAfterEndTag() const +{ + return true; +} + + + +TableCell & +TableRow::AddCell( DYN Item * let_dpItem ) +{ + return PushElem( *this, new TableCell, let_dpItem ); +} + +bool +TableRow::LineBreakAfterBeginTag() const +{ + return true; +} + + +Table::Table( const csv::String & i_sBorder, + const csv::String & i_sWidth, + const csv::String & i_sCellPadding, + const csv::String & i_sCellSpacing ) + : csi::xml::AnElement("table") +{ + if ( i_sBorder.length() > 0 ) + *this << new AnAttribute("border",i_sBorder); + if ( i_sBorder.length() > 0 ) + *this << new AnAttribute("width",i_sWidth); + if ( i_sBorder.length() > 0 ) + *this << new AnAttribute("cellpadding",i_sCellPadding); + if ( i_sBorder.length() > 0 ) + *this << new AnAttribute("cellspacing",i_sCellSpacing); +} + +TableRow & +Table::AddRow() +{ + TableRow * ret = new TableRow; + *this << ret; + return *ret; +} + +bool +Table::FinishEmptyTag_XmlStyle() const +{ + return false; +} + +bool +Table::LineBreakAfterBeginTag() const +{ + return true; +} + + + +bool +DefListTerm::LineBreakAfterEndTag() const +{ + return true; +} + +bool +DefListDefinition::LineBreakAfterEndTag() const +{ + return true; +} + + + + + +DefListTerm & +DefList::AddTerm( DYN csi::xml::Item* let_dpItem ) +{ + return PushElem( *this, new DefListTerm, let_dpItem ); +} + +DefListDefinition & +DefList::AddDefinition( DYN csi::xml::Item* let_dpItem ) +{ + return PushElem( *this, new DefListDefinition, let_dpItem ); +} + +bool +DefList::LineBreakAfterBeginTag() const +{ + return true; +} + + + +bool +ListItem::LineBreakAfterEndTag() const +{ + return true; +} + + + + +ListItem & +NumeratedList::AddItem( DYN csi::xml::Item* let_dpItem ) +{ + return PushElem( *this, new ListItem, let_dpItem ); +} + +bool +NumeratedList::LineBreakAfterBeginTag() const +{ + return true; +} + + +ListItem & +SimpleList::AddItem( DYN csi::xml::Item* let_dpItem ) +{ + return PushElem( *this, new ListItem, let_dpItem ); +} + +bool +SimpleList::LineBreakAfterBeginTag() const +{ + return true; +} + + + +} // namespace html +} // namespace csi + + + + + diff --git a/udm/source/html/makefile.mk b/udm/source/html/makefile.mk new file mode 100644 index 000000000000..01765af93cfd --- /dev/null +++ b/udm/source/html/makefile.mk @@ -0,0 +1,91 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: np $ $Date: 2002-03-08 14:32:37 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRUNTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ=..$/.. + +PRJNAME=udm +TARGET=csi_html + + +# --- Settings ----------------------------------------------------- + +ENABLE_EXCEPTIONS=true + + +.INCLUDE : settings.mk +.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk + + +# --- Files -------------------------------------------------------- + +OBJFILES= \ + $(OBJ)$/htmlitem.obj + + + + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk + + + |