1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir #include <precomp.h> 29*cdf0e10cSrcweir #include <cfrstd.hxx> 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir 32*cdf0e10cSrcweir // NOT FULLY DEFINED SERVICES 33*cdf0e10cSrcweir #include <time.h> 34*cdf0e10cSrcweir 35*cdf0e10cSrcweir 36*cdf0e10cSrcweir /* CSS Styles 37*cdf0e10cSrcweir ---------- 38*cdf0e10cSrcweir 39*cdf0e10cSrcweir Colors: 40*cdf0e10cSrcweir - light background color #eeeeff 41*cdf0e10cSrcweir - dark background color #ccccff 42*cdf0e10cSrcweir - self in navibar background color #2222ad 43*cdf0e10cSrcweir 44*cdf0e10cSrcweir 45*cdf0e10cSrcweir Fonts: 46*cdf0e10cSrcweir - page title 20, bold, Arial 47*cdf0e10cSrcweir - navibar main 12, bold, Arial 48*cdf0e10cSrcweir - navibar sub 8, Arial, kapit�lchen 49*cdf0e10cSrcweir - attrtable title line 8, bold, Arial, kapit�lchen 50*cdf0e10cSrcweir - attrtable value line 8, Arial kapit�lchen 51*cdf0e10cSrcweir 52*cdf0e10cSrcweir - namespace chain 13, bold 53*cdf0e10cSrcweir - table title 13, bold 54*cdf0e10cSrcweir - template line 13 55*cdf0e10cSrcweir 56*cdf0e10cSrcweir - member paragraph title 12, bold 57*cdf0e10cSrcweir 58*cdf0e10cSrcweir - docu paragraph title 11, bold 59*cdf0e10cSrcweir - standard text 11 60*cdf0e10cSrcweir 61*cdf0e10cSrcweir - hierarchy 11, monospace 62*cdf0e10cSrcweir 63*cdf0e10cSrcweir 64*cdf0e10cSrcweir classes: 65*cdf0e10cSrcweir 66*cdf0e10cSrcweir td.title page title 67*cdf0e10cSrcweir h3 table title 68*cdf0e10cSrcweir h4 member paragraph title 69*cdf0e10cSrcweir 70*cdf0e10cSrcweir td.nmain navigation main bar 71*cdf0e10cSrcweir td.nsub navigation sub bar 72*cdf0e10cSrcweir a.nmain links in navigation main bar 73*cdf0e10cSrcweir a.nsub links in navigation sub bar 74*cdf0e10cSrcweir 75*cdf0e10cSrcweir td.attr1 attribute table head line 76*cdf0e10cSrcweir td.attr2 attribute table value line 77*cdf0e10cSrcweir 78*cdf0e10cSrcweir p.namechain namespace chain in head of pages 79*cdf0e10cSrcweir p.tpl template line in head of pages 80*cdf0e10cSrcweir 81*cdf0e10cSrcweir pre.doc preformatted docu 82*cdf0e10cSrcweir pre.hierarchy class bases hierarchy graphic 83*cdf0e10cSrcweir 84*cdf0e10cSrcweir dl.syntax function- or variable-declaration field 85*cdf0e10cSrcweir a.syntax link in function- or variable-declaration field 86*cdf0e10cSrcweir 87*cdf0e10cSrcweir p.dt docu paragraph title 88*cdf0e10cSrcweir dl.dt docu paragraph title 89*cdf0e10cSrcweir 90*cdf0e10cSrcweir p standard text 91*cdf0e10cSrcweir dl standard text 92*cdf0e10cSrcweir dd standard text 93*cdf0e10cSrcweir */ 94*cdf0e10cSrcweir 95*cdf0e10cSrcweir 96*cdf0e10cSrcweir #define CRLF "\n" 97*cdf0e10cSrcweir 98*cdf0e10cSrcweir namespace 99*cdf0e10cSrcweir { 100*cdf0e10cSrcweir 101*cdf0e10cSrcweir bool bUse_OOoFrameDiv = true; 102*cdf0e10cSrcweir 103*cdf0e10cSrcweir 104*cdf0e10cSrcweir //*************** These are used for IDL currently only! ******************** 105*cdf0e10cSrcweir 106*cdf0e10cSrcweir const char * const C_sStdStyle = 107*cdf0e10cSrcweir "/*See bottom of file for explanations.*/"CRLF 108*cdf0e10cSrcweir CRLF 109*cdf0e10cSrcweir "body { background-color:#ffffff; }"CRLF 110*cdf0e10cSrcweir CRLF 111*cdf0e10cSrcweir "h3 { font-size:13pt; font-weight:bold;"CRLF 112*cdf0e10cSrcweir " margin-top:3pt; margin-bottom:1pt; }"CRLF 113*cdf0e10cSrcweir "p, dt, dd, pre { font-size:11pt;"CRLF 114*cdf0e10cSrcweir " margin-top:3pt; margin-bottom:1pt; }"CRLF 115*cdf0e10cSrcweir "pre { font-family:monospace; }"CRLF 116*cdf0e10cSrcweir CRLF 117*cdf0e10cSrcweir "table.navimain { background-color:#eeeeff; }"CRLF 118*cdf0e10cSrcweir "table.subtitle { margin-top:6pt; margin-bottom:6pt; }"CRLF 119*cdf0e10cSrcweir CRLF 120*cdf0e10cSrcweir "td { font-size:11pt; }"CRLF 121*cdf0e10cSrcweir "td.title { font-family: Arial; font-size:19pt; font-weight:bold;"CRLF 122*cdf0e10cSrcweir " line-height:30pt; background-color:#ccccff; text-align:center; }"CRLF 123*cdf0e10cSrcweir "td.subtitle { font-family: Arial; font-size:13pt;"CRLF 124*cdf0e10cSrcweir " line-height:20pt; background-color:#ccccff; }"CRLF 125*cdf0e10cSrcweir "td.crosstitle { font-size:12pt; font-weight:bold;"CRLF 126*cdf0e10cSrcweir " line-height:15pt; background-color:#eeeeff; }"CRLF 127*cdf0e10cSrcweir "td.imdetail { width:100%; background-color:#eeeeff; }"CRLF 128*cdf0e10cSrcweir CRLF 129*cdf0e10cSrcweir "td.imsum_left { width:30%; }"CRLF 130*cdf0e10cSrcweir "td.imsum_right { width:70%; }"CRLF 131*cdf0e10cSrcweir CRLF 132*cdf0e10cSrcweir "td.navimain, a.navimain"CRLF 133*cdf0e10cSrcweir " { text-align:center; font-family: Arial; font-size:12pt; font-weight:bold; }"CRLF 134*cdf0e10cSrcweir "td.navimainself { text-align:center; font-family: Arial; font-size:12pt; font-weight:bold;"CRLF 135*cdf0e10cSrcweir " color:#ffffff; background-color:#2222ad; }"CRLF 136*cdf0e10cSrcweir "td.navimainnone { text-align:center; font-family: Arial; font-size:12pt; }"CRLF 137*cdf0e10cSrcweir "td.navisub, a.navisub"CRLF 138*cdf0e10cSrcweir " { text-align:center; font-family: Arial; font-size:9pt; font-variant:small-caps; }"CRLF 139*cdf0e10cSrcweir "td.navimain, td.navisub"CRLF 140*cdf0e10cSrcweir " { padding-left:7pt; padding-right:7pt; }"CRLF 141*cdf0e10cSrcweir CRLF 142*cdf0e10cSrcweir "a.membertitle { font-size:12pt; font-weight:bold; line-height:18pt; }"CRLF 143*cdf0e10cSrcweir "a.navimain, a.navisub { color:#000000; }"CRLF 144*cdf0e10cSrcweir ".dt { font-weight:bold; }"CRLF 145*cdf0e10cSrcweir ".namechain { font-size:13pt; font-weight:bold;"CRLF 146*cdf0e10cSrcweir " margin-top:3pt; margin-bottom:6pt; }"CRLF 147*cdf0e10cSrcweir ".title2 { font-size:13pt; font-style:italic; font-weight:bold; text-align:left; }"CRLF 148*cdf0e10cSrcweir ; 149*cdf0e10cSrcweir 150*cdf0e10cSrcweir 151*cdf0e10cSrcweir const char * const C_sCssExplanations = 152*cdf0e10cSrcweir "/* Explanation of CSS classes:"CRLF 153*cdf0e10cSrcweir CRLF 154*cdf0e10cSrcweir ".navimain Text in main navigation bar."CRLF 155*cdf0e10cSrcweir ".navisub Text in lower navigation bar."CRLF 156*cdf0e10cSrcweir "td.navimainself Cell in main navigation bar with \"selected\" shadow: You are here."CRLF 157*cdf0e10cSrcweir "td.navimainnone Cell in main navigation bar with no link."CRLF 158*cdf0e10cSrcweir CRLF 159*cdf0e10cSrcweir ".namechain Line with current module path."CRLF 160*cdf0e10cSrcweir CRLF 161*cdf0e10cSrcweir "td.crosstitle Comment box for bases (base interfaces etc.)"CRLF 162*cdf0e10cSrcweir "td.imsum_left Left part of such boxes."CRLF 163*cdf0e10cSrcweir "td.imsum_right Right part of such boxes."CRLF 164*cdf0e10cSrcweir CRLF 165*cdf0e10cSrcweir "td.title Main title of the page like \"interface XYz\""CRLF 166*cdf0e10cSrcweir ".subtitle Tables, and head cells of those, which list members"CRLF 167*cdf0e10cSrcweir " like \"method summary\" and \"method details\"."CRLF 168*cdf0e10cSrcweir CRLF 169*cdf0e10cSrcweir "td.imdetail Background table of method's detail description."CRLF 170*cdf0e10cSrcweir "a.membertitle Method name (as jump label) in method's detail"CRLF 171*cdf0e10cSrcweir " description."CRLF 172*cdf0e10cSrcweir ".title2 smaller font prefixes to page titles"CRLF 173*cdf0e10cSrcweir "*/"CRLF 174*cdf0e10cSrcweir ; 175*cdf0e10cSrcweir 176*cdf0e10cSrcweir const char * const C_sStdStyle_withDivFrame = 177*cdf0e10cSrcweir "/*See bottom of file for explanations.*/"CRLF 178*cdf0e10cSrcweir CRLF 179*cdf0e10cSrcweir "body { background-color:#ffffff; }"CRLF 180*cdf0e10cSrcweir CRLF 181*cdf0e10cSrcweir "#adc-idlref h3 { font-size:13pt; font-weight:bold;"CRLF 182*cdf0e10cSrcweir " margin-top:3pt; margin-bottom:1pt; }"CRLF 183*cdf0e10cSrcweir "#adc-idlref p, #adc-idlref dt, #adc-idlref dd, #adc-idlref pre"CRLF 184*cdf0e10cSrcweir " { font-size:11pt;"CRLF 185*cdf0e10cSrcweir " margin-top:3pt; margin-bottom:1pt; }"CRLF 186*cdf0e10cSrcweir "#adc-idlref pre { font-family:monospace; }"CRLF 187*cdf0e10cSrcweir CRLF 188*cdf0e10cSrcweir "#adc-idlref table.navimain { background-color:#eeeeff; }"CRLF 189*cdf0e10cSrcweir "#adc-idlref table.subtitle { margin-top:6pt; margin-bottom:6pt; }"CRLF 190*cdf0e10cSrcweir CRLF 191*cdf0e10cSrcweir "#adc-idlref td { font-size:11pt; }"CRLF 192*cdf0e10cSrcweir "#adc-idlref td.title { font-family: Arial; font-size:19pt; font-weight:bold;"CRLF 193*cdf0e10cSrcweir " line-height:30pt; background-color:#ccccff; text-align:center; }"CRLF 194*cdf0e10cSrcweir "#adc-idlref td.subtitle { font-family: Arial; font-size:13pt;"CRLF 195*cdf0e10cSrcweir " line-height:20pt; background-color:#ccccff; }"CRLF 196*cdf0e10cSrcweir "#adc-idlref td.crosstitle { font-size:12pt; font-weight:bold;"CRLF 197*cdf0e10cSrcweir " line-height:15pt; background-color:#eeeeff; }"CRLF 198*cdf0e10cSrcweir "#adc-idlref td.imdetail { width:100%; background-color:#eeeeff; }"CRLF 199*cdf0e10cSrcweir CRLF 200*cdf0e10cSrcweir "#adc-idlref td.imsum_left { width:30%; }"CRLF 201*cdf0e10cSrcweir "#adc-idlref td.imsum_right { width:70%; }"CRLF 202*cdf0e10cSrcweir CRLF 203*cdf0e10cSrcweir "#adc-idlref td.navimain, #adc-idlref a.navimain"CRLF 204*cdf0e10cSrcweir " { text-align:center; font-family: Arial; font-size:12pt; font-weight:bold; }"CRLF 205*cdf0e10cSrcweir "#adc-idlref td.navimainself { text-align:center; font-family: Arial; font-size:12pt; font-weight:bold;"CRLF 206*cdf0e10cSrcweir " color:#ffffff; background-color:#2222ad; }"CRLF 207*cdf0e10cSrcweir "#adc-idlref td.navimainnone { text-align:center; font-family: Arial; font-size:12pt; }"CRLF 208*cdf0e10cSrcweir "#adc-idlref td.navisub, #adc-idlref a.navisub"CRLF 209*cdf0e10cSrcweir " { text-align:center; font-family: Arial; font-size:9pt; font-variant:small-caps; }"CRLF 210*cdf0e10cSrcweir "#adc-idlref td.navimain, #adc-idlref td.navisub"CRLF 211*cdf0e10cSrcweir " { padding-left:7pt; padding-right:7pt; }"CRLF 212*cdf0e10cSrcweir CRLF 213*cdf0e10cSrcweir "#adc-idlref a.membertitle { font-size:12pt; font-weight:bold; line-height:18pt; }"CRLF 214*cdf0e10cSrcweir "#adc-idlref a.navimain, #adc-idlref a.navisub { color:#000000; }"CRLF 215*cdf0e10cSrcweir "#adc-idlref .dt { font-weight:bold; }"CRLF 216*cdf0e10cSrcweir "#adc-idlref .namechain { font-size:13pt; font-weight:bold;"CRLF 217*cdf0e10cSrcweir " margin-top:3pt; margin-bottom:6pt; }"CRLF 218*cdf0e10cSrcweir "#adc-idlref .title2 { font-size:13pt; font-style:italic; font-weight:bold; text-align:left; }"CRLF 219*cdf0e10cSrcweir ""CRLF 220*cdf0e10cSrcweir "#adc-idlref table { empty-cells:show; }"CRLF 221*cdf0e10cSrcweir ""CRLF 222*cdf0e10cSrcweir "#adc-idlref .childlist td, "CRLF 223*cdf0e10cSrcweir "#adc-idlref .commentedlinks td, "CRLF 224*cdf0e10cSrcweir "#adc-idlref .memberlist td, "CRLF 225*cdf0e10cSrcweir "#adc-idlref .subtitle td, "CRLF 226*cdf0e10cSrcweir "#adc-idlref .crosstitle td { border: .1pt solid #000000; }"CRLF 227*cdf0e10cSrcweir ""CRLF 228*cdf0e10cSrcweir "#adc-idlref .flag-table td { border: .1pt solid #cccccc; } "CRLF 229*cdf0e10cSrcweir ""CRLF 230*cdf0e10cSrcweir "#adc-idlref .title-table td, "CRLF 231*cdf0e10cSrcweir "#adc-idlref .table-in-method td, "CRLF 232*cdf0e10cSrcweir "#adc-idlref .table-in-data td, "CRLF 233*cdf0e10cSrcweir "#adc-idlref .navimain td, "CRLF 234*cdf0e10cSrcweir "#adc-idlref .navisub td, "CRLF 235*cdf0e10cSrcweir "#adc-idlref .expl-table td, "CRLF 236*cdf0e10cSrcweir "#adc-idlref .param-table td { border: none; }"CRLF 237*cdf0e10cSrcweir ; 238*cdf0e10cSrcweir 239*cdf0e10cSrcweir 240*cdf0e10cSrcweir } // anonymous namespace 241*cdf0e10cSrcweir 242*cdf0e10cSrcweir 243*cdf0e10cSrcweir StdFrame::StdFrame() 244*cdf0e10cSrcweir : sDevelopersGuideHtmlRoot(), 245*cdf0e10cSrcweir bSimpleLinks(false) 246*cdf0e10cSrcweir { 247*cdf0e10cSrcweir } 248*cdf0e10cSrcweir 249*cdf0e10cSrcweir DYN Html_Image * 250*cdf0e10cSrcweir StdFrame::LogoSrc() const 251*cdf0e10cSrcweir { 252*cdf0e10cSrcweir return 0; 253*cdf0e10cSrcweir 254*cdf0e10cSrcweir // return new Html_Image( "logodot-blu.gif", 255*cdf0e10cSrcweir // "109", 256*cdf0e10cSrcweir // "54", 257*cdf0e10cSrcweir // "RIGHT", 258*cdf0e10cSrcweir // "0", 259*cdf0e10cSrcweir // "OpenOffice" ); 260*cdf0e10cSrcweir 261*cdf0e10cSrcweir } 262*cdf0e10cSrcweir 263*cdf0e10cSrcweir const char * 264*cdf0e10cSrcweir StdFrame::LogoLink() const 265*cdf0e10cSrcweir { 266*cdf0e10cSrcweir return ""; 267*cdf0e10cSrcweir // return "http://www.sun.com"; 268*cdf0e10cSrcweir // return "http://www.openoffice.org"; 269*cdf0e10cSrcweir } 270*cdf0e10cSrcweir 271*cdf0e10cSrcweir 272*cdf0e10cSrcweir String MakeCopyRight(); 273*cdf0e10cSrcweir 274*cdf0e10cSrcweir const char * 275*cdf0e10cSrcweir StdFrame::CopyrightText() const 276*cdf0e10cSrcweir { 277*cdf0e10cSrcweir static String sCopyRight_( MakeCopyRight() ); 278*cdf0e10cSrcweir return sCopyRight_.c_str(); 279*cdf0e10cSrcweir } 280*cdf0e10cSrcweir 281*cdf0e10cSrcweir const char * 282*cdf0e10cSrcweir StdFrame::CssStyle() const 283*cdf0e10cSrcweir { 284*cdf0e10cSrcweir if (bUse_OOoFrameDiv) 285*cdf0e10cSrcweir return C_sStdStyle_withDivFrame; 286*cdf0e10cSrcweir else 287*cdf0e10cSrcweir return C_sStdStyle; 288*cdf0e10cSrcweir } 289*cdf0e10cSrcweir 290*cdf0e10cSrcweir const char * 291*cdf0e10cSrcweir StdFrame::CssStylesExplanation() const 292*cdf0e10cSrcweir { 293*cdf0e10cSrcweir return C_sCssExplanations; 294*cdf0e10cSrcweir } 295*cdf0e10cSrcweir 296*cdf0e10cSrcweir const char * 297*cdf0e10cSrcweir StdFrame::DevelopersGuideHtmlRoot() const 298*cdf0e10cSrcweir { 299*cdf0e10cSrcweir return sDevelopersGuideHtmlRoot; 300*cdf0e10cSrcweir } 301*cdf0e10cSrcweir 302*cdf0e10cSrcweir bool 303*cdf0e10cSrcweir StdFrame::SimpleLinks() const 304*cdf0e10cSrcweir { 305*cdf0e10cSrcweir return bSimpleLinks; 306*cdf0e10cSrcweir } 307*cdf0e10cSrcweir 308*cdf0e10cSrcweir void 309*cdf0e10cSrcweir StdFrame::Set_DevelopersGuideHtmlRoot( const String & i_directory ) 310*cdf0e10cSrcweir { 311*cdf0e10cSrcweir if (NOT i_directory.empty()) 312*cdf0e10cSrcweir { 313*cdf0e10cSrcweir if (i_directory.char_at(i_directory.length()-1) == '/') 314*cdf0e10cSrcweir { 315*cdf0e10cSrcweir sDevelopersGuideHtmlRoot.assign(i_directory,i_directory.length()-1); 316*cdf0e10cSrcweir return; 317*cdf0e10cSrcweir } 318*cdf0e10cSrcweir } 319*cdf0e10cSrcweir sDevelopersGuideHtmlRoot = i_directory; 320*cdf0e10cSrcweir } 321*cdf0e10cSrcweir 322*cdf0e10cSrcweir void 323*cdf0e10cSrcweir StdFrame::Set_SimpleLinks() 324*cdf0e10cSrcweir { 325*cdf0e10cSrcweir bSimpleLinks = true; 326*cdf0e10cSrcweir } 327*cdf0e10cSrcweir 328*cdf0e10cSrcweir String 329*cdf0e10cSrcweir MakeCopyRight() 330*cdf0e10cSrcweir { 331*cdf0e10cSrcweir StreamStr cr(700); 332*cdf0e10cSrcweir time_t 333*cdf0e10cSrcweir gt; 334*cdf0e10cSrcweir time(>); 335*cdf0e10cSrcweir tm * 336*cdf0e10cSrcweir plt = localtime(>); 337*cdf0e10cSrcweir int year = 1900 + plt->tm_year; 338*cdf0e10cSrcweir 339*cdf0e10cSrcweir cr << "Copyright © 1995, " 340*cdf0e10cSrcweir << year 341*cdf0e10cSrcweir << ", Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners."; 342*cdf0e10cSrcweir return String(cr.c_str()); 343*cdf0e10cSrcweir 344*cdf0e10cSrcweir } 345