diff options
-rw-r--r-- | sw/source/core/inc/fntcache.hxx | 5 | ||||
-rw-r--r-- | sw/source/core/txtnode/fntcache.cxx | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sw/source/core/inc/fntcache.hxx b/sw/source/core/inc/fntcache.hxx index f46acd966a75..456c235d5ff7 100644 --- a/sw/source/core/inc/fntcache.hxx +++ b/sw/source/core/inc/fntcache.hxx @@ -20,6 +20,9 @@ #ifndef INCLUDED_SW_SOURCE_CORE_INC_FNTCACHE_HXX #define INCLUDED_SW_SOURCE_CORE_INC_FNTCACHE_HXX +#include <sal/config.h> + +#include <cstdint> #include <map> #include <vcl/font.hxx> @@ -99,7 +102,7 @@ class SwFntObj : public SwCacheObj static MapMode *pPixMap; public: - SwFntObj( const SwSubFont &rFont, const void* nFontCacheId, + SwFntObj( const SwSubFont &rFont, std::uintptr_t nFontCacheId, SwViewShell const *pSh ); virtual ~SwFntObj() override; diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 1809f631c380..6fa6b159705a 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -20,6 +20,7 @@ #include <memory> #include <sal/config.h> +#include <cstdint> #include <cstdlib> #include <i18nlangtag/mslangid.hxx> @@ -171,8 +172,8 @@ void SwFntCache::Flush( ) SwCache::Flush( ); } -SwFntObj::SwFntObj(const SwSubFont &rFont, const void* nFontCacheId, SwViewShell const *pSh) - : SwCacheObj(nFontCacheId) +SwFntObj::SwFntObj(const SwSubFont &rFont, std::uintptr_t nFontCacheId, SwViewShell const *pSh) + : SwCacheObj(reinterpret_cast<void *>(nFontCacheId)) , m_aFont(rFont) , m_pScrFont(nullptr) , m_pPrtFont(&m_aFont) @@ -2373,7 +2374,7 @@ SwFntAccess::SwFntAccess( const void* & rnFontCacheId, SwCacheObj *SwFntAccess::NewObj( ) { // "MagicNumber" used to identify Fonts - static sal_uInt8* fontCacheIdCounter = nullptr; + static std::uintptr_t fontCacheIdCounter = 0; // a new Font, a new "MagicNumber". return new SwFntObj( *static_cast<SwSubFont const *>(m_pOwner), ++fontCacheIdCounter, m_pShell ); } |