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 #ifndef ADC_DISPLAY_HFI_TAG_HXX 29 #define ADC_DISPLAY_HFI_TAG_HXX 30 31 // BASE CLASSES 32 #include "hi_factory.hxx" 33 #include <ary_i/disdocum.hxx> 34 // USED SERVICES 35 #include <ary/idl/i_types4idl.hxx> 36 #include <ary_i/ci_atag2.hxx> 37 #include <ary_i/ci_text2.hxx> 38 #include <ary/doc/d_oldidldocu.hxx> 39 40 #include <toolkit/hf_docentry.hxx> 41 42 namespace ary 43 { 44 namespace idl 45 { 46 class Module; 47 } 48 } 49 50 51 52 53 /** This class is an implementation of ary::inf::DocuText_Display 54 and will be used by that interface. 55 */ 56 class HF_IdlDocuTextDisplay : public HtmlFactory_Idl, 57 public ary::inf::DocuText_Display 58 { 59 public: 60 HF_IdlDocuTextDisplay( 61 Environment & io_rEnv, 62 Xml::Element * o_pOut, 63 const ary::idl::CodeEntity & 64 i_rScopeGivingCe ); 65 virtual ~HF_IdlDocuTextDisplay(); 66 67 const ary::idl::CodeEntity & 68 ScopeGivingCe() const { return *pScopeGivingCe; } 69 private: 70 virtual void Display_TextToken( 71 const csi::dsapi::DT_TextToken & 72 i_rToken ); 73 virtual void Display_White(); 74 75 virtual void Display_MupType( 76 const csi::dsapi::DT_MupType & 77 i_rToken ); 78 virtual void Display_MupMember( 79 const csi::dsapi::DT_MupMember & 80 i_rToken ); 81 virtual void Display_MupConst( 82 const csi::dsapi::DT_MupConst & 83 i_rToken ); 84 virtual void Display_Style( 85 const csi::dsapi::DT_Style & i_rToken ); 86 virtual void Display_EOL(); 87 88 // Local 89 void StartLinkGathering( 90 const String & i_sScope ) 91 { sLinkToken = ""; sScope = i_sScope; bGatherLink = true; } 92 void StopLinkGathering() { bGatherLink = false; } 93 /** @precond 94 The scope is in sScope, the name is in sLinkToken. 95 */ 96 void CreateTypeLink(); 97 /** @precond 98 The scope is in sScope, the qualified member-name is in sLinkToken. 99 */ 100 void CreateMemberLink(); 101 102 // DATA 103 String sScope; 104 String sLinkToken; 105 bool bGatherLink; 106 const ary::idl::CodeEntity * 107 pScopeGivingCe; 108 }; 109 110 111 112 class HF_IdlShortDocu : public HtmlFactory_Idl 113 { 114 public: 115 HF_IdlShortDocu( 116 Environment & io_rEnv, 117 Xml::Element & o_rOut ); 118 virtual ~HF_IdlShortDocu(); 119 120 void Produce_byData( 121 const ary::idl::CodeEntity & 122 i_rCe ); 123 }; 124 125 126 127 class HF_IdlTag : public HtmlFactory_Idl, 128 public ary::inf::DocuTag_Display 129 { 130 public: 131 HF_IdlTag( 132 Environment & io_rEnv, 133 const ary::idl::CodeEntity & 134 i_rScopeGivingCe ); 135 virtual ~HF_IdlTag(); 136 137 void Produce_byData( 138 Xml::Element & o_rTitle, 139 Xml::Element & o_rText, 140 const ary::inf::AtTag2 & 141 i_rTag ) const; 142 void Produce_byData( 143 Xml::Element & o_rTitle, 144 Xml::Element & o_rText, 145 const std::vector< csi::dsapi::DT_SeeAlsoAtTag* > & 146 i_seeAlsoVector ) const; 147 private: 148 virtual void Display_StdAtTag( 149 const csi::dsapi::DT_StdAtTag & 150 i_rToken ); 151 virtual void Display_SeeAlsoAtTag( 152 const csi::dsapi::DT_SeeAlsoAtTag & 153 i_rToken ); 154 virtual void Display_ParameterAtTag( 155 const csi::dsapi::DT_ParameterAtTag & 156 i_rToken ); 157 virtual void Display_SinceAtTag( 158 const csi::dsapi::DT_SinceAtTag & 159 i_rToken ); 160 161 void Enter_TextOut( 162 Xml::Element & o_rText ) const; 163 void Leave_TextOut() const; 164 void PutText_Out( 165 const ary::inf::DocuTex2 & 166 i_rText ) const; 167 // DATA 168 mutable Xml::Element * 169 pTitleOut; 170 mutable HF_IdlDocuTextDisplay 171 aTextOut; 172 }; 173 174 175 176 177 #endif 178