1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #include <precomp.h> 29 #include "hfi_singleton.hxx" 30 31 32 // NOT FULLY DEFINED SERVICES 33 #include <ary/idl/i_ce.hxx> 34 #include <ary/idl/ik_singleton.hxx> 35 #include <ary/idl/ik_sisingleton.hxx> 36 #include <toolkit/hf_docentry.hxx> 37 #include <toolkit/hf_linachain.hxx> 38 #include <toolkit/hf_title.hxx> 39 #include "hfi_navibar.hxx" 40 #include "hfi_typetext.hxx" 41 #include "hi_linkhelper.hxx" 42 43 44 45 extern const String 46 C_sCePrefix_Singleton("singleton"); 47 48 const String 49 C_sAssociatedService("Associated Service"); 50 const String 51 C_sImplementedInterface("Supported Interface"); 52 53 54 55 HF_IdlSingleton::HF_IdlSingleton( Environment & io_rEnv, 56 Xml::Element & o_rOut ) 57 : HtmlFactory_Idl(io_rEnv, &o_rOut) 58 { 59 } 60 61 HF_IdlSingleton::~HF_IdlSingleton() 62 { 63 64 } 65 66 typedef ::ary::idl::ifc_singleton::attr SingletonAttr; 67 typedef ::ary::idl::ifc_sglifcsingleton::attr SglIfcSingletonAttr; 68 69 void 70 HF_IdlSingleton::Produce_byData_ServiceBased( const client & i_ce ) const 71 { 72 make_Navibar(i_ce); 73 74 HF_TitleTable 75 aTitle(CurOut()); 76 77 HF_LinkedNameChain 78 aNameChain(aTitle.Add_Row()); 79 80 aNameChain.Produce_CompleteChain(Env().CurPosition(), nameChainLinker); 81 produce_Title(aTitle, C_sCePrefix_Singleton, i_ce); 82 83 HF_DocEntryList 84 aTopList( aTitle.Add_Row() ); 85 aTopList.Produce_Term(C_sAssociatedService); 86 87 HF_IdlTypeText 88 aAssociatedService( Env(), aTopList.Produce_Definition(), true ); 89 aAssociatedService.Produce_byData( SingletonAttr::AssociatedService(i_ce) ); 90 91 CurOut() << new Html::HorizontalLine; 92 93 write_Docu(aTitle.Add_Row(), i_ce); 94 CurOut() << new Html::HorizontalLine(); 95 } 96 97 void 98 HF_IdlSingleton::Produce_byData_InterfaceBased( const client & i_ce ) const 99 { 100 make_Navibar(i_ce); 101 102 HF_TitleTable 103 aTitle(CurOut()); 104 105 HF_LinkedNameChain 106 aNameChain(aTitle.Add_Row()); 107 108 aNameChain.Produce_CompleteChain(Env().CurPosition(), nameChainLinker); 109 produce_Title(aTitle, C_sCePrefix_Singleton, i_ce); 110 111 HF_DocEntryList 112 aTopList( aTitle.Add_Row() ); 113 aTopList.Produce_Term(C_sImplementedInterface); 114 115 HF_IdlTypeText 116 aImplementedInterface( Env(), aTopList.Produce_Definition(), true ); 117 aImplementedInterface.Produce_byData( SglIfcSingletonAttr::BaseInterface(i_ce) ); 118 119 CurOut() << new Html::HorizontalLine; 120 121 write_Docu(aTitle.Add_Row(), i_ce); 122 CurOut() << new Html::HorizontalLine(); 123 } 124 125 void 126 HF_IdlSingleton::make_Navibar( const client & i_ce ) const 127 { 128 HF_IdlNavigationBar 129 aNaviBar(Env(), CurOut()); 130 aNaviBar.Produce_CeMainRow(i_ce,true); // true := avoid link to Use-page. 131 132 CurOut() << new Html::HorizontalLine(); 133 } 134