diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-26 15:20:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-28 12:48:40 +0200 |
commit | 1ec6de1cff6a5f2c15aa85c12c6e327282ca8703 (patch) | |
tree | f9d1f693747ff00139213a1e000d04deda8b9a9a /i18npool/source/defaultnumberingprovider | |
parent | 47e04cf31c6165dd55dc20962ad9c72962b958bd (diff) |
tdf#125706 Fields slow down down load, cache NativeNumberSupplierService
Cache the NativeNumberSupplierService in DefaultNumberingProvider.
Takes the load time from 5s to 4.5s.
Change-Id: I13de1cd4db8785a1c94d40fb163bcc9b80a5c7f5
Reviewed-on: https://gerrit.libreoffice.org/74741
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool/source/defaultnumberingprovider')
-rw-r--r-- | i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx index ce6eb1dde781..5e21a5a4dc5d 100644 --- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx +++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx @@ -905,8 +905,9 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal } if (natNum) { - rtl::Reference<NativeNumberSupplierService> xNatNum(new NativeNumberSupplierService); - result += xNatNum->getNativeNumberStringParams(OUString::number(number), locale, + if (!mxNatNum) + mxNatNum.set(new NativeNumberSupplierService); + result += mxNatNum->getNativeNumberStringParams(OUString::number(number), locale, natNum, sNatNumParams); } else if (tableSize) { if ( number > tableSize && !bRecycleSymbol) |