* Fixes issue #948 by including a setUseEmbeddedCSS(false) method. Doesn't change current behaviour if not set * Removes a empty line in src/PhpSpreadsheet/Writer/Html.php that fails a test
This commit is contained in:
parent
617ea476c0
commit
13eaeb39cf
|
@ -62,6 +62,13 @@ class Html extends BaseWriter
|
|||
*/
|
||||
private $useInlineCss = false;
|
||||
|
||||
/**
|
||||
* Use embedded CSS?
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
private $useEmbeddedCSS = true;
|
||||
|
||||
/**
|
||||
* Array of CSS styles.
|
||||
*
|
||||
|
@ -1105,7 +1112,9 @@ class Html extends BaseWriter
|
|||
|
||||
// Construct HTML
|
||||
$html = '';
|
||||
if ($this->useEmbeddedCSS) {
|
||||
$html .= $this->setMargins($pSheet);
|
||||
}
|
||||
|
||||
if (!$this->useInlineCss) {
|
||||
$gridlines = $pSheet->getShowGridlines() ? ' gridlines' : '';
|
||||
|
@ -1492,6 +1501,30 @@ class Html extends BaseWriter
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get use embedded CSS?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getUseEmbeddedCSS()
|
||||
{
|
||||
return $this->useEmbeddedCSS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set use embedded CSS?
|
||||
*
|
||||
* @param bool $pValue
|
||||
*
|
||||
* @return HTML
|
||||
*/
|
||||
public function setUseEmbeddedCSS($pValue)
|
||||
{
|
||||
$this->useEmbeddedCSS = $pValue;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add color to formatted string as inline style.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue