2002-11-01 10:15:51 -06:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2005-09-07 12:00:17 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2002-11-01 10:15:51 -06:00
|
|
|
*
|
2005-09-07 12:00:17 -05:00
|
|
|
* $RCSfile: hf_funcdecl.cxx,v $
|
2002-11-01 10:15:51 -06:00
|
|
|
*
|
2005-12-14 08:34:30 -06:00
|
|
|
* $Revision: 1.5 $
|
2002-11-01 10:15:51 -06:00
|
|
|
*
|
2005-12-14 08:34:30 -06:00
|
|
|
* last change: $Author: rt $ $Date: 2005-12-14 15:34:30 $
|
2002-11-01 10:15:51 -06:00
|
|
|
*
|
2005-09-07 12:00:17 -05:00
|
|
|
* The Contents of this file are made available subject to
|
|
|
|
* the terms of GNU Lesser General Public License Version 2.1.
|
2002-11-01 10:15:51 -06:00
|
|
|
*
|
|
|
|
*
|
2005-09-07 12:00:17 -05:00
|
|
|
* GNU Lesser General Public License Version 2.1
|
|
|
|
* =============================================
|
|
|
|
* Copyright 2005 by Sun Microsystems, Inc.
|
|
|
|
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
2002-11-01 10:15:51 -06:00
|
|
|
*
|
2005-09-07 12:00:17 -05:00
|
|
|
* 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.
|
2002-11-01 10:15:51 -06:00
|
|
|
*
|
2005-09-07 12:00:17 -05:00
|
|
|
* 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.
|
2002-11-01 10:15:51 -06:00
|
|
|
*
|
2005-09-07 12:00:17 -05:00
|
|
|
* 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
|
2002-11-01 10:15:51 -06:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
#include <precomp.h>
|
|
|
|
#include <toolkit/hf_funcdecl.hxx>
|
|
|
|
|
|
|
|
|
|
|
|
// NOT FULLY DEFINED SERVICES
|
|
|
|
|
|
|
|
const String C_sValignTop("top");
|
2004-11-15 06:36:08 -06:00
|
|
|
const String C_sValignBottom("bottom");
|
2002-11-01 10:15:51 -06:00
|
|
|
|
|
|
|
|
2004-11-15 06:36:08 -06:00
|
|
|
|
|
|
|
HF_FunctionDeclaration::HF_FunctionDeclaration( Xml::Element & o_rParent,
|
|
|
|
const String & i_sRaisesText )
|
|
|
|
: HtmlMaker(o_rParent),
|
|
|
|
sRaisesText(i_sRaisesText),
|
|
|
|
pTable(0),
|
|
|
|
pReturnCell(0),
|
|
|
|
pNameCell(0),
|
|
|
|
pParameterLine(0),
|
|
|
|
pLastParameterCell(0),
|
|
|
|
pExceptionCell(0)
|
|
|
|
{
|
|
|
|
pTable = new Html::Table;
|
|
|
|
CurOut()
|
|
|
|
>> *pTable
|
2005-12-14 08:34:30 -06:00
|
|
|
<< new Html::ClassAttr("table-in-method")
|
2004-11-15 06:36:08 -06:00
|
|
|
<< new Xml::AnAttribute("border","0");
|
|
|
|
}
|
|
|
|
|
|
|
|
HF_FunctionDeclaration::~HF_FunctionDeclaration()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
Xml::Element &
|
|
|
|
HF_FunctionDeclaration::ReturnCell()
|
|
|
|
{
|
|
|
|
if (pReturnCell != 0)
|
|
|
|
return *pReturnCell;
|
|
|
|
|
|
|
|
pReturnCell = &( *pTable
|
|
|
|
>> *new Html::TableRow
|
|
|
|
>> *new Html::TableCell
|
|
|
|
<< new Html::VAlignAttr(C_sValignTop)
|
|
|
|
<< new Xml::AnAttribute("colspan", "3")
|
|
|
|
);
|
|
|
|
return *pReturnCell;
|
|
|
|
}
|
|
|
|
|
|
|
|
Xml::Element &
|
|
|
|
HF_FunctionDeclaration::NameCell()
|
|
|
|
{
|
|
|
|
if (pNameCell != 0)
|
|
|
|
return *pNameCell;
|
|
|
|
|
|
|
|
pNameCell = &( ParameterLine()
|
|
|
|
>> *new Html::TableCell
|
|
|
|
<< new Html::VAlignAttr(C_sValignTop)
|
|
|
|
);
|
|
|
|
pLastParameterCell = pNameCell;
|
|
|
|
|
|
|
|
return *pNameCell;
|
|
|
|
}
|
|
|
|
|
|
|
|
Xml::Element &
|
|
|
|
HF_FunctionDeclaration::NewParamTypeCell()
|
|
|
|
{
|
|
|
|
if (pLastParameterCell != pNameCell)
|
|
|
|
{
|
|
|
|
pParameterLine = 0;
|
|
|
|
ParameterLine()
|
|
|
|
>> *new Html::TableCell;
|
|
|
|
}
|
|
|
|
|
|
|
|
Xml::Element &
|
|
|
|
rParamType = ParameterLine()
|
|
|
|
>> *new Html::TableCell
|
|
|
|
<< new Html::VAlignAttr(C_sValignTop);
|
|
|
|
pLastParameterCell
|
|
|
|
= &( ParameterLine()
|
|
|
|
>> *new Html::TableCell
|
|
|
|
<< new Html::VAlignAttr(C_sValignBottom)
|
|
|
|
<< new Xml::XmlCode(" ")
|
|
|
|
);
|
|
|
|
return rParamType;
|
|
|
|
}
|
|
|
|
|
|
|
|
Xml::Element &
|
|
|
|
HF_FunctionDeclaration::ParamNameCell()
|
|
|
|
{
|
|
|
|
csv_assert(pLastParameterCell != pNameCell);
|
|
|
|
return *pLastParameterCell;
|
|
|
|
}
|
|
|
|
|
|
|
|
Xml::Element &
|
|
|
|
HF_FunctionDeclaration::ExceptionCell()
|
|
|
|
{
|
|
|
|
if (pExceptionCell != 0)
|
|
|
|
return *pExceptionCell;
|
|
|
|
|
|
|
|
Xml::Element &
|
|
|
|
rExceptionRow = *pTable
|
|
|
|
>> *new Html::TableRow;
|
|
|
|
rExceptionRow
|
|
|
|
>> *new Html::TableCell
|
|
|
|
<< new Html::VAlignAttr(C_sValignTop)
|
|
|
|
<< new Xml::AnAttribute("align", "right")
|
|
|
|
<< sRaisesText
|
|
|
|
<< "( ";
|
|
|
|
|
|
|
|
pExceptionCell = &( rExceptionRow
|
|
|
|
>> *new Html::TableCell
|
|
|
|
<< new Html::VAlignAttr(C_sValignTop)
|
|
|
|
<< new Xml::AnAttribute("colspan", "2")
|
|
|
|
);
|
|
|
|
return *pExceptionCell;
|
|
|
|
}
|
|
|
|
|
|
|
|
Html::TableRow &
|
|
|
|
HF_FunctionDeclaration::ParameterLine()
|
|
|
|
{
|
|
|
|
if (pParameterLine != 0)
|
|
|
|
return *pParameterLine;
|
|
|
|
|
|
|
|
pParameterLine = new Html::TableRow;
|
|
|
|
*pTable
|
|
|
|
>> *pParameterLine;
|
|
|
|
|
|
|
|
return *pParameterLine;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#if 0 // old
|
2002-11-01 10:15:51 -06:00
|
|
|
HF_FunctionDeclaration::HF_FunctionDeclaration( Xml::Element & o_rParent )
|
|
|
|
: HtmlMaker(o_rParent),
|
|
|
|
pFront(0),
|
|
|
|
pTypes(0),
|
|
|
|
pNames(0)
|
|
|
|
{
|
|
|
|
Xml::Element &
|
|
|
|
rRow = CurOut()
|
|
|
|
>> *new Html::Table
|
|
|
|
<< new Xml::AnAttribute("border","0")
|
|
|
|
>> *new Html::TableRow;
|
|
|
|
pFront = &(rRow >> *new Html::TableCell << new Html::VAlignAttr(C_sValignTop));
|
|
|
|
pTypes = &(rRow >> *new Html::TableCell << new Html::VAlignAttr(C_sValignTop));
|
|
|
|
pNames = &(rRow >> *new Html::TableCell << new Html::VAlignAttr(C_sValignTop));
|
|
|
|
}
|
|
|
|
|
|
|
|
HF_FunctionDeclaration::~HF_FunctionDeclaration()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
Xml::Element &
|
|
|
|
HF_FunctionDeclaration::Add_ReturnLine()
|
|
|
|
{
|
|
|
|
(*pTypes) << new Xml::XmlCode(" <br>\n");
|
|
|
|
(*pNames) << new Xml::XmlCode(" <br>\n");
|
|
|
|
return *pFront;
|
|
|
|
}
|
|
|
|
|
|
|
|
Xml::Element &
|
|
|
|
HF_FunctionDeclaration::Add_RaisesLine( const char * i_sRaisesText,
|
|
|
|
bool i_bSuppressExtraLine )
|
|
|
|
{
|
|
|
|
if (NOT i_bSuppressExtraLine)
|
|
|
|
{
|
|
|
|
(*pTypes) << new Xml::XmlCode(" <br>");
|
|
|
|
(*pNames) << new Xml::XmlCode(" <br>\n");
|
|
|
|
}
|
|
|
|
(*pTypes)
|
|
|
|
<< new Xml::XmlCode("<p class=\"raise\">")
|
|
|
|
<< i_sRaisesText
|
|
|
|
<< new Xml::XmlCode("( </p>\n");
|
|
|
|
return *pNames;
|
|
|
|
}
|
2004-11-15 06:36:08 -06:00
|
|
|
#endif // 0 old
|