1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir #include <precomp.h> 29*cdf0e10cSrcweir #include "hd_docu.hxx" 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir 32*cdf0e10cSrcweir // NOT FULLY DEFINED SERVICES 33*cdf0e10cSrcweir #include <ary/cpp/c_gate.hxx> 34*cdf0e10cSrcweir #include <ary/cpp/c_namesp.hxx> 35*cdf0e10cSrcweir #include <ary/cpp/c_class.hxx> 36*cdf0e10cSrcweir #include <ary/cpp/c_enum.hxx> 37*cdf0e10cSrcweir #include <ary/cpp/c_tydef.hxx> 38*cdf0e10cSrcweir #include <ary/cpp/c_funct.hxx> 39*cdf0e10cSrcweir #include <ary/cpp/c_vari.hxx> 40*cdf0e10cSrcweir #include <ary/cpp/c_enuval.hxx> 41*cdf0e10cSrcweir #include <ary/doc/d_oldcppdocu.hxx> 42*cdf0e10cSrcweir #include <ary/info/all_tags.hxx> 43*cdf0e10cSrcweir #include <ary/info/all_dts.hxx> 44*cdf0e10cSrcweir #include <adc_cl.hxx> 45*cdf0e10cSrcweir #include "html_kit.hxx" 46*cdf0e10cSrcweir #include "opageenv.hxx" 47*cdf0e10cSrcweir 48*cdf0e10cSrcweir 49*cdf0e10cSrcweir 50*cdf0e10cSrcweir using namespace ary::info; 51*cdf0e10cSrcweir using namespace csi; 52*cdf0e10cSrcweir 53*cdf0e10cSrcweir using html::DefList; 54*cdf0e10cSrcweir using html::DefListTerm; 55*cdf0e10cSrcweir using html::DefListDefinition; 56*cdf0e10cSrcweir using html::Headline; 57*cdf0e10cSrcweir using html::Link; 58*cdf0e10cSrcweir 59*cdf0e10cSrcweir 60*cdf0e10cSrcweir const char * 61*cdf0e10cSrcweir C_sTagHeadlines[ ary::info::C_eAtTag_NrOfClasses ] = 62*cdf0e10cSrcweir { 63*cdf0e10cSrcweir "ATTENTION!", "Author", "Changes", "Collaborators", 64*cdf0e10cSrcweir "Contact", // Contact may be unused 65*cdf0e10cSrcweir "Copyright", "Deprecated", "Description", "Date of Documentation", 66*cdf0e10cSrcweir "How to Derive from this Class", 67*cdf0e10cSrcweir "Heap object - owner is responsible for deletion.", 68*cdf0e10cSrcweir "Important Instances", 69*cdf0e10cSrcweir "Interface Only", 70*cdf0e10cSrcweir "Invariant", "Lifecycle", 71*cdf0e10cSrcweir "Multiplicity", "On Error", "Persistency", "Postcondition", 72*cdf0e10cSrcweir "Precondition", 73*cdf0e10cSrcweir "Responsibilities", 74*cdf0e10cSrcweir "Return", "Summary", "Todos", "Version", 75*cdf0e10cSrcweir "Base Classes", "Exceptions", "Implements", "Keywords", "Parameters", 76*cdf0e10cSrcweir "See Also", "Template Parameters", 77*cdf0e10cSrcweir "", "Since " 78*cdf0e10cSrcweir }; 79*cdf0e10cSrcweir 80*cdf0e10cSrcweir 81*cdf0e10cSrcweir 82*cdf0e10cSrcweir Docu_Display::Docu_Display( OuputPage_Environment & io_rEnv ) 83*cdf0e10cSrcweir : HtmlDisplay_Impl(io_rEnv), 84*cdf0e10cSrcweir bUseHtmlInDocuTokens(false), 85*cdf0e10cSrcweir pCurClassOverwrite(0) 86*cdf0e10cSrcweir { 87*cdf0e10cSrcweir } 88*cdf0e10cSrcweir 89*cdf0e10cSrcweir Docu_Display::~Docu_Display() 90*cdf0e10cSrcweir { 91*cdf0e10cSrcweir } 92*cdf0e10cSrcweir 93*cdf0e10cSrcweir void 94*cdf0e10cSrcweir Docu_Display::Assign_Out( csi::xml::Element & o_rOut ) 95*cdf0e10cSrcweir { 96*cdf0e10cSrcweir Easy().Enter(o_rOut); 97*cdf0e10cSrcweir } 98*cdf0e10cSrcweir 99*cdf0e10cSrcweir void 100*cdf0e10cSrcweir Docu_Display::Unassign_Out() 101*cdf0e10cSrcweir { 102*cdf0e10cSrcweir Easy().Leave(); 103*cdf0e10cSrcweir } 104*cdf0e10cSrcweir 105*cdf0e10cSrcweir void 106*cdf0e10cSrcweir Docu_Display::do_Process( const ary::cpp::Namespace & i_rData ) 107*cdf0e10cSrcweir { 108*cdf0e10cSrcweir Process(i_rData.Docu()); 109*cdf0e10cSrcweir } 110*cdf0e10cSrcweir 111*cdf0e10cSrcweir void 112*cdf0e10cSrcweir Docu_Display::do_Process( const ary::cpp::Class & i_rData ) 113*cdf0e10cSrcweir { 114*cdf0e10cSrcweir pCurClassOverwrite = &i_rData; 115*cdf0e10cSrcweir Process(i_rData.Docu()); 116*cdf0e10cSrcweir pCurClassOverwrite = 0; 117*cdf0e10cSrcweir } 118*cdf0e10cSrcweir 119*cdf0e10cSrcweir void 120*cdf0e10cSrcweir Docu_Display::do_Process( const ary::cpp::Enum & i_rData ) 121*cdf0e10cSrcweir { 122*cdf0e10cSrcweir Process(i_rData.Docu()); 123*cdf0e10cSrcweir } 124*cdf0e10cSrcweir 125*cdf0e10cSrcweir void 126*cdf0e10cSrcweir Docu_Display::do_Process( const ary::cpp::Typedef & i_rData ) 127*cdf0e10cSrcweir { 128*cdf0e10cSrcweir Process(i_rData.Docu()); 129*cdf0e10cSrcweir } 130*cdf0e10cSrcweir 131*cdf0e10cSrcweir void 132*cdf0e10cSrcweir Docu_Display::do_Process( const ary::cpp::Function & i_rData ) 133*cdf0e10cSrcweir { 134*cdf0e10cSrcweir Process(i_rData.Docu()); 135*cdf0e10cSrcweir } 136*cdf0e10cSrcweir 137*cdf0e10cSrcweir void 138*cdf0e10cSrcweir Docu_Display::do_Process( const ary::cpp::Variable & i_rData ) 139*cdf0e10cSrcweir { 140*cdf0e10cSrcweir Process(i_rData.Docu()); 141*cdf0e10cSrcweir } 142*cdf0e10cSrcweir 143*cdf0e10cSrcweir 144*cdf0e10cSrcweir 145*cdf0e10cSrcweir // -------------- Interface ary::info::DocuDisplay ------------------ // 146*cdf0e10cSrcweir 147*cdf0e10cSrcweir 148*cdf0e10cSrcweir void 149*cdf0e10cSrcweir Docu_Display::do_Process(const ary::doc::Documentation & i_rData) 150*cdf0e10cSrcweir { 151*cdf0e10cSrcweir if (i_rData.Data() == 0) 152*cdf0e10cSrcweir return; 153*cdf0e10cSrcweir 154*cdf0e10cSrcweir const ary::doc::OldCppDocu * 155*cdf0e10cSrcweir docdata = dynamic_cast< const ary::doc::OldCppDocu* >(i_rData.Data()); 156*cdf0e10cSrcweir csv_assert(docdata != 0); 157*cdf0e10cSrcweir 158*cdf0e10cSrcweir Start_DocuBlock(); 159*cdf0e10cSrcweir 160*cdf0e10cSrcweir if ( docdata->IsObsolete() ) 161*cdf0e10cSrcweir { 162*cdf0e10cSrcweir CurOut() 163*cdf0e10cSrcweir >> *new html::DefListTerm 164*cdf0e10cSrcweir >> *new html::Strong 165*cdf0e10cSrcweir << "D E P R E C A T E D"; 166*cdf0e10cSrcweir 167*cdf0e10cSrcweir } 168*cdf0e10cSrcweir 169*cdf0e10cSrcweir ary::doc::OldCppDocu::TagList::const_iterator 170*cdf0e10cSrcweir itEnd = docdata->Tags().end(); 171*cdf0e10cSrcweir for ( ary::doc::OldCppDocu::TagList::const_iterator it = docdata->Tags().begin(); 172*cdf0e10cSrcweir it != itEnd; 173*cdf0e10cSrcweir ++it ) 174*cdf0e10cSrcweir { 175*cdf0e10cSrcweir (*it)->StoreAt( *this ); 176*cdf0e10cSrcweir } 177*cdf0e10cSrcweir 178*cdf0e10cSrcweir Finish_DocuBlock(); 179*cdf0e10cSrcweir } 180*cdf0e10cSrcweir 181*cdf0e10cSrcweir void 182*cdf0e10cSrcweir Docu_Display::Display_StdTag( const StdTag & i_rData ) 183*cdf0e10cSrcweir { 184*cdf0e10cSrcweir csv_assert( uintt(i_rData.Std_Id()) < uintt(ary::info::C_eAtTag_NrOfClasses) ); 185*cdf0e10cSrcweir 186*cdf0e10cSrcweir const ary::info::DocuText::TokenList & 187*cdf0e10cSrcweir rText = i_rData.CText().Tokens(); 188*cdf0e10cSrcweir typedef ary::info::DocuText::TokenList::const_iterator TokenIterator; 189*cdf0e10cSrcweir 190*cdf0e10cSrcweir if ( rText.empty() ) 191*cdf0e10cSrcweir return; 192*cdf0e10cSrcweir else if ( rText.size() < 3 ) 193*cdf0e10cSrcweir { 194*cdf0e10cSrcweir bool bIsWhite = true; 195*cdf0e10cSrcweir for ( TokenIterator it = rText.begin(); 196*cdf0e10cSrcweir it != rText.end(); 197*cdf0e10cSrcweir ++it ) 198*cdf0e10cSrcweir { 199*cdf0e10cSrcweir if (bIsWhite) 200*cdf0e10cSrcweir bIsWhite = (*it)->IsWhite(); 201*cdf0e10cSrcweir } 202*cdf0e10cSrcweir if (bIsWhite) 203*cdf0e10cSrcweir return; 204*cdf0e10cSrcweir } 205*cdf0e10cSrcweir 206*cdf0e10cSrcweir Write_TagTitle( C_sTagHeadlines[i_rData.Std_Id()] ); 207*cdf0e10cSrcweir Write_TagContents( i_rData.CText() ); 208*cdf0e10cSrcweir } 209*cdf0e10cSrcweir 210*cdf0e10cSrcweir void 211*cdf0e10cSrcweir Docu_Display::Display_BaseTag( const BaseTag & ) 212*cdf0e10cSrcweir { 213*cdf0e10cSrcweir } 214*cdf0e10cSrcweir 215*cdf0e10cSrcweir void 216*cdf0e10cSrcweir Docu_Display::Display_ExceptionTag( const ExceptionTag & ) 217*cdf0e10cSrcweir { 218*cdf0e10cSrcweir } 219*cdf0e10cSrcweir 220*cdf0e10cSrcweir void 221*cdf0e10cSrcweir Docu_Display::Display_ImplementsTag( const ImplementsTag & ) 222*cdf0e10cSrcweir { 223*cdf0e10cSrcweir } 224*cdf0e10cSrcweir 225*cdf0e10cSrcweir void 226*cdf0e10cSrcweir Docu_Display::Display_KeywordTag( const KeywordTag & ) 227*cdf0e10cSrcweir { 228*cdf0e10cSrcweir } 229*cdf0e10cSrcweir 230*cdf0e10cSrcweir void 231*cdf0e10cSrcweir Docu_Display::Display_ParameterTag( const ParameterTag & i_rData ) 232*cdf0e10cSrcweir { 233*cdf0e10cSrcweir Write_TagTitle( "Parameters" ); 234*cdf0e10cSrcweir 235*cdf0e10cSrcweir adcdisp::ExplanationTable 236*cdf0e10cSrcweir aParams( CurOut() >> *new DefListDefinition ); 237*cdf0e10cSrcweir 238*cdf0e10cSrcweir for ( const ParameterTag * pParam = &i_rData; 239*cdf0e10cSrcweir pParam != 0; 240*cdf0e10cSrcweir pParam = pParam->GetNext() ) // KORR_FUTURE 241*cdf0e10cSrcweir { 242*cdf0e10cSrcweir aParams.AddEntry( pParam->ParamName().c_str() ); 243*cdf0e10cSrcweir 244*cdf0e10cSrcweir Easy().Enter( aParams.Def() ); 245*cdf0e10cSrcweir Write_Text( pParam->CText() ); 246*cdf0e10cSrcweir Easy().Leave(); 247*cdf0e10cSrcweir } // end for 248*cdf0e10cSrcweir } 249*cdf0e10cSrcweir 250*cdf0e10cSrcweir void 251*cdf0e10cSrcweir Docu_Display::Display_SeeTag( const SeeTag & i_rData ) 252*cdf0e10cSrcweir { 253*cdf0e10cSrcweir Write_TagTitle( "See Also" ); 254*cdf0e10cSrcweir 255*cdf0e10cSrcweir DefListDefinition * dpDef = new DefListDefinition; 256*cdf0e10cSrcweir CurOut() << dpDef; 257*cdf0e10cSrcweir Easy().Enter(*dpDef); 258*cdf0e10cSrcweir 259*cdf0e10cSrcweir for ( std::vector< ary::QualifiedName >::const_iterator 260*cdf0e10cSrcweir it = i_rData.References().begin(); 261*cdf0e10cSrcweir it != i_rData.References().end(); 262*cdf0e10cSrcweir ++it ) 263*cdf0e10cSrcweir { 264*cdf0e10cSrcweir Write_LinkableText( (*it) ); 265*cdf0e10cSrcweir CurOut() << new html::LineBreak; 266*cdf0e10cSrcweir } 267*cdf0e10cSrcweir 268*cdf0e10cSrcweir Easy().Leave(); 269*cdf0e10cSrcweir } 270*cdf0e10cSrcweir 271*cdf0e10cSrcweir void 272*cdf0e10cSrcweir Docu_Display::Display_TemplateTag( const TemplateTag & i_rData ) 273*cdf0e10cSrcweir { 274*cdf0e10cSrcweir Write_TagTitle( "Template Parameters" ); 275*cdf0e10cSrcweir 276*cdf0e10cSrcweir adcdisp::ExplanationTable 277*cdf0e10cSrcweir aTplParams( CurOut() >> *new DefListDefinition ); 278*cdf0e10cSrcweir 279*cdf0e10cSrcweir for ( const TemplateTag * pTplParam = &i_rData; 280*cdf0e10cSrcweir pTplParam != 0; 281*cdf0e10cSrcweir pTplParam = pTplParam->GetNext() ) 282*cdf0e10cSrcweir { 283*cdf0e10cSrcweir aTplParams.AddEntry( pTplParam->TplParamName().c_str() ); 284*cdf0e10cSrcweir 285*cdf0e10cSrcweir Easy().Enter( aTplParams.Def() ); 286*cdf0e10cSrcweir Write_Text( pTplParam->CText() ); 287*cdf0e10cSrcweir Easy().Leave(); 288*cdf0e10cSrcweir } // end for 289*cdf0e10cSrcweir } 290*cdf0e10cSrcweir 291*cdf0e10cSrcweir void 292*cdf0e10cSrcweir Docu_Display::Display_LabelTag( const LabelTag & ) 293*cdf0e10cSrcweir { 294*cdf0e10cSrcweir } 295*cdf0e10cSrcweir 296*cdf0e10cSrcweir void 297*cdf0e10cSrcweir Docu_Display::Display_SinceTag( const ary::info::SinceTag & i_rData ) 298*cdf0e10cSrcweir { 299*cdf0e10cSrcweir if ( i_rData.Version().empty() ) 300*cdf0e10cSrcweir { 301*cdf0e10cSrcweir return; 302*cdf0e10cSrcweir } 303*cdf0e10cSrcweir 304*cdf0e10cSrcweir // Transform the value of the @since tag into the text to be displayed. 305*cdf0e10cSrcweir String sDisplay; 306*cdf0e10cSrcweir if ( autodoc::CommandLine::Get_().DoesTransform_SinceTag() ) 307*cdf0e10cSrcweir { 308*cdf0e10cSrcweir sDisplay = autodoc::CommandLine::Get_() 309*cdf0e10cSrcweir .DisplayOf_SinceTagValue( i_rData.Version() ); 310*cdf0e10cSrcweir } 311*cdf0e10cSrcweir else 312*cdf0e10cSrcweir { 313*cdf0e10cSrcweir sDisplay = i_rData.Version(); 314*cdf0e10cSrcweir } 315*cdf0e10cSrcweir 316*cdf0e10cSrcweir if (sDisplay.empty()) 317*cdf0e10cSrcweir return; 318*cdf0e10cSrcweir 319*cdf0e10cSrcweir Write_TagTitle( "Since " ); 320*cdf0e10cSrcweir 321*cdf0e10cSrcweir DefListDefinition * dpDef = new DefListDefinition; 322*cdf0e10cSrcweir CurOut() << dpDef; 323*cdf0e10cSrcweir 324*cdf0e10cSrcweir Easy().Enter(*dpDef); 325*cdf0e10cSrcweir CurOut() << sDisplay; 326*cdf0e10cSrcweir Easy().Leave(); 327*cdf0e10cSrcweir } 328*cdf0e10cSrcweir 329*cdf0e10cSrcweir void 330*cdf0e10cSrcweir Docu_Display::Display_DT_Text( const DT_Text & i_rData ) 331*cdf0e10cSrcweir { 332*cdf0e10cSrcweir Write_TextToken( i_rData.Text() ); 333*cdf0e10cSrcweir } 334*cdf0e10cSrcweir 335*cdf0e10cSrcweir void 336*cdf0e10cSrcweir Docu_Display::Display_DT_MaybeLink( const DT_MaybeLink & i_rData ) 337*cdf0e10cSrcweir { 338*cdf0e10cSrcweir // KORR_FUTURE 339*cdf0e10cSrcweir Write_TextToken( i_rData.Text() ); 340*cdf0e10cSrcweir } 341*cdf0e10cSrcweir 342*cdf0e10cSrcweir void 343*cdf0e10cSrcweir Docu_Display::Display_DT_Whitespace( const DT_Whitespace & i_rData ) 344*cdf0e10cSrcweir { 345*cdf0e10cSrcweir static char sSpace[300] = 346*cdf0e10cSrcweir " " 347*cdf0e10cSrcweir " " 348*cdf0e10cSrcweir " " 349*cdf0e10cSrcweir " " 350*cdf0e10cSrcweir " " 351*cdf0e10cSrcweir " "; 352*cdf0e10cSrcweir UINT8 nLength = i_rData.Length(); 353*cdf0e10cSrcweir sSpace[nLength] = NULCH; 354*cdf0e10cSrcweir CurOut() << sSpace; 355*cdf0e10cSrcweir sSpace[nLength] = ' '; 356*cdf0e10cSrcweir } 357*cdf0e10cSrcweir 358*cdf0e10cSrcweir void 359*cdf0e10cSrcweir Docu_Display::Display_DT_Eol( const DT_Eol & ) 360*cdf0e10cSrcweir { 361*cdf0e10cSrcweir CurOut() << new html::Sbr; 362*cdf0e10cSrcweir } 363*cdf0e10cSrcweir 364*cdf0e10cSrcweir void 365*cdf0e10cSrcweir Docu_Display::Display_DT_Xml( const ary::info::DT_Xml & i_rData ) 366*cdf0e10cSrcweir { 367*cdf0e10cSrcweir CurOut() << new xml::XmlCode( i_rData.Text() ); 368*cdf0e10cSrcweir } 369*cdf0e10cSrcweir 370*cdf0e10cSrcweir const ary::cpp::Gate * 371*cdf0e10cSrcweir Docu_Display::inq_Get_ReFinder() const 372*cdf0e10cSrcweir { 373*cdf0e10cSrcweir return &Env().Gate(); 374*cdf0e10cSrcweir } 375*cdf0e10cSrcweir 376*cdf0e10cSrcweir void 377*cdf0e10cSrcweir Docu_Display::Start_DocuBlock() 378*cdf0e10cSrcweir { 379*cdf0e10cSrcweir DYN DefList * dpDefList = new DefList; 380*cdf0e10cSrcweir CurOut() << dpDefList; 381*cdf0e10cSrcweir Easy().Enter( *dpDefList ); 382*cdf0e10cSrcweir } 383*cdf0e10cSrcweir 384*cdf0e10cSrcweir void 385*cdf0e10cSrcweir Docu_Display::Finish_DocuBlock() 386*cdf0e10cSrcweir { 387*cdf0e10cSrcweir Easy().Leave(); 388*cdf0e10cSrcweir } 389*cdf0e10cSrcweir 390*cdf0e10cSrcweir void 391*cdf0e10cSrcweir Docu_Display::Write_TagTitle( const char * i_sText, 392*cdf0e10cSrcweir const char * ) 393*cdf0e10cSrcweir { 394*cdf0e10cSrcweir if ( strcmp(i_sText,"ATTENTION!") == 0 ) 395*cdf0e10cSrcweir { 396*cdf0e10cSrcweir CurOut() 397*cdf0e10cSrcweir >> *new html::DefListTerm 398*cdf0e10cSrcweir << new html::ClassAttr("attention") 399*cdf0e10cSrcweir << i_sText; 400*cdf0e10cSrcweir } 401*cdf0e10cSrcweir else 402*cdf0e10cSrcweir { 403*cdf0e10cSrcweir CurOut() 404*cdf0e10cSrcweir >> *new html::DefListTerm 405*cdf0e10cSrcweir << i_sText; 406*cdf0e10cSrcweir } 407*cdf0e10cSrcweir } 408*cdf0e10cSrcweir 409*cdf0e10cSrcweir void 410*cdf0e10cSrcweir Docu_Display::Write_TagContents( const DocuText & i_rDocuText ) 411*cdf0e10cSrcweir { 412*cdf0e10cSrcweir DefListDefinition * dpDef = new DefListDefinition; 413*cdf0e10cSrcweir CurOut() << dpDef; 414*cdf0e10cSrcweir 415*cdf0e10cSrcweir Easy().Enter(*dpDef); 416*cdf0e10cSrcweir Write_Text(i_rDocuText); 417*cdf0e10cSrcweir Easy().Leave(); 418*cdf0e10cSrcweir } 419*cdf0e10cSrcweir 420*cdf0e10cSrcweir void 421*cdf0e10cSrcweir Docu_Display::Write_Text( const ary::info::DocuText & i_rDocuText ) 422*cdf0e10cSrcweir { 423*cdf0e10cSrcweir if ( i_rDocuText.IsNoHtml() ) 424*cdf0e10cSrcweir { 425*cdf0e10cSrcweir CurOut() 426*cdf0e10cSrcweir << new xml::XmlCode("<pre>"); 427*cdf0e10cSrcweir bUseHtmlInDocuTokens = false; 428*cdf0e10cSrcweir } 429*cdf0e10cSrcweir else 430*cdf0e10cSrcweir { 431*cdf0e10cSrcweir bUseHtmlInDocuTokens = true; 432*cdf0e10cSrcweir } 433*cdf0e10cSrcweir i_rDocuText.StoreAt( *this ); 434*cdf0e10cSrcweir if ( i_rDocuText.IsNoHtml() ) 435*cdf0e10cSrcweir { 436*cdf0e10cSrcweir CurOut() 437*cdf0e10cSrcweir << new xml::XmlCode("</pre>"); 438*cdf0e10cSrcweir } 439*cdf0e10cSrcweir } 440*cdf0e10cSrcweir 441*cdf0e10cSrcweir void 442*cdf0e10cSrcweir Docu_Display::Write_TextToken( const String & i_sText ) 443*cdf0e10cSrcweir { 444*cdf0e10cSrcweir if ( bUseHtmlInDocuTokens ) 445*cdf0e10cSrcweir CurOut() << new xml::XmlCode(i_sText); 446*cdf0e10cSrcweir else 447*cdf0e10cSrcweir CurOut() << i_sText; 448*cdf0e10cSrcweir } 449*cdf0e10cSrcweir 450*cdf0e10cSrcweir void 451*cdf0e10cSrcweir Docu_Display::Write_LinkableText( const ary::QualifiedName & i_sQuName ) 452*cdf0e10cSrcweir { 453*cdf0e10cSrcweir const ary::cpp::CodeEntity * 454*cdf0e10cSrcweir pCe = FindUnambiguousCe( Env(), i_sQuName, pCurClassOverwrite ); 455*cdf0e10cSrcweir if ( pCe != 0 ) 456*cdf0e10cSrcweir { 457*cdf0e10cSrcweir csi::xml::Element * 458*cdf0e10cSrcweir pLink = new csi::html::Link( Link2Ce(Env(), *pCe) ); 459*cdf0e10cSrcweir CurOut() << pLink; 460*cdf0e10cSrcweir Easy().Enter(*pLink); 461*cdf0e10cSrcweir Write_QualifiedName(i_sQuName); 462*cdf0e10cSrcweir Easy().Leave(); 463*cdf0e10cSrcweir } 464*cdf0e10cSrcweir else 465*cdf0e10cSrcweir { 466*cdf0e10cSrcweir Write_QualifiedName(i_sQuName); 467*cdf0e10cSrcweir } 468*cdf0e10cSrcweir CurOut() << " "; 469*cdf0e10cSrcweir } 470*cdf0e10cSrcweir 471*cdf0e10cSrcweir void 472*cdf0e10cSrcweir Docu_Display::Write_QualifiedName( const ary::QualifiedName & i_sQuName ) 473*cdf0e10cSrcweir { 474*cdf0e10cSrcweir if ( i_sQuName.IsAbsolute() ) 475*cdf0e10cSrcweir CurOut() << "::"; 476*cdf0e10cSrcweir for ( ary::QualifiedName::namespace_iterator it = i_sQuName.first_namespace(); 477*cdf0e10cSrcweir it != i_sQuName.end_namespace(); 478*cdf0e10cSrcweir ++it ) 479*cdf0e10cSrcweir { 480*cdf0e10cSrcweir CurOut() << (*it) << "::"; 481*cdf0e10cSrcweir } 482*cdf0e10cSrcweir CurOut() << i_sQuName.LocalName(); 483*cdf0e10cSrcweir if ( i_sQuName.IsFunction() ) 484*cdf0e10cSrcweir CurOut() << "()"; 485*cdf0e10cSrcweir } 486*cdf0e10cSrcweir 487