Convert an Excel 3d reference such as "Sheet1!A1" or "Sheet1:Sheet2!A1" to a
ptgRef3d.

@access private
@param string $cell An Excel cell reference
@return mixed The packed ptgRef3d token on success.
326213
function _convertRef3d($cell)
	{
//		$class = 2; // as far as I know, this is magick.

		// Split the ref at the ! symbol
		list($ext_ref, $cell) = explode('!', $cell);

		// Convert the external reference part (different for BIFF8)
		$ext_ref = $this->_getRefIndex($ext_ref);

		// Convert the cell reference part
		list($row, $col) = $this->_cellToPackedRowcol($cell);

		// The ptg value depends on the class of the ptg.
//		if ($class == 0) {
//			$ptgRef = pack("C", $this->ptg['ptgRef3d']);
//		} elseif ($class == 1) {
//			$ptgRef = pack("C", $this->ptg['ptgRef3dV']);
//		} elseif ($class == 2) {
			$ptgRef = pack("C", $this->ptg['ptgRef3dA']);
//		} else {
//			throw new PHPExcel_Writer_Exception("Unknown class $class");
//		}

		return $ptgRef . $ext_ref. $row . $col;
	}
1373390
public function mergeCells($pRange = 'A1:A1')
    {
        // Uppercase coordinate
        $pRange = strtoupper($pRange);

        if (strpos($pRange,':') !== false) {
            $this->_mergeCells[$pRange] = $pRange;

            // make sure cells are created

            // get the cells in the range
            $aReferences = PHPExcel_Cell::extractAllCellReferencesInRange($pRange);

            // create upper left cell if it does not already exist
            $upperLeft = $aReferences[0];
            if (!$this->cellExists($upperLeft)) {
                $this->getCell($upperLeft)->setValueExplicit(null, PHPExcel_Cell_DataType::TYPE_NULL);
            }

            // create or blank out the rest of the cells in the range
            $count = count($aReferences);
            for ($i = 1; $i < $count; $i++) {
                $this->getCell($aReferences[$i])->setValueExplicit(null, PHPExcel_Cell_DataType::TYPE_NULL);
            }

        } else {
            throw new PHPExcel_Exception('Merge must be set on a range of cells.');
        }

        return $this;
    }
52981
function _convertRange2d($range, $class=0)
	{

		// TODO: possible class value 0,1,2 check Formula.pm
		// Split the range into 2 cell refs
		if (preg_match('/^(\$)?([A-Ia-i]?[A-Za-z])(\$)?(\d+)\:(\$)?([A-Ia-i]?[A-Za-z])(\$)?(\d+)$/', $range)) {
			list($cell1, $cell2) = explode(':', $range);
		} else {
			// TODO: use real error codes
			throw new PHPExcel_Writer_Exception("Unknown range separator");
		}

		// Convert the cell references
		list($row1, $col1) = $this->_cellToPackedRowcol($cell1);
		list($row2, $col2) = $this->_cellToPackedRowcol($cell2);

		// The ptg value depends on the class of the ptg.
		if ($class == 0) {
			$ptgArea = pack("C", $this->ptg['ptgArea']);
		} elseif ($class == 1) {
			$ptgArea = pack("C", $this->ptg['ptgAreaV']);
		} elseif ($class == 2) {
			$ptgArea = pack("C", $this->ptg['ptgAreaA']);
		} else {
			// TODO: use real error codes
			throw new PHPExcel_Writer_Exception("Unknown class $class");
		}
		return $ptgArea . $row1 . $row2 . $col1. $col2;
	}
604396
public function updateNamedFormulas(PHPExcel $pPhpExcel, $oldName = '', $newName = '')
    {
        if ($oldName == '') {
            return;
        }

        foreach ($pPhpExcel->getWorksheetIterator() as $sheet) {
            foreach ($sheet->getCellCollection(false) as $cellID) {
                $cell = $sheet->getCell($cellID);
                if (($cell !== null) && ($cell->getDataType() == PHPExcel_Cell_DataType::TYPE_FORMULA)) {
                    $formula = $cell->getValue();
                    if (strpos($formula, $oldName) !== false) {
                        $formula = str_replace("'" . $oldName . "'!", "'" . $newName . "'!", $formula);
                        $formula = str_replace($oldName . "!", $newName . "!", $formula);
                        $cell->setValueExplicit($formula, PHPExcel_Cell_DataType::TYPE_FORMULA);
                    }
                }
            }
        }
    }
389325
public function cell(string $content = '') : ContentCell
    {
        $this->addCell($cell = new ContentCell);

        if ($content) {
            $cell->content($content);
        }

        return $cell;
    }
468384
public function writeFile($sheet)
	{
		if (!isset($this->format))
			$this->format = 'Xlsx';
		$objectwriter = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($sheet, $this->format);
		$path = 'php://output';
		if (isset($this->savePath) && $this->savePath != null) {
			$path = $this->savePath . '/' . $this->getFileName();
		}
		$objectwriter->setOffice2003Compatibility($this->compatibilityOffice2003);
		$objectwriter->setPreCalculateFormulas($this->preCalculationFormula);
		$objectwriter->save($path);
		if ($path == 'php://output')
    		  exit();
		
    		 return true;
	}
198510
function($Cell, oCell) {
			var bGroup = TableUtils.Grouping.isInGroupingRow($Cell);
			var bSum = TableUtils.Grouping.isInSumRow($Cell);
			var bSupportStyleClass = !!oCell && !!oCell.hasStyleClass;

			var bIsRowHidden = $Cell.parent().hasClass("sapUiTableRowHidden");
			var bIsCellHidden = $Cell.hasClass("sapUiTableCellHidden");
			var bNoMeasureInFirstCellInGroup = bGroup && $Cell.hasClass("sapUiTableCellFirst") && !$Cell.hasClass("sapUiTableMeasureCell");
			var bGroupCellHiddenByApp = bGroup && bSupportStyleClass && oCell.hasStyleClass("sapUiAnalyticalTableGroupCellHidden");
			var bSumCellHiddenByApp = bSum && bSupportStyleClass && oCell.hasStyleClass("sapUiAnalyticalTableSumCellHidden");

			return bIsRowHidden || bIsCellHidden || bNoMeasureInFirstCellInGroup || bGroupCellHiddenByApp || bSumCellHiddenByApp;
		}
809796
public static function compareCells(PHPExcel_Cell $a, PHPExcel_Cell $b)
    {
        if ($a->getRow() < $b->getRow()) {
            return -1;
        } elseif ($a->getRow() > $b->getRow()) {
            return 1;
        } elseif (self::columnIndexFromString($a->getColumn()) < self::columnIndexFromString($b->getColumn())) {
            return -1;
        } else {
            return 1;
        }
    }
1252721
function _convertNumber($num)
	{
		// Integer in the range 0..2**16-1
		if ((preg_match("/^\d+$/", $num)) and ($num <= 65535)) {
			return pack("Cv", $this->ptg['ptgInt'], $num);
		} else { // A float
			if (PHPExcel_Writer_Excel5_BIFFwriter::getByteOrder()) { // if it's Big Endian
				$num = strrev($num);
			}
			return pack("Cd", $this->ptg['ptgNum'], $num);
		}
	}
1348432
protected function cell(Cell $cell)
	{
		$html = '<td';
		$this->addAttributes($html, $cell->getAttributes());
		$html .= '>' . $cell->getContent() . '</td>';

		return $html;
	}
895625
public function getHyperlink()
	{
		if (!isset($this->_parent)) {
			throw new PHPExcel_Exception('Cannot get hyperlink for cell that is not bound to a worksheet');
		}

		return $this->getWorksheet()->getHyperlink($this->getCoordinate());
	}
239487
public function getCellHelper($cell)
    {
        $renderer = lcfirst(str_replace('\\', '', get_class($cell)));
        if (method_exists($this->view, 'plugin')) {
            $helper = $this->view->plugin($renderer);
        }
        return $helper;
    }
395795
static function special_effects($sheet, $lang)
    {
        if (!is_array($sheet)) {
            $sheet = ryzom_item_info($sheet);
        }

        if ($sheet === false || empty($sheet['effects'])) {
            return array();
        }

        $effects = array();
        foreach ($sheet['effects'] as $effect) {
            $params = explode(":", $effect);
            if (empty($params)) {
                continue;
            }

            $name = strtoupper(array_shift($params));

            $tt = ryzom_translate('uiItemFX_' . $name . '.uxt', $lang);
            $chunks = preg_split('/(%[pnrs])\d?/', $tt, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
            $i = 0;
            $ret = '';
            foreach ($chunks as $c) {
                switch ($c) {
                    case '%p':
                        $ret .= sprintf('%.1f', $params[$i] * 100);
                        $i++;
                        break;
                    case '%n':
                        $ret .= (int)$params[$i];
                        $i++;
                        break;
                    case '%r':
                        $ret .= sprintf('%.1f', $params[$i]);
                        $i++;
                        break;
                    case '%s':
                        $ret .= $params[$i];
                        $i++;
                        break;
                    default:
                        $ret .= $c;
                        break;
                }
            }

            $effects[] = $ret;
        }

        return $effects;
    }
1172876
public function getCell($pCoordinate = 'A1')
    {
        // Check cell collection
        if ($this->cellCollection->isDataSet(strtoupper($pCoordinate))) {
            return $this->cellCollection->getCacheData($pCoordinate);
        }

        // Worksheet reference?
        if (strpos($pCoordinate, '!') !== false) {
            $worksheetReference = PHPExcel_Worksheet::extractSheetTitle($pCoordinate, true);
            return $this->parent->getSheetByName($worksheetReference[0])->getCell(strtoupper($worksheetReference[1]));
        }

        // Named range?
        if ((!preg_match('/^'.PHPExcel_Calculation::CALCULATION_REGEXP_CELLREF.'$/i', $pCoordinate, $matches)) &&
            (preg_match('/^'.PHPExcel_Calculation::CALCULATION_REGEXP_NAMEDRANGE.'$/i', $pCoordinate, $matches))) {
            $namedRange = PHPExcel_NamedRange::resolveRange($pCoordinate, $this);
            if ($namedRange !== null) {
                $pCoordinate = $namedRange->getRange();
                return $namedRange->getWorksheet()->getCell($pCoordinate);
            }
        }

        // Uppercase coordinate
        $pCoordinate = strtoupper($pCoordinate);

        if (strpos($pCoordinate, ':') !== false || strpos($pCoordinate, ',') !== false) {
            throw new PHPExcel_Exception('Cell coordinate can not be a range of cells.');
        } elseif (strpos($pCoordinate, '$') !== false) {
            throw new PHPExcel_Exception('Cell coordinate must not be absolute.');
        }

        // Create new cell object
        return $this->createNewCell($pCoordinate);
    }
250644
function($Cell) {
			var oTable = this.getTable(),
				sTableId = oTable.getId(),
				bIsInGroupingRow = TableUtils.Grouping.isInGroupingRow($Cell),
				bIsInSumRow = TableUtils.Grouping.isInSumRow($Cell),
				iRow = $Cell.attr("data-sap-ui-rowindex"),
				oRow = oTable.getRows()[iRow],
				bHidden = ExtensionHelper.isHiddenCell($Cell),
				aDefaultLabels = ExtensionHelper.getAriaAttributesFor(this, TableAccExtension.ELEMENTTYPES.ROWACTION)["aria-labelledby"] || [],
				aLabels = [sTableId + "-rownumberofrows", sTableId + "-colnumberofcols"].concat(aDefaultLabels),
				aDescriptions = [];

			if (bIsInGroupingRow) {
				aLabels.push(sTableId + "-ariarowgrouplabel");
				aLabels.push(sTableId + "-rows-row" + iRow + "-groupHeader");
				aLabels.push(sTableId + (oRow._bIsExpanded ? "-rowcollapsetext" : "-rowexpandtext"));
			}

			if (bIsInSumRow) {
				var iLevel = $Cell.data("sap-ui-level");
				if (iLevel == 0) {
					aLabels.push(sTableId + "-ariagrandtotallabel");
				} else if (iLevel > 0) {
					aLabels.push(sTableId + "-ariagrouptotallabel");
					aLabels.push(sTableId + "-rows-row" + iRow + "-groupHeader");
				}
			}

			if (!bIsInSumRow && !bIsInGroupingRow && $Cell.attr("aria-selected") == "true") {
				aLabels.push(sTableId + "-ariarowselected");
			}

			if (TableUtils.hasRowHighlights(oTable) && !bIsInGroupingRow && !bIsInSumRow) {
				aLabels.push(oRow.getId() + "-highlighttext");
			}

			var sText = "";
			if (!bHidden) {
				var oRowAction = oRow.getRowAction();
				if (oRowAction) {
					var oInfo = oRowAction.getAccessibilityInfo();
					if (oInfo) {
						aLabels.push(sTableId + "-cellacc");
						sText = oInfo.description;
						if (TableUtils.getInteractiveElements($Cell) !== null) {
							aDescriptions.push(sTableId + "-toggleedit");
						}
					}
				}
			}

			ExtensionHelper.performCellModifications(this, $Cell, aDefaultLabels, [], aLabels, aDescriptions, sText);
		}
780166
public function hasHyperlink()
    {
        if (!isset($this->parent)) {
            throw new PHPExcel_Exception('Cannot check for hyperlink when cell is not bound to a worksheet');
        }

        return $this->getWorksheet()->hyperlinkExists($this->getCoordinate());
    }
695914
public function bindValue(Cell $cell, $value)
    {
        if (is_array($value)) {
            $value = \json_encode($value);
        }

        return parent::bindValue($cell, $value);
    }