Difference between revisions of "Calc/Performance/Use of GetInputString When Saving Text Cells"

From Apache OpenOffice Wiki
Jump to: navigation, search
(New page: To get the content of text cells for saving, the implementation of the UNO API getFormula method is re-used (ScCellObj::GetInputString_Impl). For the API, a single quote character is added...)
 
(DISPLAYTITLE)
Line 1: Line 1:
 +
{{DISPLAYTITLE:Use of GetInputString When Saving Text Cells}}
 +
 
To get the content of text cells for saving, the implementation of the UNO API getFormula method is re-used (ScCellObj::GetInputString_Impl). For the API, a single quote character is added if the string value can be parsed as a number (this is needed so a setFormula call with the result string will create a text cell again). For the file format, this quote character isn't needed and is removed. But determining whether to add the quote involves parsing the string, so leaving that step out will improve the performance of saving files with many text cells.
 
To get the content of text cells for saving, the implementation of the UNO API getFormula method is re-used (ScCellObj::GetInputString_Impl). For the API, a single quote character is added if the string value can be parsed as a number (this is needed so a setFormula call with the result string will create a text cell again). For the file format, this quote character isn't needed and is removed. But determining whether to add the quote involves parsing the string, so leaving that step out will improve the performance of saving files with many text cells.
  

Revision as of 13:03, 9 March 2009


To get the content of text cells for saving, the implementation of the UNO API getFormula method is re-used (ScCellObj::GetInputString_Impl). For the API, a single quote character is added if the string value can be parsed as a number (this is needed so a setFormula call with the result string will create a text cell again). For the file format, this quote character isn't needed and is removed. But determining whether to add the quote involves parsing the string, so leaving that step out will improve the performance of saving files with many text cells.

This is Issue 99959 , fixed in CWS DEV300 calcperf04  .

Personal tools