summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-10-18 12:46:00 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-10-18 14:58:23 +0200
commit92bded1ca06df4a5f989040c2de825bb314db4a9 (patch)
treecc5cfcec62d7fcffc421091491094b5cb90ebce7 /sw
parenta4e9ba26d794ee20d06753eb4c4d35b17e034470 (diff)
mnFontCacheIdCounter is only used in SwFntAccess::NewObj
(and while at it, drop the misleading "m" prefix) Change-Id: Ib52ef1bb54c8fc627503bdf74e594df1fe4a5801 Reviewed-on: https://gerrit.libreoffice.org/81035 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/inc/fntcache.hxx1
-rw-r--r--sw/source/core/txtnode/fntcache.cxx6
2 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/core/inc/fntcache.hxx b/sw/source/core/inc/fntcache.hxx
index d5759ed9def3..f46acd966a75 100644
--- a/sw/source/core/inc/fntcache.hxx
+++ b/sw/source/core/inc/fntcache.hxx
@@ -56,7 +56,6 @@ void SwClearFntCacheTextGlyphs();
// Font cache, global variable, created/destroyed in txtinit.cxx
extern SwFntCache *pFntCache;
extern SwFntObj *pLastFont;
-extern sal_uInt8* mnFontCacheIdCounter;
/**
* Defines a substring on a given output device, to be used as an std::map<>
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index d5999b8f9bbe..1809f631c380 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -67,8 +67,6 @@ using namespace ::com::sun::star;
SwFntCache *pFntCache = nullptr;
// last Font set by ChgFntCache
SwFntObj *pLastFont = nullptr;
-// "MagicNumber" used to identify Fonts
-sal_uInt8* mnFontCacheIdCounter = nullptr;
static constexpr Color gWaveCol(COL_GRAY);
@@ -2374,8 +2372,10 @@ SwFntAccess::SwFntAccess( const void* & rnFontCacheId,
SwCacheObj *SwFntAccess::NewObj( )
{
+ // "MagicNumber" used to identify Fonts
+ static sal_uInt8* fontCacheIdCounter = nullptr;
// a new Font, a new "MagicNumber".
- return new SwFntObj( *static_cast<SwSubFont const *>(m_pOwner), ++mnFontCacheIdCounter, m_pShell );
+ return new SwFntObj( *static_cast<SwSubFont const *>(m_pOwner), ++fontCacheIdCounter, m_pShell );
}
TextFrameIndex SwFont::GetTextBreak(SwDrawTextInfo const & rInf, long nTextWidth)