From d4e57b1f0d7b5432db05a46e3b14daac78a243b3 Mon Sep 17 00:00:00 2001 From: Adrien Loison Date: Tue, 6 Sep 2016 19:47:18 -0700 Subject: [PATCH] Add consistency using getCellXML() (#306) --- src/Spout/Writer/ODS/Internal/Worksheet.php | 4 ++-- src/Spout/Writer/XLSX/Internal/Worksheet.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Spout/Writer/ODS/Internal/Worksheet.php b/src/Spout/Writer/ODS/Internal/Worksheet.php index cec30af..5d6ce42 100644 --- a/src/Spout/Writer/ODS/Internal/Worksheet.php +++ b/src/Spout/Writer/ODS/Internal/Worksheet.php @@ -155,7 +155,7 @@ class Worksheet implements WorksheetInterface $currentCellValue !== $dataRowWithNumericIndexes[$nextCellIndex]) { $numTimesValueRepeated = ($nextCellIndex - $currentCellIndex); - $data .= $this->getCellContent($currentCellValue, $styleIndex, $numTimesValueRepeated); + $data .= $this->getCellXML($currentCellValue, $styleIndex, $numTimesValueRepeated); $currentCellIndex = $nextCellIndex; } @@ -183,7 +183,7 @@ class Worksheet implements WorksheetInterface * @return string The cell XML content * @throws \Box\Spout\Common\Exception\InvalidArgumentException If a cell value's type is not supported */ - protected function getCellContent($cellValue, $styleIndex, $numTimesValueRepeated) + protected function getCellXML($cellValue, $styleIndex, $numTimesValueRepeated) { $data = ''; foreach($dataRow as $cellValue) { - $rowXML .= $this->getCellXml($rowIndex, $cellNumber, $cellValue, $style->getId()); + $rowXML .= $this->getCellXML($rowIndex, $cellNumber, $cellValue, $style->getId()); $cellNumber++; } @@ -159,7 +159,7 @@ EOD; * @return string * @throws InvalidArgumentException */ - private function getCellXml($rowIndex, $cellNumber, $cellValue, $styleId) + private function getCellXML($rowIndex, $cellNumber, $cellValue, $styleId) { $columnIndex = CellHelper::getCellIndexFromColumnIndex($cellNumber); $cellXML = '