summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_font
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-10 16:51:15 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-10 16:51:15 -0700
commit6f0a64a1bf18ab6636404cdfb883897459083a4d (patch)
tree1ef1326c8bb015213e0cdf0d726a27a537d09c73 /core/src/fpdfapi/fpdf_font
parente4503ea9947d2f9c61704da20271b413a364a9c0 (diff)
downloadpdfium-6f0a64a1bf18ab6636404cdfb883897459083a4d.tar.xz
These stand for const CFX_{Byte,Wide}StringC&, which is just monumentally confusing, since there are so many string types running around here. The following had manual changes: core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp core/src/fpdfdoc/doc_form.cpp fpdfsdk/src/fpdf_ext.cpp R=thestig@chromium.org Review URL: https://codereview.chromium.org/1180593004.
Diffstat (limited to 'core/src/fpdfapi/fpdf_font')
-rw-r--r--core/src/fpdfapi/fpdf_font/font_int.h2
-rw-r--r--core/src/fpdfapi/fpdf_font/fpdf_font.cpp6
-rw-r--r--core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp8
3 files changed, 8 insertions, 8 deletions
diff --git a/core/src/fpdfapi/fpdf_font/font_int.h b/core/src/fpdfapi/fpdf_font/font_int.h
index 6f32f4fa98..aa46f16f75 100644
--- a/core/src/fpdfapi/fpdf_font/font_int.h
+++ b/core/src/fpdfapi/fpdf_font/font_int.h
@@ -57,7 +57,7 @@ public:
CPDF_CMapParser();
~CPDF_CMapParser() {}
FX_BOOL Initialize(CPDF_CMap*);
- void ParseWord(FX_BSTR str);
+ void ParseWord(const CFX_ByteStringC& str);
CFX_BinaryBuf m_AddMaps;
private:
CPDF_CMap* m_pCMap;
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
index c6922d11f8..48a96dc554 100644
--- a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
+++ b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
@@ -391,7 +391,7 @@ int CPDF_Font::GetCharTypeWidth(FX_DWORD charcode)
return m_Font.GetGlyphWidth(glyph_index);
}
int _PDF_GetStandardFontName(CFX_ByteString& name);
-CPDF_Font* CPDF_Font::GetStockFont(CPDF_Document* pDoc, FX_BSTR name)
+CPDF_Font* CPDF_Font::GetStockFont(CPDF_Document* pDoc, const CFX_ByteStringC& name)
{
CFX_ByteString fontname(name);
int font_id = _PDF_GetStandardFontName(fontname);
@@ -532,7 +532,7 @@ FX_DWORD CPDF_ToUnicodeMap::ReverseLookup(FX_WCHAR unicode)
}
return 0;
}
-static FX_DWORD _StringToCode(FX_BSTR str)
+static FX_DWORD _StringToCode(const CFX_ByteStringC& str)
{
const FX_CHAR* buf = str.GetCStr();
int len = str.GetLength();
@@ -584,7 +584,7 @@ static CFX_WideString _StringDataAdd(CFX_WideString str)
}
return ret;
}
-static CFX_WideString _StringToWideString(FX_BSTR str)
+static CFX_WideString _StringToWideString(const CFX_ByteStringC& str)
{
const FX_CHAR* buf = str.GetCStr();
int len = str.GetLength();
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
index bec2c90144..ed5ef5c5fe 100644
--- a/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
+++ b/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
@@ -119,7 +119,7 @@ FX_BOOL CPDF_CMapParser::Initialize(CPDF_CMap* pCMap)
m_AddMaps.EstimateSize(0, 10240);
return TRUE;
}
-static FX_DWORD CMap_GetCode(FX_BSTR word)
+static FX_DWORD CMap_GetCode(const CFX_ByteStringC& word)
{
int num = 0;
if (word.GetAt(0) == '<') {
@@ -146,7 +146,7 @@ static FX_DWORD CMap_GetCode(FX_BSTR word)
}
return num;
}
-static FX_BOOL _CMap_GetCodeRange(_CMap_CodeRange& range, FX_BSTR first, FX_BSTR second)
+static FX_BOOL _CMap_GetCodeRange(_CMap_CodeRange& range, const CFX_ByteStringC& first, const CFX_ByteStringC& second)
{
if (first.GetLength() == 0 || first.GetAt(0) != '<') {
return FALSE;
@@ -177,11 +177,11 @@ static FX_BOOL _CMap_GetCodeRange(_CMap_CodeRange& range, FX_BSTR first, FX_BSTR
}
return TRUE;
}
-static CFX_ByteString CMap_GetString(FX_BSTR word)
+static CFX_ByteString CMap_GetString(const CFX_ByteStringC& word)
{
return word.Mid(1, word.GetLength() - 2);
}
-void CPDF_CMapParser::ParseWord(FX_BSTR word)
+void CPDF_CMapParser::ParseWord(const CFX_ByteStringC& word)
{
if (word.IsEmpty()) {
return;