10841af79SAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
30841af79SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
40841af79SAndrew Rist * or more contributor license agreements. See the NOTICE file
50841af79SAndrew Rist * distributed with this work for additional information
60841af79SAndrew Rist * regarding copyright ownership. The ASF licenses this file
70841af79SAndrew Rist * to you under the Apache License, Version 2.0 (the
80841af79SAndrew Rist * "License"); you may not use this file except in compliance
90841af79SAndrew Rist * with the License. You may obtain a copy of the License at
100841af79SAndrew Rist *
110841af79SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
120841af79SAndrew Rist *
130841af79SAndrew Rist * Unless required by applicable law or agreed to in writing,
140841af79SAndrew Rist * software distributed under the License is distributed on an
150841af79SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
160841af79SAndrew Rist * KIND, either express or implied. See the License for the
170841af79SAndrew Rist * specific language governing permissions and limitations
180841af79SAndrew Rist * under the License.
190841af79SAndrew Rist *
200841af79SAndrew Rist *************************************************************/
21cdf0e10cSrcweir
22cdf0e10cSrcweir #include <precomp.h>
23cdf0e10cSrcweir #include <cfrstd.hxx>
24cdf0e10cSrcweir
25cdf0e10cSrcweir
26cdf0e10cSrcweir // NOT FULLY DEFINED SERVICES
27cdf0e10cSrcweir #include <time.h>
28cdf0e10cSrcweir
29cdf0e10cSrcweir
30cdf0e10cSrcweir /* CSS Styles
31cdf0e10cSrcweir ----------
32cdf0e10cSrcweir
33cdf0e10cSrcweir Colors:
34cdf0e10cSrcweir - light background color #eeeeff
35cdf0e10cSrcweir - dark background color #ccccff
36cdf0e10cSrcweir - self in navibar background color #2222ad
37cdf0e10cSrcweir
38cdf0e10cSrcweir
39cdf0e10cSrcweir Fonts:
40cdf0e10cSrcweir - page title 20, bold, Arial
41cdf0e10cSrcweir - navibar main 12, bold, Arial
42cdf0e10cSrcweir - navibar sub 8, Arial, kapit�lchen
43cdf0e10cSrcweir - attrtable title line 8, bold, Arial, kapit�lchen
44cdf0e10cSrcweir - attrtable value line 8, Arial kapit�lchen
45cdf0e10cSrcweir
46cdf0e10cSrcweir - namespace chain 13, bold
47cdf0e10cSrcweir - table title 13, bold
48cdf0e10cSrcweir - template line 13
49cdf0e10cSrcweir
50cdf0e10cSrcweir - member paragraph title 12, bold
51cdf0e10cSrcweir
52cdf0e10cSrcweir - docu paragraph title 11, bold
53cdf0e10cSrcweir - standard text 11
54cdf0e10cSrcweir
55cdf0e10cSrcweir - hierarchy 11, monospace
56cdf0e10cSrcweir
57cdf0e10cSrcweir
58cdf0e10cSrcweir classes:
59cdf0e10cSrcweir
60cdf0e10cSrcweir td.title page title
61cdf0e10cSrcweir h3 table title
62cdf0e10cSrcweir h4 member paragraph title
63cdf0e10cSrcweir
64cdf0e10cSrcweir td.nmain navigation main bar
65cdf0e10cSrcweir td.nsub navigation sub bar
66cdf0e10cSrcweir a.nmain links in navigation main bar
67cdf0e10cSrcweir a.nsub links in navigation sub bar
68cdf0e10cSrcweir
69cdf0e10cSrcweir td.attr1 attribute table head line
70cdf0e10cSrcweir td.attr2 attribute table value line
71cdf0e10cSrcweir
72cdf0e10cSrcweir p.namechain namespace chain in head of pages
73cdf0e10cSrcweir p.tpl template line in head of pages
74cdf0e10cSrcweir
75cdf0e10cSrcweir pre.doc preformatted docu
76cdf0e10cSrcweir pre.hierarchy class bases hierarchy graphic
77cdf0e10cSrcweir
78cdf0e10cSrcweir dl.syntax function- or variable-declaration field
79cdf0e10cSrcweir a.syntax link in function- or variable-declaration field
80cdf0e10cSrcweir
81cdf0e10cSrcweir p.dt docu paragraph title
82cdf0e10cSrcweir dl.dt docu paragraph title
83cdf0e10cSrcweir
84cdf0e10cSrcweir p standard text
85cdf0e10cSrcweir dl standard text
86cdf0e10cSrcweir dd standard text
87cdf0e10cSrcweir */
88cdf0e10cSrcweir
89cdf0e10cSrcweir
90cdf0e10cSrcweir #define CRLF "\n"
91cdf0e10cSrcweir
92cdf0e10cSrcweir namespace
93cdf0e10cSrcweir {
94cdf0e10cSrcweir
95cdf0e10cSrcweir bool bUse_OOoFrameDiv = true;
96cdf0e10cSrcweir
97cdf0e10cSrcweir
98cdf0e10cSrcweir //*************** These are used for IDL currently only! ********************
99cdf0e10cSrcweir
100cdf0e10cSrcweir const char * const C_sStdStyle =
101*6f51c329SHerbert Dürr "/*See bottom of file for explanations.*/" CRLF
102cdf0e10cSrcweir CRLF
103*6f51c329SHerbert Dürr "body { background-color:#ffffff; }" CRLF
104cdf0e10cSrcweir CRLF
105*6f51c329SHerbert Dürr "h3 { font-size:13pt; font-weight:bold;" CRLF
106*6f51c329SHerbert Dürr " margin-top:3pt; margin-bottom:1pt; }" CRLF
107*6f51c329SHerbert Dürr "p, dt, dd, pre { font-size:11pt;" CRLF
108*6f51c329SHerbert Dürr " margin-top:3pt; margin-bottom:1pt; }" CRLF
109*6f51c329SHerbert Dürr "pre { font-family:monospace; }" CRLF
110cdf0e10cSrcweir CRLF
111*6f51c329SHerbert Dürr "table.navimain { background-color:#eeeeff; }" CRLF
112*6f51c329SHerbert Dürr "table.subtitle { margin-top:6pt; margin-bottom:6pt; }" CRLF
113cdf0e10cSrcweir CRLF
114*6f51c329SHerbert Dürr "td { font-size:11pt; }" CRLF
115*6f51c329SHerbert Dürr "td.title { font-family: Arial; font-size:19pt; font-weight:bold;" CRLF
116*6f51c329SHerbert Dürr " line-height:30pt; background-color:#ccccff; text-align:center; }" CRLF
117*6f51c329SHerbert Dürr "td.subtitle { font-family: Arial; font-size:13pt;" CRLF
118*6f51c329SHerbert Dürr " line-height:20pt; background-color:#ccccff; }" CRLF
119*6f51c329SHerbert Dürr "td.crosstitle { font-size:12pt; font-weight:bold;" CRLF
120*6f51c329SHerbert Dürr " line-height:15pt; background-color:#eeeeff; }" CRLF
121*6f51c329SHerbert Dürr "td.imdetail { width:100%; background-color:#eeeeff; }" CRLF
122cdf0e10cSrcweir CRLF
123*6f51c329SHerbert Dürr "td.imsum_left { width:30%; }" CRLF
124*6f51c329SHerbert Dürr "td.imsum_right { width:70%; }" CRLF
125cdf0e10cSrcweir CRLF
126*6f51c329SHerbert Dürr "td.navimain, a.navimain" CRLF
127*6f51c329SHerbert Dürr " { text-align:center; font-family: Arial; font-size:12pt; font-weight:bold; }" CRLF
128*6f51c329SHerbert Dürr "td.navimainself { text-align:center; font-family: Arial; font-size:12pt; font-weight:bold;" CRLF
129*6f51c329SHerbert Dürr " color:#ffffff; background-color:#2222ad; }" CRLF
130*6f51c329SHerbert Dürr "td.navimainnone { text-align:center; font-family: Arial; font-size:12pt; }" CRLF
131*6f51c329SHerbert Dürr "td.navisub, a.navisub" CRLF
132*6f51c329SHerbert Dürr " { text-align:center; font-family: Arial; font-size:9pt; font-variant:small-caps; }" CRLF
133*6f51c329SHerbert Dürr "td.navimain, td.navisub" CRLF
134*6f51c329SHerbert Dürr " { padding-left:7pt; padding-right:7pt; }" CRLF
135cdf0e10cSrcweir CRLF
136*6f51c329SHerbert Dürr "a.membertitle { font-size:12pt; font-weight:bold; line-height:18pt; }" CRLF
137*6f51c329SHerbert Dürr "a.navimain, a.navisub { color:#000000; }" CRLF
138*6f51c329SHerbert Dürr ".dt { font-weight:bold; }" CRLF
139*6f51c329SHerbert Dürr ".namechain { font-size:13pt; font-weight:bold;" CRLF
140*6f51c329SHerbert Dürr " margin-top:3pt; margin-bottom:6pt; }" CRLF
141*6f51c329SHerbert Dürr ".title2 { font-size:13pt; font-style:italic; font-weight:bold; text-align:left; }" CRLF
142cdf0e10cSrcweir ;
143cdf0e10cSrcweir
144cdf0e10cSrcweir
145cdf0e10cSrcweir const char * const C_sCssExplanations =
146*6f51c329SHerbert Dürr "/* Explanation of CSS classes:" CRLF
147cdf0e10cSrcweir CRLF
148*6f51c329SHerbert Dürr ".navimain Text in main navigation bar." CRLF
149*6f51c329SHerbert Dürr ".navisub Text in lower navigation bar." CRLF
150*6f51c329SHerbert Dürr "td.navimainself Cell in main navigation bar with \"selected\" shadow: You are here." CRLF
151*6f51c329SHerbert Dürr "td.navimainnone Cell in main navigation bar with no link." CRLF
152cdf0e10cSrcweir CRLF
153*6f51c329SHerbert Dürr ".namechain Line with current module path." CRLF
154cdf0e10cSrcweir CRLF
155*6f51c329SHerbert Dürr "td.crosstitle Comment box for bases (base interfaces etc.)" CRLF
156*6f51c329SHerbert Dürr "td.imsum_left Left part of such boxes." CRLF
157*6f51c329SHerbert Dürr "td.imsum_right Right part of such boxes." CRLF
158cdf0e10cSrcweir CRLF
159*6f51c329SHerbert Dürr "td.title Main title of the page like \"interface XYz\"" CRLF
160*6f51c329SHerbert Dürr ".subtitle Tables, and head cells of those, which list members" CRLF
161*6f51c329SHerbert Dürr " like \"method summary\" and \"method details\"." CRLF
162cdf0e10cSrcweir CRLF
163*6f51c329SHerbert Dürr "td.imdetail Background table of method's detail description." CRLF
164*6f51c329SHerbert Dürr "a.membertitle Method name (as jump label) in method's detail" CRLF
165*6f51c329SHerbert Dürr " description." CRLF
166*6f51c329SHerbert Dürr ".title2 smaller font prefixes to page titles" CRLF
167*6f51c329SHerbert Dürr "*/" CRLF
168cdf0e10cSrcweir ;
169cdf0e10cSrcweir
170cdf0e10cSrcweir const char * const C_sStdStyle_withDivFrame =
171*6f51c329SHerbert Dürr "/*See bottom of file for explanations.*/" CRLF
172cdf0e10cSrcweir CRLF
173*6f51c329SHerbert Dürr "body { background-color:#ffffff; }" CRLF
174cdf0e10cSrcweir CRLF
175*6f51c329SHerbert Dürr "#adc-idlref h3 { font-size:13pt; font-weight:bold;" CRLF
176*6f51c329SHerbert Dürr " margin-top:3pt; margin-bottom:1pt; }" CRLF
177*6f51c329SHerbert Dürr "#adc-idlref p, #adc-idlref dt, #adc-idlref dd, #adc-idlref pre" CRLF
178*6f51c329SHerbert Dürr " { font-size:11pt;" CRLF
179*6f51c329SHerbert Dürr " margin-top:3pt; margin-bottom:1pt; }" CRLF
180*6f51c329SHerbert Dürr "#adc-idlref pre { font-family:monospace; }" CRLF
181cdf0e10cSrcweir CRLF
182*6f51c329SHerbert Dürr "#adc-idlref table.navimain { background-color:#eeeeff; }" CRLF
183*6f51c329SHerbert Dürr "#adc-idlref table.subtitle { margin-top:6pt; margin-bottom:6pt; }" CRLF
184cdf0e10cSrcweir CRLF
185*6f51c329SHerbert Dürr "#adc-idlref td { font-size:11pt; }" CRLF
186*6f51c329SHerbert Dürr "#adc-idlref td.title { font-family: Arial; font-size:19pt; font-weight:bold;" CRLF
187*6f51c329SHerbert Dürr " line-height:30pt; background-color:#ccccff; text-align:center; }" CRLF
188*6f51c329SHerbert Dürr "#adc-idlref td.subtitle { font-family: Arial; font-size:13pt;" CRLF
189*6f51c329SHerbert Dürr " line-height:20pt; background-color:#ccccff; }" CRLF
190*6f51c329SHerbert Dürr "#adc-idlref td.crosstitle { font-size:12pt; font-weight:bold;" CRLF
191*6f51c329SHerbert Dürr " line-height:15pt; background-color:#eeeeff; }" CRLF
192*6f51c329SHerbert Dürr "#adc-idlref td.imdetail { width:100%; background-color:#eeeeff; }" CRLF
193cdf0e10cSrcweir CRLF
194*6f51c329SHerbert Dürr "#adc-idlref td.imsum_left { width:30%; }" CRLF
195*6f51c329SHerbert Dürr "#adc-idlref td.imsum_right { width:70%; }" CRLF
196cdf0e10cSrcweir CRLF
197*6f51c329SHerbert Dürr "#adc-idlref td.navimain, #adc-idlref a.navimain" CRLF
198*6f51c329SHerbert Dürr " { text-align:center; font-family: Arial; font-size:12pt; font-weight:bold; }" CRLF
199*6f51c329SHerbert Dürr "#adc-idlref td.navimainself { text-align:center; font-family: Arial; font-size:12pt; font-weight:bold;" CRLF
200*6f51c329SHerbert Dürr " color:#ffffff; background-color:#2222ad; }" CRLF
201*6f51c329SHerbert Dürr "#adc-idlref td.navimainnone { text-align:center; font-family: Arial; font-size:12pt; }" CRLF
202*6f51c329SHerbert Dürr "#adc-idlref td.navisub, #adc-idlref a.navisub" CRLF
203*6f51c329SHerbert Dürr " { text-align:center; font-family: Arial; font-size:9pt; font-variant:small-caps; }" CRLF
204*6f51c329SHerbert Dürr "#adc-idlref td.navimain, #adc-idlref td.navisub" CRLF
205*6f51c329SHerbert Dürr " { padding-left:7pt; padding-right:7pt; }" CRLF
206cdf0e10cSrcweir CRLF
207*6f51c329SHerbert Dürr "#adc-idlref a.membertitle { font-size:12pt; font-weight:bold; line-height:18pt; }" CRLF
208*6f51c329SHerbert Dürr "#adc-idlref a.navimain, #adc-idlref a.navisub { color:#000000; }" CRLF
209*6f51c329SHerbert Dürr "#adc-idlref .dt { font-weight:bold; }" CRLF
210*6f51c329SHerbert Dürr "#adc-idlref .namechain { font-size:13pt; font-weight:bold;" CRLF
211*6f51c329SHerbert Dürr " margin-top:3pt; margin-bottom:6pt; }" CRLF
212*6f51c329SHerbert Dürr "#adc-idlref .title2 { font-size:13pt; font-style:italic; font-weight:bold; text-align:left; }" CRLF
213*6f51c329SHerbert Dürr "" CRLF
214*6f51c329SHerbert Dürr "#adc-idlref table { empty-cells:show; }" CRLF
215*6f51c329SHerbert Dürr "" CRLF
216*6f51c329SHerbert Dürr "#adc-idlref .childlist td, " CRLF
217*6f51c329SHerbert Dürr "#adc-idlref .commentedlinks td, " CRLF
218*6f51c329SHerbert Dürr "#adc-idlref .memberlist td, " CRLF
219*6f51c329SHerbert Dürr "#adc-idlref .subtitle td, " CRLF
220*6f51c329SHerbert Dürr "#adc-idlref .crosstitle td { border: .1pt solid #000000; }" CRLF
221*6f51c329SHerbert Dürr "" CRLF
222*6f51c329SHerbert Dürr "#adc-idlref .flag-table td { border: .1pt solid #cccccc; } " CRLF
223*6f51c329SHerbert Dürr "" CRLF
224*6f51c329SHerbert Dürr "#adc-idlref .title-table td, " CRLF
225*6f51c329SHerbert Dürr "#adc-idlref .table-in-method td, " CRLF
226*6f51c329SHerbert Dürr "#adc-idlref .table-in-data td, " CRLF
227*6f51c329SHerbert Dürr "#adc-idlref .navimain td, " CRLF
228*6f51c329SHerbert Dürr "#adc-idlref .navisub td, " CRLF
229*6f51c329SHerbert Dürr "#adc-idlref .expl-table td, " CRLF
230*6f51c329SHerbert Dürr "#adc-idlref .param-table td { border: none; }" CRLF
231cdf0e10cSrcweir ;
232cdf0e10cSrcweir
233cdf0e10cSrcweir
234cdf0e10cSrcweir } // anonymous namespace
235cdf0e10cSrcweir
236cdf0e10cSrcweir
StdFrame()237cdf0e10cSrcweir StdFrame::StdFrame()
238cdf0e10cSrcweir : sDevelopersGuideHtmlRoot(),
239cdf0e10cSrcweir bSimpleLinks(false)
240cdf0e10cSrcweir {
241cdf0e10cSrcweir }
242cdf0e10cSrcweir
243cdf0e10cSrcweir DYN Html_Image *
LogoSrc() const244cdf0e10cSrcweir StdFrame::LogoSrc() const
245cdf0e10cSrcweir {
246cdf0e10cSrcweir return 0;
247cdf0e10cSrcweir
248cdf0e10cSrcweir // return new Html_Image( "logodot-blu.gif",
249cdf0e10cSrcweir // "109",
250cdf0e10cSrcweir // "54",
251cdf0e10cSrcweir // "RIGHT",
252cdf0e10cSrcweir // "0",
253cdf0e10cSrcweir // "OpenOffice" );
254cdf0e10cSrcweir
255cdf0e10cSrcweir }
256cdf0e10cSrcweir
257cdf0e10cSrcweir const char *
LogoLink() const258cdf0e10cSrcweir StdFrame::LogoLink() const
259cdf0e10cSrcweir {
260cdf0e10cSrcweir return "";
261cdf0e10cSrcweir // return "http://www.sun.com";
262cdf0e10cSrcweir // return "http://www.openoffice.org";
263cdf0e10cSrcweir }
264cdf0e10cSrcweir
265cdf0e10cSrcweir
266cdf0e10cSrcweir String MakeCopyRight();
267cdf0e10cSrcweir
268cdf0e10cSrcweir const char *
CopyrightText() const269cdf0e10cSrcweir StdFrame::CopyrightText() const
270cdf0e10cSrcweir {
271cdf0e10cSrcweir static String sCopyRight_( MakeCopyRight() );
272cdf0e10cSrcweir return sCopyRight_.c_str();
273cdf0e10cSrcweir }
274cdf0e10cSrcweir
275cdf0e10cSrcweir const char *
CssStyle() const276cdf0e10cSrcweir StdFrame::CssStyle() const
277cdf0e10cSrcweir {
278cdf0e10cSrcweir if (bUse_OOoFrameDiv)
279cdf0e10cSrcweir return C_sStdStyle_withDivFrame;
280cdf0e10cSrcweir else
281cdf0e10cSrcweir return C_sStdStyle;
282cdf0e10cSrcweir }
283cdf0e10cSrcweir
284cdf0e10cSrcweir const char *
CssStylesExplanation() const285cdf0e10cSrcweir StdFrame::CssStylesExplanation() const
286cdf0e10cSrcweir {
287cdf0e10cSrcweir return C_sCssExplanations;
288cdf0e10cSrcweir }
289cdf0e10cSrcweir
290cdf0e10cSrcweir const char *
DevelopersGuideHtmlRoot() const291cdf0e10cSrcweir StdFrame::DevelopersGuideHtmlRoot() const
292cdf0e10cSrcweir {
293cdf0e10cSrcweir return sDevelopersGuideHtmlRoot;
294cdf0e10cSrcweir }
295cdf0e10cSrcweir
296cdf0e10cSrcweir bool
SimpleLinks() const297cdf0e10cSrcweir StdFrame::SimpleLinks() const
298cdf0e10cSrcweir {
299cdf0e10cSrcweir return bSimpleLinks;
300cdf0e10cSrcweir }
301cdf0e10cSrcweir
302cdf0e10cSrcweir void
Set_DevelopersGuideHtmlRoot(const String & i_directory)303cdf0e10cSrcweir StdFrame::Set_DevelopersGuideHtmlRoot( const String & i_directory )
304cdf0e10cSrcweir {
305cdf0e10cSrcweir if (NOT i_directory.empty())
306cdf0e10cSrcweir {
307cdf0e10cSrcweir if (i_directory.char_at(i_directory.length()-1) == '/')
308cdf0e10cSrcweir {
309cdf0e10cSrcweir sDevelopersGuideHtmlRoot.assign(i_directory,i_directory.length()-1);
310cdf0e10cSrcweir return;
311cdf0e10cSrcweir }
312cdf0e10cSrcweir }
313cdf0e10cSrcweir sDevelopersGuideHtmlRoot = i_directory;
314cdf0e10cSrcweir }
315cdf0e10cSrcweir
316cdf0e10cSrcweir void
Set_SimpleLinks()317cdf0e10cSrcweir StdFrame::Set_SimpleLinks()
318cdf0e10cSrcweir {
319cdf0e10cSrcweir bSimpleLinks = true;
320cdf0e10cSrcweir }
321cdf0e10cSrcweir
322cdf0e10cSrcweir String
MakeCopyRight()323cdf0e10cSrcweir MakeCopyRight()
324cdf0e10cSrcweir {
325cdf0e10cSrcweir StreamStr cr(700);
326cdf0e10cSrcweir time_t
327cdf0e10cSrcweir gt;
328cdf0e10cSrcweir time(>);
329cdf0e10cSrcweir tm *
330cdf0e10cSrcweir plt = localtime(>);
331cdf0e10cSrcweir int year = 1900 + plt->tm_year;
332cdf0e10cSrcweir
333672406edSJürgen Schmidt cr << "Copyright © "
334cdf0e10cSrcweir << year
335507825ddSAriel Constenla-Haile << ", The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.";
336cdf0e10cSrcweir return String(cr.c_str());
337cdf0e10cSrcweir
338cdf0e10cSrcweir }
339