xmlWriter = $xmlWriter; $this->style = $style; } /** * Get XML Writer * * @return \PhpOffice\PhpWord\Shared\XMLWriter */ protected function getXmlWriter() { return $this->xmlWriter; } /** * Get Style * * @return \PhpOffice\PhpWord\Style\AbstractStyle */ protected function getStyle() { return $this->style; } /** * Convert twip value * * @param int|float $value * @param int|float $default * @return int|float */ protected function convertTwip($value, $default = 0) { $unit = Settings::getMeasurementUnit(); if ($unit == Settings::UNIT_TWIP || $value == $default) { return $value; } else { return $value * $unit; } } }