hopefullythelastone
This commit is contained in:
parent
937a91f687
commit
a88adcaf36
@ -36,16 +36,6 @@ class NumberFormat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param int $id
|
|
||||||
* @return NumberFormat
|
|
||||||
*/
|
|
||||||
public function setId($id)
|
|
||||||
{
|
|
||||||
$this->id = $id;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param bool $commas
|
* @param bool $commas
|
||||||
* @return NumberFormat
|
* @return NumberFormat
|
||||||
@ -56,14 +46,6 @@ class NumberFormat
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return int|null
|
|
||||||
*/
|
|
||||||
public function getId()
|
|
||||||
{
|
|
||||||
return $this->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $type
|
* @param int $type
|
||||||
* @return NumberFormat
|
* @return NumberFormat
|
||||||
|
@ -75,7 +75,8 @@ EOD;
|
|||||||
foreach ($registeredFormats as $styleId) {
|
foreach ($registeredFormats as $styleId) {
|
||||||
$style = $this->styleRegistry->getStyleFromStyleId($styleId);
|
$style = $this->styleRegistry->getStyleFromStyleId($styleId);
|
||||||
$format = $style->getNumberFormat();
|
$format = $style->getNumberFormat();
|
||||||
$content .= '<numFmt numFmtId="'.$format->getId().'" formatCode="'.$format->getFormatCode().'"/>';
|
$formatId = $this->styleRegistry->getNumberFormatIdForStyleId($styleId);
|
||||||
|
$content .= '<numFmt numFmtId="'.$formatId.'" formatCode="'.$format->getFormatCode().'"/>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$content .= '</numFmts>';
|
$content .= '</numFmts>';
|
||||||
|
@ -121,10 +121,8 @@ class StyleRegistry extends \Box\Spout\Writer\Common\Manager\Style\StyleRegistry
|
|||||||
$registeredFormatId = $this->styleIdToNumberFormatMappingTable[$registeredStyleId];
|
$registeredFormatId = $this->styleIdToNumberFormatMappingTable[$registeredStyleId];
|
||||||
$this->styleIdToNumberFormatMappingTable[$styleId] = $registeredFormatId;
|
$this->styleIdToNumberFormatMappingTable[$styleId] = $registeredFormatId;
|
||||||
} else {
|
} else {
|
||||||
$formatId = count($this->registeredNumberFormats);
|
|
||||||
$this->registeredNumberFormats[$serializedFormat] = $styleId;
|
$this->registeredNumberFormats[$serializedFormat] = $styleId;
|
||||||
$this->styleIdToNumberFormatMappingTable[$styleId] = $formatId;
|
$this->styleIdToNumberFormatMappingTable[$styleId] = count($this->registeredNumberFormats);
|
||||||
$format->setId($formatId);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// The fillId maps a style to a fill declaration
|
// The fillId maps a style to a fill declaration
|
||||||
|
Loading…
x
Reference in New Issue
Block a user