summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-03-13 16:43:37 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-14 14:14:51 +0000
commit812e96c2b4c5908a1979da5e27cdcecda0d1dfc9 (patch)
treef0b0607f6b757eb22237527215094bd87b5d03ba /xfa/fxfa
parent893822aa5b6254591f8e80fbffcbb4fa6ad849aa (diff)
downloadpdfium-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 'xfa/fxfa')
-rw-r--r--xfa/fxfa/app/cxfa_linkuserdata.cpp2
-rw-r--r--xfa/fxfa/app/cxfa_linkuserdata.h4
-rw-r--r--xfa/fxfa/app/cxfa_textlayout.cpp6
-rw-r--r--xfa/fxfa/app/cxfa_textparser.cpp6
-rw-r--r--xfa/fxfa/app/xfa_checksum.cpp12
-rw-r--r--xfa/fxfa/app/xfa_ffbarcode.cpp2
-rw-r--r--xfa/fxfa/app/xfa_ffbarcode.h2
-rw-r--r--xfa/fxfa/app/xfa_ffdoc.cpp20
-rw-r--r--xfa/fxfa/app/xfa_ffnotify.cpp4
-rw-r--r--xfa/fxfa/app/xfa_ffnotify.h4
-rw-r--r--xfa/fxfa/app/xfa_fftext.cpp6
-rw-r--r--xfa/fxfa/app/xfa_fftext.h2
-rw-r--r--xfa/fxfa/app/xfa_ffwidget.cpp16
-rw-r--r--xfa/fxfa/app/xfa_ffwidgetacc.cpp4
-rw-r--r--xfa/fxfa/app/xfa_fontmgr.cpp8
-rw-r--r--xfa/fxfa/app/xfa_fwltheme.cpp2
-rw-r--r--xfa/fxfa/fm2js/xfa_error.cpp14
-rw-r--r--xfa/fxfa/fm2js/xfa_error.h14
-rw-r--r--xfa/fxfa/fm2js/xfa_expression.cpp4
-rw-r--r--xfa/fxfa/fm2js/xfa_fm2jscontext.cpp106
-rw-r--r--xfa/fxfa/fm2js/xfa_fm2jscontext.h8
-rw-r--r--xfa/fxfa/fm2js/xfa_fmparse.cpp4
-rw-r--r--xfa/fxfa/fm2js/xfa_fmparse.h2
-rw-r--r--xfa/fxfa/fm2js/xfa_lexer.cpp68
-rw-r--r--xfa/fxfa/fm2js/xfa_lexer.h22
-rw-r--r--xfa/fxfa/fm2js/xfa_simpleexpression.cpp8
-rw-r--r--xfa/fxfa/fxfa_basic.h14
-rw-r--r--xfa/fxfa/parser/cscript_hostpseudomodel.cpp6
-rw-r--r--xfa/fxfa/parser/cscript_layoutpseudomodel.cpp4
-rw-r--r--xfa/fxfa/parser/cxfa_data.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_dataexporter.cpp22
-rw-r--r--xfa/fxfa/parser/cxfa_dataexporter.h4
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp14
-rw-r--r--xfa/fxfa/parser/cxfa_nodehelper.cpp4
-rw-r--r--xfa/fxfa/parser/cxfa_nodehelper.h2
-rw-r--r--xfa/fxfa/parser/cxfa_object.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_resolveprocessor.cpp16
-rw-r--r--xfa/fxfa/parser/cxfa_widetextread.cpp10
-rw-r--r--xfa/fxfa/parser/cxfa_widetextread.h4
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.cpp12
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.h4
-rw-r--r--xfa/fxfa/parser/xfa_layout_itemlayout.cpp8
-rw-r--r--xfa/fxfa/parser/xfa_locale.cpp8
-rw-r--r--xfa/fxfa/parser/xfa_localevalue.cpp18
-rw-r--r--xfa/fxfa/parser/xfa_object.h2
-rw-r--r--xfa/fxfa/parser/xfa_utils.cpp2
-rw-r--r--xfa/fxfa/parser/xfa_utils.h2
-rw-r--r--xfa/fxfa/xfa_ffwidget.h2
-rw-r--r--xfa/fxfa/xfa_fontmgr.h6
49 files changed, 256 insertions, 262 deletions
diff --git a/xfa/fxfa/app/cxfa_linkuserdata.cpp b/xfa/fxfa/app/cxfa_linkuserdata.cpp
index 4128cd8822..d657b28539 100644
--- a/xfa/fxfa/app/cxfa_linkuserdata.cpp
+++ b/xfa/fxfa/app/cxfa_linkuserdata.cpp
@@ -6,7 +6,7 @@
#include "xfa/fxfa/app/cxfa_linkuserdata.h"
-CXFA_LinkUserData::CXFA_LinkUserData(FX_WCHAR* pszText)
+CXFA_LinkUserData::CXFA_LinkUserData(wchar_t* pszText)
: m_wsURLContent(pszText) {}
CXFA_LinkUserData::~CXFA_LinkUserData() {}
diff --git a/xfa/fxfa/app/cxfa_linkuserdata.h b/xfa/fxfa/app/cxfa_linkuserdata.h
index 852b467648..5f4675962d 100644
--- a/xfa/fxfa/app/cxfa_linkuserdata.h
+++ b/xfa/fxfa/app/cxfa_linkuserdata.h
@@ -17,10 +17,10 @@ class CXFA_LinkUserData : public CFX_Retainable {
template <typename T, typename... Args>
friend CFX_RetainPtr<T> pdfium::MakeRetain(Args&&... args);
- const FX_WCHAR* GetLinkURL() const { return m_wsURLContent.c_str(); }
+ const wchar_t* GetLinkURL() const { return m_wsURLContent.c_str(); }
protected:
- explicit CXFA_LinkUserData(FX_WCHAR* pszText);
+ explicit CXFA_LinkUserData(wchar_t* pszText);
~CXFA_LinkUserData() override;
CFX_WideString m_wsURLContent;
diff --git a/xfa/fxfa/app/cxfa_textlayout.cpp b/xfa/fxfa/app/cxfa_textlayout.cpp
index c2d2a9ef6d..3c0087de09 100644
--- a/xfa/fxfa/app/cxfa_textlayout.cpp
+++ b/xfa/fxfa/app/cxfa_textlayout.cpp
@@ -897,7 +897,7 @@ bool CXFA_TextLayout::AppendChar(const CFX_WideString& wsText,
int32_t iLength = wsText.GetLength();
for (int32_t i = iChar; i < iLength; i++) {
- FX_WCHAR wch = wsText.GetAt(i);
+ wchar_t wch = wsText.GetAt(i);
if (wch == 0xA0)
wch = 0x20;
@@ -932,9 +932,9 @@ void CXFA_TextLayout::ProcessText(CFX_WideString& wsText) {
if (iLen == 0)
return;
- FX_WCHAR* psz = wsText.GetBuffer(iLen);
+ wchar_t* psz = wsText.GetBuffer(iLen);
int32_t iTrimLeft = 0;
- FX_WCHAR wch = 0, wPrev = 0;
+ wchar_t wch = 0, wPrev = 0;
for (int32_t i = 0; i < iLen; i++) {
wch = psz[i];
if (wch < 0x20)
diff --git a/xfa/fxfa/app/cxfa_textparser.cpp b/xfa/fxfa/app/cxfa_textparser.cpp
index 9759cb219d..750a0baaff 100644
--- a/xfa/fxfa/app/cxfa_textparser.cpp
+++ b/xfa/fxfa/app/cxfa_textparser.cpp
@@ -85,7 +85,7 @@ void CXFA_TextParser::InitCSSData(CXFA_TextProvider* pTextProvider) {
}
std::unique_ptr<CFDE_CSSStyleSheet> CXFA_TextParser::LoadDefaultSheetStyle() {
- static const FX_WCHAR s_pStyle[] =
+ static const wchar_t s_pStyle[] =
L"html,body,ol,p,ul{display:block}"
L"li{display:list-item}"
L"ol,ul{padding-left:33px;margin:1.12em 0}"
@@ -562,12 +562,12 @@ bool CXFA_TextParser::GetTabstops(CFDE_CSSComputedStyle* pStyle,
}
int32_t iLength = wsValue.GetLength();
- const FX_WCHAR* pTabStops = wsValue.c_str();
+ const wchar_t* pTabStops = wsValue.c_str();
int32_t iCur = 0;
int32_t iLast = 0;
CFX_WideString wsAlign;
TabStopStatus eStatus = TabStopStatus::None;
- FX_WCHAR ch;
+ wchar_t ch;
while (iCur < iLength) {
ch = pTabStops[iCur];
switch (eStatus) {
diff --git a/xfa/fxfa/app/xfa_checksum.cpp b/xfa/fxfa/app/xfa_checksum.cpp
index 09c42719c1..a06fed870c 100644
--- a/xfa/fxfa/app/xfa_checksum.cpp
+++ b/xfa/fxfa/app/xfa_checksum.cpp
@@ -21,7 +21,7 @@ struct FX_BASE64DATA {
uint32_t data7 : 8;
};
-const FX_CHAR g_FXBase64EncoderMap[64] = {
+const char g_FXBase64EncoderMap[64] = {
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
@@ -29,9 +29,7 @@ const FX_CHAR g_FXBase64EncoderMap[64] = {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/',
};
-void Base64EncodePiece(const FX_BASE64DATA& src,
- int32_t iBytes,
- FX_CHAR dst[4]) {
+void Base64EncodePiece(const FX_BASE64DATA& src, int32_t iBytes, char dst[4]) {
dst[0] = g_FXBase64EncoderMap[src.data2];
uint32_t b = src.data1 << 4;
if (iBytes > 1) {
@@ -54,7 +52,7 @@ void Base64EncodePiece(const FX_BASE64DATA& src,
}
}
-int32_t Base64EncodeA(const uint8_t* pSrc, int32_t iSrcLen, FX_CHAR* pDst) {
+int32_t Base64EncodeA(const uint8_t* pSrc, int32_t iSrcLen, char* pDst) {
ASSERT(pSrc);
if (iSrcLen < 1) {
return 0;
@@ -68,7 +66,7 @@ int32_t Base64EncodeA(const uint8_t* pSrc, int32_t iSrcLen, FX_CHAR* pDst) {
}
FX_BASE64DATA srcData;
int32_t iBytes = 3;
- FX_CHAR* pDstEnd = pDst;
+ char* pDstEnd = pDst;
while (iSrcLen > 0) {
if (iSrcLen > 2) {
((uint8_t*)&srcData)[0] = *pSrc++;
@@ -252,7 +250,7 @@ void CXFA_ChecksumContext::FinishChecksum() {
FXSYS_memset(digest, 0, 20);
CRYPT_SHA1Finish(m_pByteContext.get(), digest);
int32_t nLen = Base64EncodeA(digest, 20, nullptr);
- FX_CHAR* pBuffer = m_bsChecksum.GetBuffer(nLen);
+ char* pBuffer = m_bsChecksum.GetBuffer(nLen);
Base64EncodeA(digest, 20, pBuffer);
m_bsChecksum.ReleaseBuffer(nLen);
m_pByteContext.reset();
diff --git a/xfa/fxfa/app/xfa_ffbarcode.cpp b/xfa/fxfa/app/xfa_ffbarcode.cpp
index b136b8da5a..3bbef30d06 100644
--- a/xfa/fxfa/app/xfa_ffbarcode.cpp
+++ b/xfa/fxfa/app/xfa_ffbarcode.cpp
@@ -174,7 +174,7 @@ void CXFA_FFBarcode::UpdateWidgetProperty() {
pBarCodeWidget->SetType(pBarcodeTypeInfo->eBCType);
CXFA_WidgetAcc* pAcc = GetDataAcc();
int32_t intVal;
- FX_CHAR charVal;
+ char charVal;
bool boolVal;
FX_FLOAT floatVal;
if (pAcc->GetBarcodeAttribute_CharEncoding(intVal)) {
diff --git a/xfa/fxfa/app/xfa_ffbarcode.h b/xfa/fxfa/app/xfa_ffbarcode.h
index c20feb5167..1f11be6da7 100644
--- a/xfa/fxfa/app/xfa_ffbarcode.h
+++ b/xfa/fxfa/app/xfa_ffbarcode.h
@@ -93,7 +93,7 @@ enum XFA_BARCODETYPEENUM {
struct XFA_BARCODETYPEENUMINFO {
uint32_t uHash;
- const FX_WCHAR* pName;
+ const wchar_t* pName;
XFA_BARCODETYPEENUM eName;
BC_TYPE eBCType;
};
diff --git a/xfa/fxfa/app/xfa_ffdoc.cpp b/xfa/fxfa/app/xfa_ffdoc.cpp
index 911bdf8400..b6dba7f71a 100644
--- a/xfa/fxfa/app/xfa_ffdoc.cpp
+++ b/xfa/fxfa/app/xfa_ffdoc.cpp
@@ -59,7 +59,7 @@ uint8_t base64DecoderValue(uint8_t val) {
return g_FXBase64DecoderMap[val - kStartValuesRemoved];
}
-void Base64DecodePiece(const FX_CHAR src[4],
+void Base64DecodePiece(const char src[4],
int32_t iChars,
FX_BASE64DATA& dst,
int32_t& iBytes) {
@@ -89,7 +89,7 @@ void Base64DecodePiece(const FX_CHAR src[4],
}
}
-int32_t Base64DecodeW(const FX_WCHAR* pSrc, int32_t iSrcLen, uint8_t* pDst) {
+int32_t Base64DecodeW(const wchar_t* pSrc, int32_t iSrcLen, uint8_t* pDst) {
ASSERT(pSrc);
if (iSrcLen < 1) {
return 0;
@@ -112,26 +112,26 @@ int32_t Base64DecodeW(const FX_WCHAR* pSrc, int32_t iSrcLen, uint8_t* pDst) {
}
return iDstLen;
}
- FX_CHAR srcData[4];
+ char srcData[4];
FX_BASE64DATA dstData;
int32_t iChars = 4, iBytes;
uint8_t* pDstEnd = pDst;
while (iSrcLen > 0) {
if (iSrcLen > 3) {
- srcData[0] = (FX_CHAR)*pSrc++;
- srcData[1] = (FX_CHAR)*pSrc++;
- srcData[2] = (FX_CHAR)*pSrc++;
- srcData[3] = (FX_CHAR)*pSrc++;
+ srcData[0] = (char)*pSrc++;
+ srcData[1] = (char)*pSrc++;
+ srcData[2] = (char)*pSrc++;
+ srcData[3] = (char)*pSrc++;
iSrcLen -= 4;
} else {
*((uint32_t*)&dstData) = 0;
*((uint32_t*)srcData) = 0;
- srcData[0] = (FX_CHAR)*pSrc++;
+ srcData[0] = (char)*pSrc++;
if (iSrcLen > 1) {
- srcData[1] = (FX_CHAR)*pSrc++;
+ srcData[1] = (char)*pSrc++;
}
if (iSrcLen > 2) {
- srcData[2] = (FX_CHAR)*pSrc++;
+ srcData[2] = (char)*pSrc++;
}
iChars = iSrcLen;
iSrcLen = 0;
diff --git a/xfa/fxfa/app/xfa_ffnotify.cpp b/xfa/fxfa/app/xfa_ffnotify.cpp
index 951b4fd3f1..a0b834b96b 100644
--- a/xfa/fxfa/app/xfa_ffnotify.cpp
+++ b/xfa/fxfa/app/xfa_ffnotify.cpp
@@ -49,8 +49,8 @@ void CXFA_FFNotify::OnPageEvent(CXFA_ContainerLayoutItem* pSender,
}
void CXFA_FFNotify::OnWidgetListItemAdded(CXFA_WidgetData* pSender,
- const FX_WCHAR* pLabel,
- const FX_WCHAR* pValue,
+ const wchar_t* pLabel,
+ const wchar_t* pValue,
int32_t iIndex) {
CXFA_WidgetAcc* pWidgetAcc = static_cast<CXFA_WidgetAcc*>(pSender);
if (pWidgetAcc->GetUIType() != XFA_Element::ChoiceList)
diff --git a/xfa/fxfa/app/xfa_ffnotify.h b/xfa/fxfa/app/xfa_ffnotify.h
index 1bfaffec89..f76d35b639 100644
--- a/xfa/fxfa/app/xfa_ffnotify.h
+++ b/xfa/fxfa/app/xfa_ffnotify.h
@@ -20,8 +20,8 @@ class CXFA_FFNotify {
void OnPageEvent(CXFA_ContainerLayoutItem* pSender, uint32_t dwEvent);
void OnWidgetListItemAdded(CXFA_WidgetData* pSender,
- const FX_WCHAR* pLabel,
- const FX_WCHAR* pValue,
+ const wchar_t* pLabel,
+ const wchar_t* pValue,
int32_t iIndex);
void OnWidgetListItemRemoved(CXFA_WidgetData* pSender, int32_t iIndex);
diff --git a/xfa/fxfa/app/xfa_fftext.cpp b/xfa/fxfa/app/xfa_fftext.cpp
index e8d7aa32d0..04de9d918a 100644
--- a/xfa/fxfa/app/xfa_fftext.cpp
+++ b/xfa/fxfa/app/xfa_fftext.cpp
@@ -111,7 +111,7 @@ bool CXFA_FFText::OnLButtonDown(uint32_t dwFlags, const CFX_PointF& point) {
if (!GetRectWithoutRotate().Contains(point))
return false;
- const FX_WCHAR* wsURLContent = GetLinkURLAtPoint(point);
+ const wchar_t* wsURLContent = GetLinkURLAtPoint(point);
if (!wsURLContent)
return false;
@@ -128,7 +128,7 @@ bool CXFA_FFText::OnLButtonUp(uint32_t dwFlags, const CFX_PointF& point) {
return false;
SetButtonDown(false);
- const FX_WCHAR* wsURLContent = GetLinkURLAtPoint(point);
+ const wchar_t* wsURLContent = GetLinkURLAtPoint(point);
if (!wsURLContent)
return false;
@@ -145,7 +145,7 @@ FWL_WidgetHit CXFA_FFText::OnHitTest(const CFX_PointF& point) {
return FWL_WidgetHit::HyperLink;
}
-const FX_WCHAR* CXFA_FFText::GetLinkURLAtPoint(const CFX_PointF& point) {
+const wchar_t* CXFA_FFText::GetLinkURLAtPoint(const CFX_PointF& point) {
CXFA_TextLayout* pTextLayout = m_pDataAcc->GetTextLayout();
if (!pTextLayout)
return nullptr;
diff --git a/xfa/fxfa/app/xfa_fftext.h b/xfa/fxfa/app/xfa_fftext.h
index c553821791..eddc1224ac 100644
--- a/xfa/fxfa/app/xfa_fftext.h
+++ b/xfa/fxfa/app/xfa_fftext.h
@@ -26,7 +26,7 @@ class CXFA_FFText : public CXFA_FFDraw {
bool PerformLayout() override;
private:
- const FX_WCHAR* GetLinkURLAtPoint(const CFX_PointF& point);
+ const wchar_t* GetLinkURLAtPoint(const CFX_PointF& point);
};
#endif // XFA_FXFA_APP_XFA_FFTEXT_H_
diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp
index 9995fd11b2..ad175349f6 100644
--- a/xfa/fxfa/app/xfa_ffwidget.cpp
+++ b/xfa/fxfa/app/xfa_ffwidget.cpp
@@ -923,7 +923,7 @@ static uint8_t* XFA_RemoveBase64Whitespace(const uint8_t* pStr, int32_t iLen) {
uint8_t* pCP;
int32_t i = 0, j = 0;
if (iLen == 0) {
- iLen = FXSYS_strlen((FX_CHAR*)pStr);
+ iLen = FXSYS_strlen((char*)pStr);
}
pCP = FX_Alloc(uint8_t, iLen + 1);
for (; i < iLen; i++) {
@@ -936,16 +936,16 @@ static uint8_t* XFA_RemoveBase64Whitespace(const uint8_t* pStr, int32_t iLen) {
pCP[j] = '\0';
return pCP;
}
-static int32_t XFA_Base64Decode(const FX_CHAR* pStr, uint8_t* pOutBuffer) {
+static int32_t XFA_Base64Decode(const char* pStr, uint8_t* pOutBuffer) {
if (!pStr) {
return 0;
}
uint8_t* pBuffer =
- XFA_RemoveBase64Whitespace((uint8_t*)pStr, FXSYS_strlen((FX_CHAR*)pStr));
+ XFA_RemoveBase64Whitespace((uint8_t*)pStr, FXSYS_strlen((char*)pStr));
if (!pBuffer) {
return 0;
}
- int32_t iLen = FXSYS_strlen((FX_CHAR*)pBuffer);
+ int32_t iLen = FXSYS_strlen((char*)pBuffer);
int32_t i = 0, j = 0;
uint32_t dwLimb = 0;
for (; i + 3 < iLen; i += 4) {
@@ -982,14 +982,14 @@ static int32_t XFA_Base64Decode(const FX_CHAR* pStr, uint8_t* pOutBuffer) {
return j;
}
-static const FX_CHAR g_base64_chars[] =
+static const char g_base64_chars[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-FX_CHAR* XFA_Base64Encode(const uint8_t* buf, int32_t buf_len) {
- FX_CHAR* out = nullptr;
+char* XFA_Base64Encode(const uint8_t* buf, int32_t buf_len) {
+ char* out = nullptr;
int i, j;
uint32_t limb;
- out = FX_Alloc(FX_CHAR, ((buf_len * 8 + 5) / 6) + 5);
+ out = FX_Alloc(char, ((buf_len * 8 + 5) / 6) + 5);
for (i = 0, j = 0, limb = 0; i + 2 < buf_len; i += 3, j += 4) {
limb = ((uint32_t)buf[i] << 16) | ((uint32_t)buf[i + 1] << 8) |
((uint32_t)buf[i + 2]);
diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
index 960771f9f8..655c9da511 100644
--- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
@@ -838,8 +838,8 @@ void CXFA_WidgetAcc::CalculateTextContentSize(CFX_SizeF& size) {
return;
}
- FX_WCHAR wcEnter = '\n';
- FX_WCHAR wsLast = wsText.GetAt(wsText.GetLength() - 1);
+ wchar_t wcEnter = '\n';
+ wchar_t wsLast = wsText.GetAt(wsText.GetLength() - 1);
if (wsLast == wcEnter) {
wsText = wsText + wcEnter;
}
diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp
index 5db389663a..d7e34fb944 100644
--- a/xfa/fxfa/app/xfa_fontmgr.cpp
+++ b/xfa/fxfa/app/xfa_fontmgr.cpp
@@ -1762,10 +1762,10 @@ CFX_RetainPtr<CFGAS_GEFont> CXFA_DefFontMgr::GetFont(
if (dwFontStyles & FX_FONTSTYLE_Italic) {
dwStyle |= FX_FONTSTYLE_Italic;
}
- const FX_WCHAR* pReplace = pCurFont->pReplaceFont;
+ const wchar_t* pReplace = pCurFont->pReplaceFont;
int32_t iLength = FXSYS_wcslen(pReplace);
while (iLength > 0) {
- const FX_WCHAR* pNameText = pReplace;
+ const wchar_t* pNameText = pReplace;
while (*pNameText != L',' && iLength > 0) {
pNameText++;
iLength--;
@@ -1796,7 +1796,7 @@ CFX_RetainPtr<CFGAS_GEFont> CXFA_DefFontMgr::GetDefaultFont(
CFX_RetainPtr<CFGAS_GEFont> pFont =
pFDEFontMgr->LoadFont(L"Arial Narrow", dwFontStyles, wCodePage);
if (!pFont) {
- pFont = pFDEFontMgr->LoadFont(static_cast<const FX_WCHAR*>(nullptr),
+ pFont = pFDEFontMgr->LoadFont(static_cast<const wchar_t*>(nullptr),
dwFontStyles, wCodePage);
}
if (pFont)
@@ -1969,7 +1969,7 @@ bool CXFA_PDFFontMgr::PsNameMatchDRFontName(const CFX_ByteStringC& bsPsName,
}
bool CXFA_PDFFontMgr::GetCharWidth(const CFX_RetainPtr<CFGAS_GEFont>& pFont,
- FX_WCHAR wUnicode,
+ wchar_t wUnicode,
bool bCharCode,
int32_t* pWidth) {
if (wUnicode != 0x20 || bCharCode)
diff --git a/xfa/fxfa/app/xfa_fwltheme.cpp b/xfa/fxfa/app/xfa_fwltheme.cpp
index 73abaecbc8..5ea2a0c6c7 100644
--- a/xfa/fxfa/app/xfa_fwltheme.cpp
+++ b/xfa/fxfa/app/xfa_fwltheme.cpp
@@ -28,7 +28,7 @@
namespace {
-const FX_WCHAR* const g_FWLTheme_CalFonts[] = {
+const wchar_t* const g_FWLTheme_CalFonts[] = {
L"Arial", L"Courier New", L"DejaVu Sans",
};
diff --git a/xfa/fxfa/fm2js/xfa_error.cpp b/xfa/fxfa/fm2js/xfa_error.cpp
index 020d9bc509..9ca886954a 100644
--- a/xfa/fxfa/fm2js/xfa_error.cpp
+++ b/xfa/fxfa/fm2js/xfa_error.cpp
@@ -6,12 +6,12 @@
#include "xfa/fxfa/fm2js/xfa_error.h"
-const FX_WCHAR kFMErrUnsupportedChar[] = L"unsupported char '%c'";
-const FX_WCHAR kFMErrBadSuffixNumber[] = L"bad suffix on number";
-const FX_WCHAR kFMErrExpectedIdentifier[] =
+const wchar_t kFMErrUnsupportedChar[] = L"unsupported char '%c'";
+const wchar_t kFMErrBadSuffixNumber[] = L"bad suffix on number";
+const wchar_t kFMErrExpectedIdentifier[] =
L"expected identifier instead of '%s'";
-const FX_WCHAR kFMErrExpectedToken[] = L"expected '%s' instead of '%s'";
-const FX_WCHAR kFMErrExpectedEndIf[] = L"expected 'endif' instead of '%s'";
-const FX_WCHAR kFMErrUnexpectedExpression[] = L"unexpected expression '%s'";
-const FX_WCHAR kFMErrExpectedNonEmptyExpression[] =
+const wchar_t kFMErrExpectedToken[] = L"expected '%s' instead of '%s'";
+const wchar_t kFMErrExpectedEndIf[] = L"expected 'endif' instead of '%s'";
+const wchar_t kFMErrUnexpectedExpression[] = L"unexpected expression '%s'";
+const wchar_t kFMErrExpectedNonEmptyExpression[] =
L"expected non-empty expression";
diff --git a/xfa/fxfa/fm2js/xfa_error.h b/xfa/fxfa/fm2js/xfa_error.h
index 5e3fbbe1ba..d6bb72bb34 100644
--- a/xfa/fxfa/fm2js/xfa_error.h
+++ b/xfa/fxfa/fm2js/xfa_error.h
@@ -10,13 +10,13 @@
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/fx_system.h"
-extern const FX_WCHAR kFMErrUnsupportedChar[];
-extern const FX_WCHAR kFMErrBadSuffixNumber[];
-extern const FX_WCHAR kFMErrExpectedIdentifier[];
-extern const FX_WCHAR kFMErrExpectedToken[];
-extern const FX_WCHAR kFMErrExpectedEndIf[];
-extern const FX_WCHAR kFMErrUnexpectedExpression[];
-extern const FX_WCHAR kFMErrExpectedNonEmptyExpression[];
+extern const wchar_t kFMErrUnsupportedChar[];
+extern const wchar_t kFMErrBadSuffixNumber[];
+extern const wchar_t kFMErrExpectedIdentifier[];
+extern const wchar_t kFMErrExpectedToken[];
+extern const wchar_t kFMErrExpectedEndIf[];
+extern const wchar_t kFMErrUnexpectedExpression[];
+extern const wchar_t kFMErrExpectedNonEmptyExpression[];
class CXFA_FMErrorInfo {
public:
diff --git a/xfa/fxfa/fm2js/xfa_expression.cpp b/xfa/fxfa/fm2js/xfa_expression.cpp
index 32db6d24df..c1e451eade 100644
--- a/xfa/fxfa/fm2js/xfa_expression.cpp
+++ b/xfa/fxfa/fm2js/xfa_expression.cpp
@@ -12,10 +12,10 @@
namespace {
-const FX_WCHAR RUNTIMEBLOCKTEMPARRAY[] =
+const wchar_t RUNTIMEBLOCKTEMPARRAY[] =
L"foxit_xfa_formcalc_runtime_block_temp_array";
-const FX_WCHAR RUNTIMEBLOCKTEMPARRAYINDEX[] =
+const wchar_t RUNTIMEBLOCKTEMPARRAYINDEX[] =
L"foxit_xfa_formcalc_runtime_block_temp_array_index";
} // namespace
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
index e8cb2d0279..356180834f 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
@@ -28,7 +28,7 @@ const double kFinancialPrecision = 0.00000001;
struct XFA_FMHtmlReserveCode {
uint32_t m_uCode;
- const FX_WCHAR* m_htmlReserve;
+ const wchar_t* m_htmlReserve;
};
struct XFA_FMHtmlHashedReserveCode {
@@ -384,7 +384,7 @@ void AlternateDateTimeSymbols(CFX_WideString& wsPattern,
bool bEscape = false;
int32_t i = 0;
while (i < nLength) {
- FX_WCHAR wc = wsPattern[i];
+ wchar_t wc = wsPattern[i];
if (wc == L'\'') {
bInConstRange = !bInConstRange;
if (bEscape) {
@@ -442,11 +442,11 @@ bool PatternStringType(const CFX_ByteStringC& szPattern,
patternType = XFA_VT_NULL;
wsPattern.MakeLower();
- const FX_WCHAR* pData = wsPattern.c_str();
+ const wchar_t* pData = wsPattern.c_str();
int32_t iLength = wsPattern.GetLength();
int32_t iIndex = 0;
bool bSingleQuotation = false;
- FX_WCHAR patternChar;
+ wchar_t patternChar;
while (iIndex < iLength) {
patternChar = pData[iIndex];
if (patternChar == 0x27) {
@@ -455,7 +455,7 @@ bool PatternStringType(const CFX_ByteStringC& szPattern,
(patternChar == 'y' || patternChar == 'j')) {
patternType = XFA_VT_DATE;
iIndex++;
- FX_WCHAR timePatternChar;
+ wchar_t timePatternChar;
while (iIndex < iLength) {
timePatternChar = pData[iIndex];
if (timePatternChar == 0x27) {
@@ -1642,7 +1642,7 @@ void CXFA_FM2JSContext::TimeFmt(CFXJSE_Value* pThis,
}
// static
-bool CXFA_FM2JSContext::IsIsoDateFormat(const FX_CHAR* pData,
+bool CXFA_FM2JSContext::IsIsoDateFormat(const char* pData,
int32_t iLength,
int32_t& iStyle,
int32_t& iYear,
@@ -1655,7 +1655,7 @@ bool CXFA_FM2JSContext::IsIsoDateFormat(const FX_CHAR* pData,
if (iLength < 4)
return false;
- FX_CHAR strYear[5];
+ char strYear[5];
strYear[4] = '\0';
for (int32_t i = 0; i < 4; ++i) {
if (pData[i] > '9' || pData[i] < '0')
@@ -1670,7 +1670,7 @@ bool CXFA_FM2JSContext::IsIsoDateFormat(const FX_CHAR* pData,
iStyle = pData[4] == '-' ? 1 : 0;
- FX_CHAR strTemp[3];
+ char strTemp[3];
strTemp[2] = '\0';
int32_t iPosOff = iStyle == 0 ? 4 : 5;
if ((pData[iPosOff] > '9' || pData[iPosOff] < '0') ||
@@ -1721,7 +1721,7 @@ bool CXFA_FM2JSContext::IsIsoDateFormat(const FX_CHAR* pData,
}
// static
-bool CXFA_FM2JSContext::IsIsoTimeFormat(const FX_CHAR* pData,
+bool CXFA_FM2JSContext::IsIsoTimeFormat(const char* pData,
int32_t iLength,
int32_t& iHour,
int32_t& iMinute,
@@ -1738,7 +1738,7 @@ bool CXFA_FM2JSContext::IsIsoTimeFormat(const FX_CHAR* pData,
if (!pData)
return false;
- FX_CHAR strTemp[3];
+ char strTemp[3];
strTemp[2] = '\0';
int32_t iZone = 0;
int32_t i = 0;
@@ -1796,7 +1796,7 @@ bool CXFA_FM2JSContext::IsIsoTimeFormat(const FX_CHAR* pData,
}
if (pData[iIndex] == '.') {
++iIndex;
- FX_CHAR strSec[4];
+ char strSec[4];
strSec[3] = '\0';
if (pData[iIndex] > '9' || pData[iIndex] < '0')
return false;
@@ -1868,7 +1868,7 @@ bool CXFA_FM2JSContext::IsIsoTimeFormat(const FX_CHAR* pData,
}
// static
-bool CXFA_FM2JSContext::IsIsoDateTimeFormat(const FX_CHAR* pData,
+bool CXFA_FM2JSContext::IsIsoDateTimeFormat(const char* pData,
int32_t iLength,
int32_t& iYear,
int32_t& iMonth,
@@ -3059,14 +3059,14 @@ void CXFA_FM2JSContext::UnitType(CFXJSE_Value* pThis,
unitspanString.MakeLower();
CFX_WideString wsTypeString =
CFX_WideString::FromUTF8(unitspanString.AsStringC());
- const FX_WCHAR* pData = wsTypeString.c_str();
+ const wchar_t* pData = wsTypeString.c_str();
int32_t u = 0;
int32_t uLen = wsTypeString.GetLength();
while (IsWhitespace(pData[u]))
u++;
XFA_FM2JS_VALUETYPE_ParserStatus eParserStatus = VALUETYPE_START;
- FX_WCHAR typeChar;
+ wchar_t typeChar;
// TODO(dsinclair): Cleanup this parser, figure out what the various checks
// are for.
while (u < uLen) {
@@ -3086,7 +3086,7 @@ void CXFA_FM2JSContext::UnitType(CFXJSE_Value* pThis,
}
eParserStatus = VALUETYPE_HAVEDIGIT;
} else if ((typeChar == 'c' || typeChar == 'p') && (u + 1 < uLen)) {
- FX_WCHAR nextChar = pData[u + 1];
+ wchar_t nextChar = pData[u + 1];
if ((eParserStatus == VALUETYPE_START ||
eParserStatus == VALUETYPE_HAVEDIGIT ||
eParserStatus == VALUETYPE_HAVEDIGITWHITE) &&
@@ -3097,7 +3097,7 @@ void CXFA_FM2JSContext::UnitType(CFXJSE_Value* pThis,
}
eParserStatus = VALUETYPE_HAVEINVALIDCHAR;
} else if (typeChar == 'm' && (u + 1 < uLen)) {
- FX_WCHAR nextChar = pData[u + 1];
+ wchar_t nextChar = pData[u + 1];
if ((eParserStatus == VALUETYPE_START ||
eParserStatus == VALUETYPE_HAVEDIGIT ||
eParserStatus == VALUETYPE_HAVEDIGITWHITE) &&
@@ -3153,7 +3153,7 @@ void CXFA_FM2JSContext::UnitValue(CFXJSE_Value* pThis,
CFX_ByteString unitspanString;
ValueToUTF8String(unitspanValue.get(), unitspanString);
- const FX_CHAR* pData = unitspanString.c_str();
+ const char* pData = unitspanString.c_str();
if (!pData) {
args.GetReturnValue()->SetInteger(0);
return;
@@ -3171,7 +3171,7 @@ void CXFA_FM2JSContext::UnitValue(CFXJSE_Value* pThis,
++u;
}
- FX_CHAR* pTemp = nullptr;
+ char* pTemp = nullptr;
FX_DOUBLE dFirstNumber = strtod(pData, &pTemp);
while (IsWhitespace(pData[u]))
++u;
@@ -3192,7 +3192,7 @@ void CXFA_FM2JSContext::UnitValue(CFXJSE_Value* pThis,
std::unique_ptr<CFXJSE_Value> unitValue = GetSimpleValue(pThis, args, 1);
CFX_ByteString unitTempString;
ValueToUTF8String(unitValue.get(), unitTempString);
- const FX_CHAR* pChar = unitTempString.c_str();
+ const char* pChar = unitTempString.c_str();
int32_t uVal = 0;
while (IsWhitespace(pChar[uVal]))
++uVal;
@@ -3393,18 +3393,18 @@ void CXFA_FM2JSContext::Decode(CFXJSE_Value* pThis,
void CXFA_FM2JSContext::DecodeURL(const CFX_ByteStringC& szURLString,
CFX_ByteTextBuf& szResultString) {
CFX_WideString wsURLString = CFX_WideString::FromUTF8(szURLString);
- const FX_WCHAR* pData = wsURLString.c_str();
+ const wchar_t* pData = wsURLString.c_str();
int32_t i = 0;
CFX_WideTextBuf wsResultBuf;
while (i < wsURLString.GetLength()) {
- FX_WCHAR ch = pData[i];
+ wchar_t ch = pData[i];
if ('%' != ch) {
wsResultBuf.AppendChar(ch);
++i;
continue;
}
- FX_WCHAR chTemp = 0;
+ wchar_t chTemp = 0;
int32_t iCount = 0;
while (iCount < 2) {
++i;
@@ -3434,15 +3434,15 @@ void CXFA_FM2JSContext::DecodeURL(const CFX_ByteStringC& szURLString,
void CXFA_FM2JSContext::DecodeHTML(const CFX_ByteStringC& szHTMLString,
CFX_ByteTextBuf& szResultString) {
CFX_WideString wsHTMLString = CFX_WideString::FromUTF8(szHTMLString);
- FX_WCHAR strString[9];
+ wchar_t strString[9];
int32_t iStrIndex = 0;
int32_t iLen = wsHTMLString.GetLength();
int32_t i = 0;
int32_t iCode = 0;
- const FX_WCHAR* pData = wsHTMLString.c_str();
+ const wchar_t* pData = wsHTMLString.c_str();
CFX_WideTextBuf wsResultBuf;
while (i < iLen) {
- FX_WCHAR ch = pData[i];
+ wchar_t ch = pData[i];
if (ch != '&') {
wsResultBuf.AppendChar(ch);
++i;
@@ -3492,7 +3492,7 @@ void CXFA_FM2JSContext::DecodeHTML(const CFX_ByteStringC& szHTMLString,
}
uint32_t iData = 0;
if (HTMLSTR2Code(strString, iData)) {
- wsResultBuf.AppendChar((FX_WCHAR)iData);
+ wsResultBuf.AppendChar((wchar_t)iData);
} else {
wsResultBuf.AppendChar(iCode);
}
@@ -3510,13 +3510,13 @@ void CXFA_FM2JSContext::DecodeHTML(const CFX_ByteStringC& szHTMLString,
void CXFA_FM2JSContext::DecodeXML(const CFX_ByteStringC& szXMLString,
CFX_ByteTextBuf& szResultString) {
CFX_WideString wsXMLString = CFX_WideString::FromUTF8(szXMLString);
- FX_WCHAR strString[9];
+ wchar_t strString[9];
int32_t iStrIndex = 0;
int32_t iLen = wsXMLString.GetLength();
int32_t i = 0;
int32_t iCode = 0;
- FX_WCHAR ch = 0;
- const FX_WCHAR* pData = wsXMLString.c_str();
+ wchar_t ch = 0;
+ const wchar_t* pData = wsXMLString.c_str();
CFX_WideTextBuf wsXMLBuf;
while (i < iLen) {
ch = pData[i];
@@ -3568,7 +3568,7 @@ void CXFA_FM2JSContext::DecodeXML(const CFX_ByteStringC& szXMLString,
strString[iStrIndex] = 0;
}
- const FX_WCHAR* const strName[] = {L"quot", L"amp", L"apos", L"lt", L"gt"};
+ const wchar_t* const strName[] = {L"quot", L"amp", L"apos", L"lt", L"gt"};
int32_t iIndex = 0;
while (iIndex < 5) {
if (FXSYS_memcmp(strString, strName[iIndex],
@@ -3659,16 +3659,16 @@ void CXFA_FM2JSContext::EncodeURL(const CFX_ByteStringC& szURLString,
CFX_ByteTextBuf& szResultBuf) {
CFX_WideString wsURLString = CFX_WideString::FromUTF8(szURLString);
CFX_WideTextBuf wsResultBuf;
- FX_WCHAR strEncode[4];
+ wchar_t strEncode[4];
strEncode[0] = '%';
strEncode[3] = 0;
- FX_WCHAR strUnsafe[] = {' ', '<', '>', '"', '#', '%', '{', '}',
- '|', '\\', '^', '~', '[', ']', '`'};
- FX_WCHAR strReserved[] = {';', '/', '?', ':', '@', '=', '&'};
- FX_WCHAR strSpecial[] = {'$', '-', '+', '!', '*', '\'', '(', ')', ','};
- const FX_WCHAR* strCode = L"0123456789abcdef";
+ wchar_t strUnsafe[] = {' ', '<', '>', '"', '#', '%', '{', '}',
+ '|', '\\', '^', '~', '[', ']', '`'};
+ wchar_t strReserved[] = {';', '/', '?', ':', '@', '=', '&'};
+ wchar_t strSpecial[] = {'$', '-', '+', '!', '*', '\'', '(', ')', ','};
+ const wchar_t* strCode = L"0123456789abcdef";
for (int32_t u = 0; u < wsURLString.GetLength(); ++u) {
- FX_WCHAR ch = wsURLString.GetAt(u);
+ wchar_t ch = wsURLString.GetAt(u);
int32_t i = 0;
int32_t iCount = FX_ArraySize(strUnsafe);
while (i < iCount) {
@@ -3719,10 +3719,10 @@ void CXFA_FM2JSContext::EncodeURL(const CFX_ByteStringC& szURLString,
} else if (ch >= 0x20 && ch <= 0x7e) {
wsResultBuf.AppendChar(ch);
} else {
- const FX_WCHAR iRadix = 16;
+ const wchar_t iRadix = 16;
CFX_WideString strTmp;
while (ch >= iRadix) {
- FX_WCHAR tmp = strCode[ch % iRadix];
+ wchar_t tmp = strCode[ch % iRadix];
ch /= iRadix;
strTmp += tmp;
}
@@ -3760,8 +3760,8 @@ void CXFA_FM2JSContext::EncodeHTML(const CFX_ByteStringC& szHTMLString,
CFX_ByteTextBuf& szResultBuf) {
CFX_ByteString str = szHTMLString.c_str();
CFX_WideString wsHTMLString = CFX_WideString::FromUTF8(str.AsStringC());
- const FX_WCHAR* strCode = L"0123456789abcdef";
- FX_WCHAR strEncode[9];
+ const wchar_t* strCode = L"0123456789abcdef";
+ wchar_t strEncode[9];
strEncode[0] = '&';
strEncode[1] = '#';
strEncode[2] = 'x';
@@ -3772,7 +3772,7 @@ void CXFA_FM2JSContext::EncodeHTML(const CFX_ByteStringC& szHTMLString,
CFX_WideTextBuf wsResultBuf;
int32_t iLen = wsHTMLString.GetLength();
int32_t i = 0;
- const FX_WCHAR* pData = wsHTMLString.c_str();
+ const wchar_t* pData = wsHTMLString.c_str();
while (i < iLen) {
uint32_t ch = pData[i];
CFX_WideString htmlReserve;
@@ -3781,7 +3781,7 @@ void CXFA_FM2JSContext::EncodeHTML(const CFX_ByteStringC& szHTMLString,
wsResultBuf << htmlReserve;
wsResultBuf.AppendChar(L';');
} else if (ch >= 32 && ch <= 126) {
- wsResultBuf.AppendChar((FX_WCHAR)ch);
+ wsResultBuf.AppendChar((wchar_t)ch);
} else if (ch < 256) {
int32_t iIndex = ch / 16;
strEncode[3] = strCode[iIndex];
@@ -3810,7 +3810,7 @@ void CXFA_FM2JSContext::EncodeXML(const CFX_ByteStringC& szXMLString,
CFX_ByteTextBuf& szResultBuf) {
CFX_WideString wsXMLString = CFX_WideString::FromUTF8(szXMLString);
CFX_WideTextBuf wsResultBuf;
- FX_WCHAR strEncode[9];
+ wchar_t strEncode[9];
strEncode[0] = '&';
strEncode[1] = '#';
strEncode[2] = 'x';
@@ -3818,10 +3818,10 @@ void CXFA_FM2JSContext::EncodeXML(const CFX_ByteStringC& szXMLString,
strEncode[6] = 0;
strEncode[7] = ';';
strEncode[8] = 0;
- const FX_WCHAR* strCode = L"0123456789abcdef";
- const FX_WCHAR* pData = wsXMLString.c_str();
+ const wchar_t* strCode = L"0123456789abcdef";
+ const wchar_t* pData = wsXMLString.c_str();
for (int32_t u = 0; u < wsXMLString.GetLength(); ++u) {
- FX_WCHAR ch = pData[u];
+ wchar_t ch = pData[u];
switch (ch) {
case '"':
wsResultBuf.AppendChar('&');
@@ -4060,7 +4060,7 @@ void CXFA_FM2JSContext::Lower(CFXJSE_Value* pThis,
ValueToUTF8String(argOne.get(), argString);
CFX_WideTextBuf lowStringBuf;
CFX_WideString wsArgString = CFX_WideString::FromUTF8(argString.AsStringC());
- const FX_WCHAR* pData = wsArgString.c_str();
+ const wchar_t* pData = wsArgString.c_str();
int32_t i = 0;
while (i < argString.GetLength()) {
int32_t ch = pData[i];
@@ -4399,7 +4399,7 @@ void CXFA_FM2JSContext::Str(CFXJSE_Value* pThis,
formatStr += "f";
numberString.Format(formatStr.c_str(), fNumber);
- const FX_CHAR* pData = numberString.c_str();
+ const char* pData = numberString.c_str();
int32_t iLength = numberString.GetLength();
int32_t u = 0;
while (u < iLength) {
@@ -4608,7 +4608,7 @@ void CXFA_FM2JSContext::Upper(CFXJSE_Value* pThis,
CFX_WideTextBuf upperStringBuf;
CFX_WideString wsArgString = CFX_WideString::FromUTF8(argString.AsStringC());
- const FX_WCHAR* pData = wsArgString.c_str();
+ const wchar_t* pData = wsArgString.c_str();
int32_t i = 0;
while (i < wsArgString.GetLength()) {
int32_t ch = pData[i];
@@ -4692,7 +4692,7 @@ void CXFA_FM2JSContext::TrillionUS(const CFX_ByteStringC& szData,
"Sixty", "Seventy", "Eighty", "Ninety"};
CFX_ByteStringC pComm[] = {" Hundred ", " Thousand ", " Million ",
" Billion ", "Trillion"};
- const FX_CHAR* pData = szData.c_str();
+ const char* pData = szData.c_str();
int32_t iLength = szData.GetLength();
int32_t iComm = 0;
if (iLength > 12)
@@ -4781,7 +4781,7 @@ void CXFA_FM2JSContext::TrillionUS(const CFX_ByteStringC& szData,
void CXFA_FM2JSContext::WordUS(const CFX_ByteStringC& szData,
int32_t iStyle,
CFX_ByteTextBuf& strBuf) {
- const FX_CHAR* pData = szData.c_str();
+ const char* pData = szData.c_str();
int32_t iLength = szData.GetLength();
if (iStyle < 0 || iStyle > 2) {
return;
@@ -6411,7 +6411,7 @@ void CXFA_FM2JSContext::ThrowArgumentMismatchException() const {
ThrowException(L"Argument mismatch in property or function argument.");
}
-void CXFA_FM2JSContext::ThrowException(const FX_WCHAR* str, ...) const {
+void CXFA_FM2JSContext::ThrowException(const wchar_t* str, ...) const {
CFX_WideString wsMessage;
va_list arg_ptr;
va_start(arg_ptr, str);
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.h b/xfa/fxfa/fm2js/xfa_fm2jscontext.h
index 0f802fe65e..b56a0212d8 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.h
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.h
@@ -91,13 +91,13 @@ class CXFA_FM2JSContext : public CFXJSE_HostObject {
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args);
- static bool IsIsoDateFormat(const FX_CHAR* pData,
+ static bool IsIsoDateFormat(const char* pData,
int32_t iLength,
int32_t& iStyle,
int32_t& iYear,
int32_t& iMonth,
int32_t& iDay);
- static bool IsIsoTimeFormat(const FX_CHAR* pData,
+ static bool IsIsoTimeFormat(const char* pData,
int32_t iLength,
int32_t& iHour,
int32_t& iMinute,
@@ -105,7 +105,7 @@ class CXFA_FM2JSContext : public CFXJSE_HostObject {
int32_t& iMilliSecond,
int32_t& iZoneHour,
int32_t& iZoneMinute);
- static bool IsIsoDateTimeFormat(const FX_CHAR* pData,
+ static bool IsIsoDateTimeFormat(const char* pData,
int32_t iLength,
int32_t& iYear,
int32_t& iMonth,
@@ -462,7 +462,7 @@ class CXFA_FM2JSContext : public CFXJSE_HostObject {
const CFX_WideString& exp) const;
void ThrowArgumentMismatchException() const;
void ThrowParamCountMismatchException(const CFX_WideString& method) const;
- void ThrowException(const FX_WCHAR* str, ...) const;
+ void ThrowException(const wchar_t* str, ...) const;
v8::Isolate* m_pIsolate;
CFXJSE_Class* m_pFMClass;
diff --git a/xfa/fxfa/fm2js/xfa_fmparse.cpp b/xfa/fxfa/fm2js/xfa_fmparse.cpp
index 52161e8c0a..09e8f36298 100644
--- a/xfa/fxfa/fm2js/xfa_fmparse.cpp
+++ b/xfa/fxfa/fm2js/xfa_fmparse.cpp
@@ -39,7 +39,7 @@ void CXFA_FMParse::Check(XFA_FM_TOKEN op) {
NextToken();
}
-void CXFA_FMParse::Error(uint32_t lineNum, const FX_WCHAR* msg, ...) {
+void CXFA_FMParse::Error(uint32_t lineNum, const wchar_t* msg, ...) {
m_pErrorInfo->linenum = lineNum;
va_list ap;
va_start(ap, msg);
@@ -832,7 +832,7 @@ std::unique_ptr<CXFA_FMExpression> CXFA_FMParse::ParseBlockExpression() {
std::unique_ptr<CXFA_FMExpression> CXFA_FMParse::ParseIfExpression() {
uint32_t line = m_pToken->m_uLinenum;
- const FX_WCHAR* pStartPos = m_lexer->SavePos();
+ const wchar_t* pStartPos = m_lexer->SavePos();
NextToken();
Check(TOKlparen);
std::unique_ptr<CXFA_FMSimpleExpression> pExpression;
diff --git a/xfa/fxfa/fm2js/xfa_fmparse.h b/xfa/fxfa/fm2js/xfa_fmparse.h
index 8f2671d1b0..ccb793ae68 100644
--- a/xfa/fxfa/fm2js/xfa_fmparse.h
+++ b/xfa/fxfa/fm2js/xfa_fmparse.h
@@ -20,7 +20,7 @@ class CXFA_FMParse {
void NextToken();
void Check(XFA_FM_TOKEN op);
- void Error(uint32_t lineNum, const FX_WCHAR* msg, ...);
+ void Error(uint32_t lineNum, const wchar_t* msg, ...);
std::vector<std::unique_ptr<CXFA_FMExpression>> ParseTopExpression();
std::unique_ptr<CXFA_FMExpression> ParseFunction();
std::unique_ptr<CXFA_FMExpression> ParseExpression();
diff --git a/xfa/fxfa/fm2js/xfa_lexer.cpp b/xfa/fxfa/fm2js/xfa_lexer.cpp
index 6e844bcdf0..e83877eb13 100644
--- a/xfa/fxfa/fm2js/xfa_lexer.cpp
+++ b/xfa/fxfa/fm2js/xfa_lexer.cpp
@@ -11,41 +11,39 @@
namespace {
struct XFA_FMDChar {
- static const FX_WCHAR* inc(const FX_WCHAR*& p) {
+ static const wchar_t* inc(const wchar_t*& p) {
++p;
return p;
}
- static const FX_WCHAR* dec(const FX_WCHAR*& p) {
+ static const wchar_t* dec(const wchar_t*& p) {
--p;
return p;
}
- static uint16_t get(const FX_WCHAR* p) { return *p; }
- static bool isWhiteSpace(const FX_WCHAR* p) {
+ static uint16_t get(const wchar_t* p) { return *p; }
+ static bool isWhiteSpace(const wchar_t* p) {
return (*p) == 0x09 || (*p) == 0x0b || (*p) == 0x0c || (*p) == 0x20;
}
- static bool isLineTerminator(const FX_WCHAR* p) {
+ static bool isLineTerminator(const wchar_t* p) {
return *p == 0x0A || *p == 0x0D;
}
- static bool isBinary(const FX_WCHAR* p) { return (*p) >= '0' && (*p) <= '1'; }
- static bool isOctal(const FX_WCHAR* p) { return (*p) >= '0' && (*p) <= '7'; }
- static bool isDigital(const FX_WCHAR* p) {
- return (*p) >= '0' && (*p) <= '9';
- }
- static bool isHex(const FX_WCHAR* p) {
+ static bool isBinary(const wchar_t* p) { return (*p) >= '0' && (*p) <= '1'; }
+ static bool isOctal(const wchar_t* p) { return (*p) >= '0' && (*p) <= '7'; }
+ static bool isDigital(const wchar_t* p) { return (*p) >= '0' && (*p) <= '9'; }
+ static bool isHex(const wchar_t* p) {
return isDigital(p) || ((*p) >= 'a' && (*p) <= 'f') ||
((*p) >= 'A' && (*p) <= 'F');
}
- static bool isAlpha(const FX_WCHAR* p) {
+ static bool isAlpha(const wchar_t* p) {
return ((*p) <= 'z' && (*p) >= 'a') || ((*p) <= 'Z' && (*p) >= 'A');
}
- static bool isAvalid(const FX_WCHAR* p, bool flag = 0);
- static bool string2number(const FX_WCHAR* s,
+ static bool isAvalid(const wchar_t* p, bool flag = 0);
+ static bool string2number(const wchar_t* s,
FX_DOUBLE* pValue,
- const FX_WCHAR*& pEnd);
+ const wchar_t*& pEnd);
static bool isUnicodeAlpha(uint16_t ch);
};
-inline bool XFA_FMDChar::isAvalid(const FX_WCHAR* p, bool flag) {
+inline bool XFA_FMDChar::isAvalid(const wchar_t* p, bool flag) {
if (*p == 0) {
return 1;
}
@@ -61,9 +59,9 @@ inline bool XFA_FMDChar::isAvalid(const FX_WCHAR* p, bool flag) {
return 0;
}
-inline bool XFA_FMDChar::string2number(const FX_WCHAR* s,
+inline bool XFA_FMDChar::string2number(const wchar_t* s,
FX_DOUBLE* pValue,
- const FX_WCHAR*& pEnd) {
+ const wchar_t*& pEnd) {
if (s) {
*pValue = wcstod((wchar_t*)s, (wchar_t**)&pEnd);
}
@@ -148,7 +146,7 @@ const XFA_FM_TOKEN KEYWORD_END = TOKendif;
} // namespace
-const FX_WCHAR* XFA_FM_KeywordToString(XFA_FM_TOKEN op) {
+const wchar_t* XFA_FM_KeywordToString(XFA_FM_TOKEN op) {
if (op < KEYWORD_START || op > KEYWORD_END)
return L"";
return keyWords[op].m_keyword;
@@ -199,12 +197,12 @@ CXFA_FMToken* CXFA_FMLexer::Scan() {
XFA_FMDChar::inc(m_ptr);
break;
case ';': {
- const FX_WCHAR* pTemp = 0;
+ const wchar_t* pTemp = 0;
Comment(m_ptr, pTemp);
m_ptr = pTemp;
} break;
case '"': {
- const FX_WCHAR* pTemp = 0;
+ const wchar_t* pTemp = 0;
p->m_type = TOKstring;
iRet = String(p, m_ptr, pTemp);
m_ptr = pTemp;
@@ -221,7 +219,7 @@ CXFA_FMToken* CXFA_FMLexer::Scan() {
case '8':
case '9': {
p->m_type = TOKnumber;
- const FX_WCHAR* pTemp = 0;
+ const wchar_t* pTemp = 0;
iRet = Number(p, m_ptr, pTemp);
m_ptr = pTemp;
if (iRet) {
@@ -333,7 +331,7 @@ CXFA_FMToken* CXFA_FMLexer::Scan() {
if (XFA_FMDChar::isAvalid(m_ptr)) {
ch = XFA_FMDChar::get(m_ptr);
if (ch == '/') {
- const FX_WCHAR* pTemp = 0;
+ const wchar_t* pTemp = 0;
Comment(m_ptr, pTemp);
m_ptr = pTemp;
break;
@@ -365,7 +363,7 @@ CXFA_FMToken* CXFA_FMLexer::Scan() {
return p;
} else if (ch <= '9' && ch >= '0') {
p->m_type = TOKnumber;
- const FX_WCHAR* pTemp = 0;
+ const wchar_t* pTemp = 0;
XFA_FMDChar::dec(m_ptr);
iRet = Number(p, m_ptr, pTemp);
m_ptr = pTemp;
@@ -389,7 +387,7 @@ CXFA_FMToken* CXFA_FMLexer::Scan() {
XFA_FMDChar::inc(m_ptr);
break;
default: {
- const FX_WCHAR* pTemp = 0;
+ const wchar_t* pTemp = 0;
iRet = Identifiers(p, m_ptr, pTemp);
m_ptr = pTemp;
if (iRet) {
@@ -403,8 +401,8 @@ CXFA_FMToken* CXFA_FMLexer::Scan() {
}
uint32_t CXFA_FMLexer::Number(CXFA_FMToken* t,
- const FX_WCHAR* p,
- const FX_WCHAR*& pEnd) {
+ const wchar_t* p,
+ const wchar_t*& pEnd) {
FX_DOUBLE number = 0;
if (XFA_FMDChar::string2number(p, &number, pEnd)) {
return 1;
@@ -417,9 +415,9 @@ uint32_t CXFA_FMLexer::Number(CXFA_FMToken* t,
}
uint32_t CXFA_FMLexer::String(CXFA_FMToken* t,
- const FX_WCHAR* p,
- const FX_WCHAR*& pEnd) {
- const FX_WCHAR* pStart = p;
+ const wchar_t* p,
+ const wchar_t*& pEnd) {
+ const wchar_t* pStart = p;
uint16_t ch = 0;
XFA_FMDChar::inc(p);
ch = XFA_FMDChar::get(p);
@@ -457,9 +455,9 @@ uint32_t CXFA_FMLexer::String(CXFA_FMToken* t,
}
uint32_t CXFA_FMLexer::Identifiers(CXFA_FMToken* t,
- const FX_WCHAR* p,
- const FX_WCHAR*& pEnd) {
- const FX_WCHAR* pStart = p;
+ const wchar_t* p,
+ const wchar_t*& pEnd) {
+ const wchar_t* pStart = p;
uint16_t ch = 0;
ch = XFA_FMDChar::get(p);
XFA_FMDChar::inc(p);
@@ -491,7 +489,7 @@ uint32_t CXFA_FMLexer::Identifiers(CXFA_FMToken* t,
return 0;
}
-void CXFA_FMLexer::Comment(const FX_WCHAR* p, const FX_WCHAR*& pEnd) {
+void CXFA_FMLexer::Comment(const wchar_t* p, const wchar_t*& pEnd) {
unsigned ch = 0;
XFA_FMDChar::inc(p);
ch = XFA_FMDChar::get(p);
@@ -530,7 +528,7 @@ XFA_FM_TOKEN CXFA_FMLexer::IsKeyword(const CFX_WideStringC& str) {
return TOKidentifier;
}
-void CXFA_FMLexer::Error(const FX_WCHAR* msg, ...) {
+void CXFA_FMLexer::Error(const wchar_t* msg, ...) {
m_pErrorInfo->linenum = m_uCurrentLine;
va_list ap;
va_start(ap, msg);
diff --git a/xfa/fxfa/fm2js/xfa_lexer.h b/xfa/fxfa/fm2js/xfa_lexer.h
index 9395c06814..aa7904cfb3 100644
--- a/xfa/fxfa/fm2js/xfa_lexer.h
+++ b/xfa/fxfa/fm2js/xfa_lexer.h
@@ -86,10 +86,10 @@ enum XFA_FM_TOKEN {
struct XFA_FMKeyword {
XFA_FM_TOKEN m_type;
uint32_t m_uHash;
- const FX_WCHAR* m_keyword;
+ const wchar_t* m_keyword;
};
-const FX_WCHAR* XFA_FM_KeywordToString(XFA_FM_TOKEN op);
+const wchar_t* XFA_FM_KeywordToString(XFA_FM_TOKEN op);
class CXFA_FMToken {
public:
@@ -107,27 +107,25 @@ class CXFA_FMLexer {
~CXFA_FMLexer();
CXFA_FMToken* NextToken();
- uint32_t Number(CXFA_FMToken* t, const FX_WCHAR* p, const FX_WCHAR*& pEnd);
- uint32_t String(CXFA_FMToken* t, const FX_WCHAR* p, const FX_WCHAR*& pEnd);
- uint32_t Identifiers(CXFA_FMToken* t,
- const FX_WCHAR* p,
- const FX_WCHAR*& pEnd);
- void Comment(const FX_WCHAR* p, const FX_WCHAR*& pEnd);
+ uint32_t Number(CXFA_FMToken* t, const wchar_t* p, const wchar_t*& pEnd);
+ uint32_t String(CXFA_FMToken* t, const wchar_t* p, const wchar_t*& pEnd);
+ uint32_t Identifiers(CXFA_FMToken* t, const wchar_t* p, const wchar_t*& pEnd);
+ void Comment(const wchar_t* p, const wchar_t*& pEnd);
XFA_FM_TOKEN IsKeyword(const CFX_WideStringC& p);
void SetCurrentLine(uint32_t line) { m_uCurrentLine = line; }
void SetToken(CXFA_FMToken* pToken) {
if (m_pToken.get() != pToken)
m_pToken.reset(pToken);
}
- const FX_WCHAR* SavePos() { return m_ptr; }
- void RestorePos(const FX_WCHAR* pPos) { m_ptr = pPos; }
- void Error(const FX_WCHAR* msg, ...);
+ const wchar_t* SavePos() { return m_ptr; }
+ void RestorePos(const wchar_t* pPos) { m_ptr = pPos; }
+ void Error(const wchar_t* msg, ...);
bool HasError() const;
protected:
CXFA_FMToken* Scan();
- const FX_WCHAR* m_ptr;
+ const wchar_t* m_ptr;
uint32_t m_uCurrentLine;
std::unique_ptr<CXFA_FMToken> m_pToken;
CXFA_FMErrorInfo* m_pErrorInfo;
diff --git a/xfa/fxfa/fm2js/xfa_simpleexpression.cpp b/xfa/fxfa/fm2js/xfa_simpleexpression.cpp
index 686ddaa17d..7bc703b59b 100644
--- a/xfa/fxfa/fm2js/xfa_simpleexpression.cpp
+++ b/xfa/fxfa/fm2js/xfa_simpleexpression.cpp
@@ -12,7 +12,7 @@
namespace {
-const FX_WCHAR* const gs_lpStrExpFuncName[] = {
+const wchar_t* const gs_lpStrExpFuncName[] = {
L"foxit_xfa_formcalc_runtime.assign_value_operator",
L"foxit_xfa_formcalc_runtime.logical_or_operator",
L"foxit_xfa_formcalc_runtime.logical_and_operator",
@@ -42,7 +42,7 @@ const FX_WCHAR* const gs_lpStrExpFuncName[] = {
struct XFA_FMBuildInFunc {
uint32_t m_uHash;
- const FX_WCHAR* m_buildinfunc;
+ const wchar_t* m_buildinfunc;
};
const XFA_FMBuildInFunc g_BuildInFuncs[] = {
@@ -83,7 +83,7 @@ const XFA_FMBuildInFunc g_BuildInFuncs[] = {
struct XFA_FMSOMMethod {
uint32_t m_uHash;
- const FX_WCHAR* m_wsSomMethodName;
+ const wchar_t* m_wsSomMethodName;
uint32_t m_dParameters;
};
const XFA_FMSOMMethod gs_FMSomMethods[] = {
@@ -155,7 +155,7 @@ void CXFA_FMStringExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
CFX_WideString tempStr(m_wsString);
if (tempStr.GetLength() > 2) {
javascript.AppendChar(L'\"');
- FX_WCHAR oneChar;
+ wchar_t oneChar;
for (int16_t i = 1; i < tempStr.GetLength() - 1; i++) {
oneChar = tempStr[i];
switch (oneChar) {
diff --git a/xfa/fxfa/fxfa_basic.h b/xfa/fxfa/fxfa_basic.h
index d16f50fd90..a33f8c8153 100644
--- a/xfa/fxfa/fxfa_basic.h
+++ b/xfa/fxfa/fxfa_basic.h
@@ -90,9 +90,9 @@ enum XFA_XDPPACKET_FLAGS {
};
struct XFA_PACKETINFO {
uint32_t uHash;
- const FX_WCHAR* pName;
+ const wchar_t* pName;
XFA_XDPPACKET eName;
- const FX_WCHAR* pURI;
+ const wchar_t* pURI;
uint32_t eFlags;
};
@@ -928,7 +928,7 @@ enum class XFA_Element : int32_t {
};
struct XFA_ELEMENTINFO {
uint32_t uHash;
- const FX_WCHAR* pName;
+ const wchar_t* pName;
XFA_Element eName;
uint32_t dwPackets;
XFA_ObjectType eObjectType;
@@ -944,7 +944,7 @@ enum XFA_ATTRIBUTETYPE {
};
struct XFA_ATTRIBUTEINFO {
uint32_t uHash;
- const FX_WCHAR* pName;
+ const wchar_t* pName;
XFA_ATTRIBUTE eName;
XFA_ATTRIBUTETYPE eType;
uint32_t dwPackets;
@@ -974,7 +974,7 @@ struct XFA_PROPERTY {
struct XFA_ATTRIBUTEENUMINFO {
uint32_t uHash;
- const FX_WCHAR* pName;
+ const wchar_t* pName;
XFA_ATTRIBUTEENUM eName;
};
@@ -1004,7 +1004,7 @@ class CXFA_Object;
typedef void (CXFA_Object::*XFA_METHOD_CALLBACK)(CFXJSE_Arguments* pArguments);
struct XFA_METHODINFO {
uint32_t uHash;
- const FX_WCHAR* pName;
+ const wchar_t* pName;
XFA_METHOD_CALLBACK lpfnCallback;
};
@@ -1017,7 +1017,7 @@ enum XFA_SCRIPT_TYPE {
};
struct XFA_SCRIPTATTRIBUTEINFO {
uint32_t uHash;
- const FX_WCHAR* pName;
+ const wchar_t* pName;
XFA_ATTRIBUTE_CALLBACK lpfnCallback;
int32_t eAttribute;
uint16_t eValueType;
diff --git a/xfa/fxfa/parser/cscript_hostpseudomodel.cpp b/xfa/fxfa/parser/cscript_hostpseudomodel.cpp
index a06e02f56d..94958a58e6 100644
--- a/xfa/fxfa/parser/cscript_hostpseudomodel.cpp
+++ b/xfa/fxfa/parser/cscript_hostpseudomodel.cpp
@@ -322,10 +322,10 @@ static int32_t XFA_FilterName(const CFX_WideStringC& wsExpression,
if (nStart >= iLength) {
return iLength;
}
- FX_WCHAR* pBuf = wsFilter.GetBuffer(iLength - nStart);
+ wchar_t* pBuf = wsFilter.GetBuffer(iLength - nStart);
int32_t nCount = 0;
- const FX_WCHAR* pSrc = wsExpression.c_str();
- FX_WCHAR wCur;
+ const wchar_t* pSrc = wsExpression.c_str();
+ wchar_t wCur;
while (nStart < iLength) {
wCur = pSrc[nStart++];
if (wCur == ',') {
diff --git a/xfa/fxfa/parser/cscript_layoutpseudomodel.cpp b/xfa/fxfa/parser/cscript_layoutpseudomodel.cpp
index 152b568619..aa3117a734 100644
--- a/xfa/fxfa/parser/cscript_layoutpseudomodel.cpp
+++ b/xfa/fxfa/parser/cscript_layoutpseudomodel.cpp
@@ -50,7 +50,7 @@ void CScript_LayoutPseudoModel::HWXY(CFXJSE_Arguments* pArguments,
XFA_LAYOUTMODEL_HWXY layoutModel) {
int32_t iLength = pArguments->GetLength();
if (iLength < 1 || iLength > 3) {
- const FX_WCHAR* methodName = nullptr;
+ const wchar_t* methodName = nullptr;
switch (layoutModel) {
case XFA_LAYOUTMODEL_H:
methodName = L"h";
@@ -451,7 +451,7 @@ void CScript_LayoutPseudoModel::PageImp(CFXJSE_Arguments* pArguments,
bool bAbsPage) {
int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
- const FX_WCHAR* methodName;
+ const wchar_t* methodName;
if (bAbsPage) {
methodName = L"absPage";
} else {
diff --git a/xfa/fxfa/parser/cxfa_data.cpp b/xfa/fxfa/parser/cxfa_data.cpp
index 19f85088b8..3544a1de4c 100644
--- a/xfa/fxfa/parser/cxfa_data.cpp
+++ b/xfa/fxfa/parser/cxfa_data.cpp
@@ -17,7 +17,7 @@ FX_ARGB CXFA_Data::ToColor(const CFX_WideStringC& wsValue) {
return 0xff000000;
int cc = 0;
- const FX_WCHAR* str = wsValue.c_str();
+ const wchar_t* str = wsValue.c_str();
int len = wsValue.GetLength();
while (FXSYS_iswspace(str[cc]) && cc < len)
cc++;
diff --git a/xfa/fxfa/parser/cxfa_dataexporter.cpp b/xfa/fxfa/parser/cxfa_dataexporter.cpp
index fe9947527d..4d3b039b33 100644
--- a/xfa/fxfa/parser/cxfa_dataexporter.cpp
+++ b/xfa/fxfa/parser/cxfa_dataexporter.cpp
@@ -49,7 +49,7 @@ CFX_WideString ExportEncodeContent(const CFX_WideStringC& str) {
CFX_WideTextBuf textBuf;
int32_t iLen = str.GetLength();
for (int32_t i = 0; i < iLen; i++) {
- FX_WCHAR ch = str.GetAt(i);
+ wchar_t ch = str.GetAt(i);
if (!FDE_IsXMLValidChar(ch))
continue;
@@ -332,7 +332,7 @@ void RegenerateFormFile_Container(CXFA_Node* pNode,
RegenerateFormFile_Changed(pNode, buf, bSaveXML);
FX_STRSIZE nLen = buf.GetLength();
if (nLen > 0)
- pStream->WriteString((const FX_WCHAR*)buf.GetBuffer(), nLen);
+ pStream->WriteString((const wchar_t*)buf.GetBuffer(), nLen);
return;
}
@@ -379,21 +379,21 @@ void RegenerateFormFile_Container(CXFA_Node* pNode,
void XFA_DataExporter_RegenerateFormFile(
CXFA_Node* pNode,
const CFX_RetainPtr<IFGAS_Stream>& pStream,
- const FX_CHAR* pChecksum,
+ const char* pChecksum,
bool bSaveXML) {
if (pNode->IsModelNode()) {
- static const FX_WCHAR s_pwsTagName[] = L"<form";
- static const FX_WCHAR s_pwsClose[] = L"</form\n>";
+ static const wchar_t s_pwsTagName[] = L"<form";
+ static const wchar_t s_pwsClose[] = L"</form\n>";
pStream->WriteString(s_pwsTagName, FXSYS_wcslen(s_pwsTagName));
if (pChecksum) {
- static const FX_WCHAR s_pwChecksum[] = L" checksum=\"";
+ static const wchar_t s_pwChecksum[] = L" checksum=\"";
CFX_WideString wsChecksum = CFX_WideString::FromUTF8(pChecksum);
pStream->WriteString(s_pwChecksum, FXSYS_wcslen(s_pwChecksum));
pStream->WriteString(wsChecksum.c_str(), wsChecksum.GetLength());
pStream->WriteString(L"\"", 1);
}
pStream->WriteString(L" xmlns=\"", FXSYS_wcslen(L" xmlns=\""));
- const FX_WCHAR* pURI = XFA_GetPacketByIndex(XFA_PACKET_Form)->pURI;
+ const wchar_t* pURI = XFA_GetPacketByIndex(XFA_PACKET_Form)->pURI;
pStream->WriteString(pURI, FXSYS_wcslen(pURI));
CFX_WideString wsVersionNumber;
RecognizeXFAVersionNumber(
@@ -460,7 +460,7 @@ bool CXFA_DataExporter::Export(
const CFX_RetainPtr<IFX_SeekableWriteStream>& pWrite,
CXFA_Node* pNode,
uint32_t dwFlag,
- const FX_CHAR* pChecksum) {
+ const char* pChecksum) {
ASSERT(pWrite);
if (!pWrite)
return false;
@@ -478,19 +478,19 @@ bool CXFA_DataExporter::Export(
bool CXFA_DataExporter::Export(const CFX_RetainPtr<IFGAS_Stream>& pStream,
CXFA_Node* pNode,
uint32_t dwFlag,
- const FX_CHAR* pChecksum) {
+ const char* pChecksum) {
CFDE_XMLDoc* pXMLDoc = m_pDocument->GetXMLDoc();
if (pNode->IsModelNode()) {
switch (pNode->GetPacketID()) {
case XFA_XDPPACKET_XDP: {
- static const FX_WCHAR s_pwsPreamble[] =
+ static const wchar_t s_pwsPreamble[] =
L"<xdp:xdp xmlns:xdp=\"http://ns.adobe.com/xdp/\">";
pStream->WriteString(s_pwsPreamble, FXSYS_wcslen(s_pwsPreamble));
for (CXFA_Node* pChild = pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
pChild; pChild = pChild->GetNodeItem(XFA_NODEITEM_NextSibling)) {
Export(pStream, pChild, dwFlag, pChecksum);
}
- static const FX_WCHAR s_pwsPostamble[] = L"</xdp:xdp\n>";
+ static const wchar_t s_pwsPostamble[] = L"</xdp:xdp\n>";
pStream->WriteString(s_pwsPostamble, FXSYS_wcslen(s_pwsPostamble));
break;
}
diff --git a/xfa/fxfa/parser/cxfa_dataexporter.h b/xfa/fxfa/parser/cxfa_dataexporter.h
index 0e5de00796..2037167fba 100644
--- a/xfa/fxfa/parser/cxfa_dataexporter.h
+++ b/xfa/fxfa/parser/cxfa_dataexporter.h
@@ -23,13 +23,13 @@ class CXFA_DataExporter {
bool Export(const CFX_RetainPtr<IFX_SeekableWriteStream>& pWrite,
CXFA_Node* pNode,
uint32_t dwFlag,
- const FX_CHAR* pChecksum);
+ const char* pChecksum);
protected:
bool Export(const CFX_RetainPtr<IFGAS_Stream>& pStream,
CXFA_Node* pNode,
uint32_t dwFlag,
- const FX_CHAR* pChecksum);
+ const char* pChecksum);
CXFA_Document* const m_pDocument;
};
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index cd6b84424c..086c0e929d 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -350,7 +350,7 @@ CXFA_Node* CreateInstance(CXFA_Node* pInstMgrNode, bool bDataMerge) {
struct XFA_ExecEventParaInfo {
public:
uint32_t m_uHash;
- const FX_WCHAR* m_lpcEventName;
+ const wchar_t* m_lpcEventName;
XFA_EVENTTYPE m_eventType;
uint32_t m_validFlags;
};
@@ -408,11 +408,11 @@ void StrToRGB(const CFX_WideString& strRGB,
g = 0;
b = 0;
- FX_WCHAR zero = '0';
+ wchar_t zero = '0';
int32_t iIndex = 0;
int32_t iLen = strRGB.GetLength();
for (int32_t i = 0; i < iLen; ++i) {
- FX_WCHAR ch = strRGB.GetAt(i);
+ wchar_t ch = strRGB.GetAt(i);
if (ch == L',')
++iIndex;
if (iIndex > 2)
@@ -3949,7 +3949,7 @@ bool CXFA_Node::TryCData(XFA_ATTRIBUTE eAttr,
void* pValue = nullptr;
if (XFA_GetAttributeDefaultValue(pValue, GetElementType(), eAttr,
XFA_ATTRIBUTETYPE_Cdata, m_ePacket)) {
- wsValue = (const FX_WCHAR*)pValue;
+ wsValue = (const wchar_t*)pValue;
return true;
}
return false;
@@ -3977,7 +3977,7 @@ bool CXFA_Node::TryCData(XFA_ATTRIBUTE eAttr,
void* pValue = nullptr;
if (XFA_GetAttributeDefaultValue(pValue, GetElementType(), eAttr,
XFA_ATTRIBUTETYPE_Cdata, m_ePacket)) {
- wsValue = (CFX_WideStringC)(const FX_WCHAR*)pValue;
+ wsValue = (CFX_WideStringC)(const wchar_t*)pValue;
return true;
}
return false;
@@ -4898,7 +4898,7 @@ bool CXFA_Node::GetMapModuleValue(void* pKey, void*& pValue) {
void CXFA_Node::SetMapModuleString(void* pKey, const CFX_WideStringC& wsValue) {
SetMapModuleBuffer(pKey, (void*)wsValue.c_str(),
- wsValue.GetLength() * sizeof(FX_WCHAR));
+ wsValue.GetLength() * sizeof(wchar_t));
}
bool CXFA_Node::GetMapModuleString(void* pKey, CFX_WideStringC& wsValue) {
@@ -4907,7 +4907,7 @@ bool CXFA_Node::GetMapModuleString(void* pKey, CFX_WideStringC& wsValue) {
if (!GetMapModuleBuffer(pKey, pValue, iBytes)) {
return false;
}
- wsValue = CFX_WideStringC((const FX_WCHAR*)pValue, iBytes / sizeof(FX_WCHAR));
+ wsValue = CFX_WideStringC((const wchar_t*)pValue, iBytes / sizeof(wchar_t));
return true;
}
diff --git a/xfa/fxfa/parser/cxfa_nodehelper.cpp b/xfa/fxfa/parser/cxfa_nodehelper.cpp
index 2290892318..641697dc81 100644
--- a/xfa/fxfa/parser/cxfa_nodehelper.cpp
+++ b/xfa/fxfa/parser/cxfa_nodehelper.cpp
@@ -25,7 +25,7 @@ CXFA_NodeHelper::CXFA_NodeHelper()
CXFA_NodeHelper::~CXFA_NodeHelper() {}
CXFA_Node* CXFA_NodeHelper::ResolveNodes_GetOneChild(CXFA_Node* parent,
- const FX_WCHAR* pwsName,
+ const wchar_t* pwsName,
bool bIsClassName) {
if (!parent) {
return nullptr;
@@ -316,7 +316,7 @@ bool CXFA_NodeHelper::CreateNode_ForCondition(CFX_WideString& wsCondition) {
if (wsCondition.GetAt(0) == '[') {
int32_t i = 1;
for (; i < iLen; ++i) {
- FX_WCHAR ch = wsCondition[i];
+ wchar_t ch = wsCondition[i];
if (ch == ' ') {
continue;
}
diff --git a/xfa/fxfa/parser/cxfa_nodehelper.h b/xfa/fxfa/parser/cxfa_nodehelper.h
index 5097feabac..1db8321690 100644
--- a/xfa/fxfa/parser/cxfa_nodehelper.h
+++ b/xfa/fxfa/parser/cxfa_nodehelper.h
@@ -23,7 +23,7 @@ class CXFA_NodeHelper {
~CXFA_NodeHelper();
CXFA_Node* ResolveNodes_GetOneChild(CXFA_Node* parent,
- const FX_WCHAR* pwsName,
+ const wchar_t* pwsName,
bool bIsClassName = false);
CXFA_Node* ResolveNodes_GetParent(
CXFA_Node* pNode,
diff --git a/xfa/fxfa/parser/cxfa_object.cpp b/xfa/fxfa/parser/cxfa_object.cpp
index c8cd354b48..4964265b4d 100644
--- a/xfa/fxfa/parser/cxfa_object.cpp
+++ b/xfa/fxfa/parser/cxfa_object.cpp
@@ -63,7 +63,7 @@ void CXFA_Object::ThrowArgumentMismatchException() const {
ThrowException(L"Argument mismatch in property or function argument.");
}
-void CXFA_Object::ThrowException(const FX_WCHAR* str, ...) const {
+void CXFA_Object::ThrowException(const wchar_t* str, ...) const {
CFX_WideString wsMessage;
va_list arg_ptr;
va_start(arg_ptr, str);
diff --git a/xfa/fxfa/parser/cxfa_resolveprocessor.cpp b/xfa/fxfa/parser/cxfa_resolveprocessor.cpp
index 3ef4e976ca..94fd761bdf 100644
--- a/xfa/fxfa/parser/cxfa_resolveprocessor.cpp
+++ b/xfa/fxfa/parser/cxfa_resolveprocessor.cpp
@@ -34,7 +34,7 @@ int32_t CXFA_ResolveProcessor::Resolve(CXFA_ResolveNodesData& rnd) {
if (rnd.m_dwStyles & XFA_RESOLVENODE_AnyChild) {
return ResolveAnyChild(rnd);
}
- FX_WCHAR wch = rnd.m_wsName.GetAt(0);
+ wchar_t wch = rnd.m_wsName.GetAt(0);
switch (wch) {
case '$':
return ResolveDollar(rnd);
@@ -517,14 +517,14 @@ int32_t CXFA_ResolveProcessor::GetFilter(const CFX_WideStringC& wsExpression,
}
CFX_WideString& wsName = rnd.m_wsName;
CFX_WideString& wsCondition = rnd.m_wsCondition;
- FX_WCHAR* pNameBuf = wsName.GetBuffer(iLength - nStart);
- FX_WCHAR* pConditionBuf = wsCondition.GetBuffer(iLength - nStart);
+ wchar_t* pNameBuf = wsName.GetBuffer(iLength - nStart);
+ wchar_t* pConditionBuf = wsCondition.GetBuffer(iLength - nStart);
int32_t nNameCount = 0;
int32_t nConditionCount = 0;
CFX_ArrayTemplate<int32_t> stack;
int32_t nType = -1;
- const FX_WCHAR* pSrc = wsExpression.c_str();
- FX_WCHAR wPrev = 0, wCur;
+ const wchar_t* pSrc = wsExpression.c_str();
+ wchar_t wPrev = 0, wCur;
bool bIsCondition = false;
while (nStart < iLength) {
wCur = pSrc[nStart++];
@@ -537,7 +537,7 @@ int32_t CXFA_ResolveProcessor::GetFilter(const CFX_WideStringC& wsExpression,
rnd.m_dwStyles |= XFA_RESOLVENODE_AnyChild;
continue;
}
- FX_WCHAR wLookahead = nStart < iLength ? pSrc[nStart] : 0;
+ wchar_t wLookahead = nStart < iLength ? pSrc[nStart] : 0;
if (wLookahead != '[' && wLookahead != '(') {
if (nType < 0) {
break;
@@ -617,7 +617,7 @@ void CXFA_ResolveProcessor::ConditionArray(int32_t iCurIndex,
bool bAll = false;
int32_t i = 1;
for (; i < iLen; ++i) {
- FX_WCHAR ch = wsCondition[i];
+ wchar_t ch = wsCondition[i];
if (ch == ' ') {
continue;
}
@@ -746,7 +746,7 @@ void CXFA_ResolveProcessor::FilterCondition(CXFA_ResolveNodesData& rnd,
return;
}
}
- FX_WCHAR wTypeChar = wsCondition[0];
+ wchar_t wTypeChar = wsCondition[0];
switch (wTypeChar) {
case '[':
ConditionArray(iCurrIndex, wsCondition, iFoundCount, rnd);
diff --git a/xfa/fxfa/parser/cxfa_widetextread.cpp b/xfa/fxfa/parser/cxfa_widetextread.cpp
index 34fa6b9c5e..bba7cbdaa1 100644
--- a/xfa/fxfa/parser/cxfa_widetextread.cpp
+++ b/xfa/fxfa/parser/cxfa_widetextread.cpp
@@ -21,7 +21,7 @@ uint32_t CXFA_WideTextRead::GetAccessModes() const {
}
int32_t CXFA_WideTextRead::GetLength() const {
- return m_wsBuffer.GetLength() * sizeof(FX_WCHAR);
+ return m_wsBuffer.GetLength() * sizeof(wchar_t);
}
int32_t CXFA_WideTextRead::Seek(FX_STREAMSEEK eSeek, int32_t iOffset) {
@@ -41,7 +41,7 @@ int32_t CXFA_WideTextRead::Seek(FX_STREAMSEEK eSeek, int32_t iOffset) {
}
int32_t CXFA_WideTextRead::GetPosition() {
- return m_iPosition * sizeof(FX_WCHAR);
+ return m_iPosition * sizeof(wchar_t);
}
bool CXFA_WideTextRead::IsEOF() const {
@@ -52,7 +52,7 @@ int32_t CXFA_WideTextRead::ReadData(uint8_t* pBuffer, int32_t iBufferSize) {
return 0;
}
-int32_t CXFA_WideTextRead::ReadString(FX_WCHAR* pStr,
+int32_t CXFA_WideTextRead::ReadString(wchar_t* pStr,
int32_t iMaxLength,
bool& bEOS) {
iMaxLength = std::min(iMaxLength, m_wsBuffer.GetLength() - m_iPosition);
@@ -70,7 +70,7 @@ int32_t CXFA_WideTextRead::WriteData(const uint8_t* pBuffer,
return 0;
}
-int32_t CXFA_WideTextRead::WriteString(const FX_WCHAR* pStr, int32_t iLength) {
+int32_t CXFA_WideTextRead::WriteString(const wchar_t* pStr, int32_t iLength) {
return 0;
}
@@ -83,7 +83,7 @@ int32_t CXFA_WideTextRead::GetBOM(uint8_t bom[4]) const {
}
uint16_t CXFA_WideTextRead::GetCodePage() const {
- return (sizeof(FX_WCHAR) == 2) ? FX_CODEPAGE_UTF16LE : FX_CODEPAGE_UTF32LE;
+ return (sizeof(wchar_t) == 2) ? FX_CODEPAGE_UTF16LE : FX_CODEPAGE_UTF32LE;
}
uint16_t CXFA_WideTextRead::SetCodePage(uint16_t wCodePage) {
diff --git a/xfa/fxfa/parser/cxfa_widetextread.h b/xfa/fxfa/parser/cxfa_widetextread.h
index 2ccb042908..6c4a97f358 100644
--- a/xfa/fxfa/parser/cxfa_widetextread.h
+++ b/xfa/fxfa/parser/cxfa_widetextread.h
@@ -22,9 +22,9 @@ class CXFA_WideTextRead : public IFGAS_Stream {
int32_t GetPosition() override;
bool IsEOF() const override;
int32_t ReadData(uint8_t* pBuffer, int32_t iBufferSize) override;
- int32_t ReadString(FX_WCHAR* pStr, int32_t iMaxLength, bool& bEOS) override;
+ int32_t ReadString(wchar_t* pStr, int32_t iMaxLength, bool& bEOS) override;
int32_t WriteData(const uint8_t* pBuffer, int32_t iBufferSize) override;
- int32_t WriteString(const FX_WCHAR* pStr, int32_t iLength) override;
+ int32_t WriteString(const wchar_t* pStr, int32_t iLength) override;
void Flush() override {}
bool SetLength(int32_t iLength) override;
int32_t GetBOM(uint8_t bom[4]) const override;
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp
index d3533c277a..ca0303d00c 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.cpp
+++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp
@@ -225,7 +225,7 @@ CFX_WideStringC GetAttributeDefaultValue_Cdata(XFA_Element eElement,
void* pValue;
if (XFA_GetAttributeDefaultValue(pValue, eElement, eAttribute,
XFA_ATTRIBUTETYPE_Cdata, dwPacket)) {
- return (const FX_WCHAR*)pValue;
+ return (const wchar_t*)pValue;
}
return nullptr;
}
@@ -1292,24 +1292,24 @@ bool CXFA_WidgetData::GetBarcodeAttribute_DataLength(int32_t& val) {
return false;
}
-bool CXFA_WidgetData::GetBarcodeAttribute_StartChar(FX_CHAR& val) {
+bool CXFA_WidgetData::GetBarcodeAttribute_StartChar(char& val) {
CXFA_Node* pUIChild = GetUIChild();
CFX_WideStringC wsStartEndChar;
if (pUIChild->TryCData(XFA_ATTRIBUTE_StartChar, wsStartEndChar)) {
if (wsStartEndChar.GetLength()) {
- val = (FX_CHAR)wsStartEndChar.GetAt(0);
+ val = (char)wsStartEndChar.GetAt(0);
return true;
}
}
return false;
}
-bool CXFA_WidgetData::GetBarcodeAttribute_EndChar(FX_CHAR& val) {
+bool CXFA_WidgetData::GetBarcodeAttribute_EndChar(char& val) {
CXFA_Node* pUIChild = GetUIChild();
CFX_WideStringC wsStartEndChar;
if (pUIChild->TryCData(XFA_ATTRIBUTE_EndChar, wsStartEndChar)) {
if (wsStartEndChar.GetLength()) {
- val = (FX_CHAR)wsStartEndChar.GetAt(0);
+ val = (char)wsStartEndChar.GetAt(0);
return true;
}
}
@@ -1919,7 +1919,7 @@ CFX_WideString CXFA_WidgetData::NumericLimit(const CFX_WideString& wsValue,
i++;
}
for (; i < iCount; i++) {
- FX_WCHAR wc = wsValue[i];
+ wchar_t wc = wsValue[i];
if (FXSYS_isDecimalDigit(wc)) {
if (iLead >= 0) {
iLead_++;
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.h b/xfa/fxfa/parser/cxfa_widgetdata.h
index 4f5db3bad6..3eca270320 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.h
+++ b/xfa/fxfa/parser/cxfa_widgetdata.h
@@ -140,8 +140,8 @@ class CXFA_WidgetData : public CXFA_Data {
bool GetBarcodeAttribute_CharEncoding(int32_t& val);
bool GetBarcodeAttribute_Checksum(bool& val);
bool GetBarcodeAttribute_DataLength(int32_t& val);
- bool GetBarcodeAttribute_StartChar(FX_CHAR& val);
- bool GetBarcodeAttribute_EndChar(FX_CHAR& val);
+ bool GetBarcodeAttribute_StartChar(char& val);
+ bool GetBarcodeAttribute_EndChar(char& val);
bool GetBarcodeAttribute_ECLevel(int32_t& val);
bool GetBarcodeAttribute_ModuleWidth(int32_t& val);
bool GetBarcodeAttribute_ModuleHeight(int32_t& val);
diff --git a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
index dd04668a33..193ffdd497 100644
--- a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
+++ b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp
@@ -26,17 +26,17 @@
namespace {
-std::vector<CFX_WideString> SeparateStringW(const FX_WCHAR* pStr,
+std::vector<CFX_WideString> SeparateStringW(const wchar_t* pStr,
int32_t iStrLen,
- FX_WCHAR delimiter) {
+ wchar_t delimiter) {
std::vector<CFX_WideString> ret;
if (!pStr)
return ret;
if (iStrLen < 0)
iStrLen = FXSYS_wcslen(pStr);
- const FX_WCHAR* pToken = pStr;
- const FX_WCHAR* pEnd = pStr + iStrLen;
+ const wchar_t* pToken = pStr;
+ const wchar_t* pEnd = pStr + iStrLen;
while (true) {
if (pStr >= pEnd || delimiter == *pStr) {
ret.push_back(CFX_WideString(pToken, pStr - pToken));
diff --git a/xfa/fxfa/parser/xfa_locale.cpp b/xfa/fxfa/parser/xfa_locale.cpp
index d835eb2bc7..a9ddbcec3c 100644
--- a/xfa/fxfa/parser/xfa_locale.cpp
+++ b/xfa/fxfa/parser/xfa_locale.cpp
@@ -14,10 +14,10 @@
#include "xfa/fxfa/parser/xfa_object.h"
#include "xfa/fxfa/parser/xfa_utils.h"
-static const FX_WCHAR g_FX_Percent[] = L"z,zzz,zzz,zzz,zzz,zzz%";
-static const FX_WCHAR g_FX_Currency[] = L"$z,zzz,zzz,zzz,zzz,zz9.99";
-static const FX_WCHAR g_FX_Decimal[] = L"z,zzz,zzz,zzz,zzz,zz9.zzz";
-static const FX_WCHAR g_FX_Integer[] = L"z,zzz,zzz,zzz,zzz,zzz";
+static const wchar_t g_FX_Percent[] = L"z,zzz,zzz,zzz,zzz,zzz%";
+static const wchar_t g_FX_Currency[] = L"$z,zzz,zzz,zzz,zzz,zz9.99";
+static const wchar_t g_FX_Decimal[] = L"z,zzz,zzz,zzz,zzz,zz9.zzz";
+static const wchar_t g_FX_Integer[] = L"z,zzz,zzz,zzz,zzz,zzz";
CXFA_XMLLocale::CXFA_XMLLocale(std::unique_ptr<CXML_Element> pLocaleData)
: m_pLocaleData(std::move(pLocaleData)) {}
diff --git a/xfa/fxfa/parser/xfa_localevalue.cpp b/xfa/fxfa/parser/xfa_localevalue.cpp
index 7e92535c3d..6dd02e6a85 100644
--- a/xfa/fxfa/parser/xfa_localevalue.cpp
+++ b/xfa/fxfa/parser/xfa_localevalue.cpp
@@ -218,7 +218,7 @@ FX_FLOAT CXFA_LocaleValue::GetNum() const {
int32_t nExponent = 0;
int cc = 0;
bool bNegative = false, bExpSign = false;
- const FX_WCHAR* str = m_wsValue.c_str();
+ const wchar_t* str = m_wsValue.c_str();
int len = m_wsValue.GetLength();
while (FXSYS_iswspace(str[cc]) && cc < len) {
cc++;
@@ -294,7 +294,7 @@ FX_DOUBLE CXFA_LocaleValue::GetDoubleNum() const {
int32_t nExponent = 0;
int32_t cc = 0;
bool bNegative = false, bExpSign = false;
- const FX_WCHAR* str = m_wsValue.c_str();
+ const wchar_t* str = m_wsValue.c_str();
int len = m_wsValue.GetLength();
while (FXSYS_iswspace(str[cc]) && cc < len) {
cc++;
@@ -605,7 +605,7 @@ bool CXFA_LocaleValue::ValidateCanonicalDate(const CFX_WideString& wsDate,
uint16_t wYear = 0;
uint16_t wMonth = 0;
uint16_t wDay = 0;
- const FX_WCHAR* pDate = wsDate.c_str();
+ const wchar_t* pDate = wsDate.c_str();
int nIndex = 0, nStart = 0;
while (pDate[nIndex] != '\0' && nIndex < wCountY) {
if (!FXSYS_isDecimalDigit(pDate[nIndex])) {
@@ -691,7 +691,7 @@ bool CXFA_LocaleValue::ValidateCanonicalTime(const CFX_WideString& wsTime) {
uint16_t wMinute = 0;
uint16_t wSecond = 0;
uint16_t wFraction = 0;
- const FX_WCHAR* pTime = wsTime.c_str();
+ const wchar_t* pTime = wsTime.c_str();
int nIndex = 0;
int nStart = 0;
while (nIndex - nStart < wCountH && pTime[nIndex]) {
@@ -880,7 +880,7 @@ void CXFA_LocaleValue::GetNumbericFormat(CFX_WideString& wsFormat,
ASSERT(nIntLen >= -1 && nDecLen >= -1);
int32_t nTotalLen = (nIntLen >= 0 ? nIntLen : 2) + (bSign ? 1 : 0) +
(nDecLen >= 0 ? nDecLen : 2) + (nDecLen == 0 ? 0 : 1);
- FX_WCHAR* lpBuf = wsFormat.GetBuffer(nTotalLen);
+ wchar_t* lpBuf = wsFormat.GetBuffer(nTotalLen);
int32_t nPos = 0;
if (bSign) {
lpBuf[nPos++] = L's';
@@ -915,11 +915,11 @@ bool CXFA_LocaleValue::ValidateNumericTemp(CFX_WideString& wsNumeric,
if (wsFormat.IsEmpty() || wsNumeric.IsEmpty()) {
return true;
}
- const FX_WCHAR* pNum = wsNumeric.c_str();
- const FX_WCHAR* pFmt = wsFormat.c_str();
+ const wchar_t* pNum = wsNumeric.c_str();
+ const wchar_t* pFmt = wsFormat.c_str();
int32_t n = 0, nf = 0;
- FX_WCHAR c = pNum[n];
- FX_WCHAR cf = pFmt[nf];
+ wchar_t c = pNum[n];
+ wchar_t cf = pFmt[nf];
if (cf == L's') {
if (c == L'-' || c == L'+') {
++n;
diff --git a/xfa/fxfa/parser/xfa_object.h b/xfa/fxfa/parser/xfa_object.h
index e4f7ab2cb1..2300cc2209 100644
--- a/xfa/fxfa/parser/xfa_object.h
+++ b/xfa/fxfa/parser/xfa_object.h
@@ -98,7 +98,7 @@ class CXFA_Object : public CFXJSE_HostObject {
void ThrowParamCountMismatchException(const CFX_WideString& method) const;
protected:
- void ThrowException(const FX_WCHAR* str, ...) const;
+ void ThrowException(const wchar_t* str, ...) const;
CXFA_Document* const m_pDocument;
const XFA_ObjectType m_objectType;
diff --git a/xfa/fxfa/parser/xfa_utils.cpp b/xfa/fxfa/parser/xfa_utils.cpp
index 216c5a56c4..ef7e939a85 100644
--- a/xfa/fxfa/parser/xfa_utils.cpp
+++ b/xfa/fxfa/parser/xfa_utils.cpp
@@ -44,7 +44,7 @@ FX_DOUBLE WideStringToDouble(const CFX_WideString& wsStringVal) {
int32_t cc = 0;
bool bNegative = false;
bool bExpSign = false;
- const FX_WCHAR* str = wsValue.c_str();
+ const wchar_t* str = wsValue.c_str();
int32_t len = wsValue.GetLength();
if (str[0] == '+') {
cc++;
diff --git a/xfa/fxfa/parser/xfa_utils.h b/xfa/fxfa/parser/xfa_utils.h
index 3e95612132..a5bdeea192 100644
--- a/xfa/fxfa/parser/xfa_utils.h
+++ b/xfa/fxfa/parser/xfa_utils.h
@@ -154,7 +154,7 @@ void XFA_DataExporter_DealWithDataGroupNode(CXFA_Node* pDataNode);
void XFA_DataExporter_RegenerateFormFile(
CXFA_Node* pNode,
const CFX_RetainPtr<IFGAS_Stream>& pStream,
- const FX_CHAR* pChecksum = nullptr,
+ const char* pChecksum = nullptr,
bool bSaveXML = false);
const XFA_NOTSUREATTRIBUTE* XFA_GetNotsureAttribute(
diff --git a/xfa/fxfa/xfa_ffwidget.h b/xfa/fxfa/xfa_ffwidget.h
index 5972b8ad70..5345bc451e 100644
--- a/xfa/fxfa/xfa_ffwidget.h
+++ b/xfa/fxfa/xfa_ffwidget.h
@@ -173,7 +173,7 @@ CFX_DIBitmap* XFA_LoadImageFromBuffer(
int32_t& iImageYDpi);
FXCODEC_IMAGE_TYPE XFA_GetImageType(const CFX_WideString& wsType);
-FX_CHAR* XFA_Base64Encode(const uint8_t* buf, int32_t buf_len);
+char* XFA_Base64Encode(const uint8_t* buf, int32_t buf_len);
void XFA_RectWidthoutMargin(CFX_RectF& rt,
const CXFA_Margin& mg,
bool bUI = false);
diff --git a/xfa/fxfa/xfa_fontmgr.h b/xfa/fxfa/xfa_fontmgr.h
index f00b069ef0..b3ed8ab236 100644
--- a/xfa/fxfa/xfa_fontmgr.h
+++ b/xfa/fxfa/xfa_fontmgr.h
@@ -21,8 +21,8 @@ class CPDF_Font;
struct XFA_FONTINFO {
uint32_t dwFontNameHash;
- const FX_WCHAR* pPsName;
- const FX_WCHAR* pReplaceFont;
+ const wchar_t* pPsName;
+ const wchar_t* pReplaceFont;
uint16_t dwStyles;
uint16_t wCodePage;
};
@@ -56,7 +56,7 @@ class CXFA_PDFFontMgr {
CPDF_Font** pPDFFont,
bool bStrictMatch);
bool GetCharWidth(const CFX_RetainPtr<CFGAS_GEFont>& pFont,
- FX_WCHAR wUnicode,
+ wchar_t wUnicode,
bool bCharCode,
int32_t* pWidth);
void SetFont(const CFX_RetainPtr<CFGAS_GEFont>& pFont, CPDF_Font* pPDFFont);