incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arie...@apache.org
Subject svn commit: r1363563 - in /incubator/ooo/trunk/main/autodoc/source/parser_i: idoc/docu_pe2.cxx inc/s2_dsapi/docu_pe2.hxx
Date Thu, 19 Jul 2012 22:02:06 GMT
Author: arielch
Date: Thu Jul 19 22:02:06 2012
New Revision: 1363563

URL: http://svn.apache.org/viewvc?rev=1363563&view=rev
Log:
#i120302# - Add support for "AOO" and "Apache OpenOffice" in @since IDL tag

Modified:
    incubator/ooo/trunk/main/autodoc/source/parser_i/idoc/docu_pe2.cxx
    incubator/ooo/trunk/main/autodoc/source/parser_i/inc/s2_dsapi/docu_pe2.hxx

Modified: incubator/ooo/trunk/main/autodoc/source/parser_i/idoc/docu_pe2.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/autodoc/source/parser_i/idoc/docu_pe2.cxx?rev=1363563&r1=1363562&r2=1363563&view=diff
==============================================================================
--- incubator/ooo/trunk/main/autodoc/source/parser_i/idoc/docu_pe2.cxx (original)
+++ incubator/ooo/trunk/main/autodoc/source/parser_i/idoc/docu_pe2.cxx Thu Jul 19 22:02:06
2012
@@ -491,7 +491,7 @@ SapiDocu_PE::SetCurSeeAlsoAtTagLinkText_
 }
 
 const String
-    C_sSinceFormat("Correct version format: \"OOo <major>.<minor>[.<micro>
if micro is not 0]\".");
+    C_sSinceFormat("Correct version format: \"AOO <major>.<minor>[.<micro>
if micro is not 0]\".");
 
 void
 SapiDocu_PE::SetCurSinceAtTagVersion_OOo( DYN ary::inf::DocuToken & let_drNewToken )
@@ -521,6 +521,48 @@ SapiDocu_PE::SetCurSinceAtTagVersion_OOo
     if (NOT rCommandLine.DoesTransform_SinceTag())
         pCurAtTag->AddToken(let_drNewToken);
 
+    if (sVersion=="Apache")
+    {
+        fCurTokenAddFunction = &SapiDocu_PE::SetCurSinceAtTagVersion_AOO;
+    }
+    else
+        fCurTokenAddFunction = &SapiDocu_PE::SetCurSinceAtTagVersion_Number;
+}
+
+void
+SapiDocu_PE::SetCurSinceAtTagVersion_AOO( DYN ary::inf::DocuToken & let_drNewToken )
+{
+    csv_assert(pCurAtTag);
+
+    DT_TextToken * pToken = dynamic_cast< DT_TextToken* >(&let_drNewToken);
+    if (pToken == 0)
+    {
+        delete &let_drNewToken;
+        return;
+    }
+
+    const String
+        sVersion(pToken->GetText());
+    if (sVersion != "OpenOffice")
+    {
+        Cerr() << "Version information in @since tag has incorrect format.\n"
+               << "Found: Apache \"" << sVersion << "\"\n"
+               << "Correct version format: \"Apache OpenOffice <major>.<minor>[.<micro>
if micro is not 0]\"."
+               << Endl();
+        exit(1);
+    }
+
+    const autodoc::CommandLine &
+        rCommandLine = autodoc::CommandLine::Get_();
+    if (NOT rCommandLine.DoesTransform_SinceTag())
+    {
+        String &
+            sValue = pCurAtTag->Access_Text().Access_TextOfFirstToken();
+        StreamLock
+            sHelp(1000);
+        sValue = sHelp() << sValue << " " << sVersion << " " <<
c_str;
+    }
+
     fCurTokenAddFunction = &SapiDocu_PE::SetCurSinceAtTagVersion_Number;
 }
 
@@ -609,6 +651,8 @@ bool
 SapiDocu_PE::CheckVersionSyntax_OOo(const String & i_versionPart1)
 {
     return      i_versionPart1 == "OOo"
+            OR  i_versionPart1 == "Apache"
+            OR  i_versionPart1 == "AOO"
             OR  i_versionPart1 == "OpenOffice.org";
 }
 

Modified: incubator/ooo/trunk/main/autodoc/source/parser_i/inc/s2_dsapi/docu_pe2.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/autodoc/source/parser_i/inc/s2_dsapi/docu_pe2.hxx?rev=1363563&r1=1363562&r2=1363563&view=diff
==============================================================================
--- incubator/ooo/trunk/main/autodoc/source/parser_i/inc/s2_dsapi/docu_pe2.hxx (original)
+++ incubator/ooo/trunk/main/autodoc/source/parser_i/inc/s2_dsapi/docu_pe2.hxx Thu Jul 19
22:02:06 2012
@@ -143,6 +143,9 @@ class SapiDocu_PE : public TokenInterpre
 	void				SetCurSinceAtTagVersion_OOo(
 							DYN ary::inf::DocuToken &
 												let_drNewToken );
+    void                SetCurSinceAtTagVersion_AOO(
+                            DYN ary::inf::DocuToken &
+                                                let_drNewToken );
 	void				SetCurSinceAtTagVersion_Number(
 							DYN ary::inf::DocuToken &
 												let_drNewToken );



Mime
View raw message