Bump for 3.6-28
[LibreOffice.git] / autodoc / source / display / idl / hfi_enum.cxx
blob18f97880bc7f9370dcddb8365aa7400121efa9c5
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_enum.hxx"
33 // NOT FULLY DEFINED SERVICES
34 #include <ary/idl/i_ce.hxx>
35 #include <ary/idl/ik_enum.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_Enum("enum");
47 namespace
50 const String
51 C_sList_Values("Values");
52 const String
53 C_sList_Values_Label("Values");
54 const String
55 C_sList_ValueDetails("Values' Details");
56 const String
57 C_sList_ValueDetails_Label("ValueDetails");
59 enum E_SubListIndices
61 sli_ValuesSummary = 0,
62 sli_ValueDetails = 1
65 } // anonymous namespace
67 HF_IdlEnum::HF_IdlEnum( Environment & io_rEnv,
68 Xml::Element & o_rOut )
69 : HtmlFactory_Idl(io_rEnv, &o_rOut)
73 HF_IdlEnum::~HF_IdlEnum()
77 void
78 HF_IdlEnum::Produce_byData( const client & i_ce ) const
80 Dyn<HF_NaviSubRow>
81 pNaviSubRow( &make_Navibar(i_ce) );
83 HF_TitleTable
84 aTitle(CurOut());
86 HF_LinkedNameChain
87 aNameChain(aTitle.Add_Row());
89 aNameChain.Produce_CompleteChain(Env().CurPosition(), nameChainLinker);
90 produce_Title(aTitle, C_sCePrefix_Enum, i_ce);
92 write_Docu(aTitle.Add_Row(), i_ce);
93 CurOut() << new Html::HorizontalLine();
95 dyn_ce_list
96 dpValues;
97 ary::idl::ifc_enum::attr::Get_Values(dpValues, i_ce);
98 if ( (*dpValues).operator bool() )
100 produce_Members( *dpValues,
101 C_sList_Values,
102 C_sList_Values_Label,
103 C_sList_ValueDetails,
104 C_sList_ValueDetails_Label );
105 pNaviSubRow->SwitchOn(sli_ValuesSummary);
106 pNaviSubRow->SwitchOn(sli_ValueDetails);
108 pNaviSubRow->Produce_Row();
111 HF_NaviSubRow &
112 HF_IdlEnum::make_Navibar( const client & i_ce ) const
114 HF_IdlNavigationBar
115 aNaviBar(Env(), CurOut());
116 aNaviBar.Produce_CeMainRow(i_ce);
118 DYN HF_NaviSubRow &
119 ret = aNaviBar.Add_SubRow();
120 ret.AddItem(C_sList_Values, C_sList_Values_Label, false);
121 ret.AddItem(C_sList_ValueDetails, C_sList_ValueDetails_Label, false);
123 CurOut() << new Html::HorizontalLine();
124 return ret;
127 void
128 HF_IdlEnum::produce_MemberDetails( HF_SubTitleTable & o_table,
129 const client & i_ce) const
131 HF_IdlEnumValue
132 aElement( Env(), o_table );
133 aElement.Produce_byData(i_ce);
136 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */