diff options
author | Nikolai Pretzell <np@openoffice.org> | 2009-11-04 09:47:38 +0000 |
---|---|---|
committer | Nikolai Pretzell <np@openoffice.org> | 2009-11-04 09:47:38 +0000 |
commit | 66ac51ee8b5f167f0d78d074d2e6586476e992f7 (patch) | |
tree | 7cdc3c914d03a5ae665ead5d3328c4076e193b6c /autodoc | |
parent | e71d531a6f4197b3e5930638168bcef1be8710b1 (diff) |
#i106434# @see tags were not shown in the documentation
Diffstat (limited to 'autodoc')
-rw-r--r-- | autodoc/source/display/idl/hfi_doc.cxx | 60 | ||||
-rw-r--r-- | autodoc/source/display/idl/hfi_doc.hxx | 10 | ||||
-rw-r--r-- | autodoc/source/display/idl/hfi_interface.cxx | 4 | ||||
-rw-r--r-- | autodoc/source/display/idl/hfi_property.cxx | 4 | ||||
-rw-r--r-- | autodoc/source/display/idl/hfi_tag.cxx | 24 | ||||
-rw-r--r-- | autodoc/source/display/idl/hfi_tag.hxx | 7 | ||||
-rw-r--r-- | autodoc/source/display/idl/hi_factory.cxx | 4 | ||||
-rw-r--r-- | autodoc/source/parser_i/idoc/docu_pe2.cxx | 2 |
8 files changed, 101 insertions, 14 deletions
diff --git a/autodoc/source/display/idl/hfi_doc.cxx b/autodoc/source/display/idl/hfi_doc.cxx index afb92c3d..278859f7 100644 --- a/autodoc/source/display/idl/hfi_doc.cxx +++ b/autodoc/source/display/idl/hfi_doc.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -55,8 +55,17 @@ HF_IdlDocu::~HF_IdlDocu() } void -HF_IdlDocu::Produce_byDocu4Reference( const ce_info & i_rDocuForReference, - const client & i_rScopeGivingCe ) const +HF_IdlDocu::Produce_fromCodeEntity( const client & i_ce ) const +{ + const ce_info * + i_pDocu = Get_IdlDocu(i_ce.Docu()); + if (i_pDocu != 0) + Produce_byDocuAndScope(*i_pDocu, &i_ce, i_ce); +} + +void +HF_IdlDocu::Produce_fromReference( const ce_info & i_rDocuForReference, + const client & i_rScopeGivingCe ) const { Produce_byDocuAndScope(i_rDocuForReference, 0, i_rScopeGivingCe ); } @@ -121,11 +130,31 @@ HF_IdlDocu::Produce_byDocuAndScope( const ce_info & i_rDocu, } } + std::vector< csi::dsapi::DT_SeeAlsoAtTag* > + aSeeAlsosWithoutText; + std::vector< csi::dsapi::DT_SeeAlsoAtTag* > + aSeeAlsosWithText; + for ( std::vector< ary::inf::AtTag2* >::const_iterator iter = i_rDocu.Tags().begin(); iter != i_rDocu.Tags().end(); ++iter ) { + csi::dsapi::DT_SeeAlsoAtTag* + pSeeAlso = dynamic_cast< csi::dsapi::DT_SeeAlsoAtTag * >(*iter); + if (pSeeAlso != 0 ) + { + if ( pSeeAlso->Text().IsEmpty() ) + { + aSeeAlsosWithoutText.push_back(pSeeAlso); + } + else + { + aSeeAlsosWithText.push_back(pSeeAlso); + } + continue; + } + if ( strlen( (*iter)->Title() ) > 0 ) { HF_IdlTag @@ -137,4 +166,29 @@ HF_IdlDocu::Produce_byDocuAndScope( const ce_info & i_rDocu, *(*iter) ); } } // end for + + if (aSeeAlsosWithoutText.size() > 0) + { + HF_IdlTag + aSeeAlsoTag(Env(), i_rScopeGivingCe); + Xml::Element & + rTerm = rOut.Produce_Term(); + aSeeAlsoTag.Produce_byData( rTerm, + rOut.Produce_Definition(), + aSeeAlsosWithoutText ); + } + + for ( std::vector< csi::dsapi::DT_SeeAlsoAtTag* >::const_iterator + itSee2 = aSeeAlsosWithText.begin(); + itSee2 != aSeeAlsosWithText.end(); + ++itSee2 ) + { + HF_IdlTag + aTag(Env(), i_rScopeGivingCe); + Xml::Element & + rTerm = rOut.Produce_Term(); + aTag.Produce_byData( rTerm, + rOut.Produce_Definition(), + *(*itSee2) ); + } // end for } diff --git a/autodoc/source/display/idl/hfi_doc.hxx b/autodoc/source/display/idl/hfi_doc.hxx index 3722a325..9064bba3 100644 --- a/autodoc/source/display/idl/hfi_doc.hxx +++ b/autodoc/source/display/idl/hfi_doc.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -53,12 +53,18 @@ class HF_IdlDocu : public HtmlFactory_Idl /** Produces documentation by the CodeInfo accompanying + ->i_ce. + */ + void Produce_fromCodeEntity( + const client & i_ce ) const; + + /** Produces documentation by the CodeInfo accompanying a link or reference to a CodeEntity. @param i_rScopeGivingCe Gives the scope from which links are to be calculated. */ - void Produce_byDocu4Reference( + void Produce_fromReference( const ce_info & i_rDocuForReference, const client & i_rScopeGivingCe ) const; diff --git a/autodoc/source/display/idl/hfi_interface.cxx b/autodoc/source/display/idl/hfi_interface.cxx index cddc4c05..1c242f74 100644 --- a/autodoc/source/display/idl/hfi_interface.cxx +++ b/autodoc/source/display/idl/hfi_interface.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -335,7 +335,7 @@ HF_IdlInterface::produce_BaseHierarchy( Xml::Element & o_screen, HF_IdlDocu aDocuDisplay(Env(), aDocuList); - aDocuDisplay.Produce_byDocu4Reference(*(*it).Info(), i_ce); + aDocuDisplay.Produce_fromReference(*(*it).Info(), i_ce); } else { diff --git a/autodoc/source/display/idl/hfi_property.cxx b/autodoc/source/display/idl/hfi_property.cxx index 37e009ef..8500a236 100644 --- a/autodoc/source/display/idl/hfi_property.cxx +++ b/autodoc/source/display/idl/hfi_property.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -378,7 +378,7 @@ HF_IdlCommentedRelationElement::produce_LinkDoc( Environment & io_env, HF_DocEntryList aDocList(io_context); HF_IdlDocu aDocuDisplay(io_env, aDocList); - aDocuDisplay.Produce_byDocu4Reference(*i_commentedRef.Info(), i_ce); + aDocuDisplay.Produce_fromReference(*i_commentedRef.Info(), i_ce); } else { diff --git a/autodoc/source/display/idl/hfi_tag.cxx b/autodoc/source/display/idl/hfi_tag.cxx index 3ce63f49..8d194bc4 100644 --- a/autodoc/source/display/idl/hfi_tag.cxx +++ b/autodoc/source/display/idl/hfi_tag.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -93,6 +93,28 @@ HF_IdlTag::Produce_byData( Xml::Element & o_rTitle, } void +HF_IdlTag::Produce_byData( Xml::Element & o_rTitle, + Xml::Element & o_rText, + const std::vector< csi::dsapi::DT_SeeAlsoAtTag* > & + i_seeAlsoVector ) const +{ + o_rTitle << "See also"; + for ( std::vector< csi::dsapi::DT_SeeAlsoAtTag* >::const_iterator + it = i_seeAlsoVector.begin(); + it != i_seeAlsoVector.end(); + ++it ) + { + if (it != i_seeAlsoVector.begin()) + { + o_rText << ", "; + } + HF_IdlTypeText + aLinkText(Env(), o_rText, true, &aTextOut.ScopeGivingCe()); + aLinkText.Produce_byData( (*it)->LinkText() ); + } +} + +void HF_IdlTag::Display_StdAtTag( const csi::dsapi::DT_StdAtTag & i_rTag ) { if ( i_rTag.Text().IsEmpty() ) diff --git a/autodoc/source/display/idl/hfi_tag.hxx b/autodoc/source/display/idl/hfi_tag.hxx index ec781c7b..5b9ba730 100644 --- a/autodoc/source/display/idl/hfi_tag.hxx +++ b/autodoc/source/display/idl/hfi_tag.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -142,6 +142,11 @@ class HF_IdlTag : public HtmlFactory_Idl, Xml::Element & o_rText, const ary::inf::AtTag2 & i_rTag ) const; + void Produce_byData( + Xml::Element & o_rTitle, + Xml::Element & o_rText, + const std::vector< csi::dsapi::DT_SeeAlsoAtTag* > & + i_seeAlsoVector ) const; private: virtual void Display_StdAtTag( const csi::dsapi::DT_StdAtTag & diff --git a/autodoc/source/display/idl/hi_factory.cxx b/autodoc/source/display/idl/hi_factory.cxx index 180c9814..5b711d5d 100644 --- a/autodoc/source/display/idl/hi_factory.cxx +++ b/autodoc/source/display/idl/hi_factory.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -224,7 +224,7 @@ HtmlFactory_Idl::write_Docu( Xml::Element & o_screen, aDocuList( o_screen ); HF_IdlDocu aDocu( Env(), aDocuList ); - aDocu.Produce_byDocu4Reference(*doc, i_ce); + aDocu.Produce_fromCodeEntity(i_ce); } write_ManualLinks(o_screen, i_ce); diff --git a/autodoc/source/parser_i/idoc/docu_pe2.cxx b/autodoc/source/parser_i/idoc/docu_pe2.cxx index 63d88377..24a2f55b 100644 --- a/autodoc/source/parser_i/idoc/docu_pe2.cxx +++ b/autodoc/source/parser_i/idoc/docu_pe2.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite |