diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-10 09:50:50 +1100 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-10 02:31:46 +0000 |
commit | 15dae2693e807014d20415085673ad3af7c79f8f (patch) | |
tree | eda614fe216f99693665ed281ceb62c170f54656 /vcl/win | |
parent | 33208c347182d8fe80bfbe34fe3e0b4b21a0a7a2 (diff) |
vcl: (Windows only) Changed ImplWinFontEntry name to WinFontInstance
The base class is no longer called ImplFontEntry, but is now
LogicalFontInstance. I want to bring the names in the class hierachy
into line for consistency, so this change is necessary.
Change-Id: Ie24197c140bf152f78ed7faf46b7509b82bcbdee
Reviewed-on: https://gerrit.libreoffice.org/21297
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/gdi/salfont.cxx | 2 | ||||
-rw-r--r-- | vcl/win/gdi/winlayout.cxx | 32 | ||||
-rw-r--r-- | vcl/win/gdi/winlayout.hxx | 14 |
3 files changed, 24 insertions, 24 deletions
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index bf32700b068a..76a9da5047e6 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -1437,7 +1437,7 @@ sal_uInt16 WinSalGraphics::SetFont( FontSelectPattern* pFont, int nFallbackLevel } DBG_ASSERT( pFont->mpFontData, "WinSalGraphics mpFontData==NULL"); - mpWinFontEntry[ nFallbackLevel ] = reinterpret_cast<ImplWinFontEntry*>( pFont->mpFontInstance ); + mpWinFontEntry[ nFallbackLevel ] = reinterpret_cast<WinFontInstance*>( pFont->mpFontInstance ); mpWinFontData[ nFallbackLevel ] = static_cast<const ImplWinFontData*>( pFont->mpFontData ); HFONT hOldFont = 0; diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx index 828634d275f4..5810c34d67f5 100644 --- a/vcl/win/gdi/winlayout.cxx +++ b/vcl/win/gdi/winlayout.cxx @@ -86,11 +86,11 @@ struct OpenGLGlyphCacheChunk }; // win32 specific physical font instance -class ImplWinFontEntry : public LogicalFontInstance +class WinFontInstance : public LogicalFontInstance { public: - explicit ImplWinFontEntry( FontSelectPattern& ); - virtual ~ImplWinFontEntry(); + explicit WinFontInstance( FontSelectPattern& ); + virtual ~WinFontInstance(); void setupGLyphy(HDC hDC); private: @@ -122,7 +122,7 @@ private: bool mbGLyphySetupCalled; }; -GLuint ImplWinFontEntry::mnGLyphyProgram = 0; +GLuint WinFontInstance::mnGLyphyProgram = 0; #ifdef SAL_LOG_INFO @@ -192,7 +192,7 @@ inline std::basic_ostream<charT, traits> & operator <<( return stream << "}"; } -bool ImplWinFontEntry::GlyphIsCached(int nGlyphIndex) const +bool WinFontInstance::GlyphIsCached(int nGlyphIndex) const { if (nGlyphIndex == DROPPED_OUTGLYPH) return true; @@ -205,7 +205,7 @@ bool ImplWinFontEntry::GlyphIsCached(int nGlyphIndex) const return false; } -bool ImplWinFontEntry::AddChunkOfGlyphs(int nGlyphIndex, const WinLayout& rLayout, SalGraphics& rGraphics) +bool WinFontInstance::AddChunkOfGlyphs(int nGlyphIndex, const WinLayout& rLayout, SalGraphics& rGraphics) { const int DEFAULT_CHUNK_SIZE = 20; @@ -443,7 +443,7 @@ bool ImplWinFontEntry::AddChunkOfGlyphs(int nGlyphIndex, const WinLayout& rLayou return true; } -const OpenGLGlyphCacheChunk& ImplWinFontEntry::GetCachedGlyphChunkFor(int nGlyphIndex) const +const OpenGLGlyphCacheChunk& WinFontInstance::GetCachedGlyphChunkFor(int nGlyphIndex) const { auto i = maOpenGLGlyphCache.cbegin(); while (i != maOpenGLGlyphCache.cend() && nGlyphIndex >= i->mnFirstGlyph + i->mnGlyphCount) @@ -453,7 +453,7 @@ const OpenGLGlyphCacheChunk& ImplWinFontEntry::GetCachedGlyphChunkFor(int nGlyph return *i; } -void ImplWinFontEntry::setupGLyphy(HDC hDC) +void WinFontInstance::setupGLyphy(HDC hDC) { if (mbGLyphySetupCalled) return; @@ -508,7 +508,7 @@ void ImplWinFontEntry::setupGLyphy(HDC hDC) mpGLyphyFont = demo_font_create(hNewDC, mpGLyphyAtlas); } -WinLayout::WinLayout(HDC hDC, const ImplWinFontData& rWFD, ImplWinFontEntry& rWFE, bool bUseOpenGL) +WinLayout::WinLayout(HDC hDC, const ImplWinFontData& rWFD, WinFontInstance& rWFE, bool bUseOpenGL) : mhDC( hDC ), mhFont( (HFONT)GetCurrentObject(hDC,OBJ_FONT) ), mnBaseAdv( 0 ), @@ -719,7 +719,7 @@ static void InitUSP() } UniscribeLayout::UniscribeLayout(HDC hDC, const ImplWinFontData& rWinFontData, - ImplWinFontEntry& rWinFontEntry, bool bUseOpenGL) + WinFontInstance& rWinFontEntry, bool bUseOpenGL) : WinLayout(hDC, rWinFontData, rWinFontEntry, bUseOpenGL), mpScriptItems( NULL ), mpVisualItems( NULL ), @@ -2754,7 +2754,7 @@ float gr_fontAdvance(const void* appFontHandle, gr_uint16 glyphId) return gm.gmCellIncX; } -GraphiteWinLayout::GraphiteWinLayout(HDC hDC, const ImplWinFontData& rWFD, ImplWinFontEntry& rWFE, bool bUseOpenGL) throw() +GraphiteWinLayout::GraphiteWinLayout(HDC hDC, const ImplWinFontData& rWFD, WinFontInstance& rWFE, bool bUseOpenGL) throw() : WinLayout(hDC, rWFD, rWFE, bUseOpenGL), mpFont(NULL), maImpl(rWFD.GraphiteFace(), rWFE) { @@ -2915,7 +2915,7 @@ SalLayout* WinSalGraphics::GetTextLayout( ImplLayoutArgs& /*rArgs*/, int nFallba WinLayout* pWinLayout = NULL; const ImplWinFontData& rFontFace = *mpWinFontData[ nFallbackLevel ]; - ImplWinFontEntry& rFontInstance = *mpWinFontEntry[ nFallbackLevel ]; + WinFontInstance& rFontInstance = *mpWinFontEntry[ nFallbackLevel ]; bool bUseOpenGL = OpenGLHelper::isVCLOpenGLEnabled() && !mbPrinter; @@ -2950,7 +2950,7 @@ int WinSalGraphics::GetMinKashidaWidth() return nMinKashida; } -ImplWinFontEntry::ImplWinFontEntry( FontSelectPattern& rFSD ) +WinFontInstance::WinFontInstance( FontSelectPattern& rFSD ) : LogicalFontInstance( rFSD ) , mpGLyphyAtlas( nullptr ) , mpGLyphyFont( nullptr ) @@ -2962,13 +2962,13 @@ ImplWinFontEntry::ImplWinFontEntry( FontSelectPattern& rFSD ) mbGLyphySetupCalled = false; } -ImplWinFontEntry::~ImplWinFontEntry() +WinFontInstance::~WinFontInstance() { if( maScriptCache != NULL ) ScriptFreeCache( &maScriptCache ); } -bool ImplWinFontEntry::InitKashidaHandling( HDC hDC ) +bool WinFontInstance::InitKashidaHandling( HDC hDC ) { if( mnMinKashidaWidth >= 0 ) // already cached? return mnMinKashidaWidth; @@ -3003,7 +3003,7 @@ PhysicalFontFace* ImplWinFontData::Clone() const LogicalFontInstance* ImplWinFontData::CreateFontInstance( FontSelectPattern& rFSD ) const { - LogicalFontInstance* pFontInstance = new ImplWinFontEntry( rFSD ); + LogicalFontInstance* pFontInstance = new WinFontInstance( rFSD ); return pFontInstance; } diff --git a/vcl/win/gdi/winlayout.hxx b/vcl/win/gdi/winlayout.hxx index ff4e5cced2a3..c7a532bbe719 100644 --- a/vcl/win/gdi/winlayout.hxx +++ b/vcl/win/gdi/winlayout.hxx @@ -34,13 +34,13 @@ #include <graphite_layout.hxx> #endif -class ImplWinFontEntry; +class WinFontInstance; struct VisualItem; class WinLayout : public SalLayout { public: - WinLayout(HDC, const ImplWinFontData&, ImplWinFontEntry&, bool bUseOpenGL); + WinLayout(HDC, const ImplWinFontData&, WinFontInstance&, bool bUseOpenGL); virtual ~WinLayout(); virtual void InitFont() const override; void SetFontScale( float f ) { mfFontScale = f; } @@ -65,13 +65,13 @@ public: bool mbUseOpenGL; ///< We need to render via OpenGL const ImplWinFontData& mrWinFontData; - ImplWinFontEntry& mrWinFontEntry; + WinFontInstance& mrWinFontEntry; }; class UniscribeLayout : public WinLayout { public: - UniscribeLayout(HDC, const ImplWinFontData&, ImplWinFontEntry&, bool bUseOpenGL); + UniscribeLayout(HDC, const ImplWinFontData&, WinFontInstance&, bool bUseOpenGL); virtual bool LayoutText( ImplLayoutArgs& ) override; virtual void AdjustLayout( ImplLayoutArgs& ) override; @@ -145,13 +145,13 @@ private: class GraphiteLayoutWinImpl : public GraphiteLayout { public: - GraphiteLayoutWinImpl(const gr_face * pFace, ImplWinFontEntry & rFont) + GraphiteLayoutWinImpl(const gr_face * pFace, WinFontInstance & rFont) throw() : GraphiteLayout(pFace), mrFont(rFont) {}; virtual ~GraphiteLayoutWinImpl() throw() {}; virtual sal_GlyphId getKashidaGlyph(int & rWidth) override; private: - ImplWinFontEntry & mrFont; + WinFontInstance & mrFont; }; /// This class uses the SIL Graphite engine to provide complex text layout services to the VCL @@ -162,7 +162,7 @@ private: grutils::GrFeatureParser * mpFeatures; mutable GraphiteLayoutWinImpl maImpl; public: - GraphiteWinLayout(HDC hDC, const ImplWinFontData& rWFD, ImplWinFontEntry& rWFE, bool bUseOpenGL) throw(); + GraphiteWinLayout(HDC hDC, const ImplWinFontData& rWFD, WinFontInstance& rWFE, bool bUseOpenGL) throw(); virtual ~GraphiteWinLayout(); // used by upper layers |