Ods writer repects PreCalculateFormulas flag
The OpenDocument Writer did not respect the "preCalculateFormulas" flag that can be set to speed up saving process, now it does. Closes #142
This commit is contained in:
parent
4c42afe7b8
commit
77199c9877
|
@ -224,10 +224,13 @@ class Content extends WriterPart
|
||||||
throw new Exception('Writing of error not implemented yet.');
|
throw new Exception('Writing of error not implemented yet.');
|
||||||
break;
|
break;
|
||||||
case DataType::TYPE_FORMULA:
|
case DataType::TYPE_FORMULA:
|
||||||
try {
|
$formulaValue = $cell->getValue();
|
||||||
$formulaValue = $cell->getCalculatedValue();
|
if ($this->getParentWriter()->getPreCalculateFormulas()) {
|
||||||
} catch (\Exception $e) {
|
try {
|
||||||
$formulaValue = $cell->getValue();
|
$formulaValue = $cell->getCalculatedValue();
|
||||||
|
} catch (Exception $e) {
|
||||||
|
// don't do anything
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$objWriter->writeAttribute('table:formula', 'of:' . $cell->getValue());
|
$objWriter->writeAttribute('table:formula', 'of:' . $cell->getValue());
|
||||||
if (is_numeric($formulaValue)) {
|
if (is_numeric($formulaValue)) {
|
||||||
|
|
Loading…
Reference in New Issue