diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-03-13 16:43:37 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-03-14 14:14:51 +0000 |
commit | 812e96c2b4c5908a1979da5e27cdcecda0d1dfc9 (patch) | |
tree | f0b0607f6b757eb22237527215094bd87b5d03ba /core/fpdfdoc | |
parent | 893822aa5b6254591f8e80fbffcbb4fa6ad849aa (diff) | |
download | pdfium-812e96c2b4c5908a1979da5e27cdcecda0d1dfc9.tar.xz |
Replace FX_CHAR and FX_WCHAR with underlying types.
Change-Id: I96e0a20d66b9184d22f64d8e4ce0dadd5a78c1e8
Reviewed-on: https://pdfium-review.googlesource.com/2967
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfdoc')
-rw-r--r-- | core/fpdfdoc/cpdf_aaction.cpp | 6 | ||||
-rw-r--r-- | core/fpdfdoc/cpdf_action.cpp | 2 | ||||
-rw-r--r-- | core/fpdfdoc/cpdf_annot.cpp | 2 | ||||
-rw-r--r-- | core/fpdfdoc/cpdf_bookmark.cpp | 4 | ||||
-rw-r--r-- | core/fpdfdoc/cpdf_dest.cpp | 4 | ||||
-rw-r--r-- | core/fpdfdoc/cpdf_filespec.cpp | 4 | ||||
-rw-r--r-- | core/fpdfdoc/cpdf_formcontrol.cpp | 2 | ||||
-rw-r--r-- | core/fpdfdoc/cpdf_formfield.cpp | 2 | ||||
-rw-r--r-- | core/fpdfdoc/cpdf_formfield.h | 2 | ||||
-rw-r--r-- | core/fpdfdoc/cpdf_interform.cpp | 22 | ||||
-rw-r--r-- | core/fpdfdoc/cpdf_interform.h | 4 | ||||
-rw-r--r-- | core/fpdfdoc/cpdf_pagelabel.cpp | 2 | ||||
-rw-r--r-- | core/fpdfdoc/cpdf_variabletext.cpp | 2 | ||||
-rw-r--r-- | core/fpdfdoc/cpdf_variabletext.h | 2 |
14 files changed, 30 insertions, 30 deletions
diff --git a/core/fpdfdoc/cpdf_aaction.cpp b/core/fpdfdoc/cpdf_aaction.cpp index 39120fcdb3..7dc42828f4 100644 --- a/core/fpdfdoc/cpdf_aaction.cpp +++ b/core/fpdfdoc/cpdf_aaction.cpp @@ -8,9 +8,9 @@ namespace { -const FX_CHAR* g_sAATypes[] = {"E", "X", "D", "U", "Fo", "Bl", "PO", "PC", - "PV", "PI", "O", "C", "K", "F", "V", "C", - "WC", "WS", "DS", "WP", "DP", ""}; +const char* g_sAATypes[] = {"E", "X", "D", "U", "Fo", "Bl", "PO", "PC", + "PV", "PI", "O", "C", "K", "F", "V", "C", + "WC", "WS", "DS", "WP", "DP", ""}; } // namespace diff --git a/core/fpdfdoc/cpdf_action.cpp b/core/fpdfdoc/cpdf_action.cpp index dabc0bb102..f523f86b37 100644 --- a/core/fpdfdoc/cpdf_action.cpp +++ b/core/fpdfdoc/cpdf_action.cpp @@ -13,7 +13,7 @@ namespace { -const FX_CHAR* const g_sATypes[] = { +const char* const g_sATypes[] = { "Unknown", "GoTo", "GoToR", "GoToE", "Launch", "Thread", "URI", "Sound", "Movie", "Hide", "Named", "SubmitForm", "ResetForm", "ImportData", "JavaScript", diff --git a/core/fpdfdoc/cpdf_annot.cpp b/core/fpdfdoc/cpdf_annot.cpp index 89c4785d98..f15d39d89b 100644 --- a/core/fpdfdoc/cpdf_annot.cpp +++ b/core/fpdfdoc/cpdf_annot.cpp @@ -163,7 +163,7 @@ CPDF_Stream* FPDFDOC_GetAnnotAP(CPDF_Dictionary* pAnnotDict, if (!pAP) { return nullptr; } - const FX_CHAR* ap_entry = "N"; + const char* ap_entry = "N"; if (mode == CPDF_Annot::Down) ap_entry = "D"; else if (mode == CPDF_Annot::Rollover) diff --git a/core/fpdfdoc/cpdf_bookmark.cpp b/core/fpdfdoc/cpdf_bookmark.cpp index c2c3705717..ba1e18c46d 100644 --- a/core/fpdfdoc/cpdf_bookmark.cpp +++ b/core/fpdfdoc/cpdf_bookmark.cpp @@ -44,9 +44,9 @@ CFX_WideString CPDF_Bookmark::GetTitle() const { if (!len) return CFX_WideString(); - std::unique_ptr<FX_WCHAR[]> buf(new FX_WCHAR[len]); + std::unique_ptr<wchar_t[]> buf(new wchar_t[len]); for (int i = 0; i < len; i++) { - FX_WCHAR w = title[i]; + wchar_t w = title[i]; buf[i] = w > 0x20 ? w : 0x20; } return CFX_WideString(buf.get(), len); diff --git a/core/fpdfdoc/cpdf_dest.cpp b/core/fpdfdoc/cpdf_dest.cpp index 51e2d0b534..11264f729d 100644 --- a/core/fpdfdoc/cpdf_dest.cpp +++ b/core/fpdfdoc/cpdf_dest.cpp @@ -13,8 +13,8 @@ namespace { -const FX_CHAR* const g_sZoomModes[] = {"XYZ", "Fit", "FitH", "FitV", "FitR", - "FitB", "FitBH", "FitBV", nullptr}; +const char* const g_sZoomModes[] = {"XYZ", "Fit", "FitH", "FitV", "FitR", + "FitB", "FitBH", "FitBV", nullptr}; } // namespace diff --git a/core/fpdfdoc/cpdf_filespec.cpp b/core/fpdfdoc/cpdf_filespec.cpp index ce6f9a247e..e5f026e573 100644 --- a/core/fpdfdoc/cpdf_filespec.cpp +++ b/core/fpdfdoc/cpdf_filespec.cpp @@ -17,7 +17,7 @@ namespace { #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || \ _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ -CFX_WideString ChangeSlashToPlatform(const FX_WCHAR* str) { +CFX_WideString ChangeSlashToPlatform(const wchar_t* str) { CFX_WideString result; while (*str) { if (*str == '/') { @@ -34,7 +34,7 @@ CFX_WideString ChangeSlashToPlatform(const FX_WCHAR* str) { return result; } -CFX_WideString ChangeSlashToPDF(const FX_WCHAR* str) { +CFX_WideString ChangeSlashToPDF(const wchar_t* str) { CFX_WideString result; while (*str) { if (*str == '\\' || *str == ':') diff --git a/core/fpdfdoc/cpdf_formcontrol.cpp b/core/fpdfdoc/cpdf_formcontrol.cpp index 54edb4910c..0a5363ed96 100644 --- a/core/fpdfdoc/cpdf_formcontrol.cpp +++ b/core/fpdfdoc/cpdf_formcontrol.cpp @@ -20,7 +20,7 @@ namespace { -const FX_CHAR* const g_sHighlightingMode[] = { +const char* const g_sHighlightingMode[] = { // Must match order of HighlightingMode enum. "N", "I", "O", "P", "T"}; diff --git a/core/fpdfdoc/cpdf_formfield.cpp b/core/fpdfdoc/cpdf_formfield.cpp index f9187d8d27..c697cbbf16 100644 --- a/core/fpdfdoc/cpdf_formfield.cpp +++ b/core/fpdfdoc/cpdf_formfield.cpp @@ -48,7 +48,7 @@ bool IsUnison(CPDF_FormField* pField) { } // namespace CPDF_Object* FPDF_GetFieldAttr(CPDF_Dictionary* pFieldDict, - const FX_CHAR* name, + const char* name, int nLevel) { if (nLevel > kMaxRecursion) return nullptr; diff --git a/core/fpdfdoc/cpdf_formfield.h b/core/fpdfdoc/cpdf_formfield.h index 42608b1122..0cb0a481c2 100644 --- a/core/fpdfdoc/cpdf_formfield.h +++ b/core/fpdfdoc/cpdf_formfield.h @@ -36,7 +36,7 @@ class CPDF_InterForm; class CPDF_String; CPDF_Object* FPDF_GetFieldAttr(CPDF_Dictionary* pFieldDict, - const FX_CHAR* name, + const char* name, int nLevel = 0); CFX_WideString FPDF_GetFullName(CPDF_Dictionary* pFieldDict); diff --git a/core/fpdfdoc/cpdf_interform.cpp b/core/fpdfdoc/cpdf_interform.cpp index d9f0db9747..9b2c2eb323 100644 --- a/core/fpdfdoc/cpdf_interform.cpp +++ b/core/fpdfdoc/cpdf_interform.cpp @@ -29,7 +29,7 @@ namespace { const int nMaxRecursion = 32; const struct SupportFieldEncoding { - const FX_CHAR* m_name; + const char* m_name; uint16_t m_codePage; } g_fieldEncoding[] = { {"BigFive", 950}, @@ -307,7 +307,7 @@ class CFieldNameExtractor { m_pEnd = m_pCur + m_FullName.GetLength(); } - void GetNext(const FX_WCHAR*& pSubName, FX_STRSIZE& size) { + void GetNext(const wchar_t*& pSubName, FX_STRSIZE& size) { pSubName = m_pCur; while (m_pCur < m_pEnd && m_pCur[0] != L'.') m_pCur++; @@ -319,8 +319,8 @@ class CFieldNameExtractor { protected: CFX_WideString m_FullName; - const FX_WCHAR* m_pCur; - const FX_WCHAR* m_pEnd; + const wchar_t* m_pCur; + const wchar_t* m_pEnd; }; #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ @@ -372,8 +372,8 @@ bool RetrieveSpecificFont(uint8_t charSet, #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ int CompareFieldName(const CFX_WideString& name1, const CFX_WideString& name2) { - const FX_WCHAR* ptr1 = name1.c_str(); - const FX_WCHAR* ptr2 = name2.c_str(); + const wchar_t* ptr1 = name1.c_str(); + const wchar_t* ptr2 = name2.c_str(); if (name1.GetLength() == name2.GetLength()) return name1 == name2 ? 1 : 0; @@ -523,7 +523,7 @@ void CFieldTree::SetField(const CFX_WideString& full_name, return; CFieldNameExtractor name_extractor(full_name); - const FX_WCHAR* pName; + const wchar_t* pName; FX_STRSIZE nLength; name_extractor.GetNext(pName, nLength); Node* pNode = &m_Root; @@ -546,7 +546,7 @@ CPDF_FormField* CFieldTree::GetField(const CFX_WideString& full_name) { return nullptr; CFieldNameExtractor name_extractor(full_name); - const FX_WCHAR* pName; + const wchar_t* pName; FX_STRSIZE nLength; name_extractor.GetNext(pName, nLength); Node* pNode = &m_Root; @@ -565,7 +565,7 @@ CFieldTree::Node* CFieldTree::FindNode(const CFX_WideString& full_name) { return nullptr; CFieldNameExtractor name_extractor(full_name); - const FX_WCHAR* pName; + const wchar_t* pName; FX_STRSIZE nLength; name_extractor.GetNext(pName, nLength); Node* pNode = &m_Root; @@ -687,9 +687,9 @@ void CPDF_InterForm::SetUpdateAP(bool bUpdateAP) { CFX_ByteString CPDF_InterForm::GenerateNewResourceName( const CPDF_Dictionary* pResDict, - const FX_CHAR* csType, + const char* csType, int iMinLen, - const FX_CHAR* csPrefix) { + const char* csPrefix) { CFX_ByteString csStr = csPrefix; CFX_ByteString csBType = csType; if (csStr.IsEmpty()) { diff --git a/core/fpdfdoc/cpdf_interform.h b/core/fpdfdoc/cpdf_interform.h index cbaaa7bc2d..fdf08ac79e 100644 --- a/core/fpdfdoc/cpdf_interform.h +++ b/core/fpdfdoc/cpdf_interform.h @@ -39,9 +39,9 @@ class CPDF_InterForm { static void SetUpdateAP(bool bUpdateAP); static bool IsUpdateAPEnabled(); static CFX_ByteString GenerateNewResourceName(const CPDF_Dictionary* pResDict, - const FX_CHAR* csType, + const char* csType, int iMinLen, - const FX_CHAR* csPrefix); + const char* csPrefix); static CPDF_Font* AddStandardFont(CPDF_Document* pDocument, CFX_ByteString csFontName); static CFX_ByteString GetNativeFont(uint8_t iCharSet, void* pLogFont); diff --git a/core/fpdfdoc/cpdf_pagelabel.cpp b/core/fpdfdoc/cpdf_pagelabel.cpp index 2a79d77ca7..4200a28f64 100644 --- a/core/fpdfdoc/cpdf_pagelabel.cpp +++ b/core/fpdfdoc/cpdf_pagelabel.cpp @@ -44,7 +44,7 @@ CFX_WideString MakeLetters(int num) { int count = num / nLetterCount + 1; count %= nMaxCount; - FX_WCHAR ch = L'a' + num % nLetterCount; + wchar_t ch = L'a' + num % nLetterCount; for (int i = 0; i < count; i++) wsLetters += ch; return wsLetters; diff --git a/core/fpdfdoc/cpdf_variabletext.cpp b/core/fpdfdoc/cpdf_variabletext.cpp index 94b3425a09..aa393f7657 100644 --- a/core/fpdfdoc/cpdf_variabletext.cpp +++ b/core/fpdfdoc/cpdf_variabletext.cpp @@ -338,7 +338,7 @@ CPVT_WordPlace CPDF_VariableText::InsertSection( } CPVT_WordPlace CPDF_VariableText::InsertText(const CPVT_WordPlace& place, - const FX_WCHAR* text) { + const wchar_t* text) { CFX_WideString swText = text; CPVT_WordPlace wp = place; for (int32_t i = 0, sz = swText.GetLength(); i < sz; i++) { diff --git a/core/fpdfdoc/cpdf_variabletext.h b/core/fpdfdoc/cpdf_variabletext.h index 8e7c0c964a..3bec89abec 100644 --- a/core/fpdfdoc/cpdf_variabletext.h +++ b/core/fpdfdoc/cpdf_variabletext.h @@ -114,7 +114,7 @@ class CPDF_VariableText { CPVT_WordPlace InsertSection(const CPVT_WordPlace& place, const CPVT_SecProps* pSecProps, const CPVT_WordProps* pWordProps); - CPVT_WordPlace InsertText(const CPVT_WordPlace& place, const FX_WCHAR* text); + CPVT_WordPlace InsertText(const CPVT_WordPlace& place, const wchar_t* text); CPVT_WordPlace DeleteWords(const CPVT_WordRange& PlaceRange); CPVT_WordPlace DeleteWord(const CPVT_WordPlace& place); CPVT_WordPlace BackSpaceWord(const CPVT_WordPlace& place); |