summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/outdev.h2
-rw-r--r--vcl/source/outdev/font.cxx10
2 files changed, 6 insertions, 6 deletions
diff --git a/vcl/inc/outdev.h b/vcl/inc/outdev.h
index e468ae22534a..dcde57c09ee9 100644
--- a/vcl/inc/outdev.h
+++ b/vcl/inc/outdev.h
@@ -149,7 +149,7 @@ public:
ImplFontEntry* GetFontEntry( PhysicalFontCollection*,
const Font&, const Size& rPixelSize, float fExactHeight);
- ImplFontEntry* GetFontEntry( PhysicalFontCollection*, const FontSelectPattern& );
+ ImplFontEntry* GetFontEntry( PhysicalFontCollection*, FontSelectPattern& );
ImplFontEntry* GetGlyphFallbackFont( PhysicalFontCollection*, FontSelectPattern&,
int nFallbackLevel, OUString& rMissingCodes );
void Release( ImplFontEntry* );
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index d8b77db84134..6de4765e7093 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -1227,23 +1227,23 @@ ImplFontEntry* ImplFontCache::GetFontEntry( PhysicalFontCollection* pFontList,
}
ImplFontEntry* ImplFontCache::GetFontEntry( PhysicalFontCollection* pFontList,
- const FontSelectPattern& rFontSelData )
+ FontSelectPattern& aFontSelData )
{
+ const FontSelectPattern aFontSelDataOrig(aFontSelData);
// check if a directly matching logical font instance is already cached,
// the most recently used font usually has a hit rate of >50%
ImplFontEntry *pEntry = NULL;
PhysicalFontFamily* pFontFamily = NULL;
IFSD_Equal aIFSD_Equal;
- if( mpFirstEntry && aIFSD_Equal( rFontSelData, mpFirstEntry->maFontSelData ) )
+ if( mpFirstEntry && aIFSD_Equal( aFontSelData, mpFirstEntry->maFontSelData ) )
pEntry = mpFirstEntry;
else
{
- FontInstanceList::iterator it = maFontInstanceList.find( rFontSelData );
+ FontInstanceList::iterator it = maFontInstanceList.find( aFontSelData );
if( it != maFontInstanceList.end() )
pEntry = (*it).second;
}
- FontSelectPattern aFontSelData(rFontSelData);
if( !pEntry ) // no direct cache hit
{
// find the best matching logical font family and update font selector accordingly
@@ -1318,7 +1318,7 @@ ImplFontEntry* ImplFontCache::GetFontEntry( PhysicalFontCollection* pFontList,
// Add the new entry to the cache with the original FontSelectPattern,
// so that we can find it next time as a direct cache hit.
- maFontInstanceList[ rFontSelData ] = pEntry;
+ maFontInstanceList[ aFontSelDataOrig ] = pEntry;
}
mpFirstEntry = pEntry;