summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_page
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_page
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_page')
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp8
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp6
-rw-r--r--core/src/fpdfapi/fpdf_page/pageint.h4
5 files changed, 12 insertions, 12 deletions
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
index 046cebeb98..688066e3a3 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
@@ -902,7 +902,7 @@ CPDF_Page::~CPDF_Page()
pModule->DestroyPageCache(m_pPageRender);
}
}
-CPDF_Object* FPDFAPI_GetPageAttr(CPDF_Dictionary* pPageDict, FX_BSTR name)
+CPDF_Object* FPDFAPI_GetPageAttr(CPDF_Dictionary* pPageDict, const CFX_ByteStringC& name)
{
int level = 0;
while (1) {
@@ -921,7 +921,7 @@ CPDF_Object* FPDFAPI_GetPageAttr(CPDF_Dictionary* pPageDict, FX_BSTR name)
}
}
}
-CPDF_Object* CPDF_Page::GetPageAttr(FX_BSTR name) const
+CPDF_Object* CPDF_Page::GetPageAttr(const CFX_ByteStringC& name) const
{
return FPDFAPI_GetPageAttr(m_pFormDict, name);
}
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp
index 6c3d8c6a29..1c0629f45a 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp
@@ -360,7 +360,7 @@ CPDF_Font* CPDF_DocPageData::GetFont(CPDF_Dictionary* pFontDict, FX_BOOL findOnl
return pFont;
}
-CPDF_Font* CPDF_DocPageData::GetStandardFont(FX_BSTR fontName, CPDF_FontEncoding* pEncoding)
+CPDF_Font* CPDF_DocPageData::GetStandardFont(const CFX_ByteStringC& fontName, CPDF_FontEncoding* pEncoding)
{
if (fontName.IsEmpty())
return nullptr;
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
index 3ce4baf20c..8752acf536 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
@@ -376,7 +376,7 @@ CPDF_GeneralStateData::~CPDF_GeneralStateData()
pDocCache->ReleaseTransferFunc(m_pTR);
}
}
-static int GetBlendType(FX_BSTR mode)
+static int GetBlendType(const CFX_ByteStringC& mode)
{
switch (mode.GetID()) {
case FXBSTR_ID('N', 'o', 'r', 'm'):
@@ -417,7 +417,7 @@ static int GetBlendType(FX_BSTR mode)
}
return FXDIB_BLEND_NORMAL;
}
-void CPDF_GeneralStateData::SetBlendMode(FX_BSTR blend_mode)
+void CPDF_GeneralStateData::SetBlendMode(const CFX_ByteStringC& blend_mode)
{
if (blend_mode.GetLength() > 15) {
return;
@@ -677,7 +677,7 @@ void CPDF_ContentMarkData::DeleteLastMark()
}
m_Marks.RemoveAt(size - 1);
}
-FX_BOOL CPDF_ContentMark::HasMark(FX_BSTR mark) const
+FX_BOOL CPDF_ContentMark::HasMark(const CFX_ByteStringC& mark) const
{
if (m_pObject == NULL) {
return FALSE;
@@ -690,7 +690,7 @@ FX_BOOL CPDF_ContentMark::HasMark(FX_BSTR mark) const
}
return FALSE;
}
-FX_BOOL CPDF_ContentMark::LookupMark(FX_BSTR mark, CPDF_Dictionary*& pDict) const
+FX_BOOL CPDF_ContentMark::LookupMark(const CFX_ByteStringC& mark, CPDF_Dictionary*& pDict) const
{
if (m_pObject == NULL) {
return FALSE;
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index d898feecf4..ebe75484e0 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -438,7 +438,7 @@ const _FX_BSTR _PDF_InlineValueAbbr[] = {
_FX_BSTRC("CCITTFaxDecode"), _FX_BSTRC("CCF"),
_FX_BSTRC("DCTDecode"), _FX_BSTRC("DCT"),
};
-static CFX_ByteStringC _PDF_FindFullName(const _FX_BSTR* table, int count, FX_BSTR abbr)
+static CFX_ByteStringC _PDF_FindFullName(const _FX_BSTR* table, int count, const CFX_ByteStringC& abbr)
{
int i = 0;
while (i < count) {
@@ -496,7 +496,7 @@ void _PDF_ReplaceAbbr(CPDF_Object* pObj)
}
}
}
-static CFX_ByteStringC _PDF_FindAbbrName(const _FX_BSTR* table, int count, FX_BSTR fullName)
+static CFX_ByteStringC _PDF_FindAbbrName(const _FX_BSTR* table, int count, const CFX_ByteStringC& fullName)
{
int i = 0;
while (i < count) {
@@ -1178,7 +1178,7 @@ void CPDF_StreamContentParser::Handle_SetFont()
m_pCurStates->m_TextState.SetFont(pFont);
}
}
-CPDF_Object* CPDF_StreamContentParser::FindResourceObj(FX_BSTR type, const CFX_ByteString& name)
+CPDF_Object* CPDF_StreamContentParser::FindResourceObj(const CFX_ByteStringC& type, const CFX_ByteString& name)
{
if (m_pResources == NULL) {
return NULL;
diff --git a/core/src/fpdfapi/fpdf_page/pageint.h b/core/src/fpdfapi/fpdf_page/pageint.h
index 3e6abc2059..11214133a2 100644
--- a/core/src/fpdfapi/fpdf_page/pageint.h
+++ b/core/src/fpdfapi/fpdf_page/pageint.h
@@ -206,7 +206,7 @@ public:
CPDF_Font* FindFont(const CFX_ByteString& name);
CPDF_ColorSpace* FindColorSpace(const CFX_ByteString& name);
CPDF_Pattern* FindPattern(const CFX_ByteString& name, FX_BOOL bShading);
- CPDF_Object* FindResourceObj(FX_BSTR type, const CFX_ByteString& name);
+ CPDF_Object* FindResourceObj(const CFX_ByteStringC& type, const CFX_ByteString& name);
void Handle_CloseFillStrokePath();
void Handle_FillStrokePath();
void Handle_CloseEOFillStrokePath();
@@ -335,7 +335,7 @@ class CPDF_DocPageData
void Clear(FX_BOOL bRelease = FALSE);
CPDF_Font* GetFont(CPDF_Dictionary* pFontDict, FX_BOOL findOnly);
- CPDF_Font* GetStandardFont(FX_BSTR fontName, CPDF_FontEncoding* pEncoding);
+ CPDF_Font* GetStandardFont(const CFX_ByteStringC& fontName, CPDF_FontEncoding* pEncoding);
void ReleaseFont(CPDF_Dictionary* pFontDict);
CPDF_ColorSpace* GetColorSpace(CPDF_Object* pCSObj, CPDF_Dictionary* pResources);
CPDF_ColorSpace* GetCopiedColorSpace(CPDF_Object* pCSObj);