From ca3ac5e9ffc936066267fbb1c329e5297d8e23e6 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 10 Jun 2015 17:38:11 -0700 Subject: Merge to XFA: Remove FX_BSTR and FX_WSTR typedefs. Nearly automatic merge + re-run script on new files. Original Review URL: https://codereview.chromium.org/1180593004. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1174303002. --- core/src/fpdfapi/fpdf_page/fpdf_page.cpp | 4 ++-- core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp | 2 +- core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp | 8 ++++---- core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp | 6 +++--- core/src/fpdfapi/fpdf_page/pageint.h | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'core/src/fpdfapi/fpdf_page') 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 00ea4c5fce..305c1a9183 100644 --- a/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp +++ b/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp @@ -310,7 +310,7 @@ CPDF_Font* CPDF_DocPageData::GetFont(CPDF_Dictionary* pFontDict, FX_BOOL findOnl m_FontMap.SetAt(pFontDict, fontData); 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 NULL; 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 9ff1c4cb11..5bf854948a 100644 --- a/core/src/fpdfapi/fpdf_page/pageint.h +++ b/core/src/fpdfapi/fpdf_page/pageint.h @@ -205,7 +205,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(); @@ -367,7 +367,7 @@ public: ~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); -- cgit v1.2.3