Bump for 3.6-28
[LibreOffice.git] / autodoc / source / display / idl / hfi_constgroup.cxx
blobd197e55234db9c9b9ab768833b3c7ff912f31dd1
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_constgroup.hxx"
33 // NOT FULLY DEFINED SERVICES
34 #include <ary/idl/i_ce.hxx>
35 #include <ary/idl/ik_constgroup.hxx>
36 #include <toolkit/hf_linachain.hxx>
37 #include <toolkit/hf_navi_sub.hxx>
38 #include <toolkit/hf_title.hxx>
39 #include "hfi_navibar.hxx"
40 #include "hfi_property.hxx"
41 #include "hi_linkhelper.hxx"
44 extern const String
45 C_sCePrefix_Constants("constants group");
48 namespace
51 const String
52 C_sList_Constants("Constants");
53 const String
54 C_sList_Constants_Label("Constants");
55 const String
56 C_sList_ConstantDetails("Constants' Details");
57 const String
58 C_sList_ConstantDetails_Label("ConstantDetails");
60 enum E_SubListIndices
62 sli_ConstantsSummary = 0,
63 sli_ConstantDetails = 1
67 } // anonymous namespace
71 HF_IdlConstGroup::HF_IdlConstGroup( Environment & io_rEnv,
72 Xml::Element & o_rOut )
73 : HtmlFactory_Idl(io_rEnv, &o_rOut)
77 HF_IdlConstGroup::~HF_IdlConstGroup()
81 void
82 HF_IdlConstGroup::Produce_byData( const client & i_ce ) const
84 Dyn<HF_NaviSubRow>
85 pNaviSubRow( &make_Navibar(i_ce) );
87 HF_TitleTable
88 aTitle(CurOut());
89 HF_LinkedNameChain
90 aNameChain(aTitle.Add_Row());
92 aNameChain.Produce_CompleteChain(Env().CurPosition(), nameChainLinker);
93 produce_Title(aTitle, C_sCePrefix_Constants, i_ce);
95 write_Docu(aTitle.Add_Row(), i_ce);
96 CurOut() << new Html::HorizontalLine();
98 dyn_ce_list
99 dpConstants;
100 ary::idl::ifc_constgroup::attr::Get_Constants(dpConstants, i_ce);
102 if ( (*dpConstants).operator bool() )
104 produce_Members( *dpConstants,
105 C_sList_Constants,
106 C_sList_Constants_Label,
107 C_sList_ConstantDetails,
108 C_sList_ConstantDetails_Label );
109 pNaviSubRow->SwitchOn(sli_ConstantsSummary);
110 pNaviSubRow->SwitchOn(sli_ConstantDetails);
112 pNaviSubRow->Produce_Row();
115 HF_NaviSubRow &
116 HF_IdlConstGroup::make_Navibar( const client & i_ce ) const
118 HF_IdlNavigationBar
119 aNaviBar(Env(), CurOut());
120 aNaviBar.Produce_CeMainRow(i_ce,true); // true := avoid link to Use-page.
122 DYN HF_NaviSubRow &
123 ret = aNaviBar.Add_SubRow();
124 ret.AddItem(C_sList_Constants, C_sList_Constants_Label, false);
125 ret.AddItem(C_sList_ConstantDetails, C_sList_ConstantDetails_Label, false);
127 CurOut() << new Html::HorizontalLine();
128 return ret;
131 void
132 HF_IdlConstGroup::produce_MemberDetails( HF_SubTitleTable & o_table,
133 const client & i_ce ) const
135 HF_IdlConstant
136 aElement( Env(), o_table );
137 aElement.Produce_byData(i_ce);
140 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */