mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-05 23:18:49 +00:00
* 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:
@@ -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 = '';
|
||||
$html .= $this->setMargins($pSheet);
|
||||
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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user