summaryrefslogtreecommitdiff
path: root/autodoc
diff options
context:
space:
mode:
authorNikolai Pretzell <np@openoffice.org>2009-11-04 09:47:38 +0000
committerNikolai Pretzell <np@openoffice.org>2009-11-04 09:47:38 +0000
commit517e4e2afe70cb9c7de2477c87b8267200ea4d86 (patch)
tree3079aa2262fbc73394cbbe4b9c4d1dcac9181fbc /autodoc
parent1316975f2eee54842c9e8564ff1576bb715e5cb7 (diff)
#i106434# @see tags were not shown in the documentation
Diffstat (limited to 'autodoc')
-rw-r--r--autodoc/source/display/idl/hfi_doc.cxx58
-rw-r--r--autodoc/source/display/idl/hfi_doc.hxx8
-rw-r--r--autodoc/source/display/idl/hfi_interface.cxx2
-rw-r--r--autodoc/source/display/idl/hfi_property.cxx2
-rw-r--r--autodoc/source/display/idl/hfi_tag.cxx22
-rw-r--r--autodoc/source/display/idl/hfi_tag.hxx5
-rw-r--r--autodoc/source/display/idl/hi_factory.cxx2
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);