diff options
author | Kurt Zenker <kz@openoffice.org> | 2009-12-02 16:23:57 +0100 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2009-12-02 16:23:57 +0100 |
commit | 831b42e5106c3d76b9dcc0458645b6feaf2a1224 (patch) | |
tree | 136ba1ca808633938e998c58ecb5f409bd15a628 /autodoc | |
parent | 87d0adf849adb6bb48a178fe6efc2ba5b8852f1f (diff) | |
parent | 517e4e2afe70cb9c7de2477c87b8267200ea4d86 (diff) |
CWS-TOOLING: integrate CWS adc26
Diffstat (limited to 'autodoc')
-rw-r--r-- | autodoc/source/display/idl/hfi_doc.cxx | 58 | ||||
-rw-r--r-- | autodoc/source/display/idl/hfi_doc.hxx | 8 | ||||
-rw-r--r-- | autodoc/source/display/idl/hfi_interface.cxx | 2 | ||||
-rw-r--r-- | autodoc/source/display/idl/hfi_property.cxx | 2 | ||||
-rw-r--r-- | autodoc/source/display/idl/hfi_tag.cxx | 22 | ||||
-rw-r--r-- | autodoc/source/display/idl/hfi_tag.hxx | 5 | ||||
-rw-r--r-- | autodoc/source/display/idl/hi_factory.cxx | 2 |
7 files changed, 93 insertions, 6 deletions
diff --git a/autodoc/source/display/idl/hfi_doc.cxx b/autodoc/source/display/idl/hfi_doc.cxx index d5c686d2bbe0..278859f76acb 100644 --- a/autodoc/source/display/idl/hfi_doc.cxx +++ b/autodoc/source/display/idl/hfi_doc.cxx @@ -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 b44fd4822770..9064bba3fee8 100644 --- a/autodoc/source/display/idl/hfi_doc.hxx +++ b/autodoc/source/display/idl/hfi_doc.hxx @@ -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 26d548c613e8..1c242f746b58 100644 --- a/autodoc/source/display/idl/hfi_interface.cxx +++ b/autodoc/source/display/idl/hfi_interface.cxx @@ -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 282095578a6c..8500a236c791 100644 --- a/autodoc/source/display/idl/hfi_property.cxx +++ b/autodoc/source/display/idl/hfi_property.cxx @@ -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 99f4a83732ca..8d194bc43222 100644 --- a/autodoc/source/display/idl/hfi_tag.cxx +++ b/autodoc/source/display/idl/hfi_tag.cxx @@ -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 c070c5d15a0a..23f16a46919f 100644 --- a/autodoc/source/display/idl/hfi_tag.hxx +++ b/autodoc/source/display/idl/hfi_tag.hxx @@ -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 04ac8e3d2c13..5b711d5d9ed6 100644 --- a/autodoc/source/display/idl/hi_factory.cxx +++ b/autodoc/source/display/idl/hi_factory.cxx @@ -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); |