summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdf_sysfontinfo.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-08-14 22:16:22 -0700
committerLei Zhang <thestig@chromium.org>2015-08-14 22:16:22 -0700
commit2b1a2d528469cda4e9f3e36d3c7a649e0d476480 (patch)
tree91eea8ae70b87c632a06fba52ea06c0842e30878 /fpdfsdk/src/fpdf_sysfontinfo.cpp
parent62b2e912dc2a508972fbf01b25f7449c39ff1543 (diff)
downloadpdfium-2b1a2d528469cda4e9f3e36d3c7a649e0d476480.tar.xz
Merge to XFA: Use override in more classes in fpdfsdk/
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1287193005 . (cherry picked from commit 0f6b51c0fdd14f5762bf3c7412ac59c825443cc3) Review URL: https://codereview.chromium.org/1288393004 .
Diffstat (limited to 'fpdfsdk/src/fpdf_sysfontinfo.cpp')
-rw-r--r--fpdfsdk/src/fpdf_sysfontinfo.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/fpdfsdk/src/fpdf_sysfontinfo.cpp b/fpdfsdk/src/fpdf_sysfontinfo.cpp
index a0fdb5083d..53610b040e 100644
--- a/fpdfsdk/src/fpdf_sysfontinfo.cpp
+++ b/fpdfsdk/src/fpdf_sysfontinfo.cpp
@@ -10,15 +10,15 @@
class CFX_ExternalFontInfo final : public IFX_SystemFontInfo {
public:
- CFX_ExternalFontInfo(FPDF_SYSFONTINFO* pInfo) : m_pInfo(pInfo) {}
+ explicit CFX_ExternalFontInfo(FPDF_SYSFONTINFO* pInfo) : m_pInfo(pInfo) {}
- virtual void Release() override {
+ void Release() override {
if (m_pInfo->Release)
m_pInfo->Release(m_pInfo);
delete this;
}
- virtual FX_BOOL EnumFontList(CFX_FontMapper* pMapper) override {
+ FX_BOOL EnumFontList(CFX_FontMapper* pMapper) override {
if (m_pInfo->EnumFonts) {
m_pInfo->EnumFonts(m_pInfo, pMapper);
return TRUE;
@@ -26,34 +26,34 @@ class CFX_ExternalFontInfo final : public IFX_SystemFontInfo {
return FALSE;
}
- virtual void* MapFont(int weight,
- FX_BOOL bItalic,
- int charset,
- int pitch_family,
- const FX_CHAR* family,
- int& iExact) override {
+ void* MapFont(int weight,
+ FX_BOOL bItalic,
+ int charset,
+ int pitch_family,
+ const FX_CHAR* family,
+ int& iExact) override {
if (m_pInfo->MapFont)
return m_pInfo->MapFont(m_pInfo, weight, bItalic, charset, pitch_family,
family, &iExact);
return NULL;
}
- virtual void* GetFont(const FX_CHAR* family) override {
+ void* GetFont(const FX_CHAR* family) override {
if (m_pInfo->GetFont)
return m_pInfo->GetFont(m_pInfo, family);
return NULL;
}
- virtual FX_DWORD GetFontData(void* hFont,
- FX_DWORD table,
- uint8_t* buffer,
- FX_DWORD size) override {
+ FX_DWORD GetFontData(void* hFont,
+ FX_DWORD table,
+ uint8_t* buffer,
+ FX_DWORD size) override {
if (m_pInfo->GetFontData)
return m_pInfo->GetFontData(m_pInfo, hFont, table, buffer, size);
return 0;
}
- virtual FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) override {
+ FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) override {
if (m_pInfo->GetFaceName == NULL)
return FALSE;
FX_DWORD size = m_pInfo->GetFaceName(m_pInfo, hFont, NULL, 0);
@@ -66,7 +66,7 @@ class CFX_ExternalFontInfo final : public IFX_SystemFontInfo {
return TRUE;
}
- virtual FX_BOOL GetFontCharset(void* hFont, int& charset) override {
+ FX_BOOL GetFontCharset(void* hFont, int& charset) override {
if (m_pInfo->GetFontCharset) {
charset = m_pInfo->GetFontCharset(m_pInfo, hFont);
return TRUE;
@@ -74,13 +74,13 @@ class CFX_ExternalFontInfo final : public IFX_SystemFontInfo {
return FALSE;
}
- virtual void DeleteFont(void* hFont) override {
+ void DeleteFont(void* hFont) override {
if (m_pInfo->DeleteFont)
m_pInfo->DeleteFont(m_pInfo, hFont);
}
private:
- ~CFX_ExternalFontInfo() {}
+ ~CFX_ExternalFontInfo() override {}
FPDF_SYSFONTINFO* const m_pInfo;
};