Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions src/PhpSpreadsheet/Writer/BaseWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace PhpOffice\PhpSpreadsheet\Writer;

use PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException;

abstract class BaseWriter implements IWriter
{
/**
Expand All @@ -19,18 +17,6 @@ abstract class BaseWriter implements IWriter
*/
protected bool $preCalculateFormulas = true;

/**
* Table formats
* Enables table formats in writer, disabled here, must be enabled in writer via a setter.
*/
protected bool $tableFormats = false;

/**
* Conditional Formatting
* Enables conditional formatting in writer, disabled here, must be enabled in writer via a setter.
*/
protected bool $conditionalFormatting = false;

/**
* Use disk caching where possible?
*/
Expand Down Expand Up @@ -72,34 +58,6 @@ public function setPreCalculateFormulas(bool $precalculateFormulas): self
return $this;
}

public function getTableFormats(): bool
{
return $this->tableFormats;
}

public function setTableFormats(bool $tableFormats): self
{
if ($tableFormats) {
throw new PhpSpreadsheetException('Table formatting not implemented for this writer');
}

return $this;
}

public function getConditionalFormatting(): bool
{
return $this->conditionalFormatting;
}

public function setConditionalFormatting(bool $conditionalFormatting): self
{
if ($conditionalFormatting) {
throw new PhpSpreadsheetException('Conditional Formatting not implemented for this writer');
}

return $this;
}

public function getUseDiskCaching(): bool
{
return $this->useDiskCaching;
Expand Down
22 changes: 22 additions & 0 deletions src/PhpSpreadsheet/Writer/Html.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,18 @@ class Html extends BaseWriter

private string $getFalse = 'FALSE';

/**
* Table formats
* Enables table formats in writer, disabled here, must be enabled in writer via a setter.
*/
protected bool $tableFormats = false;

/**
* Conditional Formatting
* Enables conditional formatting in writer, disabled here, must be enabled in writer via a setter.
*/
protected bool $conditionalFormatting = false;

/**
* Create a new HTML.
*/
Expand Down Expand Up @@ -1849,13 +1861,23 @@ public function setUseInlineCss(bool $useInlineCss): static
return $this;
}

public function getTableFormats(): bool
{
return $this->tableFormats;
}

public function setTableFormats(bool $tableFormats): self
{
$this->tableFormats = $tableFormats;

return $this;
}

public function getConditionalFormatting(): bool
{
return $this->conditionalFormatting;
}

public function setConditionalFormatting(bool $conditionalFormatting): self
{
$this->conditionalFormatting = $conditionalFormatting;
Expand Down