You are here

class FrxWordDoc in Forena Reports 7.4

Same name and namespace in other branches
  1. 7.3 docformats/FrxWordDoc.inc \FrxWordDoc

@file FrxWordDoc.inc Word document exporter. @author davidmetzler

Hierarchy

Expanded class hierarchy of FrxWordDoc

1 string reference to 'FrxWordDoc'
forena_forena_document_types in ./forena.module
Self register document formats with Forena

File

docformats/FrxWordDoc.inc, line 8
FrxWordDoc.inc Word document exporter. @author davidmetzler

View source
class FrxWordDoc extends FrxDocument {
  public function __construct() {
    $this->content_type = 'application/msword';
  }
  public function render($r, $format, $options = array()) {
    $css = $this
      ->loadCSSFiles($format);
    $output = '<html><head>';
    $output .= '<meta http-equiv="Content-Type" content="text/html"/>';
    if (isset($r->rpt_xml->head->style)) {
      $output .= '<style type="text/css">';
      $output .= $css;
      if (isset($r->rpt_xml->head->style)) {
        $sheet = (string) $r->rpt_xml->head->style;
        $output .= $sheet;
      }
      $output .= '</style>';
    }
    $output .= '<title>' . $r->title . '</title></head><body class="forena-report">' . $r->html . '</body></html>';
    return $output;
  }
  public function output(&$output) {
    $output = $this
      ->convertCharset($output, 'windows-1252');
    parent::output($output);
    return TRUE;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FrxDocument::$allowDirectOutput public property
FrxDocument::$charset public property
FrxDocument::$content_type public property
FrxDocument::$format public property
FrxDocument::$print public property
FrxDocument::check_markup public function Wrapper function for check output to default the right type.
FrxDocument::convertCharset public function
FrxDocument::header public function 5
FrxDocument::loadCSSFiles public function
FrxWordDoc::output public function Overrides FrxDocument::output
FrxWordDoc::render public function Overrides FrxDocument::render
FrxWordDoc::__construct public function