Kaydet (Commit) 67925c3b authored tarafından Chris Sherlock's avatar Chris Sherlock

vcl: Rename ImplServerFontEntry to ServerFontInstance

I want to keep this class in line with the naming of the base class.
ImplServerFontEntry derives from LogicalFontInstance, so the name
ServerFontInstance is a better fit.

Change-Id: I2d2e3919634c2aaa8e5d6d63b0bf718dec18c336
Reviewed-on: https://gerrit.libreoffice.org/21284Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarChris Sherlock <chris.sherlock79@gmail.com>
üst c71de145
...@@ -434,7 +434,7 @@ ImplFTSFontData::ImplFTSFontData( FreetypeFontInfo* pFI, const ImplFontAttribute ...@@ -434,7 +434,7 @@ ImplFTSFontData::ImplFTSFontData( FreetypeFontInfo* pFI, const ImplFontAttribute
LogicalFontInstance* ImplFTSFontData::CreateFontInstance( FontSelectPattern& rFSD ) const LogicalFontInstance* ImplFTSFontData::CreateFontInstance( FontSelectPattern& rFSD ) const
{ {
ImplServerFontEntry* pEntry = new ImplServerFontEntry( rFSD ); ServerFontInstance* pEntry = new ServerFontInstance( rFSD );
return pEntry; return pEntry;
} }
...@@ -464,7 +464,7 @@ ServerFont::ServerFont( const FontSelectPattern& rFSD, FreetypeFontInfo* pFI ) ...@@ -464,7 +464,7 @@ ServerFont::ServerFont( const FontSelectPattern& rFSD, FreetypeFontInfo* pFI )
{ {
// TODO: move update of mpFontInstance into FontEntry class when // TODO: move update of mpFontInstance into FontEntry class when
// it becomes responsible for the ServerFont instantiation // it becomes responsible for the ServerFont instantiation
static_cast<ImplServerFontEntry*>(rFSD.mpFontInstance)->SetServerFont( this ); static_cast<ServerFontInstance*>(rFSD.mpFontInstance)->SetServerFont( this );
maFaceFT = pFI->GetFaceFT(); maFaceFT = pFI->GetFaceFT();
......
...@@ -353,13 +353,13 @@ void ServerFont::GarbageCollect( long nMinLruIndex ) ...@@ -353,13 +353,13 @@ void ServerFont::GarbageCollect( long nMinLruIndex )
} }
} }
ImplServerFontEntry::ImplServerFontEntry( FontSelectPattern& rFSD ) ServerFontInstance::ServerFontInstance( FontSelectPattern& rFSD )
: LogicalFontInstance( rFSD ) : LogicalFontInstance( rFSD )
, mpServerFont( nullptr ) , mpServerFont( nullptr )
, mbGotFontOptions( false ) , mbGotFontOptions( false )
{} {}
void ImplServerFontEntry::SetServerFont(ServerFont* p) void ServerFontInstance::SetServerFont(ServerFont* p)
{ {
if (p == mpServerFont) if (p == mpServerFont)
return; return;
...@@ -370,7 +370,7 @@ void ImplServerFontEntry::SetServerFont(ServerFont* p) ...@@ -370,7 +370,7 @@ void ImplServerFontEntry::SetServerFont(ServerFont* p)
mpServerFont->AddRef(); mpServerFont->AddRef();
} }
ImplServerFontEntry::~ImplServerFontEntry() ServerFontInstance::~ServerFontInstance()
{ {
// TODO: remove the ServerFont here instead of in the GlyphCache // TODO: remove the ServerFont here instead of in the GlyphCache
if (mpServerFont) if (mpServerFont)
......
...@@ -560,7 +560,7 @@ ImplPspFontData::ImplPspFontData( const psp::FastPrintFontInfo& rInfo ) ...@@ -560,7 +560,7 @@ ImplPspFontData::ImplPspFontData( const psp::FastPrintFontInfo& rInfo )
LogicalFontInstance* ImplPspFontData::CreateFontInstance( FontSelectPattern& rFSD ) const LogicalFontInstance* ImplPspFontData::CreateFontInstance( FontSelectPattern& rFSD ) const
{ {
ImplServerFontEntry* pEntry = new ImplServerFontEntry( rFSD ); ServerFontInstance* pEntry = new ServerFontInstance( rFSD );
return pEntry; return pEntry;
} }
......
...@@ -185,7 +185,7 @@ public: ...@@ -185,7 +185,7 @@ public:
private: private:
friend class GlyphCache; friend class GlyphCache;
friend class ServerFontLayout; friend class ServerFontLayout;
friend class ImplServerFontEntry; friend class ServerFontInstance;
friend class X11SalGraphics; friend class X11SalGraphics;
friend class CairoTextRender; friend class CairoTextRender;
...@@ -243,11 +243,11 @@ private: ...@@ -243,11 +243,11 @@ private:
}; };
// a class for cache entries for physical font instances that are based on serverfonts // a class for cache entries for physical font instances that are based on serverfonts
class VCL_DLLPUBLIC ImplServerFontEntry : public LogicalFontInstance class VCL_DLLPUBLIC ServerFontInstance : public LogicalFontInstance
{ {
public: public:
ImplServerFontEntry( FontSelectPattern& ); ServerFontInstance( FontSelectPattern& );
virtual ~ImplServerFontEntry(); virtual ~ServerFontInstance();
void SetServerFont(ServerFont* p); void SetServerFont(ServerFont* p);
void HandleFontOptions(); void HandleFontOptions();
......
...@@ -90,7 +90,7 @@ bool CairoTextRender::setFont( const FontSelectPattern *pEntry, int nFallbackLev ...@@ -90,7 +90,7 @@ bool CairoTextRender::setFont( const FontSelectPattern *pEntry, int nFallbackLev
mpServerFont[ nFallbackLevel ] = pServerFont; mpServerFont[ nFallbackLevel ] = pServerFont;
// apply font specific-hint settings // apply font specific-hint settings
ImplServerFontEntry* pSFE = static_cast<ImplServerFontEntry*>( pEntry->mpFontInstance ); ServerFontInstance* pSFE = static_cast<ServerFontInstance*>( pEntry->mpFontInstance );
pSFE->HandleFontOptions(); pSFE->HandleFontOptions();
return true; return true;
...@@ -101,7 +101,7 @@ bool CairoTextRender::setFont( const FontSelectPattern *pEntry, int nFallbackLev ...@@ -101,7 +101,7 @@ bool CairoTextRender::setFont( const FontSelectPattern *pEntry, int nFallbackLev
FontConfigFontOptions* GetFCFontOptions( const ImplFontAttributes& rFontAttributes, int nSize); FontConfigFontOptions* GetFCFontOptions( const ImplFontAttributes& rFontAttributes, int nSize);
void ImplServerFontEntry::HandleFontOptions() void ServerFontInstance::HandleFontOptions()
{ {
if( !mpServerFont ) if( !mpServerFont )
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment