diff options
author | Wei Li <weili@chromium.org> | 2016-01-29 15:44:20 -0800 |
---|---|---|
committer | Wei Li <weili@chromium.org> | 2016-01-29 15:44:20 -0800 |
commit | 9b76113ae4567eb998618d049afde26d3f0175d5 (patch) | |
tree | ede02b9835770dafe91eaee727e328765e4ffd52 /core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp | |
parent | 47f7199eee69abdd48c5ab16a5b8f5aef433a003 (diff) | |
download | pdfium-9b76113ae4567eb998618d049afde26d3f0175d5.tar.xz |
Merge to XFA: Member function name refactoring
This is needed by Cl 1634373003 as the name collision with virtual functions
will be shown as warnings on Linux. Also, it is better to use
different names for different cases.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1644633003 .
(cherry picked from commit d45e7a51904164fb22049f0a7a80d2a94c06936b)
Review URL: https://codereview.chromium.org/1648233002 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp')
-rw-r--r-- | core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp index 6e7a051b34..37647c8ef0 100644 --- a/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp +++ b/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp @@ -1153,21 +1153,21 @@ FX_DWORD CPDF_CIDFont::_CharCodeFromUnicode(FX_WCHAR unicode) const { } FX_BOOL CPDF_CIDFont::_Load() { - if (m_pFontDict->GetString("Subtype") == "TrueType") { + if (m_pFontDict->GetStringBy("Subtype") == "TrueType") { return LoadGB2312(); } - CPDF_Array* pFonts = m_pFontDict->GetArray("DescendantFonts"); + CPDF_Array* pFonts = m_pFontDict->GetArrayBy("DescendantFonts"); if (!pFonts) { return FALSE; } if (pFonts->GetCount() != 1) { return FALSE; } - CPDF_Dictionary* pCIDFontDict = pFonts->GetDict(0); + CPDF_Dictionary* pCIDFontDict = pFonts->GetDictAt(0); if (!pCIDFontDict) { return FALSE; } - m_BaseFont = pCIDFontDict->GetString("BaseFont"); + m_BaseFont = pCIDFontDict->GetStringBy("BaseFont"); if ((m_BaseFont.Compare("CourierStd") == 0 || m_BaseFont.Compare("CourierStd-Bold") == 0 || m_BaseFont.Compare("CourierStd-BoldOblique") == 0 || @@ -1175,7 +1175,7 @@ FX_BOOL CPDF_CIDFont::_Load() { !IsEmbedded()) { m_bAdobeCourierStd = TRUE; } - CPDF_Dictionary* pFontDesc = pCIDFontDict->GetDict("FontDescriptor"); + CPDF_Dictionary* pFontDesc = pCIDFontDict->GetDictBy("FontDescriptor"); if (pFontDesc) { LoadFontDescriptor(pFontDesc); } @@ -1183,7 +1183,7 @@ FX_BOOL CPDF_CIDFont::_Load() { if (!pEncoding) { return FALSE; } - CFX_ByteString subtype = pCIDFontDict->GetString("Subtype"); + CFX_ByteString subtype = pCIDFontDict->GetStringBy("Subtype"); m_bType1 = (subtype == "CIDFontType0"); if (pEncoding->IsName()) { @@ -1206,9 +1206,9 @@ FX_BOOL CPDF_CIDFont::_Load() { } m_Charset = m_pCMap->m_Charset; if (m_Charset == CIDSET_UNKNOWN) { - CPDF_Dictionary* pCIDInfo = pCIDFontDict->GetDict("CIDSystemInfo"); + CPDF_Dictionary* pCIDInfo = pCIDFontDict->GetDictBy("CIDSystemInfo"); if (pCIDInfo) { - m_Charset = CharsetFromOrdering(pCIDInfo->GetString("Ordering")); + m_Charset = CharsetFromOrdering(pCIDInfo->GetStringBy("Ordering")); } } if (m_Charset != CIDSET_UNKNOWN) @@ -1227,8 +1227,8 @@ FX_BOOL CPDF_CIDFont::_Load() { FT_UseCIDCharmap(m_Font.GetFace(), m_pCMap->m_Coding); } } - m_DefaultWidth = pCIDFontDict->GetInteger("DW", 1000); - CPDF_Array* pWidthArray = pCIDFontDict->GetArray("W"); + m_DefaultWidth = pCIDFontDict->GetIntegerBy("DW", 1000); + CPDF_Array* pWidthArray = pCIDFontDict->GetArrayBy("W"); if (pWidthArray) { LoadMetricsArray(pWidthArray, m_WidthList, 1); } @@ -1256,14 +1256,14 @@ FX_BOOL CPDF_CIDFont::_Load() { } CheckFontMetrics(); if (IsVertWriting()) { - pWidthArray = pCIDFontDict->GetArray("W2"); + pWidthArray = pCIDFontDict->GetArrayBy("W2"); if (pWidthArray) { LoadMetricsArray(pWidthArray, m_VertMetrics, 3); } - CPDF_Array* pDefaultArray = pCIDFontDict->GetArray("DW2"); + CPDF_Array* pDefaultArray = pCIDFontDict->GetArrayBy("DW2"); if (pDefaultArray) { - m_DefaultVY = pDefaultArray->GetInteger(0); - m_DefaultW1 = pDefaultArray->GetInteger(1); + m_DefaultVY = pDefaultArray->GetIntegerAt(0); + m_DefaultW1 = pDefaultArray->GetIntegerAt(1); } else { m_DefaultVY = 880; m_DefaultW1 = -1000; @@ -1650,7 +1650,7 @@ void CPDF_CIDFont::LoadMetricsArray(CPDF_Array* pArray, result.Add(first_code); result.Add(first_code); for (int k = 0; k < nElements; k++) { - result.Add(pArray->GetInteger(j + k)); + result.Add(pArray->GetIntegerAt(j + k)); } first_code++; } @@ -1687,8 +1687,8 @@ FX_FLOAT CPDF_CIDFont::CIDTransformToFloat(uint8_t ch) { } FX_BOOL CPDF_CIDFont::LoadGB2312() { - m_BaseFont = m_pFontDict->GetString("BaseFont"); - CPDF_Dictionary* pFontDesc = m_pFontDict->GetDict("FontDescriptor"); + m_BaseFont = m_pFontDict->GetStringBy("BaseFont"); + CPDF_Dictionary* pFontDesc = m_pFontDict->GetDictBy("FontDescriptor"); if (pFontDesc) { LoadFontDescriptor(pFontDesc); } |