summaryrefslogtreecommitdiff
path: root/autodoc/source/exes/adc_uni
diff options
context:
space:
mode:
Diffstat (limited to 'autodoc/source/exes/adc_uni')
-rw-r--r--autodoc/source/exes/adc_uni/adc_cl.cxx402
-rw-r--r--autodoc/source/exes/adc_uni/adc_cmd.hxx134
-rw-r--r--autodoc/source/exes/adc_uni/adc_cmd_parse.cxx345
-rw-r--r--autodoc/source/exes/adc_uni/adc_cmd_parse.hxx211
-rw-r--r--autodoc/source/exes/adc_uni/adc_cmds.cxx180
-rw-r--r--autodoc/source/exes/adc_uni/adc_cmds.hxx128
-rw-r--r--autodoc/source/exes/adc_uni/adc_msg.cxx211
-rw-r--r--autodoc/source/exes/adc_uni/cmd_run.cxx281
-rw-r--r--autodoc/source/exes/adc_uni/cmd_run.hxx107
-rw-r--r--autodoc/source/exes/adc_uni/cmd_sincedata.cxx132
-rw-r--r--autodoc/source/exes/adc_uni/cmd_sincedata.hxx94
-rw-r--r--autodoc/source/exes/adc_uni/main.cxx56
-rw-r--r--autodoc/source/exes/adc_uni/makefile.mk104
-rw-r--r--autodoc/source/exes/adc_uni/spec-CommandLine.txt181
-rw-r--r--autodoc/source/exes/adc_uni/spec-DevGuideReferenceFile.txt0
-rw-r--r--autodoc/source/exes/adc_uni/spec-SinceTag_Handling.txt49
16 files changed, 2615 insertions, 0 deletions
diff --git a/autodoc/source/exes/adc_uni/adc_cl.cxx b/autodoc/source/exes/adc_uni/adc_cl.cxx
new file mode 100644
index 000000000000..9c6aa56ee8dc
--- /dev/null
+++ b/autodoc/source/exes/adc_uni/adc_cl.cxx
@@ -0,0 +1,402 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <precomp.h>
+#include <adc_cl.hxx>
+
+
+// NOT FULLY DEFINED SERVICES
+#include <algorithm>
+#include <cosv/x.hxx>
+#include <cosv/file.hxx>
+#include <cosv/tpl/tpltools.hxx>
+#include <ary/ary.hxx>
+#include <tools/tkpchars.hxx>
+#include <adc_msg.hxx>
+#include "adc_cmds.hxx"
+#include "adc_cmd_parse.hxx"
+#include "cmd_sincedata.hxx"
+
+
+namespace autodoc
+{
+
+CommandLine * CommandLine::pTheInstance_ = 0;
+
+const char * const C_sUserGuide =
+"\n\n\n"
+" General Use of Autodoc\n"
+" ----------------------\n"
+"\n"
+" Example for C++:\n"
+"\n"
+" -html <OutputDirectory> -name \"UDK 3.x anything\" -lg c++\n"
+" -p <ProjName> <ProjectRootDirectory>\n"
+" -t <SourceDir_relativeToProjectRoot>\n"
+"\n"
+" There may be several projects specified by -p.\n"
+"\n"
+"\n"
+" Example for IDL:\n"
+"\n"
+" -html <OutputDirectory> -name \"UDK 3.x anything\" -lg idl\n"
+" -t <SourceDir1> <SourceDir2>\n"
+"\n"
+" For both languages, instead of or in addition to -t may be\n"
+" used -d (no subdirectories) or -f (just one file). There can\n"
+" be multiple arguments after each of these options (-t -d -f).\n"
+"\n"
+"\n"
+" Replacing @since Tag Content\n"
+" ----------------------------\n"
+"\n"
+" In both languages you can give a transformation file to replace\n"
+" entries in @since tags by different entries.\n"
+" This file is given by the option\n"
+" -sincefile <TransformationFilePath>\n"
+" This option has to appear between the -html and the -lg option.\n"
+" Example:\n"
+" -html <OutputDirectory> -sincefile replacesince.txt\n"
+" -name \"UDK 3.x anything\" -lg idl -t <SourceDir>\n"
+"\n"
+"\n";
+
+CommandLine::CommandLine()
+ : nDebugStyle(0),
+ pSinceTransformator(new command::SinceTagTransformationData),
+ aCommands(),
+ bInitOk(false),
+ pCommand_CreateHtml(0),
+ pReposy( & ary::Repository::Create_() ),
+ bCpp(false),
+ bIdl(false)
+{
+ csv_assert(pTheInstance_ == 0);
+ pTheInstance_ = this;
+}
+
+CommandLine::~CommandLine()
+{
+ csv::erase_container_of_heap_ptrs(aCommands);
+ pTheInstance_ = 0;
+}
+
+int
+CommandLine::Run() const
+{
+ Cout() << "\nAutodoc version 2.2.5"
+ << "\n---------------------"
+ << "\n" << Endl();
+
+ bool
+ ok = true;
+ for ( CommandList::const_iterator it = aCommands.begin();
+ ok AND it != aCommands.end();
+ ++it )
+ {
+ ok = (*it)->Run();
+ }
+
+ if (pCommand_CreateHtml != 0)
+ {
+ StreamStr aDiagnosticMessagesFile(700);
+ aDiagnosticMessagesFile
+ << pCommand_CreateHtml->OutputDir()
+ << csv::ploc::Delimiter()
+ << "Autodoc_DiagnosticMessages.txt";
+ TheMessages().WriteFile(aDiagnosticMessagesFile.c_str());
+ }
+
+ return ok ? 0 : 1;
+}
+
+CommandLine &
+CommandLine::Get_()
+{
+ csv_assert(pTheInstance_ != 0);
+ return *pTheInstance_;
+}
+
+bool
+CommandLine::DoesTransform_SinceTag() const
+{
+ return pSinceTransformator->DoesTransform();
+}
+
+//bool
+//CommandLine::Strip_SinceTagText( String & io_sSinceTagValue ) const
+//{
+// return pSinceTransformator->StripSinceTagText(io_sSinceTagValue);
+//}
+
+const String &
+CommandLine::DisplayOf_SinceTagValue( const String & i_sVersionNumber ) const
+{
+ return pSinceTransformator->DisplayOf(i_sVersionNumber);
+}
+
+void
+CommandLine::do_Init( int argc,
+ char * argv[] )
+{
+ try
+ {
+ bInitOk = false;
+ StringVector aParameters;
+
+ char * * itpEnd = &argv[0] + argc;
+ for ( char * * itp = &argv[1]; itp != itpEnd; ++itp )
+ {
+ if ( strncmp(*itp, "-I:", 3) != 0 )
+ aParameters.push_back(String(*itp));
+ else
+ load_IncludedCommands(aParameters, (*itp)+3);
+ }
+
+ StringVector::const_iterator itEnd = aParameters.end();
+ for ( StringVector::const_iterator it = aParameters.begin();
+ it != itEnd;
+ )
+ {
+ if ( *it == command::C_opt_Verbose )
+ do_clVerbose(it,itEnd);
+ else if ( *it == command::C_opt_LangAll
+ OR *it == command::C_opt_Name
+ OR *it == command::C_opt_DevmanFile )
+ do_clParse(it,itEnd);
+ else if (*it == command::C_opt_CreateHtml)
+ do_clCreateHtml(it,itEnd);
+ else if (*it == command::C_opt_SinceFile)
+ do_clSinceFile(it,itEnd);
+ else if (*it == command::C_opt_ExternNamespace)
+ {
+ sExternNamespace = *(++it);
+ ++it;
+ if ( strncmp(sExternNamespace.c_str(), "::", 2) != 0)
+ {
+ throw command::X_CommandLine(
+ "-extnsp needs an absolute qualified namespace, starting with \"::\"."
+ );
+ }
+ }
+ else if (*it == command::C_opt_ExternRoot)
+ {
+ ++it;
+ StreamLock sl(1000);
+ if ( csv::compare(*it, 0, "http://", 7) != 0 )
+ {
+ sl() << "http://" << *it;
+ }
+ if ( *(sl().end()-1) != '/')
+ sl() << '/';
+ sExternRoot = sl().c_str();
+
+ ++it;
+ }
+// else if (*it == command::C_opt_CreateXml)
+// do_clCreateXml(it,itEnd);
+// else if (command::C_opt_Load)
+// do_clLoad(it,itEnd);
+// else if (*it == command::C_opt_Save)
+// do_clSave(it,itEnd);
+ else if (*it == "-h" OR *it == "-?" OR *it == "?")
+ // Leads to displaying help, because bInitOk stays on false.
+ return;
+ else if ( *it == command::C_opt_Parse )
+ // Only for backwards compatibility.
+ // Just ignore "-parse".
+ ++it;
+ else
+ {
+ StreamLock sl(200);
+ throw command::X_CommandLine(
+ sl() << "Unknown commandline option \""
+ << *it
+ << "\"."
+ << c_str );
+ }
+ } // end for
+ sort_Commands();
+
+ bInitOk = true;
+
+ } // end try
+ catch ( command::X_CommandLine & xxx )
+ {
+ xxx.Report( Cerr() );
+ }
+ catch ( csv::Exception & xxx )
+ {
+ xxx.GetInfo( Cerr() );
+ }
+}
+
+void
+CommandLine::do_PrintUse() const
+{
+ Cout() << C_sUserGuide << Endl();
+}
+
+bool
+CommandLine::inq_CheckParameters() const
+{
+ if (NOT bInitOk OR aCommands.size() == 0)
+ return false;
+ return true;
+}
+
+void
+CommandLine::load_IncludedCommands( StringVector & out,
+ const char * i_filePath )
+{
+ CharacterSource
+ aIncludedCommands;
+ csv::File
+ aFile(i_filePath, csv::CFM_READ);
+ if (NOT aFile.open())
+ {
+ Cerr() << "Command include file \""
+ << i_filePath
+ << "\" not found."
+ << Endl();
+ throw command::X_CommandLine("Invalid file in option -I:<command-file>.");
+ }
+ aIncludedCommands.LoadText(aFile);
+ aFile.close();
+
+ bool bInToken = false;
+ StreamLock aTransmit(200);
+ for ( ; NOT aIncludedCommands.IsFinished(); aIncludedCommands.MoveOn() )
+ {
+ if (bInToken)
+ {
+ if (aIncludedCommands.CurChar() <= 32)
+ {
+ const char *
+ pToken = aIncludedCommands.CutToken();
+ bInToken = false;
+
+ if ( strncmp(pToken, "-I:", 3) != 0 )
+ {
+ aTransmit().seekp(0);
+ aTransmit() << pToken;
+ aTransmit().replace_all('\\', *csv::ploc::Delimiter());
+ aTransmit().replace_all('/', *csv::ploc::Delimiter());
+ out.push_back(String(aTransmit().c_str()));
+ }
+ else
+ load_IncludedCommands(out, pToken+3);
+ }
+ }
+ else
+ {
+ if (aIncludedCommands.CurChar() > 32)
+ {
+ aIncludedCommands.CutToken();
+ bInToken = true;
+ }
+ } // endif (bInToken) else
+
+ } // end while()
+}
+
+namespace
+{
+inline int
+v_nr(StringVector::const_iterator it)
+{
+ return int( *(*it).c_str() ) - int('0');
+}
+} // anonymous namespace
+
+void
+CommandLine::do_clVerbose( opt_iter & it,
+ opt_iter itEnd )
+{
+ ++it;
+ if ( it == itEnd ? true : v_nr(it) < 0 OR v_nr(it) > 7 )
+ throw command::X_CommandLine( "Missing or invalid number in -v option." );
+ nDebugStyle = v_nr(it);
+ ++it;
+}
+
+void
+CommandLine::do_clParse( opt_iter & it,
+ opt_iter itEnd )
+{
+ command::Command *
+ pCmd_Parse = new command::Parse;
+ pCmd_Parse->Init(it, itEnd);
+ aCommands.push_back(pCmd_Parse);
+}
+
+void
+CommandLine::do_clCreateHtml( opt_iter & it,
+ opt_iter itEnd )
+{
+ pCommand_CreateHtml = new command::CreateHtml;
+ pCommand_CreateHtml->Init(it, itEnd);
+ aCommands.push_back(pCommand_CreateHtml);
+}
+
+void
+CommandLine::do_clSinceFile( opt_iter & it,
+ opt_iter itEnd )
+{
+ pSinceTransformator->Init(it, itEnd);
+}
+
+
+namespace
+{
+
+struct Less_RunningRank
+{
+ bool operator()(
+ const command::Command * const &
+ i1,
+ const command::Command * const &
+ i2 ) const
+ { return i1->RunningRank() < i2->RunningRank(); }
+};
+
+} // anonymous namespace
+
+
+
+void
+CommandLine::sort_Commands()
+{
+ std::sort( aCommands.begin(),
+ aCommands.end(),
+ Less_RunningRank() );
+}
+
+} // namespace autodoc
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/adc_cmd.hxx b/autodoc/source/exes/adc_uni/adc_cmd.hxx
new file mode 100644
index 000000000000..72e75ff8091c
--- /dev/null
+++ b/autodoc/source/exes/adc_uni/adc_cmd.hxx
@@ -0,0 +1,134 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef ADC_ADC_CMD_HXX
+#define ADC_ADC_CMD_HXX
+
+
+
+// USED SERVICES
+ // BASE CLASSES
+#include <cosv/comdline.hxx>
+ // COMPONENTS
+ // PARAMETERS
+
+
+namespace autodoc
+{
+namespace command
+{
+
+/** Context for a command, which can be read from the command line.
+*/
+class Context
+{
+ public:
+ typedef StringVector::const_iterator opt_iter;
+
+ virtual ~Context() {}
+
+ void Init(
+ opt_iter & it,
+ opt_iter itEnd );
+ private:
+ virtual void do_Init(
+ opt_iter & it,
+ opt_iter itEnd ) = 0;
+};
+
+// IMPLEMENTATION
+inline void
+Context::Init( opt_iter & i_nCurArgsBegin,
+ opt_iter i_nEndOfAllArgs )
+
+{ do_Init(i_nCurArgsBegin, i_nEndOfAllArgs); }
+
+
+
+/** Interface for commands, autodoc is able to perform.
+*/
+class Command : public Context
+{
+ public:
+ /** Running ranks of the commands are to be maintained at one location:
+ Here!
+ */
+ enum E_Ranks
+ {
+ rank_Load = 10,
+ rank_Parse = 20,
+ rank_Save = 30,
+ rank_CreateHtml = 40,
+ rank_CreateXml = 50
+ };
+
+
+ bool Run() const;
+ int RunningRank() const;
+
+ private:
+ virtual bool do_Run() const = 0;
+ virtual int inq_RunningRank() const = 0;
+};
+
+// IMPLEMENTATION
+inline bool
+Command::Run() const
+{ return do_Run(); }
+inline int
+Command::RunningRank() const
+{ return inq_RunningRank(); }
+
+
+
+
+/** The exception thrown, if the command line is invalid.
+*/
+class X_CommandLine
+{
+ public:
+ X_CommandLine(
+ const char * i_sExplanation )
+ : sExplanation(i_sExplanation) {}
+
+ void Report(
+ std::ostream & o_rOut )
+ { o_rOut << "Error in command line: "
+ << sExplanation << Endl(); }
+ private:
+ String sExplanation;
+};
+
+
+
+
+} // namespace command
+} // namespace autodoc
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/adc_cmd_parse.cxx b/autodoc/source/exes/adc_uni/adc_cmd_parse.cxx
new file mode 100644
index 000000000000..2ce39cb14a2e
--- /dev/null
+++ b/autodoc/source/exes/adc_uni/adc_cmd_parse.cxx
@@ -0,0 +1,345 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <precomp.h>
+#include "adc_cmd_parse.hxx"
+
+
+// NOT FULLY DEFINED SERVICES
+#include <cosv/tpl/tpltools.hxx>
+#include <adc_cl.hxx>
+#include "adc_cmds.hxx"
+#include "cmd_run.hxx"
+
+
+
+namespace autodoc
+{
+namespace command
+{
+
+namespace
+{
+
+const String C_FileEnding_hxx("*.hxx");
+const String C_FileEnding_h("*.h");
+const String C_FileEnding_idl("*.idl");
+const String C_FileEnding_java("*.java");
+
+inline void
+CHECK( bool b, const String & text )
+{
+ if (NOT b)
+ throw X_CommandLine( text );
+}
+
+} // anonymous namespace
+
+
+
+//************************** S_LanguageInfo ***********************//
+
+S_LanguageInfo::~S_LanguageInfo()
+{
+}
+
+void
+S_LanguageInfo::do_Init( opt_iter & it,
+ opt_iter itEnd )
+{
+ ++it; // Cur is language.
+ CHECKOPT( it != itEnd AND
+ ( *it == C_arg_Cplusplus OR
+ *it == C_arg_Idl OR
+ *it == C_arg_Java ),
+ "language",
+ C_opt_LangAll );
+
+ if ( *it == C_arg_Cplusplus ) {
+ eLanguage = cpp;
+ }
+ else if ( *it == C_arg_Idl ) {
+ eLanguage = idl;
+ }
+ else if ( *it == C_arg_Java ) {
+ eLanguage = java;
+ }
+ else {
+ csv_assert(false);
+ }
+
+ switch (eLanguage)
+ {
+ case cpp: aExtensions.push_back( C_FileEnding_hxx );
+ aExtensions.push_back( C_FileEnding_h );
+ CommandLine::Get_().Set_CppUsed();
+ break;
+ case idl: aExtensions.push_back( C_FileEnding_idl );
+ CommandLine::Get_().Set_IdlUsed();
+ break;
+ case java: aExtensions.push_back( C_FileEnding_java );
+ break;
+ default: // do nothing.
+ ;
+ }
+
+ ++it; // Cur is next option.
+}
+
+void
+S_LanguageInfo::InitExtensions( opt_iter & it,
+ opt_iter itEnd )
+{
+ ++it;
+ CHECKOPT( it != itEnd AND (*it).char_at(0) == '.',
+ "extensions",
+ C_opt_ExtensionsAll );
+
+ StreamLock slCheck(150);
+ slCheck() << C_opt_ExtensionsAll
+ << " used without previous "
+ << C_opt_LangAll;
+
+ CHECK( eLanguage != none,
+ slCheck().c_str() );
+
+ do {
+ aExtensions.push_back(*it);
+ ++it;
+ } while (it != itEnd AND (*it).char_at(0) == '.');
+}
+
+
+
+//************************** Parse ***********************//
+
+Parse::Parse()
+ : sRepositoryName(),
+ aGlobalLanguage(),
+ aProjects(),
+ sDevelopersManual_RefFilePath()
+{
+}
+
+Parse::~Parse()
+{
+ csv::erase_container_of_heap_ptrs(aProjects);
+}
+
+void
+Parse::do_Init( opt_iter & it,
+ opt_iter itEnd )
+{
+ for ( ; it != itEnd; )
+ {
+ if (*it == C_opt_Name)
+ do_clName(it, itEnd);
+ else if (*it == C_opt_LangAll)
+ aGlobalLanguage.Init(it, itEnd);
+ else if (*it == C_opt_ExtensionsAll)
+ aGlobalLanguage.InitExtensions(it, itEnd);
+ else if (*it == C_opt_DevmanFile)
+ do_clDevManual(it, itEnd);
+ else if (*it == C_opt_Project)
+ do_clProject(it, itEnd);
+ else if ( *it == C_opt_SourceTree
+ OR *it == C_opt_SourceDir
+ OR *it == C_opt_SourceFile )
+ do_clDefaultProject(it, itEnd);
+ else
+ break;
+ } // for
+}
+
+void
+Parse::do_clName( opt_iter & it,
+ opt_iter itEnd )
+{
+ ++it;
+ CHECKOPT( it != itEnd AND (*it).char_at(0) != '-',
+ "name",
+ C_opt_Name );
+ sRepositoryName = *it;
+ ++it;
+}
+
+void
+Parse::do_clDevManual( opt_iter & it,
+ opt_iter itEnd )
+{
+ ++it;
+ CHECKOPT( it != itEnd AND (*it).char_at(0) != '-',
+ "link file path",
+ C_opt_DevmanFile );
+ sDevelopersManual_RefFilePath = *it;
+ ++it;
+}
+
+void
+Parse::do_clProject( opt_iter & it,
+ opt_iter itEnd )
+{
+ if ( aProjects.size() == 1 )
+ {
+ if ( aProjects.front()->IsDefault() )
+ throw X_CommandLine( "Both, named projects and a default project, cannot be used together." );
+ }
+
+ S_ProjectData * dpProject = new S_ProjectData(aGlobalLanguage);
+ ++it;
+ dpProject->Init(it, itEnd);
+ aProjects.push_back(dpProject);
+}
+
+void
+Parse::do_clDefaultProject( opt_iter & it,
+ opt_iter itEnd )
+{
+ if ( aProjects.size() > 0 )
+ {
+ throw X_CommandLine( "Both, named projects and a default project, cannot be used together." );
+ }
+
+ S_ProjectData * dpProject = new S_ProjectData( aGlobalLanguage,
+ S_ProjectData::default_prj );
+ dpProject->Init(it, itEnd);
+ aProjects.push_back(dpProject);
+}
+
+bool
+Parse::do_Run() const
+{
+ run::Parser
+ aParser(*this);
+ return aParser.Perform();
+}
+
+int
+Parse::inq_RunningRank() const
+{
+ return static_cast<int>(rank_Parse);
+}
+
+
+
+//************************** S_Sources ***********************//
+
+void
+S_Sources::do_Init( opt_iter & it,
+ opt_iter itEnd )
+{
+ StringVector *
+ pList = 0;
+ csv_assert((*it)[0] == '-');
+
+ for ( ; it != itEnd; ++it)
+ {
+ if ((*it)[0] == '-')
+ {
+ if (*it == C_opt_SourceTree)
+ pList = &aTrees;
+ else if (*it == C_opt_SourceDir)
+ pList = &aDirectories;
+ else if (*it == C_opt_SourceFile)
+ pList = &aFiles;
+ else
+ return;
+ }
+ else
+ pList->push_back(*it);
+ } // end for
+}
+
+
+
+//************************** S_ProjectData ***********************//
+
+
+S_ProjectData::S_ProjectData( const S_LanguageInfo & i_globalLanguage )
+ : sName(),
+ aRootDirectory(),
+ aLanguage(i_globalLanguage),
+ aFiles(),
+ bIsDefault(false)
+{
+}
+
+S_ProjectData::S_ProjectData( const S_LanguageInfo & i_globalLanguage,
+ E_Default )
+ : sName(),
+ aRootDirectory("."),
+ aLanguage(i_globalLanguage),
+ aFiles(),
+ bIsDefault(true)
+{
+}
+
+S_ProjectData::~S_ProjectData()
+{
+}
+
+void
+S_ProjectData::do_Init( opt_iter & it,
+ opt_iter itEnd )
+{
+ if (NOT IsDefault())
+ {
+ CHECKOPT( it != itEnd AND (*it).char_at(0) != '-',
+ "name",
+ C_opt_Project );
+ sName = *it;
+ ++it;
+
+ CHECKOPT( it != itEnd AND (*it).char_at(0) != '-',
+ "root directory",
+ C_opt_Project );
+ aRootDirectory.Set((*it).c_str(), true);
+ ++it;
+ }
+
+ for ( ; it != itEnd; )
+ {
+ if ( *it == C_opt_SourceTree
+ OR *it == C_opt_SourceDir
+ OR *it == C_opt_SourceFile )
+ aFiles.Init(it, itEnd);
+// else if (*it == C_opt_Lang)
+// aLanguage.Init(it, itEnd);
+// else if (*it == C_opt_Extensions)
+// aLanguage.InitExtensions(it, itEnd);
+ else
+ break;
+ } // for
+}
+
+} // namespace command
+} // namespace autodoc
+
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/adc_cmd_parse.hxx b/autodoc/source/exes/adc_uni/adc_cmd_parse.hxx
new file mode 100644
index 000000000000..0f15f49a0372
--- /dev/null
+++ b/autodoc/source/exes/adc_uni/adc_cmd_parse.hxx
@@ -0,0 +1,211 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef ADC_ADC_CMD_PARSE_HXX
+#define ADC_ADC_CMD_PARSE_HXX
+
+
+
+// USED SERVICES
+ // BASE CLASSES
+#include "adc_cmd.hxx"
+ // COMPONENTS
+#include <cosv/ploc.hxx>
+ // PARAMETERS
+
+namespace autodoc
+{
+namespace command
+{
+
+/** A command context which holds the currently parsed programing language
+ and its valid file extensions.
+*/
+struct S_LanguageInfo : public Context
+{
+ enum E_ProgrammingLanguage
+ {
+ none,
+ cpp,
+ idl,
+ java
+ };
+ S_LanguageInfo()
+ : eLanguage(none),
+ aExtensions() {}
+ ~S_LanguageInfo();
+
+ void InitExtensions(
+ opt_iter & it,
+ opt_iter itEnd );
+ // DATA
+ E_ProgrammingLanguage
+ eLanguage;
+ StringVector aExtensions; // An empty string is possible and means exactly that: files without extension.
+
+ private:
+ // Interface Context:
+ virtual void do_Init(
+ opt_iter & it,
+ opt_iter itEnd );
+};
+
+
+class S_ProjectData;
+
+
+/** A command that parses source code into the Autodoc Repository.
+*/
+class Parse : public Command
+{
+ public:
+ typedef std::vector< DYN S_ProjectData * > ProjectList;
+ typedef ProjectList::const_iterator ProjectIterator;
+
+ Parse();
+ ~Parse();
+
+ // INQUIRY
+ const String & ReposyName() const;
+ const S_LanguageInfo &
+ GlobalLanguage() const;
+ ProjectIterator ProjectsBegin() const;
+ ProjectIterator ProjectsEnd() const;
+ const String & DevelopersManual_RefFilePath() const
+ { return sDevelopersManual_RefFilePath; }
+
+ private:
+ // Interface Context:
+ virtual void do_Init(
+ opt_iter & i_nCurArgsBegin,
+ opt_iter i_nEndOfAllArgs );
+ // Interface Command:
+ virtual bool do_Run() const;
+ virtual int inq_RunningRank() const;
+
+ // Locals
+ void do_clName(
+ opt_iter & it,
+ opt_iter itEnd );
+ void do_clDevManual(
+ opt_iter & it,
+ opt_iter itEnd );
+ void do_clProject(
+ opt_iter & it,
+ opt_iter itEnd );
+ void do_clDefaultProject(
+ opt_iter & it,
+ opt_iter itEnd );
+
+ // DATA
+ String sRepositoryName;
+ S_LanguageInfo aGlobalLanguage;
+
+ ProjectList aProjects;
+
+ String sDevelopersManual_RefFilePath;
+};
+
+inline const String &
+Parse::ReposyName() const
+ { return sRepositoryName; }
+inline const S_LanguageInfo &
+Parse::GlobalLanguage() const
+ { return aGlobalLanguage; }
+inline Parse::ProjectIterator
+Parse::ProjectsBegin() const
+ { return aProjects.begin(); }
+inline Parse::ProjectIterator
+Parse::ProjectsEnd() const
+ { return aProjects.end(); }
+//inline const String &
+//Parse::DevelopersManual_RefFilePath() const
+// { return sDevelopersManual_RefFilePath; }
+//inline const String &
+//Parse::DevelopersManual_HtmlRoot() const
+// { return sDevelopersManual_HtmlRoot; }
+
+
+struct S_Sources : public Context
+{
+ StringVector aTrees;
+ StringVector aDirectories;
+ StringVector aFiles;
+
+ private:
+ // Interface Context:
+ virtual void do_Init(
+ opt_iter & it,
+ opt_iter itEnd );
+};
+
+class S_ProjectData : public Context
+{
+ public:
+ enum E_Default { default_prj };
+
+ S_ProjectData(
+ const S_LanguageInfo &
+ i_globalLanguage );
+ S_ProjectData(
+ const S_LanguageInfo &
+ i_globalLanguage,
+ E_Default unused );
+ ~S_ProjectData();
+
+ bool IsDefault() const { return bIsDefault; }
+ const String & Name() const { return sName; }
+ const csv::ploc::Path &
+ RootDirectory() const { return aRootDirectory; }
+ const S_LanguageInfo &
+ Language() const { return aLanguage; }
+ const S_Sources Sources() const { return aFiles; }
+
+ private:
+ // Interface Context:
+ virtual void do_Init(
+ opt_iter & it,
+ opt_iter itEnd );
+ // Locals
+
+ // DATA
+ String sName;
+ csv::ploc::Path aRootDirectory;
+ S_LanguageInfo aLanguage;
+ S_Sources aFiles;
+ bool bIsDefault;
+};
+
+
+} // namespace command
+} // namespace autodoc
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/adc_cmds.cxx b/autodoc/source/exes/adc_uni/adc_cmds.cxx
new file mode 100644
index 000000000000..c54adea084ea
--- /dev/null
+++ b/autodoc/source/exes/adc_uni/adc_cmds.cxx
@@ -0,0 +1,180 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <precomp.h>
+#include "adc_cmds.hxx"
+
+
+// NOT FULLY DEFINED SERVICES
+#include <ary/ary.hxx>
+#include <autodoc/displaying.hxx>
+#include <autodoc/dsp_html_std.hxx>
+#include <display/corframe.hxx>
+#include <adc_cl.hxx>
+
+
+namespace autodoc
+{
+namespace command
+{
+
+extern const String C_opt_Include("-I:");
+
+extern const String C_opt_Verbose("-v");
+
+extern const String C_opt_Parse("-parse");
+extern const String C_opt_Name("-name");
+extern const String C_opt_LangAll("-lg");
+extern const String C_opt_ExtensionsAll("-extg");
+extern const String C_opt_DevmanFile("-dvgfile");
+extern const String C_opt_SinceFile("-sincefile");
+
+extern const String C_arg_Cplusplus("c++");
+extern const String C_arg_Idl("idl");
+extern const String C_arg_Java("java");
+
+extern const String C_opt_Project("-p");
+//extern const String C_opt_Lang;
+//extern const String C_opt_Extensions;
+extern const String C_opt_SourceDir("-d");
+extern const String C_opt_SourceTree("-t");
+extern const String C_opt_SourceFile("-f");
+
+extern const String C_opt_CreateHtml("-html");
+extern const String C_opt_DevmanRoot("-dvgroot");
+
+//extern const String C_opt_CreateXml("-xml");
+//extern const String C_opt_Load("-load");
+//extern const String C_opt_Save("-save");
+
+extern const String C_opt_ExternNamespace("-extnsp");
+extern const String C_opt_ExternRoot("-extroot");
+
+
+
+//************************** CreateHTML ***********************//
+
+CreateHtml::CreateHtml()
+ : sOutputRootDirectory(),
+ sDevelopersManual_HtmlRoot()
+{
+}
+
+CreateHtml::~CreateHtml()
+{
+}
+
+void
+CreateHtml::do_Init( opt_iter & it,
+ opt_iter itEnd )
+{
+ ++it;
+ CHECKOPT( it != itEnd && (*it).char_at(0) != '-',
+ "output directory", C_opt_CreateHtml );
+ sOutputRootDirectory = *it;
+
+ for ( ++it;
+ it != itEnd AND (*it == C_opt_DevmanRoot);
+ ++it )
+ {
+ if (*it == C_opt_DevmanRoot)
+ {
+ ++it;
+ CHECKOPT( it != itEnd AND (*it).char_at(0) != '-',
+ "HTML root directory of Developers Guide",
+ C_opt_DevmanRoot );
+ sDevelopersManual_HtmlRoot = *it;
+ }
+ } // end for
+}
+
+bool
+CreateHtml::do_Run() const
+{
+ if ( CommandLine::Get_().IdlUsed() )
+ run_Idl();
+ if ( CommandLine::Get_().CppUsed() )
+ run_Cpp();
+ return true;
+}
+
+int
+CreateHtml::inq_RunningRank() const
+{
+ return static_cast<int>(rank_CreateHtml);
+}
+
+void
+CreateHtml::run_Idl() const
+{
+ const ary::idl::Gate &
+ rGate = CommandLine::Get_().TheRepository().Gate_Idl();
+
+ Cout() << "Creating HTML-output into the directory "
+ << sOutputRootDirectory
+ << "."
+ << Endl();
+
+ const DisplayToolsFactory_Ifc &
+ rToolsFactory = DisplayToolsFactory_Ifc::GetIt_();
+ Dyn<autodoc::HtmlDisplay_Idl_Ifc>
+ pDisplay( rToolsFactory.Create_HtmlDisplay_Idl() );
+
+ DYN display::CorporateFrame & // KORR_FUTURE: Remove the need for const_cast
+ drFrame = const_cast< display::CorporateFrame& >(rToolsFactory.Create_StdFrame());
+ if (NOT DevelopersManual_HtmlRoot().empty())
+ drFrame.Set_DevelopersGuideHtmlRoot( DevelopersManual_HtmlRoot() );
+
+ pDisplay->Run( sOutputRootDirectory,
+ rGate,
+ drFrame );
+}
+
+void
+CreateHtml::run_Cpp() const
+{
+ const ary::Repository &
+ rReposy = CommandLine::Get_().TheRepository();
+ const ary::cpp::Gate &
+ rGate = rReposy.Gate_Cpp();
+
+ const DisplayToolsFactory_Ifc &
+ rToolsFactory = DisplayToolsFactory_Ifc::GetIt_();
+ Dyn< autodoc::HtmlDisplay_UdkStd >
+ pDisplay( rToolsFactory.Create_HtmlDisplay_UdkStd() );
+
+ pDisplay->Run( sOutputRootDirectory,
+ rGate,
+ rToolsFactory.Create_StdFrame() );
+}
+
+
+} // namespace command
+} // namespace autodoc
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/adc_cmds.hxx b/autodoc/source/exes/adc_uni/adc_cmds.hxx
new file mode 100644
index 000000000000..784a50402a4b
--- /dev/null
+++ b/autodoc/source/exes/adc_uni/adc_cmds.hxx
@@ -0,0 +1,128 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef ADC_ADC_CMDS_HXX
+#define ADC_ADC_CMDS_HXX
+
+
+
+// USED SERVICES
+ // BASE CLASSES
+#include "adc_cmd.hxx"
+ // COMPONENTS
+ // PARAMETERS
+
+namespace autodoc
+{
+namespace command
+{
+
+
+/** A command that produces HTML output from the Autodoc Repository.
+*/
+class CreateHtml : public Command
+{
+ public:
+ CreateHtml();
+ ~CreateHtml();
+
+ const String & OutputDir() const;
+ const String & DevelopersManual_HtmlRoot() const
+ { return sDevelopersManual_HtmlRoot; }
+
+ private:
+ // Interface Context:
+ virtual void do_Init(
+ opt_iter & i_nCurArgsBegin,
+ opt_iter i_nEndOfAllArgs );
+ // Interface Command:
+ virtual bool do_Run() const;
+ virtual int inq_RunningRank() const;
+
+ // Locals
+ void run_Cpp() const;
+ void run_Idl() const;
+
+ // DATA
+ String sOutputRootDirectory;
+ String sDevelopersManual_HtmlRoot;
+};
+
+inline const String &
+CreateHtml::OutputDir() const
+ { return sOutputRootDirectory; }
+
+
+extern const String C_opt_Verbose;
+
+extern const String C_opt_Parse;
+extern const String C_opt_Name;
+extern const String C_opt_LangAll;
+extern const String C_opt_ExtensionsAll;
+extern const String C_opt_DevmanFile;
+extern const String C_opt_SinceFile;
+
+extern const String C_arg_Cplusplus;
+extern const String C_arg_Idl;
+extern const String C_arg_Java;
+
+extern const String C_opt_Project;
+//extern const String C_opt_Lang;
+//extern const String C_opt_Extensions;
+extern const String C_opt_SourceTree;
+extern const String C_opt_SourceDir;
+extern const String C_opt_SourceFile;
+
+extern const String C_opt_CreateHtml;
+extern const String C_opt_DevmanRoot;
+
+//extern const String C_opt_CreateXml;
+//extern const String C_opt_Load;
+//extern const String C_opt_Save;
+
+extern const String C_opt_ExternNamespace;
+extern const String C_opt_ExternRoot;
+
+
+inline void
+CHECKOPT( bool b, const char * miss, const String & opt )
+{
+ if ( NOT b )
+ {
+ StreamLock slMsg(100);
+ throw X_CommandLine( slMsg() << "Missing " << miss <<" after " << opt << "." << c_str );
+ }
+}
+
+} // namespace command
+} // namespace autodoc
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/adc_msg.cxx b/autodoc/source/exes/adc_uni/adc_msg.cxx
new file mode 100644
index 000000000000..15f8377fb53a
--- /dev/null
+++ b/autodoc/source/exes/adc_uni/adc_msg.cxx
@@ -0,0 +1,211 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <precomp.h>
+#include <adc_msg.hxx>
+
+
+// NOT FULLY DEFINED SERVICES
+#include <cosv/file.hxx>
+#include <cosv/tpl/tpltools.hxx>
+
+
+namespace autodoc
+{
+
+
+Messages::Messages()
+ : aMissingDocs(),
+ aParseErrors(),
+ aInvalidConstSymbols(),
+ aUnresolvedLinks(),
+ aTypeVsMemberMisuses()
+{
+}
+
+Messages::~Messages()
+{
+}
+
+void
+Messages::WriteFile(const String & i_sOutputFilePath)
+{
+ csv::File
+ aOut(i_sOutputFilePath, csv::CFM_CREATE);
+ aOut.open();
+
+ // KORR_FUTURE Enable this when appropriate:
+ WriteParagraph( aOut,
+ aParseErrors,
+ "Incompletely Parsed Files",
+ "Stopped parsing at " );
+
+ WriteParagraph( aOut,
+ aMissingDocs,
+ "Entities Without Documentation",
+ " in " );
+
+ WriteParagraph( aOut,
+ aInvalidConstSymbols,
+ "Incorrectly Written Const Symbols",
+ " in " );
+
+ WriteParagraph( aOut,
+ aUnresolvedLinks,
+ "Unresolved Links",
+ " in\n " );
+
+ WriteParagraph( aOut,
+ aTypeVsMemberMisuses,
+ "Confusion or Misuse of <Type> vs. <Member>",
+ " in " );
+ aOut.close();
+}
+
+void
+Messages::Out_MissingDoc( const String & i_sEntity,
+ const String & i_sFile,
+ uintt i_nLine)
+{
+ AddValue( aMissingDocs,
+ i_sEntity,
+ i_sFile,
+ i_nLine );
+}
+
+void
+Messages::Out_ParseError( const String & i_sFile,
+ uintt i_nLine)
+{
+ aParseErrors[Location(i_sFile,i_nLine)] = String::Null_();
+}
+
+void
+Messages::Out_InvalidConstSymbol( const String & i_sText,
+ const String & i_sFile,
+ uintt i_nLine)
+{
+ AddValue( aInvalidConstSymbols,
+ i_sText,
+ i_sFile,
+ i_nLine );
+}
+
+void
+Messages::Out_UnresolvedLink( const String & i_sLinkText,
+ const String & i_sFile,
+ uintt i_nLine)
+{
+ AddValue( aUnresolvedLinks,
+ i_sLinkText,
+ i_sFile,
+ i_nLine );
+}
+
+void
+Messages::Out_TypeVsMemberMisuse( const String & i_sLinkText,
+ const String & i_sFile,
+ uintt i_nLine)
+{
+ AddValue( aTypeVsMemberMisuses,
+ i_sLinkText,
+ i_sFile,
+ i_nLine );
+}
+
+Messages &
+Messages::The_()
+{
+ static Messages TheMessages_;
+ return TheMessages_;
+}
+
+void
+Messages::AddValue( MessageMap & o_dest,
+ const String & i_sText,
+ const String & i_sFile,
+ uintt i_nLine )
+{
+ String &
+ rDest = o_dest[Location(i_sFile,i_nLine)];
+ StreamLock
+ slDest(2000);
+ if (NOT rDest.empty())
+ slDest() << rDest;
+ slDest() << "\n " << i_sText;
+ rDest = slDest().c_str();
+}
+
+void
+Messages::WriteParagraph( csv::File & o_out,
+ const MessageMap & i_source,
+ const String & i_title,
+ const String & )
+{
+ StreamStr aLine(2000);
+
+ // Write title of paragraph:
+ aLine << i_title
+ << "\n";
+ o_out.write(aLine.c_str());
+
+ aLine.seekp(0);
+ for (uintt i = i_title.size(); i > 0; --i)
+ {
+ aLine << '-';
+ }
+ aLine << "\n\n";
+ o_out.write(aLine.c_str());
+
+ // Write Content
+ MessageMap::const_iterator it = i_source.begin();
+ MessageMap::const_iterator itEnd = i_source.end();
+ for ( ; it != itEnd; ++it )
+ {
+ aLine.seekp(0);
+ aLine << (*it).first.sFile;
+ // Nobody wants to see this, if we don't know the line:
+ if ((*it).first.nLine != 0)
+ {
+ aLine << ", line "
+ << (*it).first.nLine;
+ }
+ if (NOT (*it).second.empty())
+ {
+ aLine << ':'
+ << (*it).second
+ << "\n";
+ }
+ o_out.write(aLine.c_str());
+ }
+ o_out.write("\n\n\n");
+}
+
+} // namespace autodoc
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/cmd_run.cxx b/autodoc/source/exes/adc_uni/cmd_run.cxx
new file mode 100644
index 000000000000..24eb9f40c746
--- /dev/null
+++ b/autodoc/source/exes/adc_uni/cmd_run.cxx
@@ -0,0 +1,281 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <precomp.h>
+#include "cmd_run.hxx"
+
+
+// NOT FULLY DEFINED SERVICES
+#include <cosv/file.hxx>
+#include <cosv/x.hxx>
+#include <ary/ary.hxx>
+#include <ary/cpp/c_gate.hxx>
+#include <ary/idl/i_ce.hxx>
+#include <ary/idl/i_gate.hxx>
+#include <ary/idl/i_module.hxx>
+#include <ary/idl/ip_ce.hxx>
+#include <autodoc/filecoli.hxx>
+#include <autodoc/parsing.hxx>
+#include <autodoc/prs_code.hxx>
+#include <autodoc/prs_docu.hxx>
+#include <parser/unoidl.hxx>
+#include <adc_cl.hxx>
+#include "adc_cmd_parse.hxx"
+#include "adc_cmds.hxx"
+
+namespace autodoc
+{
+namespace command
+{
+namespace run
+{
+
+Parser::Parser( const Parse & i_command )
+ : rCommand(i_command),
+ pCppParser(),
+ pCppDocuInterpreter(),
+ pIdlParser()
+{
+}
+
+Parser::~Parser()
+{
+}
+
+bool
+Parser::Perform()
+{
+ Cout() << "Parsing the repository "
+ << rCommand.ReposyName()
+ << " ..."
+ << Endl();
+ try
+ {
+ ::ary::Repository &
+ rAry = CommandLine::Get_().TheRepository();
+ rAry.Set_Title(rCommand.ReposyName());
+
+ Dyn< FileCollector_Ifc >
+ pFiles( ParseToolsFactory().Create_FileCollector(6000) );
+
+ bool bIDL = false;
+ bool bCpp = false;
+
+ command::Parse::ProjectIterator
+ itEnd = rCommand.ProjectsEnd();
+ for ( command::Parse::ProjectIterator it = rCommand.ProjectsBegin();
+ it != itEnd;
+ ++it )
+ {
+ uintt nCount = GatherFiles( *pFiles, *(*it) );
+ Cout() << nCount
+ << " files found to parse in project "
+ << (*it)->Name()
+ << "."
+ << Endl();
+
+ switch ( (*it)->Language().eLanguage )
+ {
+ case command::S_LanguageInfo::idl:
+ {
+ Get_IdlParser().Run(*pFiles);
+ bIDL = true;
+ } break;
+ case command::S_LanguageInfo::cpp:
+ {
+ Get_CppParser().Run( *pFiles );
+ bCpp = true;
+ } break;
+ default:
+ Cerr() << "Project in yet unimplemented language skipped."
+ << Endl();
+ }
+ } // end for
+
+ if (bCpp)
+ {
+ rAry.Gate_Cpp().Calculate_AllSecondaryInformation();
+ }
+ if (bIDL)
+ {
+ rAry.Gate_Idl().Calculate_AllSecondaryInformation(
+ rCommand.DevelopersManual_RefFilePath() );
+
+// ::ary::idl::SecondariesPilot &
+// rIdl2sPilot = rAry.Gate_Idl().Secondaries();
+//
+// rIdl2sPilot.CheckAllInterfaceBases( rAry.Gate_Idl() );
+// rIdl2sPilot.Connect_Types2Ces();
+// rIdl2sPilot.Gather_CrossReferences();
+//
+// if (NOT rCommand.DevelopersManual_RefFilePath().empty())
+// {
+// csv::File
+// aFile(rCommand.DevelopersManual_RefFilePath(), csv::CFM_READ);
+// if ( aFile.open() )
+// {
+// rIdl2sPilot.Read_Links2DevManual(aFile);
+// aFile.close();
+// }
+// }
+ } // endif (bIDL)
+
+ return true;
+
+ } // end try
+ catch (csv::Exception & xx)
+ {
+ xx.GetInfo(Cerr());
+ Cerr() << " program will exit." << Endl();
+
+ return false;
+ }
+}
+
+CodeParser_Ifc &
+Parser::Get_CppParser()
+{
+ if ( NOT pCppParser )
+ Create_CppParser();
+ return *pCppParser;
+}
+
+IdlParser &
+Parser::Get_IdlParser()
+{
+ if ( NOT pIdlParser )
+ Create_IdlParser();
+ return *pIdlParser;
+}
+
+void
+Parser::Create_CppParser()
+{
+ pCppParser = ParseToolsFactory().Create_Parser_Cplusplus();
+ pCppDocuInterpreter = ParseToolsFactory().Create_DocuParser_AutodocStyle();
+
+ pCppParser->Setup( CommandLine::Get_().TheRepository(),
+ *pCppDocuInterpreter );
+}
+
+void
+Parser::Create_IdlParser()
+{
+ pIdlParser = new IdlParser(CommandLine::Get_().TheRepository());
+}
+
+const ParseToolsFactory_Ifc &
+Parser::ParseToolsFactory()
+{
+ return ParseToolsFactory_Ifc::GetIt_();
+}
+
+uintt
+Parser::GatherFiles( FileCollector_Ifc & o_rFiles,
+ const S_ProjectData & i_rProject )
+{
+ uintt ret = 0;
+ o_rFiles.EraseAll();
+
+ typedef StringVector StrVector;
+ typedef StrVector::const_iterator StrIterator;
+ const S_Sources &
+ rSources = i_rProject.Sources();
+ const StrVector &
+ rExtensions = i_rProject.Language().aExtensions;
+
+ StrIterator it;
+ StrIterator itTreesEnd = rSources.aTrees.end();
+ StrIterator itDirsEnd = rSources.aDirectories.end();
+ StrIterator itFilesEnd = rSources.aFiles.end();
+ StrIterator itExt;
+ StrIterator itExtEnd = rExtensions.end();
+
+ csv::StreamStr aDir(500);
+ i_rProject.RootDirectory().Get( aDir );
+
+ uintt nProjectDir_AddPosition =
+ ( strcmp(aDir.c_str(),".\\") == 0 OR strcmp(aDir.c_str(),"./") == 0 )
+ ? 0
+ : uintt( aDir.tellp() );
+
+ for ( it = rSources.aDirectories.begin();
+ it != itDirsEnd;
+ ++it )
+ {
+ aDir.seekp( nProjectDir_AddPosition );
+ aDir << *it;
+
+ for ( itExt = rExtensions.begin();
+ itExt != itExtEnd;
+ ++itExt )
+ {
+ ret += o_rFiles.AddFilesFrom( aDir.c_str(),
+ *itExt,
+ FileCollector_Ifc::flat );
+ } // end for itExt
+ } // end for it
+ for ( it = rSources.aTrees.begin();
+ it != itTreesEnd;
+ ++it )
+ {
+ aDir.seekp( nProjectDir_AddPosition );
+ aDir << *it;
+
+ for ( itExt = rExtensions.begin();
+ itExt != itExtEnd;
+ ++itExt )
+ {
+ ret += o_rFiles.AddFilesFrom( aDir.c_str(),
+ *itExt,
+ FileCollector_Ifc::recursive );
+ } // end for itExt
+ } // end for it
+ for ( it = rSources.aFiles.begin();
+ it != itFilesEnd;
+ ++it )
+ {
+ aDir.seekp( nProjectDir_AddPosition );
+ aDir << *it;
+
+ o_rFiles.AddFile( aDir.c_str() );
+ } // end for it
+ ret += rSources.aFiles.size();
+
+ return ret;
+}
+
+
+} // namespace run
+} // namespace command
+} // namespace autodoc
+
+
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/cmd_run.hxx b/autodoc/source/exes/adc_uni/cmd_run.hxx
new file mode 100644
index 000000000000..c316037af492
--- /dev/null
+++ b/autodoc/source/exes/adc_uni/cmd_run.hxx
@@ -0,0 +1,107 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef ADC_CMD_RUN_HXX
+#define ADC_CMD_RUN_HXX
+
+
+
+// USED SERVICES
+ // BASE CLASSES
+#include <cosv/comdline.hxx>
+ // COMPONENTS
+ // PARAMETERS
+
+namespace ary
+{
+ class Repository;
+}
+
+namespace autodoc
+{
+ class FileCollector_Ifc;
+ class ParseToolsFactory_Ifc;
+ class CodeParser_Ifc;
+ class DocumentationParser_Ifc;
+ class IdlParser;
+
+
+namespace command
+{
+ class Parse;
+ class S_ProjectData;
+ struct S_LanguageInfo;
+
+namespace run
+{
+
+/** Performs an ::autodoc::command::Parse .
+*/
+class Parser
+{
+ public:
+ Parser(
+ const Parse & i_command );
+ ~Parser();
+
+ bool Perform();
+
+ private:
+ // Locals
+ CodeParser_Ifc & Get_CppParser();
+ IdlParser & Get_IdlParser();
+ void Create_CppParser();
+ void Create_IdlParser();
+ const ParseToolsFactory_Ifc &
+ ParseToolsFactory();
+ uintt GatherFiles(
+ FileCollector_Ifc & o_rFiles,
+ const S_ProjectData &
+ i_rProject );
+ // DATA
+ const Parse & rCommand;
+
+ Dyn<CodeParser_Ifc> pCppParser;
+ Dyn<DocumentationParser_Ifc>
+ pCppDocuInterpreter;
+ Dyn<IdlParser> pIdlParser;
+};
+
+
+
+
+// IMPLEMENTATION
+
+
+} // namespace run
+} // namespace command
+} // namespace autodoc
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/cmd_sincedata.cxx b/autodoc/source/exes/adc_uni/cmd_sincedata.cxx
new file mode 100644
index 000000000000..bb21028e6f21
--- /dev/null
+++ b/autodoc/source/exes/adc_uni/cmd_sincedata.cxx
@@ -0,0 +1,132 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <precomp.h>
+#include "cmd_sincedata.hxx"
+
+
+// NOT FULLY DEFINED SERVICES
+#include <cosv/file.hxx>
+#include <cosv/tpl/tpltools.hxx>
+#include "adc_cmds.hxx"
+
+
+
+namespace autodoc
+{
+namespace command
+{
+
+SinceTagTransformationData::SinceTagTransformationData()
+ : aTransformationTable()
+{
+}
+
+SinceTagTransformationData::~SinceTagTransformationData()
+{
+}
+
+bool
+SinceTagTransformationData::DoesTransform() const
+{
+ return NOT aTransformationTable.empty();
+}
+
+const String &
+SinceTagTransformationData::DisplayOf( const String & i_versionNumber ) const
+{
+ if (DoesTransform())
+ {
+ StreamLock
+ sl(200);
+ sl() << i_versionNumber;
+ sl().strip_frontback_whitespace();
+ String
+ sVersionNumber(sl().c_str());
+
+ const String *
+ ret = csv::find_in_map(aTransformationTable, sVersionNumber);
+ return ret != 0
+ ? *ret
+ : String::Null_();
+ }
+ else
+ {
+ return i_versionNumber;
+ }
+}
+
+void
+SinceTagTransformationData::do_Init( opt_iter & it,
+ opt_iter itEnd )
+{
+ ++it; // Cur is since-file path.
+
+ CHECKOPT( it != itEnd ,
+ "file path",
+ C_opt_SinceFile );
+
+ csv::File aSinceFile(*it);
+ csv::OpenCloseGuard aSinceFileGuard(aSinceFile);
+ StreamStr sLine(200);
+
+ if (aSinceFileGuard)
+ {
+ for ( sLine.operator_read_line(aSinceFile);
+ NOT sLine.empty();
+ sLine.operator_read_line(aSinceFile) )
+ {
+
+ if (*sLine.begin() != '"')
+ continue;
+
+ const char * pVersion = sLine.c_str() + 1;
+ const char * pVersionEnd = strchr(pVersion, '"');
+ if (pVersionEnd == 0)
+ continue;
+ const char * pDisplay = strchr(pVersionEnd+1, '"');
+ if (pDisplay == 0)
+ continue;
+ ++pDisplay;
+ const char * pDisplayEnd = strchr(pDisplay, '"');
+ if (pDisplayEnd == 0)
+ continue;
+
+ aTransformationTable[ String(pVersion,pVersionEnd) ]
+ = String(pDisplay,pDisplayEnd);
+ sLine.clear();
+ } // end for
+ } // end if
+
+ ++it; // Cur is next option.
+}
+
+} // namespace command
+} // namespace autodoc
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/cmd_sincedata.hxx b/autodoc/source/exes/adc_uni/cmd_sincedata.hxx
new file mode 100644
index 000000000000..f6bb5cac2694
--- /dev/null
+++ b/autodoc/source/exes/adc_uni/cmd_sincedata.hxx
@@ -0,0 +1,94 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef ADC_CMD_SINCEDATA_HXX
+#define ADC_CMD_SINCEDATA_HXX
+
+
+
+// USED SERVICES
+ // BASE CLASSES
+#include "adc_cmd.hxx"
+ // COMPONENTS
+ // PARAMETERS
+
+namespace autodoc
+{
+namespace command
+{
+
+
+/** Provides replacements for the contents of the @@since documentation tag.
+
+ Because the @@since tag is part of the source code, it allows only one kind
+ of version information there. If this is to be mapped for different products
+ (example: from OpenOffice.org versions in the @@since tag to StarOffice or
+ StarSuite products), the value of @@since needs a replacement, which is provided
+ by this class.
+
+*/
+class SinceTagTransformationData : public Context
+{
+ public:
+ /** The key of this map are the version numbers within @since.
+ The value is the string to display for each version number.
+ */
+ typedef std::map<String,String> Map_Version2Display;
+
+ // LIFECYCLE
+ SinceTagTransformationData();
+ virtual ~SinceTagTransformationData();
+
+ // INQUIRY
+ /// False, if no transformation table exists.
+ bool DoesTransform() const;
+
+ /** Gets the string to display for a version number.
+
+ @param i_sVersionNumber
+ Usually should be the result of ->StripSinceTagValue().
+ */
+ const String & DisplayOf(
+ const String & i_sVersionNumber ) const;
+ private:
+ // Interface Context:
+ virtual void do_Init(
+ opt_iter & i_nCurArgsBegin,
+ opt_iter i_nEndOfAllArgs );
+ // DATA
+ Map_Version2Display aTransformationTable;
+};
+
+
+} // namespace command
+} // namespace autodoc
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/main.cxx b/autodoc/source/exes/adc_uni/main.cxx
new file mode 100644
index 000000000000..f0f0b89d34a4
--- /dev/null
+++ b/autodoc/source/exes/adc_uni/main.cxx
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <precomp.h>
+
+
+// NOT FULLY DECLARED SERVICES
+
+#include <adc_cl.hxx>
+#include "cmd_run.hxx"
+
+
+int
+#ifdef WNT
+ _cdecl
+#endif
+main( int argc,
+ char * argv[] )
+{
+ autodoc::CommandLine aCL;
+ aCL.Init(argc, argv);
+ if (NOT aCL.CheckParameters() )
+ return 1;
+
+ int ret = aCL.Run();
+ return ret;
+}
+
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/autodoc/source/exes/adc_uni/makefile.mk b/autodoc/source/exes/adc_uni/makefile.mk
new file mode 100644
index 000000000000..8baea0830233
--- /dev/null
+++ b/autodoc/source/exes/adc_uni/makefile.mk
@@ -0,0 +1,104 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=..$/..$/..
+
+PRJNAME=autodoc
+TARGET=autodoc
+TARGETTYPE=CUI
+
+# --- Settings -----------------------------------------------------
+
+ENABLE_EXCEPTIONS=true
+PRJINC=$(PRJ)$/source
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/source$/mkinc$/fullcpp.mk
+
+UWINAPILIB=$(0)
+LIBSALCPPRT=$(0)
+
+# --- Files --------------------------------------------------------
+
+OBJFILES= \
+ $(OBJ)$/adc_cl.obj \
+ $(OBJ)$/adc_cmd_parse.obj \
+ $(OBJ)$/adc_cmds.obj \
+ $(OBJ)$/adc_msg.obj \
+ $(OBJ)$/cmd_run.obj \
+ $(OBJ)$/cmd_sincedata.obj
+
+
+# --- Targets ------------------------------------------------------
+
+LIB1TARGET=$(LB)$/atdoc.lib
+LIB1FILES= \
+ $(LB)$/$(TARGET).lib $(LB)$/autodoc_tools.lib \
+ $(LB)$/ary_kernel.lib $(LB)$/ary_cpp.lib $(LB)$/ary_idl.lib \
+ $(LB)$/ary_info.lib $(LB)$/ary_loc.lib \
+ $(LB)$/parser_kernel.lib $(LB)$/parser_tokens.lib $(LB)$/parser_semantic.lib \
+ $(LB)$/parser_cpp.lib $(LB)$/parser_adoc.lib \
+ $(LB)$/display_kernel.lib $(LB)$/display_html.lib $(LB)$/display_idl.lib \
+ $(LB)$/display_toolkit.lib $(LB)$/parser2_tokens.lib \
+ $(LB)$/parser2_s2_luidl.lib $(LB)$/parser2_s2_dsapi.lib \
+ $(LB)$/ary2_cinfo.lib $(LB)$/ary_doc.lib
+
+
+
+APP1TARGET= $(TARGET)
+APP1STACK= 1000000
+APP1OBJS= $(OBJ)$/main.obj
+
+APP1RPATH=SDK
+
+.IF "$(GUI)"=="WNT"
+APP1STDLIBS= $(LIBSTLPORT) $(COSVLIB) $(UDMLIB)
+.ELSE
+.IF "$(OS)"=="MACOSX"
+# See <http://porting.openoffice.org/servlets/ReadMsg?list=mac&msgNo=6911>:
+APP1STDLIBS= $(LIBSTLPORT) -Wl,-all_load -ludm -lcosv
+.ELSE
+APP1STDLIBS= -lcosv -ludm
+.ENDIF
+.ENDIF
+
+APP1LIBS=$(LB)$/atdoc.lib
+
+DEPOBJFILES += $(APP1OBJS)
+
+APP1DEPN= $(LB)$/$(TARGET).lib $(LB)$/autodoc_tools.lib \
+ $(LB)$/ary_kernel.lib $(LB)$/ary_cpp.lib $(LB)$/ary_idl.lib \
+ $(LB)$/ary_info.lib $(LB)$/ary_loc.lib \
+ $(LB)$/parser_kernel.lib $(LB)$/parser_tokens.lib $(LB)$/parser_semantic.lib \
+ $(LB)$/parser_cpp.lib $(LB)$/parser_adoc.lib \
+ $(LB)$/display_kernel.lib $(LB)$/display_html.lib $(LB)$/display_idl.lib \
+ $(LB)$/display_toolkit.lib $(LB)$/parser2_tokens.lib \
+ $(LB)$/parser2_s2_luidl.lib $(LB)$/parser2_s2_dsapi.lib \
+ $(LB)$/ary2_cinfo.lib $(LB)$/ary_doc.lib
+
+
+.INCLUDE : target.mk
diff --git a/autodoc/source/exes/adc_uni/spec-CommandLine.txt b/autodoc/source/exes/adc_uni/spec-CommandLine.txt
new file mode 100644
index 000000000000..756b3184a2e4
--- /dev/null
+++ b/autodoc/source/exes/adc_uni/spec-CommandLine.txt
@@ -0,0 +1,181 @@
+ Command Line Options
+ --------------------
+
+autodoc [-v <level>]
+ -html <out>
+ [-extroot <externroot> -extnsp <externnamespace>]
+ -lg <proglang>
+ [-t <sourcetree>[ <sourcetree> ...]
+ [-d <sourcedir>[ <sourcedir> ...]
+ [-f <sourcefile>[ <sourcefile> ...]
+
+
+ -html <OutputDirectory>
+ Directory where the output will be created.
+
+ -lg <ProgrammingLanguage>
+ Allowed values: "c++" or "idl"
+
+ -extroot <externroot>
+ Only together with "-lg idl" and -extnsp.
+ Links to code entities not found within the current parsed
+ code, will be linked there, but only if -extnsp is given and
+ the linked entity is in the given namespace.
+ <externroot> is a http link, it needs no "http://" at the
+ beginning nor slash at the end.
+
+ -extnsp <externnamespace>
+ Only together with "-lg idl" and -extroot.
+ If a code entity is not found in the current parsed code, but
+ dwells in the namespace (or its children) given here, it is
+ linked into the locátion given by -extroot.
+ <externnamespace> is an absolute qualified namespace,
+ starting with "::".
+
+ -t <SourceTree>*
+ Directory with all subdirectories.
+
+ -d <SourceDirectory>*
+ Directory without subdirectories.
+
+ -f <SourceFile>*
+ Any file. Here also files with extensions not matching the
+ language are accepted.
+
+ -I:<ResponseFile>
+ Each line in the response file has to have one command line
+ option. No whitespace at start of line.
+
+ -C:<ConfigurationFile>
+ Format see below.
+
+ -v <VerboseLevel>
+ Only for debugging. Bits 1, 2 and 4 in any combination give
+ different output.
+
+ -h
+ Displays help.
+ -?
+ Displays help.
+
+
+
+
+
+ Command Line Options especially for the OpenOffice.org SDK
+ ----------------------------------------------------------
+
+ -dvgroot <DevelopersGuide>
+ Root directory of the SDK Developers Guide.
+
+ -dvgfile <ReferenceFile>
+ File with references to the SDK Developers Guide.
+
+ -sincefile <@since-AssociationFile>
+ File that maps OpenOffice versions to the wished displayed version names.
+
+ -idlref <IdlDocumentationRoot> <Namespace[,Namespace ...]>
+ Gives the outputdirectory of an IDL documentation, where
+ symbols not found in the currently parsed namespaces of C++
+ or Java can be found.
+
+
+
+ Configure File Format
+ ---------------------
+
+<AutodocConfiguration>
+ <RepositoryName></RepositoryName>
+ // Base name of the binary repository files.
+ // Has to be a valid file name.
+
+ <HtmlOutputTitle></HtmlOutputTitle>
+ // Title on the "welcome page" of the created HTML documentation.
+ // Can be any text.
+
+ <CppExtensions></CppExtensions>
+ // Overwrites the default. Default is: .hxx .h .hpp
+ // Format: File extensions with a dot in front, like ".hcc".
+
+ <IdlExtensions></IdlExtensions>
+ // Overwrites the default. Default is: .idl
+ // Format: File extensions with a dot in front, like ".txt".
+
+ <CppDocu html="(on|off) off"/>
+
+ <IdlDocu html="(on|off) on"/>
+
+</AutodocConfiguration>
+
+
+
+
+
+
+ Historical Command Line Options
+ -------------------------------
+
+autodoc.exe
+ [ -v <VerboseNr> ]
+ -html <OutputDirectory>
+ {
+ [ -parse ]
+ [ -name <RepositoryName> ]
+ -lg <ProgrammingLanguage>
+ {
+ [ -p <ProjectName> <ProjectRootDirectory> ]
+ {
+ -t <SourceDirectory>*
+ -d <SourceDirectory>*
+ -f <SourceFile>*
+ }+
+ }+
+ }
+
+Legend:
+ <Text>
+ command line parameter
+ [ ]
+ optional
+ { }
+ Block of connected options.
+ The sequence of not connected options does not matter. So the -html or -v options can be used before or after all the parsing options.
+ +
+ once or more times
+ *
+ none or more times
+
+
+Explanation of the Options
+ -v <VerboseNr> Only for debugging. Bits 1, 2 and 4 in any combination give different output.
+ -html <OutputDirectory>
+ Gives the directory, where a HTML version of the docu shall be generated.
+ -parse Starts the block, where all the parse options are given. This can be omitted, because the parse options are identifiable without it, but it may make a commandline more readable.
+ -name <RepositoryName> This name appears as title of the documentation (currently only in the in the C++ version).
+ -lg <ProgrammingLanguage>
+
+
+ Possible values are:
+
+ c++
+ This parses all files with the endings .hxx and .h .
+ idl
+ This parses all files with the ending .idl .
+
+ -p with -t/-d/-f: If there are more than one project, the -p option is required for each one.
+
+ The directory given wit the -p option is the root directory of the project.
+ If there is no -p option, the working directory is seen as root.
+
+ All paths given with -t/-d/-f are relative to that root directory. It is possible to use "." as argument for -t or -d.
+
+ Each of -t/-d/-f can have several arguments:
+ One could write "-f file1.hxx file2.hxx file_xyz.hxx"
+ After each -p (or after -lg, if there is no -p option), there has to be at least one of the following three:
+ -t Tree, which means: include subdirectories
+ -d Directory, which means: no subdirectories
+ -f File", which means: single file name with ending.
+ This option also allows to parse some files with an ending different from those, the -lg option implies.
+
+
+
diff --git a/autodoc/source/exes/adc_uni/spec-DevGuideReferenceFile.txt b/autodoc/source/exes/adc_uni/spec-DevGuideReferenceFile.txt
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/autodoc/source/exes/adc_uni/spec-DevGuideReferenceFile.txt
diff --git a/autodoc/source/exes/adc_uni/spec-SinceTag_Handling.txt b/autodoc/source/exes/adc_uni/spec-SinceTag_Handling.txt
new file mode 100644
index 000000000000..7cf264e76be3
--- /dev/null
+++ b/autodoc/source/exes/adc_uni/spec-SinceTag_Handling.txt
@@ -0,0 +1,49 @@
+ General Handling
+ ----------------
+
+- The developer inserts the OpenOffice.org version into the @since tag.
+
+- @since-Tag may contain any string which needs to end with a Version number.
+ The first cipher following immediately on a white space is interpreted as start of the version number.
+
+- The @since Tag must stay completely within one line to allow tool support for retargeting.
+
+- To replace @since entries in the generated documentation, one needs to use
+ the command line option
+
+ -sincefile <TransformationFile-path>
+
+ This option has to occur immediately after the -html option.
+ If this option is not given, the original text of the @since tag is
+ displayed.
+
+ If the TransformationFile does not contain a specific entry,
+ nothing is displayed for this entry.
+
+
+
+ Format of the @since Tag Transformation File
+ --------------------------------------------
+
+Example
+-------
+
+***** BEGIN OF FILE ******
+"1.1" "StarOffice 7.0"
+"2.0" "StarOffice 8.0"
+"2.1" "StarOffice 9.0"
+***** END OF FILE ******
+
+
+
+Rules and Restrictions
+----------------------
+
+* Each line contains two strings within "".
+ The first string is the OpenOffice.org version number which is found in the @since tag.
+ The second string is the string to display for this version.
+* No specific order among product versions is needed.
+* Empty lines and whitespaces are allowed, except:
+ - Non empty lines must not start with white space.
+ - Within OpenOffice.org version strings, no whitespace is allowed.
+* Whitespace within display strings is displayed as it is.