[Libreoffice-commits] core.git: vcl/inc vcl/win
Chris Sherlock
chris.sherlock79 at gmail.com
Sat Jan 9 18:32:09 PST 2016
vcl/inc/win/salgdi.h | 4 ++--
vcl/win/gdi/salfont.cxx | 2 +-
vcl/win/gdi/winlayout.cxx | 32 ++++++++++++++++----------------
vcl/win/gdi/winlayout.hxx | 14 +++++++-------
4 files changed, 26 insertions(+), 26 deletions(-)
New commits:
commit 15dae2693e807014d20415085673ad3af7c79f8f
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Sun Jan 10 09:50:50 2016 +1100
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 at libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79 at gmail.com>
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index f1c8c3a..29f519a 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -40,7 +40,7 @@
#endif
class FontSelectPattern;
-class ImplWinFontEntry;
+class WinFontInstance;
class ImplFontAttrCache;
class OpenGLTexture;
class PhysicalFontCollection;
@@ -200,7 +200,7 @@ private:
HFONT mhFonts[ MAX_FALLBACK ]; // Font + Fallbacks
const ImplWinFontData* mpWinFontData[ MAX_FALLBACK ]; // pointer to the most recent font face
- ImplWinFontEntry* mpWinFontEntry[ MAX_FALLBACK ]; // pointer to the most recent font instance
+ WinFontInstance* mpWinFontEntry[ MAX_FALLBACK ]; // pointer to the most recent font instance
float mfFontScale[ MAX_FALLBACK ]; // allows metrics emulation of huge font sizes
float mfCurrentFontScale;
HRGN mhRegion; // vcl::Region Handle
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index bf32700..76a9da5 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 828634d..5810c34 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 ff4e5cc..c7a532b 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
More information about the Libreoffice-commits
mailing list