Bump for 3.6-28
[LibreOffice.git] / autodoc / source / display / idl / hfi_siservice.cxx
blob7e36c79e07c154dc6885b54151ece0ff41c9307b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #include <precomp.h>
30 #include "hfi_siservice.hxx"
33 // NOT FULLY DEFINED SERVICES
34 #include <ary/idl/i_ce.hxx>
35 #include <ary/idl/ik_function.hxx>
36 #include <ary/idl/ik_siservice.hxx>
37 #include <ary/doc/d_oldidldocu.hxx>
38 #include <toolkit/hf_docentry.hxx>
39 #include <toolkit/hf_linachain.hxx>
40 #include <toolkit/hf_navi_sub.hxx>
41 #include <toolkit/hf_title.hxx>
42 #include "hfi_doc.hxx"
43 #include "hfi_method.hxx"
44 #include "hfi_navibar.hxx"
45 #include "hfi_typetext.hxx"
46 #include "hi_env.hxx"
47 #include "hi_linkhelper.hxx"
51 namespace
54 const String
55 C_sImplementedInterface("Supported Interface");
57 const String
58 C_sList_Constructors("Constructors' Summary");
59 const String
60 C_sList_Constructors_Label("ConstructorsSummary");
61 const String
62 C_sDetails_Constructors("Constructors' Details");
63 const String
64 C_sDetails_Constructors_Label("ConstructorsDetails");
67 enum E_SubListIndices
69 sli_ConstructorsSummary = 0,
70 sli_ConstructorsDetails = 1
73 } //anonymous namespace
76 HF_IdlSglIfcService::HF_IdlSglIfcService( Environment & io_rEnv,
77 Xml::Element & o_rOut )
78 : HtmlFactory_Idl(io_rEnv, &o_rOut)
82 HF_IdlSglIfcService::~HF_IdlSglIfcService()
86 typedef ::ary::idl::ifc_sglifcservice::attr SglIfcServiceAttr;
88 void
89 HF_IdlSglIfcService::Produce_byData( const client & i_ce ) const
91 Dyn<HF_NaviSubRow>
92 pNaviSubRow( &make_Navibar(i_ce) );
94 HF_TitleTable
95 aTitle(CurOut());
96 HF_LinkedNameChain
97 aNameChain(aTitle.Add_Row());
99 aNameChain.Produce_CompleteChain(Env().CurPosition(), nameChainLinker);
100 produce_Title(aTitle, C_sCePrefix_Service, i_ce);
102 HF_DocEntryList
103 aTopList( aTitle.Add_Row() );
104 aTopList.Produce_Term(C_sImplementedInterface);
106 HF_IdlTypeText
107 aImplementedInterface( Env(), aTopList.Produce_Definition(), true, &i_ce);
108 aImplementedInterface.Produce_byData( SglIfcServiceAttr::BaseInterface(i_ce) );
110 CurOut() << new Html::HorizontalLine;
112 write_Docu(aTitle.Add_Row(), i_ce);
113 CurOut() << new Html::HorizontalLine();
115 dyn_ce_list
116 dpConstructors;
117 SglIfcServiceAttr::Get_Constructors(dpConstructors, i_ce);
118 if ( (*dpConstructors).operator bool() )
120 produce_Members( *dpConstructors,
121 C_sList_Constructors,
122 C_sList_Constructors_Label,
123 C_sDetails_Constructors,
124 C_sDetails_Constructors_Label );
125 pNaviSubRow->SwitchOn(sli_ConstructorsSummary);
126 pNaviSubRow->SwitchOn(sli_ConstructorsDetails);
129 pNaviSubRow->Produce_Row();
130 CurOut() << new Xml::XmlCode("<br>&nbsp;");
133 DYN HF_NaviSubRow &
134 HF_IdlSglIfcService::make_Navibar( const client & i_ce ) const
136 HF_IdlNavigationBar
137 aNaviBar(Env(), CurOut());
138 aNaviBar.Produce_CeMainRow(i_ce, true);
140 DYN HF_NaviSubRow &
141 ret = aNaviBar.Add_SubRow();
142 ret.AddItem(C_sList_Constructors, C_sList_Constructors_Label, false);
143 ret.AddItem(C_sDetails_Constructors, C_sDetails_Constructors_Label, false);
145 CurOut() << new Html::HorizontalLine();
146 return ret;
149 typedef ary::idl::ifc_function::attr funcAttr;
151 void
152 HF_IdlSglIfcService::produce_MemberDetails( HF_SubTitleTable & o_table,
153 const client & i_ce ) const
155 HF_IdlMethod
156 aConstructor( Env(),
157 o_table.Add_Row()
158 >> *new Html::TableCell
159 << new Html::ClassAttr(C_sCellStyle_MDetail) );
161 ary::Dyn_StdConstIterator<ary::idl::Parameter>
162 pParameters;
163 funcAttr::Get_Parameters(pParameters, i_ce);
165 ary::Dyn_StdConstIterator<ary::idl::Type_id>
166 pExceptions;
167 funcAttr::Get_Exceptions(pExceptions, i_ce);
169 aConstructor.Produce_byData( i_ce.LocalName(),
170 funcAttr::ReturnType(i_ce),
171 *pParameters,
172 *pExceptions,
173 funcAttr::IsOneway(i_ce),
174 funcAttr::HasEllipse(i_ce),
175 i_ce );
178 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */