1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
30 #include "adc_cmds.hxx"
33 // NOT FULLY DEFINED SERVICES
34 #include <ary/ary.hxx>
35 #include <autodoc/displaying.hxx>
36 #include <autodoc/dsp_html_std.hxx>
37 #include <display/corframe.hxx>
46 extern const String
C_opt_Include("-I:");
48 extern const String
C_opt_Verbose("-v");
50 extern const String
C_opt_Parse("-parse");
51 extern const String
C_opt_Name("-name");
52 extern const String
C_opt_LangAll("-lg");
53 extern const String
C_opt_ExtensionsAll("-extg");
54 extern const String
C_opt_DevmanFile("-dvgfile");
55 extern const String
C_opt_SinceFile("-sincefile");
57 extern const String
C_arg_Idl("idl");
59 extern const String
C_opt_Project("-p");
60 //extern const String C_opt_Lang;
61 //extern const String C_opt_Extensions;
62 extern const String
C_opt_SourceDir("-d");
63 extern const String
C_opt_SourceTree("-t");
64 extern const String
C_opt_SourceFile("-f");
66 extern const String
C_opt_CreateHtml("-html");
67 extern const String
C_opt_DevmanRoot("-dvgroot");
69 //extern const String C_opt_CreateXml("-xml");
70 //extern const String C_opt_Load("-load");
71 //extern const String C_opt_Save("-save");
73 extern const String
C_opt_ExternNamespace("-extnsp");
74 extern const String
C_opt_ExternRoot("-extroot");
78 //************************** CreateHTML ***********************//
80 CreateHtml::CreateHtml()
81 : sOutputRootDirectory(),
82 sDevelopersManual_HtmlRoot()
86 CreateHtml::~CreateHtml()
91 CreateHtml::do_Init( opt_iter
& it
,
95 CHECKOPT( it
!= itEnd
&& (*it
).char_at(0) != '-',
96 "output directory", C_opt_CreateHtml
);
97 sOutputRootDirectory
= *it
;
100 it
!= itEnd
AND (*it
== C_opt_DevmanRoot
);
103 if (*it
== C_opt_DevmanRoot
)
106 CHECKOPT( it
!= itEnd
AND (*it
).char_at(0) != '-',
107 "HTML root directory of Developers Guide",
109 sDevelopersManual_HtmlRoot
= *it
;
115 CreateHtml::do_Run() const
117 if ( CommandLine::Get_().IdlUsed() )
123 CreateHtml::inq_RunningRank() const
125 return static_cast<int>(rank_CreateHtml
);
129 CreateHtml::run_Idl() const
131 const ary::idl::Gate
&
132 rGate
= CommandLine::Get_().TheRepository().Gate_Idl();
134 Cout() << "Creating HTML-output into the directory "
135 << sOutputRootDirectory
139 const DisplayToolsFactory_Ifc
&
140 rToolsFactory
= DisplayToolsFactory_Ifc::GetIt_();
141 Dyn
<autodoc::HtmlDisplay_Idl_Ifc
>
142 pDisplay( rToolsFactory
.Create_HtmlDisplay_Idl() );
144 DYN
display::CorporateFrame
& // KORR_FUTURE: Remove the need for const_cast
145 drFrame
= const_cast< display::CorporateFrame
& >(rToolsFactory
.Create_StdFrame());
146 if (NOT
DevelopersManual_HtmlRoot().empty())
147 drFrame
.Set_DevelopersGuideHtmlRoot( DevelopersManual_HtmlRoot() );
149 pDisplay
->Run( sOutputRootDirectory
,
154 } // namespace command
155 } // namespace autodoc
157 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */