Use options manager for default row height and column width

This commit is contained in:
Martin Wind committed 2020-03-29 15:10:11 +02:00
1 parent 36573eaa8a
commit 26e5f966fb
2 files changed
+16 -19

No files matched your search

+12 -6
View File
@@ -142,22 +142,28 @@ abstract class WriterMultiSheetsAbstract extends WriterAbstract
/**
* @param float $width
* @throws WriterNotOpenedException
* @throws WriterAlreadyOpenedException
*/
public function setDefaultColumnWidth(float $width)
{
$this->throwIfWorkbookIsNotAvailable();
$this->workbookManager->setDefaultColumnWidth($width);
$this->throwIfWriterAlreadyOpened('Writer must be configured before opening it.');
$this->optionsManager->setOption(
Options::DEFAULT_COLUMN_WIDTH,
$width
);
}
/**
* @param float $height
* @throws WriterNotOpenedException
* @throws WriterAlreadyOpenedException
*/
public function setDefaultRowHeight(float $height)
{
$this->throwIfWorkbookIsNotAvailable();
$this->workbookManager->setDefaultRowHeight($height);
$this->throwIfWriterAlreadyOpened('Writer must be configured before opening it.');
$this->optionsManager->setOption(
Options::DEFAULT_ROW_HEIGHT,
$height
);
}
/**