/**
  * Load and imports CSS.
  */
 protected function load_css()
 {
     /** @var helper_plugin_odt_dwcssloader $loader */
     $loader = plugin_load('helper', 'odt_dwcssloader');
     if ($loader != NULL) {
         $this->css = $loader->load('odt', 'odt', $this->config->getParam('css_template'), $this->config->getParam('usestyles'));
     }
     $this->import = plugin_load('helper', 'odt_cssimport');
     if ($this->import != NULL) {
         $this->import->importFromString($this->css);
     }
     // Call adjustLengthValues to make our callback function being called for every
     // length value imported. This gives us the chance to convert it once from
     // pixel to points.
     $this->import->adjustLengthValues(array($this, 'adjustLengthCallback'));
 }
 /**
  * Constructor. Loads and imports CSS and helper plugins.
  */
 public function __construct()
 {
     $this->factory = plugin_load('helper', 'odt_stylefactory');
     /** @var helper_plugin_odt_dwcssloader $loader */
     $loader = plugin_load('helper', 'odt_dwcssloader');
     if ($loader != NULL) {
         $this->css = $loader->load('odt', 'odt', $this->getConf('template'));
     }
     $this->import = plugin_load('helper', 'odt_cssimport');
     if ($this->import != NULL) {
         $this->import->importFromString($this->css);
     }
     // Call adjustLengthValues to make our callback function being called for every
     // length value imported. This gives us the chance to convert it once from
     // pixel to points.
     $this->import->adjustLengthValues(array($this, 'adjustLengthCallback'));
     // Load helper class for unit conversion.
     $this->units = plugin_load('helper', 'odt_units');
     $this->units->setPixelPerEm(14);
     $this->units->setTwipsPerPixelX($this->getConf('twips_per_pixel_x'));
     $this->units->setTwipsPerPixelY($this->getConf('twips_per_pixel_y'));
     $this->meta = new ODTMeta();
 }