diff options
author | Noel Grandin <noel@peralex.com> | 2021-05-01 11:42:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-02 11:59:53 +0200 |
commit | ffde7949ab6bd434b0f086d1a3bdf83f31aeda48 (patch) | |
tree | 1e7b6be68604afb56c1e5d76227fe574d3abe856 /sc/inc/documentimport.hxx | |
parent | 9a02976a0738f077859f4afc5829388f35f4c103 (diff) |
tdf#79049 speed up OOXML workbook load (5)
Sc::NumUtil::isLatinScript is pretty hot, so add a small
cache to ScDocumentImport.
This takes my load time from 27s to 18s.
Change-Id: I51fa891836d678f0d8700653e3a3a095297aeae7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114987
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/inc/documentimport.hxx')
-rw-r--r-- | sc/inc/documentimport.hxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sc/inc/documentimport.hxx b/sc/inc/documentimport.hxx index 8dcb3726bde3..cefe2949dcc7 100644 --- a/sc/inc/documentimport.hxx +++ b/sc/inc/documentimport.hxx @@ -21,6 +21,7 @@ class EditTextObject; class ScDocument; class ScColumn; +class ScPatternAttr; class ScTokenArray; class ScFormulaCell; class ScStyleSheet; @@ -132,6 +133,10 @@ public: */ void broadcastRecalcAfterImport(); + /** small cache for hot call during import */ + bool isLatinScript(sal_uInt32 nFormat); + bool isLatinScript(const ScPatternAttr&); + private: void initColumn(ScColumn& rCol); static void broadcastRecalcAfterImportColumn(ScColumn& rCol); |