summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/output2.cxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2022-04-07 12:06:27 +0200
committerLuboš Luňák <l.lunak@collabora.com>2022-04-08 21:29:19 +0200
commit3e5863605881c6de6ad130fe06883c176ca1c69f (patch)
tree9e7863107a162eba8952710af00c281b91a12633 /sc/source/ui/view/output2.cxx
parent53fe4a26c7c4691fcf9d07d022adfd45247d176b (diff)
use just one shared global SalLayoutGlyphsCache
Now the cache should be capable of detecting what needs to stay the same for having the same result, so it should be enough to have just one cache that can reuse results even between callers from different places. Change-Id: Ibdc0303f5b727d1a1d7be91d61db9465ed95e1c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132673 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc/source/ui/view/output2.cxx')
-rw-r--r--sc/source/ui/view/output2.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 90f6fdacf91e..ea35193dc24b 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -121,7 +121,6 @@ class ScDrawStringsVars
tools::Long nExpWidth;
ScRefCellValue maLastCell;
- mutable SalLayoutGlyphsCache mCachedGlyphs;
sal_uLong nValueFormat;
bool bLineBreak;
bool bRepeat;
@@ -189,7 +188,7 @@ public:
// to lay out the text, which is relatively slow, so cache that operation.
const SalLayoutGlyphs* GetLayoutGlyphs(const OUString& rString) const
{
- return mCachedGlyphs.GetLayoutGlyphs(pOutput->pFmtDevice, rString);
+ return SalLayoutGlyphsCache::self()->GetLayoutGlyphs(pOutput->pFmtDevice, rString);
}
private:
@@ -307,7 +306,6 @@ void ScDrawStringsVars::SetPattern(
nSignWidth = 0;
nDotWidth = 0;
nExpWidth = 0;
- mCachedGlyphs.clear();
pPattern = pNew;
pCondSet = pSet;
@@ -462,7 +460,6 @@ void ScDrawStringsVars::SetPatternSimple( const ScPatternAttr* pNew, const SfxIt
nSignWidth = 0;
nDotWidth = 0;
nExpWidth = 0;
- mCachedGlyphs.clear();
// Is called, when the font variables do not change (!StringDiffer)