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 10cdf0e10cSrcweir * 110841af79SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 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. 19cdf0e10cSrcweir * 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 = 101cdf0e10cSrcweir "/*See bottom of file for explanations.*/"CRLF 102cdf0e10cSrcweir CRLF 103cdf0e10cSrcweir "body { background-color:#ffffff; }"CRLF 104cdf0e10cSrcweir CRLF 105cdf0e10cSrcweir "h3 { font-size:13pt; font-weight:bold;"CRLF 106cdf0e10cSrcweir " margin-top:3pt; margin-bottom:1pt; }"CRLF 107cdf0e10cSrcweir "p, dt, dd, pre { font-size:11pt;"CRLF 108cdf0e10cSrcweir " margin-top:3pt; margin-bottom:1pt; }"CRLF 109cdf0e10cSrcweir "pre { font-family:monospace; }"CRLF 110cdf0e10cSrcweir CRLF 111cdf0e10cSrcweir "table.navimain { background-color:#eeeeff; }"CRLF 112cdf0e10cSrcweir "table.subtitle { margin-top:6pt; margin-bottom:6pt; }"CRLF 113cdf0e10cSrcweir CRLF 114cdf0e10cSrcweir "td { font-size:11pt; }"CRLF 115cdf0e10cSrcweir "td.title { font-family: Arial; font-size:19pt; font-weight:bold;"CRLF 116cdf0e10cSrcweir " line-height:30pt; background-color:#ccccff; text-align:center; }"CRLF 117cdf0e10cSrcweir "td.subtitle { font-family: Arial; font-size:13pt;"CRLF 118cdf0e10cSrcweir " line-height:20pt; background-color:#ccccff; }"CRLF 119cdf0e10cSrcweir "td.crosstitle { font-size:12pt; font-weight:bold;"CRLF 120cdf0e10cSrcweir " line-height:15pt; background-color:#eeeeff; }"CRLF 121cdf0e10cSrcweir "td.imdetail { width:100%; background-color:#eeeeff; }"CRLF 122cdf0e10cSrcweir CRLF 123cdf0e10cSrcweir "td.imsum_left { width:30%; }"CRLF 124cdf0e10cSrcweir "td.imsum_right { width:70%; }"CRLF 125cdf0e10cSrcweir CRLF 126cdf0e10cSrcweir "td.navimain, a.navimain"CRLF 127cdf0e10cSrcweir " { text-align:center; font-family: Arial; font-size:12pt; font-weight:bold; }"CRLF 128cdf0e10cSrcweir "td.navimainself { text-align:center; font-family: Arial; font-size:12pt; font-weight:bold;"CRLF 129cdf0e10cSrcweir " color:#ffffff; background-color:#2222ad; }"CRLF 130cdf0e10cSrcweir "td.navimainnone { text-align:center; font-family: Arial; font-size:12pt; }"CRLF 131cdf0e10cSrcweir "td.navisub, a.navisub"CRLF 132cdf0e10cSrcweir " { text-align:center; font-family: Arial; font-size:9pt; font-variant:small-caps; }"CRLF 133cdf0e10cSrcweir "td.navimain, td.navisub"CRLF 134cdf0e10cSrcweir " { padding-left:7pt; padding-right:7pt; }"CRLF 135cdf0e10cSrcweir CRLF 136cdf0e10cSrcweir "a.membertitle { font-size:12pt; font-weight:bold; line-height:18pt; }"CRLF 137cdf0e10cSrcweir "a.navimain, a.navisub { color:#000000; }"CRLF 138cdf0e10cSrcweir ".dt { font-weight:bold; }"CRLF 139cdf0e10cSrcweir ".namechain { font-size:13pt; font-weight:bold;"CRLF 140cdf0e10cSrcweir " margin-top:3pt; margin-bottom:6pt; }"CRLF 141cdf0e10cSrcweir ".title2 { font-size:13pt; font-style:italic; font-weight:bold; text-align:left; }"CRLF 142cdf0e10cSrcweir ; 143cdf0e10cSrcweir 144cdf0e10cSrcweir 145cdf0e10cSrcweir const char * const C_sCssExplanations = 146cdf0e10cSrcweir "/* Explanation of CSS classes:"CRLF 147cdf0e10cSrcweir CRLF 148cdf0e10cSrcweir ".navimain Text in main navigation bar."CRLF 149cdf0e10cSrcweir ".navisub Text in lower navigation bar."CRLF 150cdf0e10cSrcweir "td.navimainself Cell in main navigation bar with \"selected\" shadow: You are here."CRLF 151cdf0e10cSrcweir "td.navimainnone Cell in main navigation bar with no link."CRLF 152cdf0e10cSrcweir CRLF 153cdf0e10cSrcweir ".namechain Line with current module path."CRLF 154cdf0e10cSrcweir CRLF 155cdf0e10cSrcweir "td.crosstitle Comment box for bases (base interfaces etc.)"CRLF 156cdf0e10cSrcweir "td.imsum_left Left part of such boxes."CRLF 157cdf0e10cSrcweir "td.imsum_right Right part of such boxes."CRLF 158cdf0e10cSrcweir CRLF 159cdf0e10cSrcweir "td.title Main title of the page like \"interface XYz\""CRLF 160cdf0e10cSrcweir ".subtitle Tables, and head cells of those, which list members"CRLF 161cdf0e10cSrcweir " like \"method summary\" and \"method details\"."CRLF 162cdf0e10cSrcweir CRLF 163cdf0e10cSrcweir "td.imdetail Background table of method's detail description."CRLF 164cdf0e10cSrcweir "a.membertitle Method name (as jump label) in method's detail"CRLF 165cdf0e10cSrcweir " description."CRLF 166cdf0e10cSrcweir ".title2 smaller font prefixes to page titles"CRLF 167cdf0e10cSrcweir "*/"CRLF 168cdf0e10cSrcweir ; 169cdf0e10cSrcweir 170cdf0e10cSrcweir const char * const C_sStdStyle_withDivFrame = 171cdf0e10cSrcweir "/*See bottom of file for explanations.*/"CRLF 172cdf0e10cSrcweir CRLF 173cdf0e10cSrcweir "body { background-color:#ffffff; }"CRLF 174cdf0e10cSrcweir CRLF 175cdf0e10cSrcweir "#adc-idlref h3 { font-size:13pt; font-weight:bold;"CRLF 176cdf0e10cSrcweir " margin-top:3pt; margin-bottom:1pt; }"CRLF 177cdf0e10cSrcweir "#adc-idlref p, #adc-idlref dt, #adc-idlref dd, #adc-idlref pre"CRLF 178cdf0e10cSrcweir " { font-size:11pt;"CRLF 179cdf0e10cSrcweir " margin-top:3pt; margin-bottom:1pt; }"CRLF 180cdf0e10cSrcweir "#adc-idlref pre { font-family:monospace; }"CRLF 181cdf0e10cSrcweir CRLF 182cdf0e10cSrcweir "#adc-idlref table.navimain { background-color:#eeeeff; }"CRLF 183cdf0e10cSrcweir "#adc-idlref table.subtitle { margin-top:6pt; margin-bottom:6pt; }"CRLF 184cdf0e10cSrcweir CRLF 185cdf0e10cSrcweir "#adc-idlref td { font-size:11pt; }"CRLF 186cdf0e10cSrcweir "#adc-idlref td.title { font-family: Arial; font-size:19pt; font-weight:bold;"CRLF 187cdf0e10cSrcweir " line-height:30pt; background-color:#ccccff; text-align:center; }"CRLF 188cdf0e10cSrcweir "#adc-idlref td.subtitle { font-family: Arial; font-size:13pt;"CRLF 189cdf0e10cSrcweir " line-height:20pt; background-color:#ccccff; }"CRLF 190cdf0e10cSrcweir "#adc-idlref td.crosstitle { font-size:12pt; font-weight:bold;"CRLF 191cdf0e10cSrcweir " line-height:15pt; background-color:#eeeeff; }"CRLF 192cdf0e10cSrcweir "#adc-idlref td.imdetail { width:100%; background-color:#eeeeff; }"CRLF 193cdf0e10cSrcweir CRLF 194cdf0e10cSrcweir "#adc-idlref td.imsum_left { width:30%; }"CRLF 195cdf0e10cSrcweir "#adc-idlref td.imsum_right { width:70%; }"CRLF 196cdf0e10cSrcweir CRLF 197cdf0e10cSrcweir "#adc-idlref td.navimain, #adc-idlref a.navimain"CRLF 198cdf0e10cSrcweir " { text-align:center; font-family: Arial; font-size:12pt; font-weight:bold; }"CRLF 199cdf0e10cSrcweir "#adc-idlref td.navimainself { text-align:center; font-family: Arial; font-size:12pt; font-weight:bold;"CRLF 200cdf0e10cSrcweir " color:#ffffff; background-color:#2222ad; }"CRLF 201cdf0e10cSrcweir "#adc-idlref td.navimainnone { text-align:center; font-family: Arial; font-size:12pt; }"CRLF 202cdf0e10cSrcweir "#adc-idlref td.navisub, #adc-idlref a.navisub"CRLF 203cdf0e10cSrcweir " { text-align:center; font-family: Arial; font-size:9pt; font-variant:small-caps; }"CRLF 204cdf0e10cSrcweir "#adc-idlref td.navimain, #adc-idlref td.navisub"CRLF 205cdf0e10cSrcweir " { padding-left:7pt; padding-right:7pt; }"CRLF 206cdf0e10cSrcweir CRLF 207cdf0e10cSrcweir "#adc-idlref a.membertitle { font-size:12pt; font-weight:bold; line-height:18pt; }"CRLF 208cdf0e10cSrcweir "#adc-idlref a.navimain, #adc-idlref a.navisub { color:#000000; }"CRLF 209cdf0e10cSrcweir "#adc-idlref .dt { font-weight:bold; }"CRLF 210cdf0e10cSrcweir "#adc-idlref .namechain { font-size:13pt; font-weight:bold;"CRLF 211cdf0e10cSrcweir " margin-top:3pt; margin-bottom:6pt; }"CRLF 212cdf0e10cSrcweir "#adc-idlref .title2 { font-size:13pt; font-style:italic; font-weight:bold; text-align:left; }"CRLF 213cdf0e10cSrcweir ""CRLF 214cdf0e10cSrcweir "#adc-idlref table { empty-cells:show; }"CRLF 215cdf0e10cSrcweir ""CRLF 216cdf0e10cSrcweir "#adc-idlref .childlist td, "CRLF 217cdf0e10cSrcweir "#adc-idlref .commentedlinks td, "CRLF 218cdf0e10cSrcweir "#adc-idlref .memberlist td, "CRLF 219cdf0e10cSrcweir "#adc-idlref .subtitle td, "CRLF 220cdf0e10cSrcweir "#adc-idlref .crosstitle td { border: .1pt solid #000000; }"CRLF 221cdf0e10cSrcweir ""CRLF 222cdf0e10cSrcweir "#adc-idlref .flag-table td { border: .1pt solid #cccccc; } "CRLF 223cdf0e10cSrcweir ""CRLF 224cdf0e10cSrcweir "#adc-idlref .title-table td, "CRLF 225cdf0e10cSrcweir "#adc-idlref .table-in-method td, "CRLF 226cdf0e10cSrcweir "#adc-idlref .table-in-data td, "CRLF 227cdf0e10cSrcweir "#adc-idlref .navimain td, "CRLF 228cdf0e10cSrcweir "#adc-idlref .navisub td, "CRLF 229cdf0e10cSrcweir "#adc-idlref .expl-table td, "CRLF 230cdf0e10cSrcweir "#adc-idlref .param-table td { border: none; }"CRLF 231cdf0e10cSrcweir ; 232cdf0e10cSrcweir 233cdf0e10cSrcweir 234cdf0e10cSrcweir } // anonymous namespace 235cdf0e10cSrcweir 236cdf0e10cSrcweir 237cdf0e10cSrcweir StdFrame::StdFrame() 238cdf0e10cSrcweir : sDevelopersGuideHtmlRoot(), 239cdf0e10cSrcweir bSimpleLinks(false) 240cdf0e10cSrcweir { 241cdf0e10cSrcweir } 242cdf0e10cSrcweir 243cdf0e10cSrcweir DYN Html_Image * 244cdf0e10cSrcweir 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 * 258cdf0e10cSrcweir 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 * 269cdf0e10cSrcweir StdFrame::CopyrightText() const 270cdf0e10cSrcweir { 271cdf0e10cSrcweir static String sCopyRight_( MakeCopyRight() ); 272cdf0e10cSrcweir return sCopyRight_.c_str(); 273cdf0e10cSrcweir } 274cdf0e10cSrcweir 275cdf0e10cSrcweir const char * 276cdf0e10cSrcweir StdFrame::CssStyle() const 277cdf0e10cSrcweir { 278cdf0e10cSrcweir if (bUse_OOoFrameDiv) 279cdf0e10cSrcweir return C_sStdStyle_withDivFrame; 280cdf0e10cSrcweir else 281cdf0e10cSrcweir return C_sStdStyle; 282cdf0e10cSrcweir } 283cdf0e10cSrcweir 284cdf0e10cSrcweir const char * 285cdf0e10cSrcweir StdFrame::CssStylesExplanation() const 286cdf0e10cSrcweir { 287cdf0e10cSrcweir return C_sCssExplanations; 288cdf0e10cSrcweir } 289cdf0e10cSrcweir 290cdf0e10cSrcweir const char * 291cdf0e10cSrcweir StdFrame::DevelopersGuideHtmlRoot() const 292cdf0e10cSrcweir { 293cdf0e10cSrcweir return sDevelopersGuideHtmlRoot; 294cdf0e10cSrcweir } 295cdf0e10cSrcweir 296cdf0e10cSrcweir bool 297cdf0e10cSrcweir StdFrame::SimpleLinks() const 298cdf0e10cSrcweir { 299cdf0e10cSrcweir return bSimpleLinks; 300cdf0e10cSrcweir } 301cdf0e10cSrcweir 302cdf0e10cSrcweir void 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 317cdf0e10cSrcweir StdFrame::Set_SimpleLinks() 318cdf0e10cSrcweir { 319cdf0e10cSrcweir bSimpleLinks = true; 320cdf0e10cSrcweir } 321cdf0e10cSrcweir 322cdf0e10cSrcweir String 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 333*672406edSJürgen Schmidt cr << "Copyright © " 334cdf0e10cSrcweir << year 335*672406edSJürgen Schmidt << ", The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOfifce.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