sw/source/core/inc/fntcache.hxx | 1 - sw/source/core/txtnode/fntcache.cxx | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-)
New commits: commit 92bded1ca06df4a5f989040c2de825bb314db4a9 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Fri Oct 18 12:46:00 2019 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Fri Oct 18 14:58:23 2019 +0200 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 <sberg...@redhat.com> 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) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits