summaryrefslogtreecommitdiff
path: root/xfa
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
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')
-rw-r--r--xfa/fde/cfde_txtedtbuf.cpp32
-rw-r--r--xfa/fde/cfde_txtedtbuf.h12
-rw-r--r--xfa/fde/cfde_txtedtdorecord_insert.cpp6
-rw-r--r--xfa/fde/cfde_txtedtdorecord_insert.h2
-rw-r--r--xfa/fde/cfde_txtedtengine.cpp66
-rw-r--r--xfa/fde/cfde_txtedtengine.h18
-rw-r--r--xfa/fde/cfde_txtedtpage.cpp20
-rw-r--r--xfa/fde/cfde_txtedtpage.h2
-rw-r--r--xfa/fde/cfde_txtedtparag.cpp6
-rw-r--r--xfa/fde/cfde_txtedttextset.cpp2
-rw-r--r--xfa/fde/cfx_chariter.cpp2
-rw-r--r--xfa/fde/cfx_chariter.h2
-rw-r--r--xfa/fde/cfx_wordbreak.cpp4
-rw-r--r--xfa/fde/css/cfde_cssdeclaration.cpp26
-rw-r--r--xfa/fde/css/cfde_cssdeclaration.h20
-rw-r--r--xfa/fde/css/cfde_cssselector.cpp18
-rw-r--r--xfa/fde/css/cfde_cssselector.h2
-rw-r--r--xfa/fde/css/cfde_cssstylesheet.cpp2
-rw-r--r--xfa/fde/css/cfde_cssstylesheet.h4
-rw-r--r--xfa/fde/css/cfde_cssstylesheet_unittest.cpp8
-rw-r--r--xfa/fde/css/cfde_csssyntaxparser.cpp8
-rw-r--r--xfa/fde/css/cfde_csssyntaxparser.h4
-rw-r--r--xfa/fde/css/cfde_csstextbuf.cpp10
-rw-r--r--xfa/fde/css/cfde_csstextbuf.h14
-rw-r--r--xfa/fde/css/cfde_cssvaluelistparser.cpp12
-rw-r--r--xfa/fde/css/cfde_cssvaluelistparser.h14
-rw-r--r--xfa/fde/css/cfde_cssvaluelistparser_unittest.cpp8
-rw-r--r--xfa/fde/css/fde_cssdatatable.h4
-rw-r--r--xfa/fde/ifde_txtedtengine.h4
-rw-r--r--xfa/fde/ifx_chariter.h2
-rw-r--r--xfa/fde/tto/fde_textout.cpp44
-rw-r--r--xfa/fde/tto/fde_textout.h29
-rw-r--r--xfa/fde/xml/fde_xml.h2
-rw-r--r--xfa/fde/xml/fde_xml_imp.cpp76
-rw-r--r--xfa/fde/xml/fde_xml_imp.h56
-rw-r--r--xfa/fde/xml/fde_xml_imp_unittest.cpp124
-rw-r--r--xfa/fgas/crt/fgas_codepage.cpp26
-rw-r--r--xfa/fgas/crt/fgas_codepage.h12
-rw-r--r--xfa/fgas/crt/fgas_stream.cpp79
-rw-r--r--xfa/fgas/crt/fgas_stream.h6
-rw-r--r--xfa/fgas/font/cfgas_fontmgr.cpp44
-rw-r--r--xfa/fgas/font/cfgas_fontmgr.h40
-rw-r--r--xfa/fgas/font/cfgas_gefont.cpp23
-rw-r--r--xfa/fgas/font/cfgas_gefont.h22
-rw-r--r--xfa/fgas/font/fgas_fontutils.cpp4
-rw-r--r--xfa/fgas/font/fgas_fontutils.h4
-rw-r--r--xfa/fgas/layout/cfx_breakline.cpp4
-rw-r--r--xfa/fgas/layout/cfx_breakpiece.cpp2
-rw-r--r--xfa/fgas/layout/fgas_rtfbreak.cpp14
-rw-r--r--xfa/fgas/layout/fgas_rtfbreak.h8
-rw-r--r--xfa/fgas/layout/fgas_textbreak.cpp46
-rw-r--r--xfa/fgas/layout/fgas_textbreak.h12
-rw-r--r--xfa/fgas/localization/fgas_locale.cpp110
-rw-r--r--xfa/fwl/cfwl_barcode.cpp4
-rw-r--r--xfa/fwl/cfwl_barcode.h8
-rw-r--r--xfa/fwl/cfwl_edit.cpp10
-rw-r--r--xfa/fwl/cfwl_edit.h4
-rw-r--r--xfa/fwl/cfwl_monthcalendar.cpp8
-rw-r--r--xfa/fwl/cfx_barcode.cpp8
-rw-r--r--xfa/fwl/cfx_barcode.h4
-rw-r--r--xfa/fxbarcode/BC_Dimension.cpp2
-rw-r--r--xfa/fxbarcode/BC_Utils.cpp4
-rw-r--r--xfa/fxbarcode/cbc_codabar.cpp4
-rw-r--r--xfa/fxbarcode/cbc_codabar.h4
-rw-r--r--xfa/fxbarcode/cbc_ean13.cpp2
-rw-r--r--xfa/fxbarcode/cbc_ean8.cpp4
-rw-r--r--xfa/fxbarcode/cbc_upca.cpp2
-rw-r--r--xfa/fxbarcode/datamatrix/BC_ASCIIEncoder.cpp19
-rw-r--r--xfa/fxbarcode/datamatrix/BC_ASCIIEncoder.h4
-rw-r--r--xfa/fxbarcode/datamatrix/BC_Base256Encoder.cpp22
-rw-r--r--xfa/fxbarcode/datamatrix/BC_Base256Encoder.h2
-rw-r--r--xfa/fxbarcode/datamatrix/BC_C40Encoder.cpp46
-rw-r--r--xfa/fxbarcode/datamatrix/BC_C40Encoder.h2
-rw-r--r--xfa/fxbarcode/datamatrix/BC_EdifactEncoder.cpp24
-rw-r--r--xfa/fxbarcode/datamatrix/BC_EdifactEncoder.h2
-rw-r--r--xfa/fxbarcode/datamatrix/BC_EncoderContext.cpp8
-rw-r--r--xfa/fxbarcode/datamatrix/BC_EncoderContext.h6
-rw-r--r--xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp4
-rw-r--r--xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp54
-rw-r--r--xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.h42
-rw-r--r--xfa/fxbarcode/datamatrix/BC_TextEncoder.cpp42
-rw-r--r--xfa/fxbarcode/datamatrix/BC_TextEncoder.h2
-rw-r--r--xfa/fxbarcode/datamatrix/BC_X12Encoder.cpp16
-rw-r--r--xfa/fxbarcode/datamatrix/BC_X12Encoder.h2
-rw-r--r--xfa/fxbarcode/oned/BC_OneDimWriter.cpp2
-rw-r--r--xfa/fxbarcode/oned/BC_OneDimWriter.h2
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCodaBarWriter.cpp28
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h10
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCode128Writer.cpp4
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp55
-rw-r--r--xfa/fxbarcode/oned/BC_OnedCode39Writer.h2
-rw-r--r--xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp2
-rw-r--r--xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp2
-rw-r--r--xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp2
-rw-r--r--xfa/fxbarcode/pdf417/BC_PDF417.cpp4
-rw-r--r--xfa/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp12
-rw-r--r--xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp84
-rw-r--r--xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h12
-rw-r--r--xfa/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.cpp2
-rw-r--r--xfa/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h2
-rw-r--r--xfa/fxbarcode/utils.h4
-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
150 files changed, 1104 insertions, 1129 deletions
diff --git a/xfa/fde/cfde_txtedtbuf.cpp b/xfa/fde/cfde_txtedtbuf.cpp
index 1c2e0d1f3f..ba9f5cdca0 100644
--- a/xfa/fde/cfde_txtedtbuf.cpp
+++ b/xfa/fde/cfde_txtedtbuf.cpp
@@ -44,7 +44,7 @@ void CFDE_TxtEdtBuf::SetText(const CFX_WideString& wsText) {
m_chunks.push_back(NewChunk());
int32_t nTotalCount = m_chunks.size();
- const FX_WCHAR* lpSrcBuf = wsText.c_str();
+ const wchar_t* lpSrcBuf = wsText.c_str();
int32_t nLeave = nTextLength;
int32_t nCopyedLength = GetChunkSize();
for (i = 0; i < nTotalCount && nLeave > 0; i++) {
@@ -54,7 +54,7 @@ void CFDE_TxtEdtBuf::SetText(const CFX_WideString& wsText) {
ChunkHeader* chunk = m_chunks[i].get();
FXSYS_memcpy(chunk->wChars.get(), lpSrcBuf,
- nCopyedLength * sizeof(FX_WCHAR));
+ nCopyedLength * sizeof(wchar_t));
nLeave -= nCopyedLength;
lpSrcBuf += nCopyedLength;
chunk->nUsed = nCopyedLength;
@@ -66,7 +66,7 @@ CFX_WideString CFDE_TxtEdtBuf::GetText() const {
return GetRange(0, m_nTotal);
}
-FX_WCHAR CFDE_TxtEdtBuf::GetCharByIndex(int32_t nIndex) const {
+wchar_t CFDE_TxtEdtBuf::GetCharByIndex(int32_t nIndex) const {
ASSERT(nIndex >= 0 && nIndex < GetTextLength());
ChunkHeader* pChunkHeader = nullptr;
@@ -79,7 +79,7 @@ FX_WCHAR CFDE_TxtEdtBuf::GetCharByIndex(int32_t nIndex) const {
}
ASSERT(pChunkHeader);
- FX_WCHAR* buf = pChunkHeader->wChars.get();
+ wchar_t* buf = pChunkHeader->wChars.get();
return buf[pChunkHeader->nUsed - (nTotal - nIndex)];
}
@@ -98,17 +98,17 @@ CFX_WideString CFDE_TxtEdtBuf::GetRange(int32_t nBegin, int32_t nLength) const {
int32_t nCount = m_chunks.size();
CFX_WideString wsText;
- FX_WCHAR* lpDstBuf = wsText.GetBuffer(nLength);
+ wchar_t* lpDstBuf = wsText.GetBuffer(nLength);
int32_t nChunkIndex = chunkIndex;
ChunkHeader* chunkHeader = m_chunks[nChunkIndex].get();
int32_t nCopyLength = chunkHeader->nUsed - charIndex;
- FX_WCHAR* lpSrcBuf = chunkHeader->wChars.get() + charIndex;
+ wchar_t* lpSrcBuf = chunkHeader->wChars.get() + charIndex;
while (nLeave > 0) {
if (nLeave <= nCopyLength) {
nCopyLength = nLeave;
}
- FXSYS_memcpy(lpDstBuf, lpSrcBuf, nCopyLength * sizeof(FX_WCHAR));
+ FXSYS_memcpy(lpDstBuf, lpSrcBuf, nCopyLength * sizeof(wchar_t));
nChunkIndex++;
if (nChunkIndex >= nCount) {
break;
@@ -125,7 +125,7 @@ CFX_WideString CFDE_TxtEdtBuf::GetRange(int32_t nBegin, int32_t nLength) const {
}
void CFDE_TxtEdtBuf::Insert(int32_t nPos,
- const FX_WCHAR* lpText,
+ const wchar_t* lpText,
int32_t nLength) {
ASSERT(nPos >= 0 && nPos <= m_nTotal);
ASSERT(nLength > 0);
@@ -142,7 +142,7 @@ void CFDE_TxtEdtBuf::Insert(int32_t nPos,
int32_t nCopy = chunk->nUsed - charIndex;
FXSYS_memcpy(newChunk->wChars.get(), chunk->wChars.get() + charIndex,
- nCopy * sizeof(FX_WCHAR));
+ nCopy * sizeof(wchar_t));
chunk->nUsed -= nCopy;
chunkIndex++;
@@ -158,7 +158,7 @@ void CFDE_TxtEdtBuf::Insert(int32_t nPos,
int32_t nFree = GetChunkSize() - chunk->nUsed;
int32_t nCopy = std::min(nLengthTemp, nFree);
FXSYS_memcpy(chunk->wChars.get() + chunk->nUsed, lpText,
- nCopy * sizeof(FX_WCHAR));
+ nCopy * sizeof(wchar_t));
lpText += nCopy;
nLengthTemp -= nCopy;
chunk->nUsed += nCopy;
@@ -170,7 +170,7 @@ void CFDE_TxtEdtBuf::Insert(int32_t nPos,
auto chunk = NewChunk();
int32_t nCopy = std::min(nLengthTemp, GetChunkSize());
- FXSYS_memcpy(chunk->wChars.get(), lpText, nCopy * sizeof(FX_WCHAR));
+ FXSYS_memcpy(chunk->wChars.get(), lpText, nCopy * sizeof(wchar_t));
lpText += nCopy;
nLengthTemp -= nCopy;
chunk->nUsed = nCopy;
@@ -195,7 +195,7 @@ void CFDE_TxtEdtBuf::Delete(int32_t nIndex, int32_t nLength) {
int32_t nDelete = std::min(nFirstPart, nLength);
FXSYS_memmove(chunk->wChars.get() + nFirstPart - nDelete,
chunk->wChars.get() + nFirstPart,
- nMovePart * sizeof(FX_WCHAR));
+ nMovePart * sizeof(wchar_t));
chunk->nUsed -= nDelete;
nLength -= nDelete;
endChunkIndex--;
@@ -255,7 +255,7 @@ std::tuple<int32_t, int32_t> CFDE_TxtEdtBuf::Index2CP(int32_t nIndex) const {
std::unique_ptr<CFDE_TxtEdtBuf::ChunkHeader> CFDE_TxtEdtBuf::NewChunk() {
auto chunk = pdfium::MakeUnique<ChunkHeader>();
- chunk->wChars.reset(FX_Alloc(FX_WCHAR, GetChunkSize()));
+ chunk->wChars.reset(FX_Alloc(wchar_t, GetChunkSize()));
chunk->nUsed = 0;
return chunk;
}
@@ -264,7 +264,7 @@ CFDE_TxtEdtBuf::ChunkHeader::ChunkHeader() {}
CFDE_TxtEdtBuf::ChunkHeader::~ChunkHeader() {}
-CFDE_TxtEdtBuf::Iterator::Iterator(CFDE_TxtEdtBuf* pBuf, FX_WCHAR wcAlias)
+CFDE_TxtEdtBuf::Iterator::Iterator(CFDE_TxtEdtBuf* pBuf, wchar_t wcAlias)
: m_pBuf(pBuf),
m_nCurChunk(0),
m_nCurIndex(0),
@@ -332,10 +332,10 @@ int32_t CFDE_TxtEdtBuf::Iterator::GetAt() const {
return m_nIndex;
}
-FX_WCHAR CFDE_TxtEdtBuf::Iterator::GetChar() {
+wchar_t CFDE_TxtEdtBuf::Iterator::GetChar() {
ASSERT(m_nIndex >= 0 && m_nIndex < m_pBuf->m_nTotal);
if (m_Alias == 0 || m_nIndex == (m_pBuf->m_nTotal - 1)) {
- FX_WCHAR* buf = m_pBuf->m_chunks[m_nCurChunk]->wChars.get();
+ wchar_t* buf = m_pBuf->m_chunks[m_nCurChunk]->wChars.get();
return buf[m_nCurIndex];
}
return m_Alias;
diff --git a/xfa/fde/cfde_txtedtbuf.h b/xfa/fde/cfde_txtedtbuf.h
index 9eeee5632e..6a20ae0de1 100644
--- a/xfa/fde/cfde_txtedtbuf.h
+++ b/xfa/fde/cfde_txtedtbuf.h
@@ -21,11 +21,11 @@ class CFDE_TxtEdtBuf {
public:
class Iterator : public IFX_CharIter {
public:
- explicit Iterator(CFDE_TxtEdtBuf* pBuf, FX_WCHAR wcAlias = 0);
+ explicit Iterator(CFDE_TxtEdtBuf* pBuf, wchar_t wcAlias = 0);
~Iterator() override;
bool Next(bool bPrev = false) override;
- FX_WCHAR GetChar() override;
+ wchar_t GetChar() override;
void SetAt(int32_t nIndex) override;
int32_t GetAt() const override;
@@ -38,7 +38,7 @@ class CFDE_TxtEdtBuf {
int32_t m_nCurChunk;
int32_t m_nCurIndex;
int32_t m_nIndex;
- FX_WCHAR m_Alias;
+ wchar_t m_Alias;
};
CFDE_TxtEdtBuf();
@@ -50,10 +50,10 @@ class CFDE_TxtEdtBuf {
void SetText(const CFX_WideString& wsText);
CFX_WideString GetText() const;
- FX_WCHAR GetCharByIndex(int32_t nIndex) const;
+ wchar_t GetCharByIndex(int32_t nIndex) const;
CFX_WideString GetRange(int32_t nBegin, int32_t nCount) const;
- void Insert(int32_t nPos, const FX_WCHAR* lpText, int32_t nLength);
+ void Insert(int32_t nPos, const wchar_t* lpText, int32_t nLength);
void Delete(int32_t nIndex, int32_t nLength);
void Clear(bool bRelease);
@@ -67,7 +67,7 @@ class CFDE_TxtEdtBuf {
~ChunkHeader();
int32_t nUsed;
- std::unique_ptr<FX_WCHAR, FxFreeDeleter> wChars;
+ std::unique_ptr<wchar_t, FxFreeDeleter> wChars;
};
void SetChunkSizeForTesting(size_t size);
diff --git a/xfa/fde/cfde_txtedtdorecord_insert.cpp b/xfa/fde/cfde_txtedtdorecord_insert.cpp
index b80b15dff6..0e3f9218dd 100644
--- a/xfa/fde/cfde_txtedtdorecord_insert.cpp
+++ b/xfa/fde/cfde_txtedtdorecord_insert.cpp
@@ -12,12 +12,12 @@
CFDE_TxtEdtDoRecord_Insert::CFDE_TxtEdtDoRecord_Insert(
CFDE_TxtEdtEngine* pEngine,
int32_t nCaret,
- const FX_WCHAR* lpText,
+ const wchar_t* lpText,
int32_t nLength)
: m_pEngine(pEngine), m_nCaret(nCaret) {
ASSERT(pEngine);
- FX_WCHAR* lpBuffer = m_wsInsert.GetBuffer(nLength);
- FXSYS_memcpy(lpBuffer, lpText, nLength * sizeof(FX_WCHAR));
+ wchar_t* lpBuffer = m_wsInsert.GetBuffer(nLength);
+ FXSYS_memcpy(lpBuffer, lpText, nLength * sizeof(wchar_t));
m_wsInsert.ReleaseBuffer();
}
diff --git a/xfa/fde/cfde_txtedtdorecord_insert.h b/xfa/fde/cfde_txtedtdorecord_insert.h
index e80453e9e3..05922378d3 100644
--- a/xfa/fde/cfde_txtedtdorecord_insert.h
+++ b/xfa/fde/cfde_txtedtdorecord_insert.h
@@ -17,7 +17,7 @@ class CFDE_TxtEdtDoRecord_Insert : public IFDE_TxtEdtDoRecord {
public:
CFDE_TxtEdtDoRecord_Insert(CFDE_TxtEdtEngine* pEngine,
int32_t nCaret,
- const FX_WCHAR* lpText,
+ const wchar_t* lpText,
int32_t nLength);
~CFDE_TxtEdtDoRecord_Insert() override;
diff --git a/xfa/fde/cfde_txtedtengine.cpp b/xfa/fde/cfde_txtedtengine.cpp
index 0a955ff60f..33efa2ddf0 100644
--- a/xfa/fde/cfde_txtedtengine.cpp
+++ b/xfa/fde/cfde_txtedtengine.cpp
@@ -122,7 +122,7 @@ void CFDE_TxtEdtEngine::SetTextByStream(
int32_t nPos = pStream->GetBOM(bom);
pStream->Seek(FX_STREAMSEEK_Begin, nPos);
int32_t nPlateSize = std::min(nStreamLength, m_pTxtBuf->GetChunkSize());
- FX_WCHAR* lpwstr = FX_Alloc(FX_WCHAR, nPlateSize);
+ wchar_t* lpwstr = FX_Alloc(wchar_t, nPlateSize);
bool bEos = false;
while (!bEos) {
int32_t nRead = pStream->ReadString(lpwstr, nPlateSize, bEos);
@@ -142,8 +142,8 @@ void CFDE_TxtEdtEngine::SetText(const CFX_WideString& wsText) {
int32_t nLength = wsText.GetLength();
if (nLength > 0) {
CFX_WideString wsTemp;
- FX_WCHAR* lpBuffer = wsTemp.GetBuffer(nLength);
- FXSYS_memcpy(lpBuffer, wsText.c_str(), nLength * sizeof(FX_WCHAR));
+ wchar_t* lpBuffer = wsTemp.GetBuffer(nLength);
+ FXSYS_memcpy(lpBuffer, wsText.c_str(), nLength * sizeof(wchar_t));
ReplaceParagEnd(lpBuffer, nLength, false);
wsTemp.ReleaseBuffer(nLength);
if (m_nLimit > 0 && nLength > m_nLimit) {
@@ -315,14 +315,14 @@ bool CFDE_TxtEdtEngine::IsLocked() const {
}
int32_t CFDE_TxtEdtEngine::Insert(int32_t nStart,
- const FX_WCHAR* lpText,
+ const wchar_t* lpText,
int32_t nLength) {
if (IsLocked()) {
return FDE_TXTEDT_MODIFY_RET_F_Locked;
}
CFX_WideString wsTemp;
- FX_WCHAR* lpBuffer = wsTemp.GetBuffer(nLength);
- FXSYS_memcpy(lpBuffer, lpText, nLength * sizeof(FX_WCHAR));
+ wchar_t* lpBuffer = wsTemp.GetBuffer(nLength);
+ FXSYS_memcpy(lpBuffer, lpText, nLength * sizeof(wchar_t));
ReplaceParagEnd(lpBuffer, nLength, false);
wsTemp.ReleaseBuffer(nLength);
bool bPart = false;
@@ -349,7 +349,7 @@ int32_t CFDE_TxtEdtEngine::Insert(int32_t nStart,
while (nLength > 0) {
CFX_WideString wsText = GetPreInsertText(m_nCaret, lpBuffer, nLength);
int32_t nTotal = wsText.GetLength();
- FX_WCHAR* lpBuf = wsText.GetBuffer(nTotal);
+ wchar_t* lpBuf = wsText.GetBuffer(nTotal);
for (int32_t i = 0; i < nTotal; i++) {
lpBuf[i] = m_wcAliasChar;
}
@@ -393,7 +393,7 @@ int32_t CFDE_TxtEdtEngine::Insert(int32_t nStart,
m_ChangeInfo.wsInsert = CFX_WideString(lpBuffer, nLength);
nStart = m_nCaret;
nStart += nLength;
- FX_WCHAR wChar = m_pTxtBuf->GetCharByIndex(nStart - 1);
+ wchar_t wChar = m_pTxtBuf->GetCharByIndex(nStart - 1);
bool bBefore = true;
if (wChar != L'\n' && wChar != L'\r') {
nStart--;
@@ -498,7 +498,7 @@ int32_t CFDE_TxtEdtEngine::Replace(int32_t nStart,
m_ChangeInfo.wsInsert = CFX_WideString(wsReplace.c_str(), nTextLength);
nStart += nTextLength;
- FX_WCHAR wChar = m_pTxtBuf->GetCharByIndex(nStart - 1);
+ wchar_t wChar = m_pTxtBuf->GetCharByIndex(nStart - 1);
bool bBefore = true;
if (wChar != L'\n' && wChar != L'\r') {
nStart--;
@@ -515,7 +515,7 @@ void CFDE_TxtEdtEngine::SetLimit(int32_t nLimit) {
m_nLimit = nLimit;
}
-void CFDE_TxtEdtEngine::SetAliasChar(FX_WCHAR wcAlias) {
+void CFDE_TxtEdtEngine::SetAliasChar(wchar_t wcAlias) {
m_wcAliasChar = wcAlias;
}
@@ -733,7 +733,7 @@ CFX_WideString CFDE_TxtEdtEngine::GetPreDeleteText(int32_t nIndex,
}
CFX_WideString CFDE_TxtEdtEngine::GetPreInsertText(int32_t nIndex,
- const FX_WCHAR* lpText,
+ const wchar_t* lpText,
int32_t nLength) {
CFX_WideString wsText = GetText(0, GetTextBufLength());
int32_t nSelIndex = 0;
@@ -746,12 +746,12 @@ CFX_WideString CFDE_TxtEdtEngine::GetPreInsertText(int32_t nIndex,
}
CFX_WideString wsTemp;
int32_t nOldLength = wsText.GetLength();
- const FX_WCHAR* pOldBuffer = wsText.c_str();
- FX_WCHAR* lpBuffer = wsTemp.GetBuffer(nOldLength + nLength);
- FXSYS_memcpy(lpBuffer, pOldBuffer, (nIndex) * sizeof(FX_WCHAR));
- FXSYS_memcpy(lpBuffer + nIndex, lpText, nLength * sizeof(FX_WCHAR));
+ const wchar_t* pOldBuffer = wsText.c_str();
+ wchar_t* lpBuffer = wsTemp.GetBuffer(nOldLength + nLength);
+ FXSYS_memcpy(lpBuffer, pOldBuffer, (nIndex) * sizeof(wchar_t));
+ FXSYS_memcpy(lpBuffer + nIndex, lpText, nLength * sizeof(wchar_t));
FXSYS_memcpy(lpBuffer + nIndex + nLength, pOldBuffer + nIndex,
- (nOldLength - nIndex) * sizeof(FX_WCHAR));
+ (nOldLength - nIndex) * sizeof(wchar_t));
wsTemp.ReleaseBuffer(nOldLength + nLength);
wsText = wsTemp;
return wsText;
@@ -759,7 +759,7 @@ CFX_WideString CFDE_TxtEdtEngine::GetPreInsertText(int32_t nIndex,
CFX_WideString CFDE_TxtEdtEngine::GetPreReplaceText(int32_t nIndex,
int32_t nOriginLength,
- const FX_WCHAR* lpText,
+ const wchar_t* lpText,
int32_t nLength) {
CFX_WideString wsText = GetText(0, GetTextBufLength());
int32_t nSelIndex = 0;
@@ -778,7 +778,7 @@ CFX_WideString CFDE_TxtEdtEngine::GetPreReplaceText(int32_t nIndex,
}
void CFDE_TxtEdtEngine::Inner_Insert(int32_t nStart,
- const FX_WCHAR* lpText,
+ const wchar_t* lpText,
int32_t nLength) {
ASSERT(nLength > 0);
FDE_TXTEDTPARAGPOS ParagPos;
@@ -795,8 +795,8 @@ void CFDE_TxtEdtEngine::Inner_Insert(int32_t nStart,
int32_t nLeavePart = ParagPos.nCharIndex;
int32_t nCutPart = pParag->GetTextLength() - ParagPos.nCharIndex;
int32_t nTextStart = 0;
- FX_WCHAR wCurChar = L' ';
- const FX_WCHAR* lpPos = lpText;
+ wchar_t wCurChar = L' ';
+ const wchar_t* lpPos = lpText;
bool bFirst = true;
int32_t nParagIndex = ParagPos.nParagIndex;
for (i = 0; i < nLength; i++, lpPos++) {
@@ -926,7 +926,7 @@ void CFDE_TxtEdtEngine::ResetEngine() {
void CFDE_TxtEdtEngine::RebuildParagraphs() {
RemoveAllParags();
- FX_WCHAR wChar = L' ';
+ wchar_t wChar = L' ';
int32_t nParagStart = 0;
int32_t nIndex = 0;
auto pIter = pdfium::MakeUnique<CFDE_TxtEdtBuf::Iterator>(m_pTxtBuf.get());
@@ -1045,11 +1045,11 @@ void CFDE_TxtEdtEngine::UpdateTxtBreak() {
m_pTextBreak->SetCharSpace(m_Param.fCharSpace);
}
-bool CFDE_TxtEdtEngine::ReplaceParagEnd(FX_WCHAR*& lpText,
+bool CFDE_TxtEdtEngine::ReplaceParagEnd(wchar_t*& lpText,
int32_t& nLength,
bool bPreIsCR) {
for (int32_t i = 0; i < nLength; i++) {
- FX_WCHAR wc = lpText[i];
+ wchar_t wc = lpText[i];
switch (wc) {
case L'\r': {
lpText[i] = m_wLineEnd;
@@ -1060,7 +1060,7 @@ bool CFDE_TxtEdtEngine::ReplaceParagEnd(FX_WCHAR*& lpText,
int32_t nNext = i + 1;
if (nNext < nLength) {
FXSYS_memmove(lpText + i, lpText + nNext,
- (nLength - nNext) * sizeof(FX_WCHAR));
+ (nLength - nNext) * sizeof(wchar_t));
}
i--;
nLength--;
@@ -1090,29 +1090,29 @@ bool CFDE_TxtEdtEngine::ReplaceParagEnd(FX_WCHAR*& lpText,
}
void CFDE_TxtEdtEngine::RecoverParagEnd(CFX_WideString& wsText) const {
- FX_WCHAR wc = (m_nFirstLineEnd == FDE_TXTEDIT_LINEEND_CR) ? L'\n' : L'\r';
+ wchar_t wc = (m_nFirstLineEnd == FDE_TXTEDIT_LINEEND_CR) ? L'\n' : L'\r';
if (m_nFirstLineEnd == FDE_TXTEDIT_LINEEND_CRLF) {
CFX_ArrayTemplate<int32_t> PosArr;
int32_t nLength = wsText.GetLength();
int32_t i = 0;
- FX_WCHAR* lpPos = const_cast<FX_WCHAR*>(wsText.c_str());
+ wchar_t* lpPos = const_cast<wchar_t*>(wsText.c_str());
for (i = 0; i < nLength; i++, lpPos++) {
if (*lpPos == m_wLineEnd) {
*lpPos = wc;
PosArr.Add(i);
}
}
- const FX_WCHAR* lpSrcBuf = wsText.c_str();
+ const wchar_t* lpSrcBuf = wsText.c_str();
CFX_WideString wsTemp;
int32_t nCount = PosArr.GetSize();
- FX_WCHAR* lpDstBuf = wsTemp.GetBuffer(nLength + nCount);
+ wchar_t* lpDstBuf = wsTemp.GetBuffer(nLength + nCount);
int32_t nDstPos = 0;
int32_t nSrcPos = 0;
for (i = 0; i < nCount; i++) {
int32_t nPos = PosArr[i];
int32_t nCopyLen = nPos - nSrcPos + 1;
FXSYS_memcpy(lpDstBuf + nDstPos, lpSrcBuf + nSrcPos,
- nCopyLen * sizeof(FX_WCHAR));
+ nCopyLen * sizeof(wchar_t));
nDstPos += nCopyLen;
nSrcPos += nCopyLen;
lpDstBuf[nDstPos] = L'\n';
@@ -1120,13 +1120,13 @@ void CFDE_TxtEdtEngine::RecoverParagEnd(CFX_WideString& wsText) const {
}
if (nSrcPos < nLength) {
FXSYS_memcpy(lpDstBuf + nDstPos, lpSrcBuf + nSrcPos,
- (nLength - nSrcPos) * sizeof(FX_WCHAR));
+ (nLength - nSrcPos) * sizeof(wchar_t));
}
wsTemp.ReleaseBuffer(nLength + nCount);
wsText = wsTemp;
} else {
int32_t nLength = wsText.GetLength();
- FX_WCHAR* lpBuf = const_cast<FX_WCHAR*>(wsText.c_str());
+ wchar_t* lpBuf = const_cast<wchar_t*>(wsText.c_str());
for (int32_t i = 0; i < nLength; i++, lpBuf++) {
if (*lpBuf == m_wLineEnd)
*lpBuf = wc;
@@ -1305,7 +1305,7 @@ bool CFDE_TxtEdtEngine::MoveLineEnd() {
}
nIndex = nStart + nCount - 1;
ASSERT(nIndex <= GetTextBufLength());
- FX_WCHAR wChar = m_pTxtBuf->GetCharByIndex(nIndex);
+ wchar_t wChar = m_pTxtBuf->GetCharByIndex(nIndex);
bool bBefore = false;
if (nIndex <= GetTextBufLength()) {
if (wChar == L'\r') {
@@ -1339,7 +1339,7 @@ bool CFDE_TxtEdtEngine::MoveParagEnd() {
TextPos2ParagPos(nIndex, ParagPos);
CFDE_TxtEdtParag* pParag = m_ParagPtrArray[ParagPos.nParagIndex];
nIndex = pParag->GetStartIndex() + pParag->GetTextLength() - 1;
- FX_WCHAR wChar = m_pTxtBuf->GetCharByIndex(nIndex);
+ wchar_t wChar = m_pTxtBuf->GetCharByIndex(nIndex);
if (wChar == L'\n' && nIndex > 0) {
nIndex--;
wChar = m_pTxtBuf->GetCharByIndex(nIndex);
diff --git a/xfa/fde/cfde_txtedtengine.h b/xfa/fde/cfde_txtedtengine.h
index ee1cc1015d..63d97d33a3 100644
--- a/xfa/fde/cfde_txtedtengine.h
+++ b/xfa/fde/cfde_txtedtengine.h
@@ -46,7 +46,7 @@ class CFDE_TxtEdtEngine {
void Unlock();
bool IsLocked() const;
- int32_t Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLength);
+ int32_t Insert(int32_t nStart, const wchar_t* lpText, int32_t nLength);
int32_t Delete(int32_t nStart, bool bBackspace = false);
int32_t DeleteRange(int32_t nStart, int32_t nCount = -1);
int32_t Replace(int32_t nStart,
@@ -54,7 +54,7 @@ class CFDE_TxtEdtEngine {
const CFX_WideString& wsReplace);
void SetLimit(int32_t nLimit);
- void SetAliasChar(FX_WCHAR wcAlias);
+ void SetAliasChar(wchar_t wcAlias);
void RemoveSelRange(int32_t nStart, int32_t nCount);
@@ -83,7 +83,7 @@ class CFDE_TxtEdtEngine {
int32_t nStartLineofParag,
int32_t nLineIndex,
int32_t& nStartLine) const;
- FX_WCHAR GetAliasChar() const { return m_wcAliasChar; }
+ wchar_t GetAliasChar() const { return m_wcAliasChar; }
private:
friend class CFDE_TxtEdtDoRecord_Insert;
@@ -100,14 +100,14 @@ class CFDE_TxtEdtEngine {
int32_t nCharIndex;
};
- void Inner_Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLength);
+ void Inner_Insert(int32_t nStart, const wchar_t* lpText, int32_t nLength);
CFX_WideString GetPreDeleteText(int32_t nIndex, int32_t nLength);
CFX_WideString GetPreInsertText(int32_t nIndex,
- const FX_WCHAR* lpText,
+ const wchar_t* lpText,
int32_t nLength);
CFX_WideString GetPreReplaceText(int32_t nIndex,
int32_t nOriginLength,
- const FX_WCHAR* lpText,
+ const wchar_t* lpText,
int32_t nLength);
void Inner_DeleteRange(int32_t nStart, int32_t nCount = -1);
@@ -120,7 +120,7 @@ class CFDE_TxtEdtEngine {
void UpdatePages();
void UpdateTxtBreak();
- bool ReplaceParagEnd(FX_WCHAR*& lpText,
+ bool ReplaceParagEnd(wchar_t*& lpText,
int32_t& nLength,
bool bPreIsCR = false);
void RecoverParagEnd(CFX_WideString& wsText) const;
@@ -165,10 +165,10 @@ class CFDE_TxtEdtEngine {
uint32_t m_dwFindFlags;
bool m_bLock;
int32_t m_nLimit;
- FX_WCHAR m_wcAliasChar;
+ wchar_t m_wcAliasChar;
int32_t m_nFirstLineEnd;
bool m_bAutoLineEnd;
- FX_WCHAR m_wLineEnd;
+ wchar_t m_wLineEnd;
FDE_TXTEDT_TEXTCHANGE_INFO m_ChangeInfo;
};
diff --git a/xfa/fde/cfde_txtedtpage.cpp b/xfa/fde/cfde_txtedtpage.cpp
index f0a33d0516..f229a01fcb 100644
--- a/xfa/fde/cfde_txtedtpage.cpp
+++ b/xfa/fde/cfde_txtedtpage.cpp
@@ -109,7 +109,7 @@ int32_t CFDE_TxtEdtPage::GetCharIndex(const CFX_PointF& fPoint, bool& bBefore) {
bBefore = true;
return m_pEditEngine->GetTextBufLength();
}
- FX_WCHAR wChar = m_pEditEngine->GetTextBuf()->GetCharByIndex(nCaret);
+ wchar_t wChar = m_pEditEngine->GetTextBuf()->GetCharByIndex(nCaret);
if (wChar == L'\n' || wChar == L'\r') {
if (wChar == L'\n') {
if (m_pEditEngine->GetTextBuf()->GetCharByIndex(nCaret - 1) ==
@@ -234,7 +234,7 @@ int32_t CFDE_TxtEdtPage::LoadPage(const CFX_RectF* pClipBox,
}
CFDE_TxtEdtBuf* pBuf = m_pEditEngine->GetTextBuf();
const FDE_TXTEDTPARAMS* pParams = m_pEditEngine->GetEditParams();
- FX_WCHAR wcAlias = 0;
+ wchar_t wcAlias = 0;
if (pParams->dwMode & FDE_TEXTEDITMODE_Password) {
wcAlias = m_pEditEngine->GetAliasChar();
}
@@ -287,7 +287,7 @@ int32_t CFDE_TxtEdtPage::LoadPage(const CFX_RectF* pClipBox,
if (bReload) {
dwBreakStatus = pBreak->EndBreak(CFX_BreakType::Paragraph);
} else {
- FX_WCHAR wAppend = pIter->GetChar();
+ wchar_t wAppend = pIter->GetChar();
dwBreakStatus = pBreak->AppendChar(wAppend);
}
if (pIter->GetAt() == nPageEnd && CFX_BreakTypeNoneOrPiece(dwBreakStatus))
@@ -308,11 +308,11 @@ int32_t CFDE_TxtEdtPage::LoadPage(const CFX_RectF* pClipBox,
}
FX_FLOAT fParaBreakWidth = 0.0f;
if (!CFX_BreakTypeNoneOrPiece(pPiece->m_dwStatus)) {
- FX_WCHAR wRtChar = pParams->wLineBreakChar;
+ wchar_t wRtChar = pParams->wLineBreakChar;
if (TxtEdtPiece.nCount >= 2) {
- FX_WCHAR wChar = pBuf->GetCharByIndex(
+ wchar_t wChar = pBuf->GetCharByIndex(
m_nPageStart + TxtEdtPiece.nStart + TxtEdtPiece.nCount - 1);
- FX_WCHAR wCharPre = pBuf->GetCharByIndex(
+ wchar_t wCharPre = pBuf->GetCharByIndex(
m_nPageStart + TxtEdtPiece.nStart + TxtEdtPiece.nCount - 2);
if (wChar == wRtChar) {
fParaBreakWidth += fDefCharWidth;
@@ -321,7 +321,7 @@ int32_t CFDE_TxtEdtPage::LoadPage(const CFX_RectF* pClipBox,
fParaBreakWidth += fDefCharWidth;
}
} else if (TxtEdtPiece.nCount >= 1) {
- FX_WCHAR wChar = pBuf->GetCharByIndex(
+ wchar_t wChar = pBuf->GetCharByIndex(
m_nPageStart + TxtEdtPiece.nStart + TxtEdtPiece.nCount - 1);
if (wChar == wRtChar) {
fParaBreakWidth += fDefCharWidth;
@@ -434,13 +434,13 @@ FDE_TEXTEDITPIECE* CFDE_TxtEdtPage::GetNext(FX_POSITION& pos,
return &m_Pieces[nPos - 1];
}
-FX_WCHAR CFDE_TxtEdtPage::GetChar(const FDE_TEXTEDITPIECE* pIdentity,
- int32_t index) const {
+wchar_t CFDE_TxtEdtPage::GetChar(const FDE_TEXTEDITPIECE* pIdentity,
+ int32_t index) const {
int32_t nIndex = m_nPageStart + pIdentity->nStart + index;
if (nIndex != m_pIter->GetAt())
m_pIter->SetAt(nIndex);
- FX_WCHAR wChar = m_pIter->GetChar();
+ wchar_t wChar = m_pIter->GetChar();
m_pIter->Next();
return wChar;
}
diff --git a/xfa/fde/cfde_txtedtpage.h b/xfa/fde/cfde_txtedtpage.h
index 6d700d202c..11c8050735 100644
--- a/xfa/fde/cfde_txtedtpage.h
+++ b/xfa/fde/cfde_txtedtpage.h
@@ -49,7 +49,7 @@ class CFDE_TxtEdtPage : public IFDE_VisualSet {
FX_POSITION GetFirstPosition();
FDE_TEXTEDITPIECE* GetNext(FX_POSITION& pos, IFDE_VisualSet*& pVisualSet);
- FX_WCHAR GetChar(const FDE_TEXTEDITPIECE* pIdentity, int32_t index) const;
+ wchar_t GetChar(const FDE_TEXTEDITPIECE* pIdentity, int32_t index) const;
int32_t GetWidth(const FDE_TEXTEDITPIECE* pIdentity, int32_t index) const;
private:
diff --git a/xfa/fde/cfde_txtedtparag.cpp b/xfa/fde/cfde_txtedtparag.cpp
index 79dcc2fbac..d22fa53c02 100644
--- a/xfa/fde/cfde_txtedtparag.cpp
+++ b/xfa/fde/cfde_txtedtparag.cpp
@@ -37,7 +37,7 @@ void CFDE_TxtEdtParag::LoadParag() {
CFX_TxtBreak* pTxtBreak = m_pEngine->GetTextBreak();
CFDE_TxtEdtBuf* pTxtBuf = m_pEngine->GetTextBuf();
const FDE_TXTEDTPARAMS* pParam = m_pEngine->GetEditParams();
- FX_WCHAR wcAlias = 0;
+ wchar_t wcAlias = 0;
if (pParam->dwMode & FDE_TEXTEDITMODE_Password)
wcAlias = m_pEngine->GetAliasChar();
@@ -52,7 +52,7 @@ void CFDE_TxtEdtParag::LoadParag() {
if (bReload) {
dwBreakStatus = pTxtBreak->EndBreak(CFX_BreakType::Paragraph);
} else {
- FX_WCHAR wAppend = pIter->GetChar();
+ wchar_t wAppend = pIter->GetChar();
dwBreakStatus = pTxtBreak->AppendChar(wAppend);
}
if (pIter->GetAt() + 1 == nEndIndex &&
@@ -117,7 +117,7 @@ void CFDE_TxtEdtParag::CalcLines() {
if (bReload) {
dwBreakStatus = pTxtBreak->EndBreak(CFX_BreakType::Paragraph);
} else {
- FX_WCHAR wAppend = pIter->GetChar();
+ wchar_t wAppend = pIter->GetChar();
dwBreakStatus = pTxtBreak->AppendChar(wAppend);
}
if (pIter->GetAt() + 1 == nEndIndex &&
diff --git a/xfa/fde/cfde_txtedttextset.cpp b/xfa/fde/cfde_txtedttextset.cpp
index a6503f4022..78a7ec49d5 100644
--- a/xfa/fde/cfde_txtedttextset.cpp
+++ b/xfa/fde/cfde_txtedttextset.cpp
@@ -26,7 +26,7 @@ CFX_RectF CFDE_TxtEdtTextSet::GetRect(const FDE_TEXTEDITPIECE& pPiece) {
int32_t CFDE_TxtEdtTextSet::GetString(FDE_TEXTEDITPIECE* pPiece,
CFX_WideString& wsText) {
- FX_WCHAR* pBuffer = wsText.GetBuffer(pPiece->nCount);
+ wchar_t* pBuffer = wsText.GetBuffer(pPiece->nCount);
for (int32_t i = 0; i < pPiece->nCount; i++)
pBuffer[i] = m_pPage->GetChar(pPiece, i);
diff --git a/xfa/fde/cfx_chariter.cpp b/xfa/fde/cfx_chariter.cpp
index 568ecd6cf0..ff5b0d9c3a 100644
--- a/xfa/fde/cfx_chariter.cpp
+++ b/xfa/fde/cfx_chariter.cpp
@@ -26,7 +26,7 @@ bool CFX_CharIter::Next(bool bPrev) {
return true;
}
-FX_WCHAR CFX_CharIter::GetChar() {
+wchar_t CFX_CharIter::GetChar() {
return m_wsText.GetAt(m_nIndex);
}
diff --git a/xfa/fde/cfx_chariter.h b/xfa/fde/cfx_chariter.h
index d122af21f1..ab554b2716 100644
--- a/xfa/fde/cfx_chariter.h
+++ b/xfa/fde/cfx_chariter.h
@@ -17,7 +17,7 @@ class CFX_CharIter : public IFX_CharIter {
~CFX_CharIter() override;
bool Next(bool bPrev = false) override;
- FX_WCHAR GetChar() override;
+ wchar_t GetChar() override;
void SetAt(int32_t nIndex) override;
int32_t GetAt() const override;
bool IsEOF(bool bTail = true) const override;
diff --git a/xfa/fde/cfx_wordbreak.cpp b/xfa/fde/cfx_wordbreak.cpp
index 2d37ba1707..9ab3a9230a 100644
--- a/xfa/fde/cfx_wordbreak.cpp
+++ b/xfa/fde/cfx_wordbreak.cpp
@@ -2770,7 +2770,7 @@ const uint8_t gs_FX_WordBreak_CodePointProperties[(0xFFFF - 1) / 2 + 1] =
0x00, 0x00, 0x00, 0x00, 0x05, 0x55, 0x00, 0x00,
};
-FX_WordBreakProp GetWordBreakProperty(FX_WCHAR wcCodePoint) {
+FX_WordBreakProp GetWordBreakProperty(wchar_t wcCodePoint) {
uint32_t dwProperty =
(uint32_t)gs_FX_WordBreak_CodePointProperties[wcCodePoint >> 1];
return (FX_WordBreakProp)(((wcCodePoint)&1) ? (dwProperty & 0x0F)
@@ -2836,7 +2836,7 @@ void CFX_WordBreak::GetWord(CFX_WideString& wsWord) const {
if (nWordLength <= 0) {
return;
}
- FX_WCHAR* lpBuf = wsWord.GetBuffer(nWordLength);
+ wchar_t* lpBuf = wsWord.GetBuffer(nWordLength);
std::unique_ptr<IFX_CharIter> pTempIter(m_pPreIter->Clone());
int32_t i = 0;
while (pTempIter->GetAt() <= m_pCurIter->GetAt()) {
diff --git a/xfa/fde/css/cfde_cssdeclaration.cpp b/xfa/fde/css/cfde_cssdeclaration.cpp
index 3c776ca771..2d1e707caa 100644
--- a/xfa/fde/css/cfde_cssdeclaration.cpp
+++ b/xfa/fde/css/cfde_cssdeclaration.cpp
@@ -23,7 +23,7 @@ uint8_t Hex2Dec(uint8_t hexHigh, uint8_t hexLow) {
return (FXSYS_toHexDigit(hexHigh) << 4) + FXSYS_toHexDigit(hexLow);
}
-bool ParseCSSNumber(const FX_WCHAR* pszValue,
+bool ParseCSSNumber(const wchar_t* pszValue,
int32_t iValueLen,
FX_FLOAT& fValue,
FDE_CSSNumberType& eUnit) {
@@ -50,7 +50,7 @@ bool ParseCSSNumber(const FX_WCHAR* pszValue,
} // namespace
// static
-bool CFDE_CSSDeclaration::ParseCSSString(const FX_WCHAR* pszValue,
+bool CFDE_CSSDeclaration::ParseCSSString(const wchar_t* pszValue,
int32_t iValueLen,
int32_t* iOffset,
int32_t* iLength) {
@@ -58,7 +58,7 @@ bool CFDE_CSSDeclaration::ParseCSSString(const FX_WCHAR* pszValue,
*iOffset = 0;
*iLength = iValueLen;
if (iValueLen >= 2) {
- FX_WCHAR first = pszValue[0], last = pszValue[iValueLen - 1];
+ wchar_t first = pszValue[0], last = pszValue[iValueLen - 1];
if ((first == '\"' && last == '\"') || (first == '\'' && last == '\'')) {
*iOffset = 1;
*iLength -= 2;
@@ -68,7 +68,7 @@ bool CFDE_CSSDeclaration::ParseCSSString(const FX_WCHAR* pszValue,
}
// static.
-bool CFDE_CSSDeclaration::ParseCSSColor(const FX_WCHAR* pszValue,
+bool CFDE_CSSDeclaration::ParseCSSColor(const wchar_t* pszValue,
int32_t iValueLen,
FX_ARGB* dwColor) {
ASSERT(pszValue && iValueLen > 0);
@@ -159,7 +159,7 @@ void CFDE_CSSDeclaration::AddProperty(const FDE_CSSPropertyTable* pTable,
const CFX_WideStringC& value) {
ASSERT(!value.IsEmpty());
- const FX_WCHAR* pszValue = value.c_str();
+ const wchar_t* pszValue = value.c_str();
int32_t iValueLen = value.GetLength();
bool bImportant = false;
@@ -277,7 +277,7 @@ void CFDE_CSSDeclaration::AddProperty(const CFX_WideString& prop,
}
CFX_RetainPtr<CFDE_CSSValue> CFDE_CSSDeclaration::ParseNumber(
- const FX_WCHAR* pszValue,
+ const wchar_t* pszValue,
int32_t iValueLen) {
FX_FLOAT fValue;
FDE_CSSNumberType eUnit;
@@ -287,7 +287,7 @@ CFX_RetainPtr<CFDE_CSSValue> CFDE_CSSDeclaration::ParseNumber(
}
CFX_RetainPtr<CFDE_CSSValue> CFDE_CSSDeclaration::ParseEnum(
- const FX_WCHAR* pszValue,
+ const wchar_t* pszValue,
int32_t iValueLen) {
const FDE_CSSPropertyValueTable* pValue =
FDE_GetCSSPropertyValueByName(CFX_WideStringC(pszValue, iValueLen));
@@ -296,7 +296,7 @@ CFX_RetainPtr<CFDE_CSSValue> CFDE_CSSDeclaration::ParseEnum(
}
CFX_RetainPtr<CFDE_CSSValue> CFDE_CSSDeclaration::ParseColor(
- const FX_WCHAR* pszValue,
+ const wchar_t* pszValue,
int32_t iValueLen) {
FX_ARGB dwColor;
if (!ParseCSSColor(pszValue, iValueLen, &dwColor))
@@ -305,7 +305,7 @@ CFX_RetainPtr<CFDE_CSSValue> CFDE_CSSDeclaration::ParseColor(
}
CFX_RetainPtr<CFDE_CSSValue> CFDE_CSSDeclaration::ParseString(
- const FX_WCHAR* pszValue,
+ const wchar_t* pszValue,
int32_t iValueLen) {
int32_t iOffset;
if (!ParseCSSString(pszValue, iValueLen, &iOffset, &iValueLen))
@@ -320,10 +320,10 @@ CFX_RetainPtr<CFDE_CSSValue> CFDE_CSSDeclaration::ParseString(
void CFDE_CSSDeclaration::ParseValueListProperty(
const FDE_CSSPropertyTable* pTable,
- const FX_WCHAR* pszValue,
+ const wchar_t* pszValue,
int32_t iValueLen,
bool bImportant) {
- FX_WCHAR separator =
+ wchar_t separator =
(pTable->eName == FDE_CSSProperty::FontFamily) ? ',' : ' ';
CFDE_CSSValueListParser parser(pszValue, iValueLen, separator);
@@ -444,7 +444,7 @@ void CFDE_CSSDeclaration::Add4ValuesProperty(
}
bool CFDE_CSSDeclaration::ParseBorderProperty(
- const FX_WCHAR* pszValue,
+ const wchar_t* pszValue,
int32_t iValueLen,
CFX_RetainPtr<CFDE_CSSValue>& pWidth) const {
pWidth.Reset(nullptr);
@@ -497,7 +497,7 @@ bool CFDE_CSSDeclaration::ParseBorderProperty(
return true;
}
-void CFDE_CSSDeclaration::ParseFontProperty(const FX_WCHAR* pszValue,
+void CFDE_CSSDeclaration::ParseFontProperty(const wchar_t* pszValue,
int32_t iValueLen,
bool bImportant) {
CFDE_CSSValueListParser parser(pszValue, iValueLen, '/');
diff --git a/xfa/fde/css/cfde_cssdeclaration.h b/xfa/fde/css/cfde_cssdeclaration.h
index eb287308f8..3c2e058a43 100644
--- a/xfa/fde/css/cfde_cssdeclaration.h
+++ b/xfa/fde/css/cfde_cssdeclaration.h
@@ -23,11 +23,11 @@ class CFDE_CSSDeclaration {
using const_custom_iterator =
std::vector<std::unique_ptr<CFDE_CSSCustomProperty>>::const_iterator;
- static bool ParseCSSString(const FX_WCHAR* pszValue,
+ static bool ParseCSSString(const wchar_t* pszValue,
int32_t iValueLen,
int32_t* iOffset,
int32_t* iLength);
- static bool ParseCSSColor(const FX_WCHAR* pszValue,
+ static bool ParseCSSColor(const wchar_t* pszValue,
int32_t iValueLen,
FX_ARGB* dwColor);
@@ -53,19 +53,19 @@ class CFDE_CSSDeclaration {
size_t PropertyCountForTesting() const;
- FX_ARGB ParseColorForTest(const FX_WCHAR* pszValue,
+ FX_ARGB ParseColorForTest(const wchar_t* pszValue,
int32_t iValueLen,
FX_ARGB* dwColor) const;
private:
- void ParseFontProperty(const FX_WCHAR* pszValue,
+ void ParseFontProperty(const wchar_t* pszValue,
int32_t iValueLen,
bool bImportant);
- bool ParseBorderProperty(const FX_WCHAR* pszValue,
+ bool ParseBorderProperty(const wchar_t* pszValue,
int32_t iValueLen,
CFX_RetainPtr<CFDE_CSSValue>& pWidth) const;
void ParseValueListProperty(const FDE_CSSPropertyTable* pTable,
- const FX_WCHAR* pszValue,
+ const wchar_t* pszValue,
int32_t iValueLen,
bool bImportant);
void Add4ValuesProperty(const std::vector<CFX_RetainPtr<CFDE_CSSValue>>& list,
@@ -74,13 +74,13 @@ class CFDE_CSSDeclaration {
FDE_CSSProperty eTop,
FDE_CSSProperty eRight,
FDE_CSSProperty eBottom);
- CFX_RetainPtr<CFDE_CSSValue> ParseNumber(const FX_WCHAR* pszValue,
+ CFX_RetainPtr<CFDE_CSSValue> ParseNumber(const wchar_t* pszValue,
int32_t iValueLen);
- CFX_RetainPtr<CFDE_CSSValue> ParseEnum(const FX_WCHAR* pszValue,
+ CFX_RetainPtr<CFDE_CSSValue> ParseEnum(const wchar_t* pszValue,
int32_t iValueLen);
- CFX_RetainPtr<CFDE_CSSValue> ParseColor(const FX_WCHAR* pszValue,
+ CFX_RetainPtr<CFDE_CSSValue> ParseColor(const wchar_t* pszValue,
int32_t iValueLen);
- CFX_RetainPtr<CFDE_CSSValue> ParseString(const FX_WCHAR* pszValue,
+ CFX_RetainPtr<CFDE_CSSValue> ParseString(const wchar_t* pszValue,
int32_t iValueLen);
void AddPropertyHolder(FDE_CSSProperty eProperty,
CFX_RetainPtr<CFDE_CSSValue> pValue,
diff --git a/xfa/fde/css/cfde_cssselector.cpp b/xfa/fde/css/cfde_cssselector.cpp
index 03580236f5..6842d58738 100644
--- a/xfa/fde/css/cfde_cssselector.cpp
+++ b/xfa/fde/css/cfde_cssselector.cpp
@@ -12,14 +12,14 @@
namespace {
-bool IsCSSChar(FX_WCHAR wch) {
+bool IsCSSChar(wchar_t wch) {
return (wch >= 'a' && wch <= 'z') || (wch >= 'A' && wch <= 'Z');
}
-int32_t GetCSSNameLen(const FX_WCHAR* psz, const FX_WCHAR* pEnd) {
- const FX_WCHAR* pStart = psz;
+int32_t GetCSSNameLen(const wchar_t* psz, const wchar_t* pEnd) {
+ const wchar_t* pStart = psz;
while (psz < pEnd) {
- FX_WCHAR wch = *psz;
+ wchar_t wch = *psz;
if (IsCSSChar(wch) || (wch >= '0' && wch <= '9') || wch == '_' ||
wch == '-') {
++psz;
@@ -33,7 +33,7 @@ int32_t GetCSSNameLen(const FX_WCHAR* psz, const FX_WCHAR* pEnd) {
} // namespace
CFDE_CSSSelector::CFDE_CSSSelector(FDE_CSSSelectorType eType,
- const FX_WCHAR* psz,
+ const wchar_t* psz,
int32_t iLen,
bool bIgnoreCase)
: m_eType(eType),
@@ -58,9 +58,9 @@ std::unique_ptr<CFDE_CSSSelector> CFDE_CSSSelector::FromString(
const CFX_WideStringC& str) {
ASSERT(!str.IsEmpty());
- const FX_WCHAR* psz = str.c_str();
- const FX_WCHAR* pStart = psz;
- const FX_WCHAR* pEnd = psz + str.GetLength();
+ const wchar_t* psz = str.c_str();
+ const wchar_t* pStart = psz;
+ const wchar_t* pEnd = psz + str.GetLength();
for (; psz < pEnd; ++psz) {
switch (*psz) {
case '>':
@@ -72,7 +72,7 @@ std::unique_ptr<CFDE_CSSSelector> CFDE_CSSSelector::FromString(
std::unique_ptr<CFDE_CSSSelector> pFirst = nullptr;
for (psz = pStart; psz < pEnd;) {
- FX_WCHAR wch = *psz;
+ wchar_t wch = *psz;
if (IsCSSChar(wch) || wch == '*') {
int32_t iNameLen = wch == '*' ? 1 : GetCSSNameLen(psz, pEnd);
auto p = pdfium::MakeUnique<CFDE_CSSSelector>(
diff --git a/xfa/fde/css/cfde_cssselector.h b/xfa/fde/css/cfde_cssselector.h
index d585b3f368..048c51339e 100644
--- a/xfa/fde/css/cfde_cssselector.h
+++ b/xfa/fde/css/cfde_cssselector.h
@@ -19,7 +19,7 @@ class CFDE_CSSSelector {
const CFX_WideStringC& str);
CFDE_CSSSelector(FDE_CSSSelectorType eType,
- const FX_WCHAR* psz,
+ const wchar_t* psz,
int32_t iLen,
bool bIgnoreCase);
~CFDE_CSSSelector();
diff --git a/xfa/fde/css/cfde_cssstylesheet.cpp b/xfa/fde/css/cfde_cssstylesheet.cpp
index e259e2f332..175289be11 100644
--- a/xfa/fde/css/cfde_cssstylesheet.cpp
+++ b/xfa/fde/css/cfde_cssstylesheet.cpp
@@ -34,7 +34,7 @@ CFDE_CSSStyleRule* CFDE_CSSStyleSheet::GetRule(int32_t index) const {
return m_RuleArray[index].get();
}
-bool CFDE_CSSStyleSheet::LoadBuffer(const FX_WCHAR* pBuffer, int32_t iBufSize) {
+bool CFDE_CSSStyleSheet::LoadBuffer(const wchar_t* pBuffer, int32_t iBufSize) {
ASSERT(pBuffer && iBufSize > 0);
auto pSyntax = pdfium::MakeUnique<CFDE_CSSSyntaxParser>();
diff --git a/xfa/fde/css/cfde_cssstylesheet.h b/xfa/fde/css/cfde_cssstylesheet.h
index 4de377219c..fa73460634 100644
--- a/xfa/fde/css/cfde_cssstylesheet.h
+++ b/xfa/fde/css/cfde_cssstylesheet.h
@@ -21,7 +21,7 @@ class CFDE_CSSStyleSheet {
CFDE_CSSStyleSheet();
~CFDE_CSSStyleSheet();
- bool LoadBuffer(const FX_WCHAR* pBuffer, int32_t iBufSize);
+ bool LoadBuffer(const wchar_t* pBuffer, int32_t iBufSize);
int32_t CountRules() const;
CFDE_CSSStyleRule* GetRule(int32_t index) const;
@@ -34,7 +34,7 @@ class CFDE_CSSStyleSheet {
void SkipRuleSet(CFDE_CSSSyntaxParser* pSyntax);
std::vector<std::unique_ptr<CFDE_CSSStyleRule>> m_RuleArray;
- std::unordered_map<uint32_t, FX_WCHAR*> m_StringCache;
+ std::unordered_map<uint32_t, wchar_t*> m_StringCache;
};
#endif // XFA_FDE_CSS_CFDE_CSSSTYLESHEET_H_
diff --git a/xfa/fde/css/cfde_cssstylesheet_unittest.cpp b/xfa/fde/css/cfde_cssstylesheet_unittest.cpp
index 9d8ecb9347..0f450e9c3a 100644
--- a/xfa/fde/css/cfde_cssstylesheet_unittest.cpp
+++ b/xfa/fde/css/cfde_cssstylesheet_unittest.cpp
@@ -27,7 +27,7 @@ class CFDE_CSSStyleSheetTest : public testing::Test {
void TearDown() override { decl_ = nullptr; }
- void LoadAndVerifyDecl(const FX_WCHAR* buf,
+ void LoadAndVerifyDecl(const wchar_t* buf,
const std::vector<CFX_WideString>& selectors,
size_t decl_count) {
ASSERT(sheet_);
@@ -87,7 +87,7 @@ class CFDE_CSSStyleSheetTest : public testing::Test {
};
TEST_F(CFDE_CSSStyleSheetTest, ParseMultipleSelectors) {
- const FX_WCHAR* buf =
+ const wchar_t* buf =
L"a { border: 10px; }\nb { text-decoration: underline; }";
EXPECT_TRUE(sheet_->LoadBuffer(buf, FXSYS_wcslen(buf)));
EXPECT_EQ(2, sheet_->CountRules());
@@ -136,7 +136,7 @@ TEST_F(CFDE_CSSStyleSheetTest, ParseMultipleSelectors) {
}
TEST_F(CFDE_CSSStyleSheetTest, ParseChildSelectors) {
- const FX_WCHAR* buf = L"a b c { border: 10px; }";
+ const wchar_t* buf = L"a b c { border: 10px; }";
EXPECT_TRUE(sheet_->LoadBuffer(buf, FXSYS_wcslen(buf)));
EXPECT_EQ(1, sheet_->CountRules());
@@ -171,7 +171,7 @@ TEST_F(CFDE_CSSStyleSheetTest, ParseChildSelectors) {
}
TEST_F(CFDE_CSSStyleSheetTest, ParseUnhandledSelectors) {
- const FX_WCHAR* buf = L"a > b { padding: 0; }";
+ const wchar_t* buf = L"a > b { padding: 0; }";
EXPECT_TRUE(sheet_->LoadBuffer(buf, FXSYS_wcslen(buf)));
EXPECT_EQ(0, sheet_->CountRules());
diff --git a/xfa/fde/css/cfde_csssyntaxparser.cpp b/xfa/fde/css/cfde_csssyntaxparser.cpp
index 2f7bcce9d7..fada76b6b1 100644
--- a/xfa/fde/css/cfde_csssyntaxparser.cpp
+++ b/xfa/fde/css/cfde_csssyntaxparser.cpp
@@ -14,7 +14,7 @@
namespace {
-bool IsSelectorStart(FX_WCHAR wch) {
+bool IsSelectorStart(wchar_t wch) {
return wch == '.' || wch == '#' || wch == '*' || (wch >= 'a' && wch <= 'z') ||
(wch >= 'A' && wch <= 'Z');
}
@@ -32,7 +32,7 @@ CFDE_CSSSyntaxParser::~CFDE_CSSSyntaxParser() {
m_TextPlane.Reset();
}
-bool CFDE_CSSSyntaxParser::Init(const FX_WCHAR* pBuffer,
+bool CFDE_CSSSyntaxParser::Init(const wchar_t* pBuffer,
int32_t iBufferSize,
int32_t iTextDatSize,
bool bOnlyDeclaration) {
@@ -65,7 +65,7 @@ FDE_CSSSyntaxStatus CFDE_CSSSyntaxParser::DoSyntaxParse() {
m_eStatus = FDE_CSSSyntaxStatus::EOS;
return m_eStatus;
}
- FX_WCHAR wch;
+ wchar_t wch;
while (!m_TextPlane.IsEOF()) {
wch = m_TextPlane.GetChar();
switch (m_eMode) {
@@ -198,7 +198,7 @@ bool CFDE_CSSSyntaxParser::IsImportEnabled() const {
return true;
}
-bool CFDE_CSSSyntaxParser::AppendChar(FX_WCHAR wch) {
+bool CFDE_CSSSyntaxParser::AppendChar(wchar_t wch) {
m_TextPlane.MoveNext();
if (m_TextData.GetLength() > 0 || wch > ' ') {
m_TextData.AppendChar(wch);
diff --git a/xfa/fde/css/cfde_csssyntaxparser.h b/xfa/fde/css/cfde_csssyntaxparser.h
index b583b98b15..a5e79d50e5 100644
--- a/xfa/fde/css/cfde_csssyntaxparser.h
+++ b/xfa/fde/css/cfde_csssyntaxparser.h
@@ -40,7 +40,7 @@ class CFDE_CSSSyntaxParser {
CFDE_CSSSyntaxParser();
~CFDE_CSSSyntaxParser();
- bool Init(const FX_WCHAR* pBuffer,
+ bool Init(const wchar_t* pBuffer,
int32_t iBufferSize,
int32_t iTextDatSize = 32,
bool bOnlyDeclaration = false);
@@ -53,7 +53,7 @@ class CFDE_CSSSyntaxParser {
int32_t SwitchToComment();
bool RestoreMode();
- bool AppendChar(FX_WCHAR wch);
+ bool AppendChar(wchar_t wch);
int32_t SaveTextData();
bool IsCharsetEnabled() const {
return (m_dwCheck & FDE_CSSSYNTAXCHECK_AllowCharset) != 0;
diff --git a/xfa/fde/css/cfde_csstextbuf.cpp b/xfa/fde/css/cfde_csstextbuf.cpp
index 83b2899f19..5df09f0936 100644
--- a/xfa/fde/css/cfde_csstextbuf.cpp
+++ b/xfa/fde/css/cfde_csstextbuf.cpp
@@ -27,9 +27,9 @@ void CFDE_CSSTextBuf::Reset() {
m_iDatPos = m_iDatLen = m_iBufLen;
}
-bool CFDE_CSSTextBuf::AttachBuffer(const FX_WCHAR* pBuffer, int32_t iBufLen) {
+bool CFDE_CSSTextBuf::AttachBuffer(const wchar_t* pBuffer, int32_t iBufLen) {
Reset();
- m_pBuffer = const_cast<FX_WCHAR*>(pBuffer);
+ m_pBuffer = const_cast<wchar_t*>(pBuffer);
m_iDatLen = m_iBufLen = iBufLen;
return m_bExtBuf = true;
}
@@ -63,9 +63,9 @@ bool CFDE_CSSTextBuf::ExpandBuf(int32_t iDesiredSize) {
if (m_bExtBuf)
return false;
if (!m_pBuffer)
- m_pBuffer = FX_Alloc(FX_WCHAR, iDesiredSize);
+ m_pBuffer = FX_Alloc(wchar_t, iDesiredSize);
else if (m_iBufLen != iDesiredSize)
- m_pBuffer = FX_Realloc(FX_WCHAR, m_pBuffer, iDesiredSize);
+ m_pBuffer = FX_Realloc(wchar_t, m_pBuffer, iDesiredSize);
else
return true;
@@ -81,6 +81,6 @@ void CFDE_CSSTextBuf::Subtract(int32_t iStart, int32_t iLength) {
ASSERT(iStart >= 0 && iLength >= 0);
iLength = std::max(std::min(iLength, m_iDatLen - iStart), 0);
- FXSYS_memmove(m_pBuffer, m_pBuffer + iStart, iLength * sizeof(FX_WCHAR));
+ FXSYS_memmove(m_pBuffer, m_pBuffer + iStart, iLength * sizeof(wchar_t));
m_iDatLen = iLength;
}
diff --git a/xfa/fde/css/cfde_csstextbuf.h b/xfa/fde/css/cfde_csstextbuf.h
index df151e02d8..9ade44be8a 100644
--- a/xfa/fde/css/cfde_csstextbuf.h
+++ b/xfa/fde/css/cfde_csstextbuf.h
@@ -17,13 +17,13 @@ class CFDE_CSSTextBuf {
CFDE_CSSTextBuf();
~CFDE_CSSTextBuf();
- bool AttachBuffer(const FX_WCHAR* pBuffer, int32_t iBufLen);
+ bool AttachBuffer(const wchar_t* pBuffer, int32_t iBufLen);
bool EstimateSize(int32_t iAllocSize);
int32_t LoadFromStream(const CFX_RetainPtr<IFGAS_Stream>& pTxtStream,
int32_t iStreamOffset,
int32_t iMaxChars,
bool& bEOS);
- bool AppendChar(FX_WCHAR wch) {
+ bool AppendChar(wchar_t wch) {
if (m_iDatLen >= m_iBufLen && !ExpandBuf(m_iBufLen * 2))
return false;
m_pBuffer[m_iDatLen++] = wch;
@@ -43,21 +43,21 @@ class CFDE_CSSTextBuf {
void Subtract(int32_t iStart, int32_t iLength);
bool IsEOF() const { return m_iDatPos >= m_iDatLen; }
- FX_WCHAR GetAt(int32_t index) const { return m_pBuffer[index]; }
- FX_WCHAR GetChar() const { return m_pBuffer[m_iDatPos]; }
- FX_WCHAR GetNextChar() const {
+ wchar_t GetAt(int32_t index) const { return m_pBuffer[index]; }
+ wchar_t GetChar() const { return m_pBuffer[m_iDatPos]; }
+ wchar_t GetNextChar() const {
return (m_iDatPos + 1 >= m_iDatLen) ? 0 : m_pBuffer[m_iDatPos + 1];
}
void MoveNext() { m_iDatPos++; }
int32_t GetLength() const { return m_iDatLen; }
- const FX_WCHAR* GetBuffer() const { return m_pBuffer; }
+ const wchar_t* GetBuffer() const { return m_pBuffer; }
protected:
bool ExpandBuf(int32_t iDesiredSize);
bool m_bExtBuf;
- FX_WCHAR* m_pBuffer;
+ wchar_t* m_pBuffer;
int32_t m_iBufLen;
int32_t m_iDatLen;
int32_t m_iDatPos;
diff --git a/xfa/fde/css/cfde_cssvaluelistparser.cpp b/xfa/fde/css/cfde_cssvaluelistparser.cpp
index 42c3296865..36d5edc3c7 100644
--- a/xfa/fde/css/cfde_cssvaluelistparser.cpp
+++ b/xfa/fde/css/cfde_cssvaluelistparser.cpp
@@ -6,15 +6,15 @@
#include "xfa/fde/css/cfde_cssvaluelistparser.h"
-CFDE_CSSValueListParser::CFDE_CSSValueListParser(const FX_WCHAR* psz,
+CFDE_CSSValueListParser::CFDE_CSSValueListParser(const wchar_t* psz,
int32_t iLen,
- FX_WCHAR separator)
+ wchar_t separator)
: m_Separator(separator), m_pCur(psz), m_pEnd(psz + iLen) {
ASSERT(psz && iLen > 0);
}
bool CFDE_CSSValueListParser::NextValue(FDE_CSSPrimitiveType& eType,
- const FX_WCHAR*& pStart,
+ const wchar_t*& pStart,
int32_t& iLength) {
while (m_pCur < m_pEnd && (*m_pCur <= ' ' || *m_pCur == m_Separator))
++m_pCur;
@@ -25,7 +25,7 @@ bool CFDE_CSSValueListParser::NextValue(FDE_CSSPrimitiveType& eType,
eType = FDE_CSSPrimitiveType::Unknown;
pStart = m_pCur;
iLength = 0;
- FX_WCHAR wch = *m_pCur;
+ wchar_t wch = *m_pCur;
if (wch == '#') {
iLength = SkipTo(' ', false, false);
if (iLength == 4 || iLength == 7)
@@ -56,10 +56,10 @@ bool CFDE_CSSValueListParser::NextValue(FDE_CSSPrimitiveType& eType,
return m_pCur <= m_pEnd && iLength > 0;
}
-int32_t CFDE_CSSValueListParser::SkipTo(FX_WCHAR wch,
+int32_t CFDE_CSSValueListParser::SkipTo(wchar_t wch,
bool breakOnSpace,
bool matchBrackets) {
- const FX_WCHAR* pStart = m_pCur;
+ const wchar_t* pStart = m_pCur;
int32_t bracketCount = 0;
while (m_pCur < m_pEnd && *m_pCur != wch) {
if (breakOnSpace && *m_pCur <= ' ')
diff --git a/xfa/fde/css/cfde_cssvaluelistparser.h b/xfa/fde/css/cfde_cssvaluelistparser.h
index 734aed8a52..e41ee5c313 100644
--- a/xfa/fde/css/cfde_cssvaluelistparser.h
+++ b/xfa/fde/css/cfde_cssvaluelistparser.h
@@ -12,21 +12,19 @@
class CFDE_CSSValueListParser {
public:
- CFDE_CSSValueListParser(const FX_WCHAR* psz,
- int32_t iLen,
- FX_WCHAR separator);
+ CFDE_CSSValueListParser(const wchar_t* psz, int32_t iLen, wchar_t separator);
bool NextValue(FDE_CSSPrimitiveType& eType,
- const FX_WCHAR*& pStart,
+ const wchar_t*& pStart,
int32_t& iLength);
- FX_WCHAR m_Separator;
+ wchar_t m_Separator;
private:
- int32_t SkipTo(FX_WCHAR wch, bool breakOnSpace, bool matchBrackets);
+ int32_t SkipTo(wchar_t wch, bool breakOnSpace, bool matchBrackets);
- const FX_WCHAR* m_pCur;
- const FX_WCHAR* m_pEnd;
+ const wchar_t* m_pCur;
+ const wchar_t* m_pEnd;
};
#endif // XFA_FDE_CSS_CFDE_CSSVALUELISTPARSER_H_
diff --git a/xfa/fde/css/cfde_cssvaluelistparser_unittest.cpp b/xfa/fde/css/cfde_cssvaluelistparser_unittest.cpp
index 71bb807f3d..2864c842ad 100644
--- a/xfa/fde/css/cfde_cssvaluelistparser_unittest.cpp
+++ b/xfa/fde/css/cfde_cssvaluelistparser_unittest.cpp
@@ -11,7 +11,7 @@
TEST(CFDE_CSSValueListParser, rgb_short) {
FDE_CSSPrimitiveType type;
- const FX_WCHAR* start;
+ const wchar_t* start;
int32_t len;
auto parser = pdfium::MakeUnique<CFDE_CSSValueListParser>(L"#abc", 4, L' ');
@@ -42,7 +42,7 @@ TEST(CFDE_CSSValueListParser, rgb_short) {
TEST(CFDE_CSSValueListParser, number_parsing) {
FDE_CSSPrimitiveType type;
- const FX_WCHAR* start;
+ const wchar_t* start;
int32_t len;
auto parser = pdfium::MakeUnique<CFDE_CSSValueListParser>(L"1234", 4, L' ');
@@ -84,7 +84,7 @@ TEST(CFDE_CSSValueListParser, number_parsing) {
TEST(CFDE_CSSValueListParser, string_parsing) {
FDE_CSSPrimitiveType type;
- const FX_WCHAR* start;
+ const wchar_t* start;
int32_t len;
auto parser =
@@ -107,7 +107,7 @@ TEST(CFDE_CSSValueListParser, string_parsing) {
TEST(CFDE_CSSValueListParser, multiparsing) {
FDE_CSSPrimitiveType type;
- const FX_WCHAR* start;
+ const wchar_t* start;
int32_t len;
auto parser =
diff --git a/xfa/fde/css/fde_cssdatatable.h b/xfa/fde/css/fde_cssdatatable.h
index afb0b8502d..d1745f5d50 100644
--- a/xfa/fde/css/fde_cssdatatable.h
+++ b/xfa/fde/css/fde_cssdatatable.h
@@ -20,14 +20,14 @@
struct FDE_CSSPropertyTable {
FDE_CSSProperty eName;
- const FX_WCHAR* pszName;
+ const wchar_t* pszName;
uint32_t dwHash;
uint32_t dwType;
};
struct FDE_CSSPropertyValueTable {
FDE_CSSPropertyValue eName;
- const FX_WCHAR* pszName;
+ const wchar_t* pszName;
uint32_t dwHash;
};
diff --git a/xfa/fde/ifde_txtedtengine.h b/xfa/fde/ifde_txtedtengine.h
index 67944e01f9..f803eff079 100644
--- a/xfa/fde/ifde_txtedtengine.h
+++ b/xfa/fde/ifde_txtedtengine.h
@@ -85,8 +85,8 @@ struct FDE_TXTEDTPARAMS {
FX_FLOAT fLineSpace;
FX_FLOAT fTabWidth;
bool bTabEquidistant;
- FX_WCHAR wDefChar;
- FX_WCHAR wLineBreakChar;
+ wchar_t wDefChar;
+ wchar_t wLineBreakChar;
int32_t nLineEnd;
int32_t nHorzScale;
FX_FLOAT fCharSpace;
diff --git a/xfa/fde/ifx_chariter.h b/xfa/fde/ifx_chariter.h
index c967efd4d6..0e4adc5d01 100644
--- a/xfa/fde/ifx_chariter.h
+++ b/xfa/fde/ifx_chariter.h
@@ -14,7 +14,7 @@ class IFX_CharIter {
virtual ~IFX_CharIter() {}
virtual bool Next(bool bPrev = false) = 0;
- virtual FX_WCHAR GetChar() = 0;
+ virtual wchar_t GetChar() = 0;
virtual void SetAt(int32_t nIndex) = 0;
virtual int32_t GetAt() const = 0;
virtual bool IsEOF(bool bTail = true) const = 0;
diff --git a/xfa/fde/tto/fde_textout.cpp b/xfa/fde/tto/fde_textout.cpp
index 02b1522823..36f341b39c 100644
--- a/xfa/fde/tto/fde_textout.cpp
+++ b/xfa/fde/tto/fde_textout.cpp
@@ -82,7 +82,7 @@ void CFDE_TextOut::SetEllipsisString(const CFX_WideString& wsEllipsis) {
m_wsEllipsis = wsEllipsis;
}
-void CFDE_TextOut::SetParagraphBreakChar(FX_WCHAR wch) {
+void CFDE_TextOut::SetParagraphBreakChar(wchar_t wch) {
m_wParagraphBkChar = wch;
m_pTxtBreak->SetParagraphBreakChar(wch);
}
@@ -151,7 +151,7 @@ int32_t CFDE_TextOut::GetTotalLines() {
return m_iTotalLines;
}
-void CFDE_TextOut::CalcLogicSize(const FX_WCHAR* pwsStr,
+void CFDE_TextOut::CalcLogicSize(const wchar_t* pwsStr,
int32_t iLength,
CFX_SizeF& size) {
CFX_RectF rtText(0.0f, 0.0f, size.width, size.height);
@@ -159,7 +159,7 @@ void CFDE_TextOut::CalcLogicSize(const FX_WCHAR* pwsStr,
size = rtText.Size();
}
-void CFDE_TextOut::CalcLogicSize(const FX_WCHAR* pwsStr,
+void CFDE_TextOut::CalcLogicSize(const wchar_t* pwsStr,
int32_t iLength,
CFX_RectF& rect) {
if (!pwsStr || iLength < 1) {
@@ -170,21 +170,21 @@ void CFDE_TextOut::CalcLogicSize(const FX_WCHAR* pwsStr,
}
}
-void CFDE_TextOut::CalcTextSize(const FX_WCHAR* pwsStr,
+void CFDE_TextOut::CalcTextSize(const wchar_t* pwsStr,
int32_t iLength,
CFX_RectF& rect) {
ASSERT(m_pFont && m_fFontSize >= 1.0f);
SetLineWidth(rect);
m_iTotalLines = 0;
- const FX_WCHAR* pStr = pwsStr;
+ const wchar_t* pStr = pwsStr;
bool bHotKey = !!(m_dwStyles & FDE_TTOSTYLE_HotKey);
FX_FLOAT fWidth = 0.0f;
FX_FLOAT fHeight = 0.0f;
FX_FLOAT fStartPos = rect.right();
CFX_BreakType dwBreakStatus = CFX_BreakType::None;
- FX_WCHAR wPreChar = 0;
- FX_WCHAR wch;
- FX_WCHAR wBreak = 0;
+ wchar_t wPreChar = 0;
+ wchar_t wch;
+ wchar_t wBreak = 0;
while (iLength-- > 0) {
wch = *pStr++;
if (wBreak == 0 && (wch == L'\n' || wch == L'\r')) {
@@ -264,7 +264,7 @@ bool CFDE_TextOut::RetrieveLineWidth(CFX_BreakType dwBreakStatus,
return true;
}
-void CFDE_TextOut::DrawText(const FX_WCHAR* pwsStr,
+void CFDE_TextOut::DrawText(const wchar_t* pwsStr,
int32_t iLength,
int32_t x,
int32_t y) {
@@ -273,7 +273,7 @@ void CFDE_TextOut::DrawText(const FX_WCHAR* pwsStr,
DrawText(pwsStr, iLength, rtText);
}
-void CFDE_TextOut::DrawText(const FX_WCHAR* pwsStr,
+void CFDE_TextOut::DrawText(const wchar_t* pwsStr,
int32_t iLength,
FX_FLOAT x,
FX_FLOAT y) {
@@ -281,13 +281,13 @@ void CFDE_TextOut::DrawText(const FX_WCHAR* pwsStr,
CFX_RectF(x, y, m_fFontSize * 1000.0f, m_fFontSize * 1000.0f));
}
-void CFDE_TextOut::DrawText(const FX_WCHAR* pwsStr,
+void CFDE_TextOut::DrawText(const wchar_t* pwsStr,
int32_t iLength,
const CFX_Rect& rect) {
DrawText(pwsStr, iLength, rect.As<FX_FLOAT>());
}
-void CFDE_TextOut::DrawText(const FX_WCHAR* pwsStr,
+void CFDE_TextOut::DrawText(const wchar_t* pwsStr,
int32_t iLength,
const CFX_RectF& rect) {
CFX_RectF rtText(rect.left, rect.top, rect.width, rect.height);
@@ -297,7 +297,7 @@ void CFDE_TextOut::DrawText(const FX_WCHAR* pwsStr,
DrawText(pwsStr, iLength, rtText, m_rtClip);
}
-void CFDE_TextOut::DrawLogicText(const FX_WCHAR* pwsStr,
+void CFDE_TextOut::DrawLogicText(const wchar_t* pwsStr,
int32_t iLength,
FX_FLOAT x,
FX_FLOAT y) {
@@ -305,7 +305,7 @@ void CFDE_TextOut::DrawLogicText(const FX_WCHAR* pwsStr,
DrawLogicText(pwsStr, iLength, rtText);
}
-void CFDE_TextOut::DrawLogicText(const FX_WCHAR* pwsStr,
+void CFDE_TextOut::DrawLogicText(const wchar_t* pwsStr,
int32_t iLength,
const CFX_RectF& rect) {
CFX_RectF rtClip(m_rtLogicClip.left, m_rtLogicClip.top, m_rtLogicClip.width,
@@ -314,7 +314,7 @@ void CFDE_TextOut::DrawLogicText(const FX_WCHAR* pwsStr,
DrawText(pwsStr, iLength, rect, rtClip);
}
-void CFDE_TextOut::DrawText(const FX_WCHAR* pwsStr,
+void CFDE_TextOut::DrawText(const wchar_t* pwsStr,
int32_t iLength,
const CFX_RectF& rect,
const CFX_RectF& rtClip) {
@@ -367,9 +367,9 @@ void CFDE_TextOut::LoadEllipsis() {
return;
}
ExpandBuffer(iLength, 1);
- const FX_WCHAR* pStr = m_wsEllipsis.c_str();
+ const wchar_t* pStr = m_wsEllipsis.c_str();
CFX_BreakType dwBreakStatus;
- FX_WCHAR wch;
+ wchar_t wch;
while (iLength-- > 0) {
wch = *pStr++;
dwBreakStatus = m_pTxtBreak->AppendChar(wch);
@@ -399,10 +399,10 @@ void CFDE_TextOut::RetrieveEllPieces(std::vector<int32_t>* pCharWidths) {
m_pTxtBreak->ClearBreakPieces();
}
-void CFDE_TextOut::LoadText(const FX_WCHAR* pwsStr,
+void CFDE_TextOut::LoadText(const wchar_t* pwsStr,
int32_t iLength,
const CFX_RectF& rect) {
- FX_WCHAR* pStr = m_wsText.GetBuffer(iLength);
+ wchar_t* pStr = m_wsText.GetBuffer(iLength);
int32_t iTxtLength = iLength;
ExpandBuffer(iTxtLength, 0);
bool bHotKey = !!(m_dwStyles & FDE_TTOSTYLE_HotKey);
@@ -416,7 +416,7 @@ void CFDE_TextOut::LoadText(const FX_WCHAR* pwsStr,
int32_t iChars = 0;
int32_t iPieceWidths = 0;
CFX_BreakType dwBreakStatus;
- FX_WCHAR wch;
+ wchar_t wch;
bool bRet = false;
while (iTxtLength-- > 0) {
wch = *pwsStr++;
@@ -591,7 +591,7 @@ void CFDE_TextOut::Reload(const CFX_RectF& rect) {
}
void CFDE_TextOut::ReloadLinePiece(CFDE_TTOLine* pLine, const CFX_RectF& rect) {
- const FX_WCHAR* pwsStr = m_wsText.c_str();
+ const wchar_t* pwsStr = m_wsText.c_str();
int32_t iPieceWidths = 0;
FDE_TTOPIECE* pPiece = pLine->GetPtrAt(0);
int32_t iStartChar = pPiece->iStartChar;
@@ -599,7 +599,7 @@ void CFDE_TextOut::ReloadLinePiece(CFDE_TTOLine* pLine, const CFX_RectF& rect) {
int32_t iPieceCount = pLine->GetSize();
int32_t iPieceIndex = 0;
CFX_BreakType dwBreakStatus = CFX_BreakType::None;
- FX_WCHAR wch;
+ wchar_t wch;
while (iPieceIndex < iPieceCount) {
int32_t iStar = iStartChar;
int32_t iEnd = pPiece->iChars + iStar;
diff --git a/xfa/fde/tto/fde_textout.h b/xfa/fde/tto/fde_textout.h
index 1519a81e8f..224a584a4e 100644
--- a/xfa/fde/tto/fde_textout.h
+++ b/xfa/fde/tto/fde_textout.h
@@ -84,7 +84,7 @@ class CFDE_TextOut {
void SetStyles(uint32_t dwStyles);
void SetTabWidth(FX_FLOAT fTabWidth);
void SetEllipsisString(const CFX_WideString& wsEllipsis);
- void SetParagraphBreakChar(FX_WCHAR wch);
+ void SetParagraphBreakChar(wchar_t wch);
void SetAlignment(int32_t iAlignment);
void SetLineSpace(FX_FLOAT fLineSpace);
void SetDIBitmap(CFX_DIBitmap* pDIB);
@@ -94,38 +94,35 @@ class CFDE_TextOut {
void SetMatrix(const CFX_Matrix& matrix);
void SetLineBreakTolerance(FX_FLOAT fTolerance);
- void DrawText(const FX_WCHAR* pwsStr, int32_t iLength, int32_t x, int32_t y);
- void DrawText(const FX_WCHAR* pwsStr,
- int32_t iLength,
- FX_FLOAT x,
- FX_FLOAT y);
- void DrawText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_Rect& rect);
- void DrawText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_RectF& rect);
+ void DrawText(const wchar_t* pwsStr, int32_t iLength, int32_t x, int32_t y);
+ void DrawText(const wchar_t* pwsStr, int32_t iLength, FX_FLOAT x, FX_FLOAT y);
+ void DrawText(const wchar_t* pwsStr, int32_t iLength, const CFX_Rect& rect);
+ void DrawText(const wchar_t* pwsStr, int32_t iLength, const CFX_RectF& rect);
void SetLogicClipRect(const CFX_RectF& rtClip);
- void CalcLogicSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_SizeF& size);
- void CalcLogicSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_RectF& rect);
- void DrawLogicText(const FX_WCHAR* pwsStr,
+ void CalcLogicSize(const wchar_t* pwsStr, int32_t iLength, CFX_SizeF& size);
+ void CalcLogicSize(const wchar_t* pwsStr, int32_t iLength, CFX_RectF& rect);
+ void DrawLogicText(const wchar_t* pwsStr,
int32_t iLength,
FX_FLOAT x,
FX_FLOAT y);
- void DrawLogicText(const FX_WCHAR* pwsStr,
+ void DrawLogicText(const wchar_t* pwsStr,
int32_t iLength,
const CFX_RectF& rect);
int32_t GetTotalLines();
protected:
- void CalcTextSize(const FX_WCHAR* pwsStr, int32_t iLength, CFX_RectF& rect);
+ void CalcTextSize(const wchar_t* pwsStr, int32_t iLength, CFX_RectF& rect);
bool RetrieveLineWidth(CFX_BreakType dwBreakStatus,
FX_FLOAT& fStartPos,
FX_FLOAT& fWidth,
FX_FLOAT& fHeight);
void SetLineWidth(CFX_RectF& rect);
- void DrawText(const FX_WCHAR* pwsStr,
+ void DrawText(const wchar_t* pwsStr,
int32_t iLength,
const CFX_RectF& rect,
const CFX_RectF& rtClip);
- void LoadText(const FX_WCHAR* pwsStr, int32_t iLength, const CFX_RectF& rect);
+ void LoadText(const wchar_t* pwsStr, int32_t iLength, const CFX_RectF& rect);
void LoadEllipsis();
void ExpandBuffer(int32_t iSize, int32_t iType);
void RetrieveEllPieces(std::vector<int32_t>* pCharWidths);
@@ -157,7 +154,7 @@ class CFDE_TextOut {
int32_t m_iTxtBkAlignment;
std::vector<int32_t> m_CharWidths;
std::vector<int32_t> m_EllCharWidths;
- FX_WCHAR m_wParagraphBkChar;
+ wchar_t m_wParagraphBkChar;
FX_ARGB m_TxtColor;
uint32_t m_dwStyles;
uint32_t m_dwTxtBkStyles;
diff --git a/xfa/fde/xml/fde_xml.h b/xfa/fde/xml/fde_xml.h
index e773b30851..399a930615 100644
--- a/xfa/fde/xml/fde_xml.h
+++ b/xfa/fde/xml/fde_xml.h
@@ -40,6 +40,6 @@ struct FDE_XMLNODE {
FDE_XMLNODETYPE eNodeType;
};
-bool FDE_IsXMLValidChar(FX_WCHAR ch);
+bool FDE_IsXMLValidChar(wchar_t ch);
#endif // XFA_FDE_XML_FDE_XML_H_
diff --git a/xfa/fde/xml/fde_xml_imp.cpp b/xfa/fde/xml/fde_xml_imp.cpp
index 3e5edaf459..541fd98a00 100644
--- a/xfa/fde/xml/fde_xml_imp.cpp
+++ b/xfa/fde/xml/fde_xml_imp.cpp
@@ -24,7 +24,7 @@ const uint16_t g_XMLValidCharRange[][2] = {{0x09, 0x09},
{0x20, 0xD7FF},
{0xE000, 0xFFFD}};
-bool FDE_IsXMLWhiteSpace(FX_WCHAR ch) {
+bool FDE_IsXMLWhiteSpace(wchar_t ch) {
return ch == L' ' || ch == 0x0A || ch == 0x0D || ch == 0x09;
}
@@ -44,7 +44,7 @@ const FDE_XMLNAMECHAR g_XMLNameChars[] = {
{0xF900, 0xFDCF, true}, {0xFDF0, 0xFFFD, true},
};
-bool FDE_IsXMLNameChar(FX_WCHAR ch, bool bFirstChar) {
+bool FDE_IsXMLNameChar(wchar_t ch, bool bFirstChar) {
int32_t iStart = 0;
int32_t iEnd = FX_ArraySize(g_XMLNameChars) - 1;
while (iStart <= iEnd) {
@@ -62,7 +62,7 @@ bool FDE_IsXMLNameChar(FX_WCHAR ch, bool bFirstChar) {
} // namespace
-bool FDE_IsXMLValidChar(FX_WCHAR ch) {
+bool FDE_IsXMLValidChar(wchar_t ch) {
int32_t iStart = 0;
int32_t iEnd = FX_ArraySize(g_XMLValidCharRange) - 1;
while (iStart <= iEnd) {
@@ -137,7 +137,7 @@ int32_t CFDE_XMLNode::GetChildNodeIndex(CFDE_XMLNode* pNode) const {
return -1;
}
-CFDE_XMLNode* CFDE_XMLNode::GetPath(const FX_WCHAR* pPath,
+CFDE_XMLNode* CFDE_XMLNode::GetPath(const wchar_t* pPath,
int32_t iLength,
bool bQualifiedName) const {
ASSERT(pPath);
@@ -148,9 +148,9 @@ CFDE_XMLNode* CFDE_XMLNode::GetPath(const FX_WCHAR* pPath,
return nullptr;
}
CFX_WideString csPath;
- const FX_WCHAR* pStart = pPath;
- const FX_WCHAR* pEnd = pPath + iLength;
- FX_WCHAR ch;
+ const wchar_t* pStart = pPath;
+ const wchar_t* pEnd = pPath + iLength;
+ wchar_t ch;
while (pStart < pEnd) {
ch = *pStart++;
if (ch == L'/') {
@@ -562,7 +562,7 @@ bool CFDE_XMLInstruction::GetAttribute(int32_t index,
return false;
}
-bool CFDE_XMLInstruction::HasAttribute(const FX_WCHAR* pwsAttriName) const {
+bool CFDE_XMLInstruction::HasAttribute(const wchar_t* pwsAttriName) const {
int32_t iCount = pdfium::CollectionSize<int32_t>(m_Attributes);
for (int32_t i = 0; i < iCount; i += 2) {
if (m_Attributes[i].Compare(pwsAttriName) == 0) {
@@ -572,9 +572,9 @@ bool CFDE_XMLInstruction::HasAttribute(const FX_WCHAR* pwsAttriName) const {
return false;
}
-void CFDE_XMLInstruction::GetString(const FX_WCHAR* pwsAttriName,
+void CFDE_XMLInstruction::GetString(const wchar_t* pwsAttriName,
CFX_WideString& wsAttriValue,
- const FX_WCHAR* pwsDefValue) const {
+ const wchar_t* pwsDefValue) const {
int32_t iCount = pdfium::CollectionSize<int32_t>(m_Attributes);
for (int32_t i = 0; i < iCount; i += 2) {
if (m_Attributes[i].Compare(pwsAttriName) == 0) {
@@ -600,7 +600,7 @@ void CFDE_XMLInstruction::SetString(const CFX_WideString& wsAttriName,
m_Attributes.push_back(wsAttriValue);
}
-int32_t CFDE_XMLInstruction::GetInteger(const FX_WCHAR* pwsAttriName,
+int32_t CFDE_XMLInstruction::GetInteger(const wchar_t* pwsAttriName,
int32_t iDefValue) const {
int32_t iCount = pdfium::CollectionSize<int32_t>(m_Attributes);
for (int32_t i = 0; i < iCount; i += 2) {
@@ -611,14 +611,14 @@ int32_t CFDE_XMLInstruction::GetInteger(const FX_WCHAR* pwsAttriName,
return iDefValue;
}
-void CFDE_XMLInstruction::SetInteger(const FX_WCHAR* pwsAttriName,
+void CFDE_XMLInstruction::SetInteger(const wchar_t* pwsAttriName,
int32_t iAttriValue) {
CFX_WideString wsValue;
wsValue.Format(L"%d", iAttriValue);
SetString(pwsAttriName, wsValue);
}
-FX_FLOAT CFDE_XMLInstruction::GetFloat(const FX_WCHAR* pwsAttriName,
+FX_FLOAT CFDE_XMLInstruction::GetFloat(const wchar_t* pwsAttriName,
FX_FLOAT fDefValue) const {
int32_t iCount = pdfium::CollectionSize<int32_t>(m_Attributes);
for (int32_t i = 0; i < iCount; i += 2) {
@@ -629,14 +629,14 @@ FX_FLOAT CFDE_XMLInstruction::GetFloat(const FX_WCHAR* pwsAttriName,
return fDefValue;
}
-void CFDE_XMLInstruction::SetFloat(const FX_WCHAR* pwsAttriName,
+void CFDE_XMLInstruction::SetFloat(const wchar_t* pwsAttriName,
FX_FLOAT fAttriValue) {
CFX_WideString wsValue;
wsValue.Format(L"%f", fAttriValue);
SetString(pwsAttriName, wsValue);
}
-void CFDE_XMLInstruction::RemoveAttribute(const FX_WCHAR* pwsAttriName) {
+void CFDE_XMLInstruction::RemoveAttribute(const wchar_t* pwsAttriName) {
int32_t iCount = pdfium::CollectionSize<int32_t>(m_Attributes);
for (int32_t i = 0; i < iCount; i += 2) {
if (m_Attributes[i].Compare(pwsAttriName) == 0) {
@@ -774,7 +774,7 @@ bool CFDE_XMLElement::GetAttribute(int32_t index,
return false;
}
-bool CFDE_XMLElement::HasAttribute(const FX_WCHAR* pwsAttriName) const {
+bool CFDE_XMLElement::HasAttribute(const wchar_t* pwsAttriName) const {
int32_t iCount = pdfium::CollectionSize<int32_t>(m_Attributes);
for (int32_t i = 0; i < iCount; i += 2) {
if (m_Attributes[i].Compare(pwsAttriName) == 0)
@@ -783,9 +783,9 @@ bool CFDE_XMLElement::HasAttribute(const FX_WCHAR* pwsAttriName) const {
return false;
}
-void CFDE_XMLElement::GetString(const FX_WCHAR* pwsAttriName,
+void CFDE_XMLElement::GetString(const wchar_t* pwsAttriName,
CFX_WideString& wsAttriValue,
- const FX_WCHAR* pwsDefValue) const {
+ const wchar_t* pwsDefValue) const {
int32_t iCount = pdfium::CollectionSize<int32_t>(m_Attributes);
for (int32_t i = 0; i < iCount; i += 2) {
if (m_Attributes[i].Compare(pwsAttriName) == 0) {
@@ -811,7 +811,7 @@ void CFDE_XMLElement::SetString(const CFX_WideString& wsAttriName,
m_Attributes.push_back(wsAttriValue);
}
-int32_t CFDE_XMLElement::GetInteger(const FX_WCHAR* pwsAttriName,
+int32_t CFDE_XMLElement::GetInteger(const wchar_t* pwsAttriName,
int32_t iDefValue) const {
int32_t iCount = pdfium::CollectionSize<int32_t>(m_Attributes);
for (int32_t i = 0; i < iCount; i += 2) {
@@ -822,14 +822,14 @@ int32_t CFDE_XMLElement::GetInteger(const FX_WCHAR* pwsAttriName,
return iDefValue;
}
-void CFDE_XMLElement::SetInteger(const FX_WCHAR* pwsAttriName,
+void CFDE_XMLElement::SetInteger(const wchar_t* pwsAttriName,
int32_t iAttriValue) {
CFX_WideString wsValue;
wsValue.Format(L"%d", iAttriValue);
SetString(pwsAttriName, wsValue);
}
-FX_FLOAT CFDE_XMLElement::GetFloat(const FX_WCHAR* pwsAttriName,
+FX_FLOAT CFDE_XMLElement::GetFloat(const wchar_t* pwsAttriName,
FX_FLOAT fDefValue) const {
int32_t iCount = pdfium::CollectionSize<int32_t>(m_Attributes);
for (int32_t i = 0; i < iCount; i += 2) {
@@ -840,14 +840,14 @@ FX_FLOAT CFDE_XMLElement::GetFloat(const FX_WCHAR* pwsAttriName,
return fDefValue;
}
-void CFDE_XMLElement::SetFloat(const FX_WCHAR* pwsAttriName,
+void CFDE_XMLElement::SetFloat(const wchar_t* pwsAttriName,
FX_FLOAT fAttriValue) {
CFX_WideString wsValue;
wsValue.Format(L"%f", fAttriValue);
SetString(pwsAttriName, wsValue);
}
-void CFDE_XMLElement::RemoveAttribute(const FX_WCHAR* pwsAttriName) {
+void CFDE_XMLElement::RemoveAttribute(const wchar_t* pwsAttriName) {
int32_t iCount = pdfium::CollectionSize<int32_t>(m_Attributes);
for (int32_t i = 0; i < iCount; i += 2) {
if (m_Attributes[i].Compare(pwsAttriName) == 0) {
@@ -1112,14 +1112,14 @@ CFDE_BlockBuffer::~CFDE_BlockBuffer() {
ClearBuffer();
}
-FX_WCHAR* CFDE_BlockBuffer::GetAvailableBlock(int32_t& iIndexInBlock) {
+wchar_t* CFDE_BlockBuffer::GetAvailableBlock(int32_t& iIndexInBlock) {
iIndexInBlock = 0;
if (!m_BlockArray.GetSize()) {
return nullptr;
}
int32_t iRealIndex = m_iStartPosition + m_iDataLength;
if (iRealIndex == m_iBufferSize) {
- FX_WCHAR* pBlock = FX_Alloc(FX_WCHAR, m_iAllocStep);
+ wchar_t* pBlock = FX_Alloc(wchar_t, m_iAllocStep);
m_BlockArray.Add(pBlock);
m_iBufferSize += m_iAllocStep;
return pBlock;
@@ -1132,13 +1132,13 @@ bool CFDE_BlockBuffer::InitBuffer(int32_t iBufferSize) {
ClearBuffer();
int32_t iNumOfBlock = (iBufferSize - 1) / m_iAllocStep + 1;
for (int32_t i = 0; i < iNumOfBlock; i++) {
- m_BlockArray.Add(FX_Alloc(FX_WCHAR, m_iAllocStep));
+ m_BlockArray.Add(FX_Alloc(wchar_t, m_iAllocStep));
}
m_iBufferSize = iNumOfBlock * m_iAllocStep;
return true;
}
-void CFDE_BlockBuffer::SetTextChar(int32_t iIndex, FX_WCHAR ch) {
+void CFDE_BlockBuffer::SetTextChar(int32_t iIndex, wchar_t ch) {
if (iIndex < 0) {
return;
}
@@ -1149,12 +1149,12 @@ void CFDE_BlockBuffer::SetTextChar(int32_t iIndex, FX_WCHAR ch) {
if (iBlockIndex >= iBlockSize) {
int32_t iNewBlocks = iBlockIndex - iBlockSize + 1;
do {
- FX_WCHAR* pBlock = FX_Alloc(FX_WCHAR, m_iAllocStep);
+ wchar_t* pBlock = FX_Alloc(wchar_t, m_iAllocStep);
m_BlockArray.Add(pBlock);
m_iBufferSize += m_iAllocStep;
} while (--iNewBlocks);
}
- FX_WCHAR* pTextData = m_BlockArray[iBlockIndex];
+ wchar_t* pTextData = m_BlockArray[iBlockIndex];
*(pTextData + iInnerIndex) = ch;
if (m_iDataLength <= iIndex) {
m_iDataLength = iIndex + 1;
@@ -1192,7 +1192,7 @@ void CFDE_BlockBuffer::GetTextData(CFX_WideString& wsTextData,
if (iLength <= 0) {
return;
}
- FX_WCHAR* pBuf = wsTextData.GetBuffer(iLength);
+ wchar_t* pBuf = wsTextData.GetBuffer(iLength);
if (!pBuf) {
return;
}
@@ -1213,9 +1213,9 @@ void CFDE_BlockBuffer::GetTextData(CFX_WideString& wsTextData,
if (i == iEndBlockIndex) {
iCopyLength -= ((m_iAllocStep - 1) - iEndInnerIndex);
}
- FX_WCHAR* pBlockBuf = m_BlockArray[i];
+ wchar_t* pBlockBuf = m_BlockArray[i];
FXSYS_memcpy(pBuf + iPointer, pBlockBuf + iBufferPointer,
- iCopyLength * sizeof(FX_WCHAR));
+ iCopyLength * sizeof(wchar_t));
iPointer += iCopyLength;
}
wsTextData.ReleaseBuffer(iLength);
@@ -1286,7 +1286,7 @@ void CFDE_XMLSyntaxParser::Init(const CFX_RetainPtr<IFGAS_Stream>& pStream,
}
m_pBuffer = FX_Alloc(
- FX_WCHAR, pdfium::base::ValueOrDieForType<size_t>(alloc_size_safe));
+ wchar_t, pdfium::base::ValueOrDieForType<size_t>(alloc_size_safe));
m_pStart = m_pEnd = m_pBuffer;
ASSERT(!m_BlockBuffer.IsInitialized());
m_BlockBuffer.InitBuffer();
@@ -1330,7 +1330,7 @@ FDE_XmlSyntaxResult CFDE_XMLSyntaxParser::DoSyntaxParse() {
}
while (m_pStart < m_pEnd) {
- FX_WCHAR ch = *m_pStart;
+ wchar_t ch = *m_pStart;
switch (m_syntaxParserState) {
case FDE_XmlSyntaxState::Text:
if (ch == L'<') {
@@ -1778,7 +1778,7 @@ int32_t CFDE_XMLSyntaxParser::GetStatus() const {
return m_iParsedBytes * 100 / iStreamLength;
}
-static int32_t FX_GetUTF8EncodeLength(const FX_WCHAR* pSrc, int32_t iSrcLen) {
+static int32_t FX_GetUTF8EncodeLength(const wchar_t* pSrc, int32_t iSrcLen) {
uint32_t unicode = 0;
int32_t iDstNum = 0;
while (iSrcLen-- > 0) {
@@ -1811,7 +1811,7 @@ FX_FILESIZE CFDE_XMLSyntaxParser::GetCurrentBinaryPos() const {
return m_iParsedBytes + nDstLen;
}
-void CFDE_XMLSyntaxParser::ParseTextChar(FX_WCHAR character) {
+void CFDE_XMLSyntaxParser::ParseTextChar(wchar_t character) {
if (m_iIndexInBlock == m_iAllocStep) {
m_pCurrentBlock = m_BlockBuffer.GetAvailableBlock(m_iIndexInBlock);
if (!m_pCurrentBlock) {
@@ -1828,7 +1828,7 @@ void CFDE_XMLSyntaxParser::ParseTextChar(FX_WCHAR character) {
if (iLen > 0) {
if (csEntity[0] == L'#') {
uint32_t ch = 0;
- FX_WCHAR w;
+ wchar_t w;
if (iLen > 1 && csEntity[1] == L'x') {
for (int32_t i = 2; i < iLen; i++) {
w = csEntity[i];
@@ -1853,7 +1853,7 @@ void CFDE_XMLSyntaxParser::ParseTextChar(FX_WCHAR character) {
if (ch > kMaxCharRange)
ch = ' ';
- character = static_cast<FX_WCHAR>(ch);
+ character = static_cast<wchar_t>(ch);
if (character != 0) {
m_BlockBuffer.SetTextChar(m_iEntityStart, character);
m_iEntityStart++;
diff --git a/xfa/fde/xml/fde_xml_imp.h b/xfa/fde/xml/fde_xml_imp.h
index d9ccbea506..7ae05a4936 100644
--- a/xfa/fde/xml/fde_xml_imp.h
+++ b/xfa/fde/xml/fde_xml_imp.h
@@ -56,7 +56,7 @@ class CFDE_XMLNode {
void DeleteChildren();
void CloneChildren(CFDE_XMLNode* pClone);
- CFDE_XMLNode* GetPath(const FX_WCHAR* pPath,
+ CFDE_XMLNode* GetPath(const wchar_t* pPath,
int32_t iLength = -1,
bool bQualifiedName = true) const;
@@ -87,17 +87,17 @@ class CFDE_XMLInstruction : public CFDE_XMLNode {
bool GetAttribute(int32_t index,
CFX_WideString& wsAttriName,
CFX_WideString& wsAttriValue) const;
- bool HasAttribute(const FX_WCHAR* pwsAttriName) const;
- void GetString(const FX_WCHAR* pwsAttriName,
+ bool HasAttribute(const wchar_t* pwsAttriName) const;
+ void GetString(const wchar_t* pwsAttriName,
CFX_WideString& wsAttriValue,
- const FX_WCHAR* pwsDefValue = nullptr) const;
+ const wchar_t* pwsDefValue = nullptr) const;
void SetString(const CFX_WideString& wsAttriName,
const CFX_WideString& wsAttriValue);
- int32_t GetInteger(const FX_WCHAR* pwsAttriName, int32_t iDefValue = 0) const;
- void SetInteger(const FX_WCHAR* pwsAttriName, int32_t iAttriValue);
- FX_FLOAT GetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fDefValue = 0) const;
- void SetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fAttriValue);
- void RemoveAttribute(const FX_WCHAR* pwsAttriName);
+ int32_t GetInteger(const wchar_t* pwsAttriName, int32_t iDefValue = 0) const;
+ void SetInteger(const wchar_t* pwsAttriName, int32_t iAttriValue);
+ FX_FLOAT GetFloat(const wchar_t* pwsAttriName, FX_FLOAT fDefValue = 0) const;
+ void SetFloat(const wchar_t* pwsAttriName, FX_FLOAT fAttriValue);
+ void RemoveAttribute(const wchar_t* pwsAttriName);
int32_t CountData() const;
bool GetData(int32_t index, CFX_WideString& wsData) const;
void AppendData(const CFX_WideString& wsData);
@@ -127,20 +127,20 @@ class CFDE_XMLElement : public CFDE_XMLNode {
bool GetAttribute(int32_t index,
CFX_WideString& wsAttriName,
CFX_WideString& wsAttriValue) const;
- bool HasAttribute(const FX_WCHAR* pwsAttriName) const;
- void RemoveAttribute(const FX_WCHAR* pwsAttriName);
+ bool HasAttribute(const wchar_t* pwsAttriName) const;
+ void RemoveAttribute(const wchar_t* pwsAttriName);
- void GetString(const FX_WCHAR* pwsAttriName,
+ void GetString(const wchar_t* pwsAttriName,
CFX_WideString& wsAttriValue,
- const FX_WCHAR* pwsDefValue = nullptr) const;
+ const wchar_t* pwsDefValue = nullptr) const;
void SetString(const CFX_WideString& wsAttriName,
const CFX_WideString& wsAttriValue);
- int32_t GetInteger(const FX_WCHAR* pwsAttriName, int32_t iDefValue = 0) const;
- void SetInteger(const FX_WCHAR* pwsAttriName, int32_t iAttriValue);
+ int32_t GetInteger(const wchar_t* pwsAttriName, int32_t iDefValue = 0) const;
+ void SetInteger(const wchar_t* pwsAttriName, int32_t iAttriValue);
- FX_FLOAT GetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fDefValue = 0) const;
- void SetFloat(const FX_WCHAR* pwsAttriName, FX_FLOAT fAttriValue);
+ FX_FLOAT GetFloat(const wchar_t* pwsAttriName, FX_FLOAT fDefValue = 0) const;
+ void SetFloat(const wchar_t* pwsAttriName, FX_FLOAT fAttriValue);
void GetTextData(CFX_WideString& wsText) const;
void SetTextData(const CFX_WideString& wsText);
@@ -222,7 +222,7 @@ class CFDE_BlockBuffer {
bool InitBuffer(int32_t iBufferSize = 1024 * 1024);
bool IsInitialized() { return m_iBufferSize / m_iAllocStep >= 1; }
- FX_WCHAR* GetAvailableBlock(int32_t& iIndexInBlock);
+ wchar_t* GetAvailableBlock(int32_t& iIndexInBlock);
inline int32_t GetAllocStep() const { return m_iAllocStep; }
inline int32_t& GetDataLengthRef() { return m_iDataLength; }
inline void Reset(bool bReserveData = true) {
@@ -231,7 +231,7 @@ class CFDE_BlockBuffer {
}
m_iDataLength = 0;
}
- void SetTextChar(int32_t iIndex, FX_WCHAR ch);
+ void SetTextChar(int32_t iIndex, wchar_t ch);
int32_t DeleteTextChars(int32_t iCount, bool bDirection = true);
void GetTextData(CFX_WideString& wsTextData,
int32_t iStart = 0,
@@ -243,7 +243,7 @@ class CFDE_BlockBuffer {
int32_t& iInnerIndex) const;
void ClearBuffer();
- CFX_ArrayTemplate<FX_WCHAR*> m_BlockArray;
+ CFX_ArrayTemplate<wchar_t*> m_BlockArray;
int32_t m_iDataLength;
int32_t m_iBufferSize;
int32_t m_iAllocStep;
@@ -312,7 +312,7 @@ class CFDE_XMLSyntaxParser {
TargetData
};
- void ParseTextChar(FX_WCHAR ch);
+ void ParseTextChar(wchar_t ch);
CFX_RetainPtr<IFGAS_Stream> m_pStream;
int32_t m_iXMLPlaneSize;
@@ -321,25 +321,25 @@ class CFDE_XMLSyntaxParser {
int32_t m_iLastNodeNum;
int32_t m_iParsedChars;
int32_t m_iParsedBytes;
- FX_WCHAR* m_pBuffer;
+ wchar_t* m_pBuffer;
int32_t m_iBufferChars;
bool m_bEOS;
- FX_WCHAR* m_pStart;
- FX_WCHAR* m_pEnd;
+ wchar_t* m_pStart;
+ wchar_t* m_pEnd;
FDE_XMLNODE m_CurNode;
std::stack<FDE_XMLNODE> m_XMLNodeStack;
CFDE_BlockBuffer m_BlockBuffer;
int32_t m_iAllocStep;
int32_t& m_iDataLength;
- FX_WCHAR* m_pCurrentBlock;
+ wchar_t* m_pCurrentBlock;
int32_t m_iIndexInBlock;
int32_t m_iTextDataLength;
FDE_XmlSyntaxResult m_syntaxParserResult;
FDE_XmlSyntaxState m_syntaxParserState;
- FX_WCHAR m_wQuotationMark;
+ wchar_t m_wQuotationMark;
int32_t m_iEntityStart;
- std::stack<FX_WCHAR> m_SkipStack;
- FX_WCHAR m_SkipChar;
+ std::stack<wchar_t> m_SkipStack;
+ wchar_t m_SkipChar;
};
#endif // XFA_FDE_XML_FDE_XML_IMP_H_
diff --git a/xfa/fde/xml/fde_xml_imp_unittest.cpp b/xfa/fde/xml/fde_xml_imp_unittest.cpp
index 6db1b1905a..6191025fd2 100644
--- a/xfa/fde/xml/fde_xml_imp_unittest.cpp
+++ b/xfa/fde/xml/fde_xml_imp_unittest.cpp
@@ -10,7 +10,7 @@
#include "xfa/fgas/crt/fgas_stream.h"
TEST(CFDE_XMLSyntaxParser, CData) {
- const FX_WCHAR* input =
+ const wchar_t* input =
L"<script contentType=\"application/x-javascript\">\n"
L" <![CDATA[\n"
L" if (a[1] < 3)\n"
@@ -18,16 +18,16 @@ TEST(CFDE_XMLSyntaxParser, CData) {
L" ]]>\n"
L"</script>";
- const FX_WCHAR* cdata =
+ const wchar_t* cdata =
L"\n"
L" if (a[1] < 3)\n"
L" app.alert(\"Tclams\");\n"
L" ";
- // We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
- size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
+ // We * sizeof(wchar_t) because we pass in the uint8_t, not the wchar_t.
+ size_t len = FXSYS_wcslen(input) * sizeof(wchar_t);
CFX_RetainPtr<IFGAS_Stream> stream = IFGAS_Stream::CreateStream(
- reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0);
+ reinterpret_cast<uint8_t*>(const_cast<wchar_t*>(input)), len, 0);
CFDE_XMLSyntaxParser parser;
parser.Init(stream, 256);
EXPECT_EQ(FDE_XmlSyntaxResult::ElementOpen, parser.DoSyntaxParse());
@@ -65,7 +65,7 @@ TEST(CFDE_XMLSyntaxParser, CData) {
}
TEST(CFDE_XMLSyntaxParser, CDataWithInnerScript) {
- const FX_WCHAR* input =
+ const wchar_t* input =
L"<script contentType=\"application/x-javascript\">\n"
L" <![CDATA[\n"
L" if (a[1] < 3)\n"
@@ -74,17 +74,17 @@ TEST(CFDE_XMLSyntaxParser, CDataWithInnerScript) {
L" ]]>\n"
L"</script>";
- const FX_WCHAR* cdata =
+ const wchar_t* cdata =
L"\n"
L" if (a[1] < 3)\n"
L" app.alert(\"Tclams\");\n"
L" </script>\n"
L" ";
- // We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
- size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
+ // We * sizeof(wchar_t) because we pass in the uint8_t, not the wchar_t.
+ size_t len = FXSYS_wcslen(input) * sizeof(wchar_t);
CFX_RetainPtr<IFGAS_Stream> stream = IFGAS_Stream::CreateStream(
- reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0);
+ reinterpret_cast<uint8_t*>(const_cast<wchar_t*>(input)), len, 0);
CFDE_XMLSyntaxParser parser;
parser.Init(stream, 256);
EXPECT_EQ(FDE_XmlSyntaxResult::ElementOpen, parser.DoSyntaxParse());
@@ -122,15 +122,15 @@ TEST(CFDE_XMLSyntaxParser, CDataWithInnerScript) {
}
TEST(CFDE_XMLSyntaxParser, ArrowBangArrow) {
- const FX_WCHAR* input =
+ const wchar_t* input =
L"<script contentType=\"application/x-javascript\">\n"
L" <!>\n"
L"</script>";
- // We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
- size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
+ // We * sizeof(wchar_t) because we pass in the uint8_t, not the wchar_t.
+ size_t len = FXSYS_wcslen(input) * sizeof(wchar_t);
CFX_RetainPtr<IFGAS_Stream> stream = IFGAS_Stream::CreateStream(
- reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0);
+ reinterpret_cast<uint8_t*>(const_cast<wchar_t*>(input)), len, 0);
CFDE_XMLSyntaxParser parser;
parser.Init(stream, 256);
EXPECT_EQ(FDE_XmlSyntaxResult::ElementOpen, parser.DoSyntaxParse());
@@ -164,15 +164,15 @@ TEST(CFDE_XMLSyntaxParser, ArrowBangArrow) {
}
TEST(CFDE_XMLSyntaxParser, ArrowBangBracketArrow) {
- const FX_WCHAR* input =
+ const wchar_t* input =
L"<script contentType=\"application/x-javascript\">\n"
L" <![>\n"
L"</script>";
- // We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
- size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
+ // We * sizeof(wchar_t) because we pass in the uint8_t, not the wchar_t.
+ size_t len = FXSYS_wcslen(input) * sizeof(wchar_t);
CFX_RetainPtr<IFGAS_Stream> stream = IFGAS_Stream::CreateStream(
- reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0);
+ reinterpret_cast<uint8_t*>(const_cast<wchar_t*>(input)), len, 0);
CFDE_XMLSyntaxParser parser;
parser.Init(stream, 256);
EXPECT_EQ(FDE_XmlSyntaxResult::ElementOpen, parser.DoSyntaxParse());
@@ -200,15 +200,15 @@ TEST(CFDE_XMLSyntaxParser, ArrowBangBracketArrow) {
}
TEST(CFDE_XMLSyntaxParser, IncompleteCData) {
- const FX_WCHAR* input =
+ const wchar_t* input =
L"<script contentType=\"application/x-javascript\">\n"
L" <![CDATA>\n"
L"</script>";
- // We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
- size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
+ // We * sizeof(wchar_t) because we pass in the uint8_t, not the wchar_t.
+ size_t len = FXSYS_wcslen(input) * sizeof(wchar_t);
CFX_RetainPtr<IFGAS_Stream> stream = IFGAS_Stream::CreateStream(
- reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0);
+ reinterpret_cast<uint8_t*>(const_cast<wchar_t*>(input)), len, 0);
CFDE_XMLSyntaxParser parser;
parser.Init(stream, 256);
EXPECT_EQ(FDE_XmlSyntaxResult::ElementOpen, parser.DoSyntaxParse());
@@ -236,15 +236,15 @@ TEST(CFDE_XMLSyntaxParser, IncompleteCData) {
}
TEST(CFDE_XMLSyntaxParser, UnClosedCData) {
- const FX_WCHAR* input =
+ const wchar_t* input =
L"<script contentType=\"application/x-javascript\">\n"
L" <![CDATA[\n"
L"</script>";
- // We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
- size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
+ // We * sizeof(wchar_t) because we pass in the uint8_t, not the wchar_t.
+ size_t len = FXSYS_wcslen(input) * sizeof(wchar_t);
CFX_RetainPtr<IFGAS_Stream> stream = IFGAS_Stream::CreateStream(
- reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0);
+ reinterpret_cast<uint8_t*>(const_cast<wchar_t*>(input)), len, 0);
CFDE_XMLSyntaxParser parser;
parser.Init(stream, 256);
EXPECT_EQ(FDE_XmlSyntaxResult::ElementOpen, parser.DoSyntaxParse());
@@ -272,15 +272,15 @@ TEST(CFDE_XMLSyntaxParser, UnClosedCData) {
}
TEST(CFDE_XMLSyntaxParser, EmptyCData) {
- const FX_WCHAR* input =
+ const wchar_t* input =
L"<script contentType=\"application/x-javascript\">\n"
L" <![CDATA[]]>\n"
L"</script>";
- // We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
- size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
+ // We * sizeof(wchar_t) because we pass in the uint8_t, not the wchar_t.
+ size_t len = FXSYS_wcslen(input) * sizeof(wchar_t);
CFX_RetainPtr<IFGAS_Stream> stream = IFGAS_Stream::CreateStream(
- reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0);
+ reinterpret_cast<uint8_t*>(const_cast<wchar_t*>(input)), len, 0);
CFDE_XMLSyntaxParser parser;
parser.Init(stream, 256);
EXPECT_EQ(FDE_XmlSyntaxResult::ElementOpen, parser.DoSyntaxParse());
@@ -318,15 +318,15 @@ TEST(CFDE_XMLSyntaxParser, EmptyCData) {
}
TEST(CFDE_XMLSyntaxParser, Comment) {
- const FX_WCHAR* input =
+ const wchar_t* input =
L"<script contentType=\"application/x-javascript\">\n"
L" <!-- A Comment -->\n"
L"</script>";
- // We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
- size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
+ // We * sizeof(wchar_t) because we pass in the uint8_t, not the wchar_t.
+ size_t len = FXSYS_wcslen(input) * sizeof(wchar_t);
CFX_RetainPtr<IFGAS_Stream> stream = IFGAS_Stream::CreateStream(
- reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0);
+ reinterpret_cast<uint8_t*>(const_cast<wchar_t*>(input)), len, 0);
CFDE_XMLSyntaxParser parser;
parser.Init(stream, 256);
EXPECT_EQ(FDE_XmlSyntaxResult::ElementOpen, parser.DoSyntaxParse());
@@ -360,15 +360,15 @@ TEST(CFDE_XMLSyntaxParser, Comment) {
}
TEST(CFDE_XMLSyntaxParser, IncorrectCommentStart) {
- const FX_WCHAR* input =
+ const wchar_t* input =
L"<script contentType=\"application/x-javascript\">\n"
L" <!- A Comment -->\n"
L"</script>";
- // We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
- size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
+ // We * sizeof(wchar_t) because we pass in the uint8_t, not the wchar_t.
+ size_t len = FXSYS_wcslen(input) * sizeof(wchar_t);
CFX_RetainPtr<IFGAS_Stream> stream = IFGAS_Stream::CreateStream(
- reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0);
+ reinterpret_cast<uint8_t*>(const_cast<wchar_t*>(input)), len, 0);
CFDE_XMLSyntaxParser parser;
parser.Init(stream, 256);
EXPECT_EQ(FDE_XmlSyntaxResult::ElementOpen, parser.DoSyntaxParse());
@@ -402,15 +402,15 @@ TEST(CFDE_XMLSyntaxParser, IncorrectCommentStart) {
}
TEST(CFDE_XMLSyntaxParser, CommentEmpty) {
- const FX_WCHAR* input =
+ const wchar_t* input =
L"<script contentType=\"application/x-javascript\">\n"
L" <!---->\n"
L"</script>";
- // We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
- size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
+ // We * sizeof(wchar_t) because we pass in the uint8_t, not the wchar_t.
+ size_t len = FXSYS_wcslen(input) * sizeof(wchar_t);
CFX_RetainPtr<IFGAS_Stream> stream = IFGAS_Stream::CreateStream(
- reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0);
+ reinterpret_cast<uint8_t*>(const_cast<wchar_t*>(input)), len, 0);
CFDE_XMLSyntaxParser parser;
parser.Init(stream, 256);
EXPECT_EQ(FDE_XmlSyntaxResult::ElementOpen, parser.DoSyntaxParse());
@@ -444,15 +444,15 @@ TEST(CFDE_XMLSyntaxParser, CommentEmpty) {
}
TEST(CFDE_XMLSyntaxParser, CommentThreeDash) {
- const FX_WCHAR* input =
+ const wchar_t* input =
L"<script contentType=\"application/x-javascript\">\n"
L" <!--->\n"
L"</script>";
- // We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
- size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
+ // We * sizeof(wchar_t) because we pass in the uint8_t, not the wchar_t.
+ size_t len = FXSYS_wcslen(input) * sizeof(wchar_t);
CFX_RetainPtr<IFGAS_Stream> stream = IFGAS_Stream::CreateStream(
- reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0);
+ reinterpret_cast<uint8_t*>(const_cast<wchar_t*>(input)), len, 0);
CFDE_XMLSyntaxParser parser;
parser.Init(stream, 256);
EXPECT_EQ(FDE_XmlSyntaxResult::ElementOpen, parser.DoSyntaxParse());
@@ -478,15 +478,15 @@ TEST(CFDE_XMLSyntaxParser, CommentThreeDash) {
}
TEST(CFDE_XMLSyntaxParser, CommentTwoDash) {
- const FX_WCHAR* input =
+ const wchar_t* input =
L"<script contentType=\"application/x-javascript\">\n"
L" <!-->\n"
L"</script>";
- // We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
- size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
+ // We * sizeof(wchar_t) because we pass in the uint8_t, not the wchar_t.
+ size_t len = FXSYS_wcslen(input) * sizeof(wchar_t);
CFX_RetainPtr<IFGAS_Stream> stream = IFGAS_Stream::CreateStream(
- reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0);
+ reinterpret_cast<uint8_t*>(const_cast<wchar_t*>(input)), len, 0);
CFDE_XMLSyntaxParser parser;
parser.Init(stream, 256);
EXPECT_EQ(FDE_XmlSyntaxResult::ElementOpen, parser.DoSyntaxParse());
@@ -512,7 +512,7 @@ TEST(CFDE_XMLSyntaxParser, CommentTwoDash) {
}
TEST(CFDE_XMLSyntaxParser, Entities) {
- const FX_WCHAR* input =
+ const wchar_t* input =
L"<script contentType=\"application/x-javascript\">"
L"&#66;"
L"&#x54;"
@@ -521,10 +521,10 @@ TEST(CFDE_XMLSyntaxParser, Entities) {
L"&#x0000000000000000000;"
L"</script>";
- // We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
- size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
+ // We * sizeof(wchar_t) because we pass in the uint8_t, not the wchar_t.
+ size_t len = FXSYS_wcslen(input) * sizeof(wchar_t);
CFX_RetainPtr<IFGAS_Stream> stream = IFGAS_Stream::CreateStream(
- reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0);
+ reinterpret_cast<uint8_t*>(const_cast<wchar_t*>(input)), len, 0);
CFDE_XMLSyntaxParser parser;
parser.Init(stream, 256);
EXPECT_EQ(FDE_XmlSyntaxResult::ElementOpen, parser.DoSyntaxParse());
@@ -554,16 +554,16 @@ TEST(CFDE_XMLSyntaxParser, Entities) {
}
TEST(CFDE_XMLSyntaxParser, EntityOverflowHex) {
- const FX_WCHAR* input =
+ const wchar_t* input =
L"<script contentType=\"application/x-javascript\">"
L"&#xaDBDFFFFF;"
L"&#xafffffffffffffffffffffffffffffffff;"
L"</script>";
- // We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
- size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
+ // We * sizeof(wchar_t) because we pass in the uint8_t, not the wchar_t.
+ size_t len = FXSYS_wcslen(input) * sizeof(wchar_t);
CFX_RetainPtr<IFGAS_Stream> stream = IFGAS_Stream::CreateStream(
- reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0);
+ reinterpret_cast<uint8_t*>(const_cast<wchar_t*>(input)), len, 0);
CFDE_XMLSyntaxParser parser;
parser.Init(stream, 256);
EXPECT_EQ(FDE_XmlSyntaxResult::ElementOpen, parser.DoSyntaxParse());
@@ -593,16 +593,16 @@ TEST(CFDE_XMLSyntaxParser, EntityOverflowHex) {
}
TEST(CFDE_XMLSyntaxParser, EntityOverflowDecimal) {
- const FX_WCHAR* input =
+ const wchar_t* input =
L"<script contentType=\"application/x-javascript\">"
L"&#2914910205;"
L"&#29149102052342342134521341234512351234213452315;"
L"</script>";
- // We * sizeof(FX_WCHAR) because we pass in the uint8_t, not the FX_WCHAR.
- size_t len = FXSYS_wcslen(input) * sizeof(FX_WCHAR);
+ // We * sizeof(wchar_t) because we pass in the uint8_t, not the wchar_t.
+ size_t len = FXSYS_wcslen(input) * sizeof(wchar_t);
CFX_RetainPtr<IFGAS_Stream> stream = IFGAS_Stream::CreateStream(
- reinterpret_cast<uint8_t*>(const_cast<FX_WCHAR*>(input)), len, 0);
+ reinterpret_cast<uint8_t*>(const_cast<wchar_t*>(input)), len, 0);
CFDE_XMLSyntaxParser parser;
parser.Init(stream, 256);
EXPECT_EQ(FDE_XmlSyntaxResult::ElementOpen, parser.DoSyntaxParse());
diff --git a/xfa/fgas/crt/fgas_codepage.cpp b/xfa/fgas/crt/fgas_codepage.cpp
index 36f87a36f3..5f824667fb 100644
--- a/xfa/fgas/crt/fgas_codepage.cpp
+++ b/xfa/fgas/crt/fgas_codepage.cpp
@@ -261,7 +261,7 @@ const FX_STR2CPHASH g_FXCPHashTable[] = {
{0xf637e157, 0x478}, {0xfc213f3a, 0x2717}, {0xff654d14, 0x3b5},
};
-uint16_t GetCodePageFromStringA(const FX_CHAR* pStr, int32_t iLength) {
+uint16_t GetCodePageFromStringA(const char* pStr, int32_t iLength) {
ASSERT(pStr);
if (iLength < 0) {
iLength = FXSYS_strlen(pStr);
@@ -325,7 +325,7 @@ uint16_t FX_GetDefCodePageByLanguage(uint16_t wLanguage) {
return 0xFFFF;
}
-uint16_t FX_GetCodePageFromStringW(const FX_WCHAR* pStr, int32_t iLength) {
+uint16_t FX_GetCodePageFromStringW(const wchar_t* pStr, int32_t iLength) {
if (iLength < 0) {
iLength = FXSYS_wcslen(pStr);
}
@@ -333,21 +333,21 @@ uint16_t FX_GetCodePageFromStringW(const FX_WCHAR* pStr, int32_t iLength) {
return 0xFFFF;
}
CFX_ByteString csStr;
- FX_CHAR* pBuf = csStr.GetBuffer(iLength + 1);
+ char* pBuf = csStr.GetBuffer(iLength + 1);
for (int32_t i = 0; i < iLength; ++i) {
- *pBuf++ = (FX_CHAR)*pStr++;
+ *pBuf++ = (char)*pStr++;
}
csStr.ReleaseBuffer(iLength);
return GetCodePageFromStringA(csStr.c_str(), iLength);
}
-void FX_SwapByteOrder(FX_WCHAR* pStr, int32_t iLength) {
+void FX_SwapByteOrder(wchar_t* pStr, int32_t iLength) {
ASSERT(pStr);
if (iLength < 0) {
iLength = FXSYS_wcslen(pStr);
}
uint16_t wch;
- if (sizeof(FX_WCHAR) > 2) {
+ if (sizeof(wchar_t) > 2) {
while (iLength-- > 0) {
wch = (uint16_t)*pStr;
wch = (wch >> 8) | (wch << 8);
@@ -365,20 +365,20 @@ void FX_SwapByteOrder(FX_WCHAR* pStr, int32_t iLength) {
void FX_UTF16ToWChar(void* pBuffer, int32_t iLength) {
ASSERT(pBuffer && iLength > 0);
- if (sizeof(FX_WCHAR) == 2) {
+ if (sizeof(wchar_t) == 2) {
return;
}
uint16_t* pSrc = (uint16_t*)pBuffer;
- FX_WCHAR* pDst = (FX_WCHAR*)pBuffer;
+ wchar_t* pDst = (wchar_t*)pBuffer;
while (--iLength >= 0) {
- pDst[iLength] = (FX_WCHAR)pSrc[iLength];
+ pDst[iLength] = (wchar_t)pSrc[iLength];
}
}
int32_t FX_DecodeString(uint16_t wCodePage,
- const FX_CHAR* pSrc,
+ const char* pSrc,
int32_t* pSrcLen,
- FX_WCHAR* pDst,
+ wchar_t* pDst,
int32_t* pDstLen,
bool bErrBreak) {
if (wCodePage == FX_CODEPAGE_UTF8) {
@@ -386,9 +386,9 @@ int32_t FX_DecodeString(uint16_t wCodePage,
}
return -1;
}
-int32_t FX_UTF8Decode(const FX_CHAR* pSrc,
+int32_t FX_UTF8Decode(const char* pSrc,
int32_t* pSrcLen,
- FX_WCHAR* pDst,
+ wchar_t* pDst,
int32_t* pDstLen) {
if (!pSrcLen || !pDstLen) {
return -1;
diff --git a/xfa/fgas/crt/fgas_codepage.h b/xfa/fgas/crt/fgas_codepage.h
index 780c20e233..e3a535edfc 100644
--- a/xfa/fgas/crt/fgas_codepage.h
+++ b/xfa/fgas/crt/fgas_codepage.h
@@ -134,20 +134,20 @@
#define FX_CHARSET_OEM 255
uint16_t FX_GetCodePageFromCharset(uint8_t charset);
-uint16_t FX_GetCodePageFromStringW(const FX_WCHAR* pStr, int32_t iLength);
+uint16_t FX_GetCodePageFromStringW(const wchar_t* pStr, int32_t iLength);
uint16_t FX_GetDefCodePageByLanguage(uint16_t wLanguage);
-void FX_SwapByteOrder(FX_WCHAR* pStr, int32_t iLength);
+void FX_SwapByteOrder(wchar_t* pStr, int32_t iLength);
void FX_UTF16ToWChar(void* pBuffer, int32_t iLength);
int32_t FX_DecodeString(uint16_t wCodePage,
- const FX_CHAR* pSrc,
+ const char* pSrc,
int32_t* pSrcLen,
- FX_WCHAR* pDst,
+ wchar_t* pDst,
int32_t* pDstLen,
bool bErrBreak);
-int32_t FX_UTF8Decode(const FX_CHAR* pSrc,
+int32_t FX_UTF8Decode(const char* pSrc,
int32_t* pSrcLen,
- FX_WCHAR* pDst,
+ wchar_t* pDst,
int32_t* pDstLen);
#endif // XFA_FGAS_CRT_FGAS_CODEPAGE_H_
diff --git a/xfa/fgas/crt/fgas_stream.cpp b/xfa/fgas/crt/fgas_stream.cpp
index 424b191cb8..02096d4966 100644
--- a/xfa/fgas/crt/fgas_stream.cpp
+++ b/xfa/fgas/crt/fgas_stream.cpp
@@ -28,11 +28,9 @@ class IFGAS_StreamImp {
virtual int32_t GetPosition() = 0;
virtual bool IsEOF() const = 0;
virtual int32_t ReadData(uint8_t* pBuffer, int32_t iBufferSize) = 0;
- virtual int32_t ReadString(FX_WCHAR* pStr,
- int32_t iMaxLength,
- bool& bEOS) = 0;
+ virtual int32_t ReadString(wchar_t* pStr, int32_t iMaxLength, bool& bEOS) = 0;
virtual int32_t WriteData(const uint8_t* pBuffer, int32_t iBufferSize) = 0;
- virtual int32_t WriteString(const FX_WCHAR* pStr, int32_t iLength) = 0;
+ virtual int32_t WriteString(const wchar_t* pStr, int32_t iLength) = 0;
virtual void Flush() = 0;
virtual bool SetLength(int32_t iLength) = 0;
@@ -51,7 +49,7 @@ class CFGAS_FileStreamImp : public IFGAS_StreamImp {
CFGAS_FileStreamImp();
~CFGAS_FileStreamImp() override;
- bool LoadFile(const FX_WCHAR* pszSrcFileName, uint32_t dwAccess);
+ bool LoadFile(const wchar_t* pszSrcFileName, uint32_t dwAccess);
// IFGAS_StreamImp:
int32_t GetLength() const override;
@@ -59,9 +57,9 @@ class CFGAS_FileStreamImp : public IFGAS_StreamImp {
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;
@@ -83,9 +81,9 @@ class CFGAS_BufferStreamImp : public IFGAS_StreamImp {
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 { return false; }
@@ -110,11 +108,11 @@ class CFGAS_FileReadStreamImp : public IFGAS_StreamImp {
int32_t GetPosition() override { return m_iPosition; }
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 {
return 0;
}
- int32_t WriteString(const FX_WCHAR* pStr, int32_t iLength) override {
+ int32_t WriteString(const wchar_t* pStr, int32_t iLength) override {
return 0;
}
void Flush() override {}
@@ -141,11 +139,11 @@ class CFGAS_BufferReadStreamImp : public IFGAS_StreamImp {
int32_t GetPosition() override { return m_iPosition; }
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 {
return 0;
}
- int32_t WriteString(const FX_WCHAR* pStr, int32_t iLength) override {
+ int32_t WriteString(const wchar_t* pStr, int32_t iLength) override {
return 0;
}
void Flush() override {}
@@ -171,11 +169,11 @@ class CFGAS_FileWriteStreamImp : public IFGAS_StreamImp {
int32_t GetPosition() override { return m_iPosition; }
bool IsEOF() const override;
int32_t ReadData(uint8_t* pBuffer, int32_t iBufferSize) override { return 0; }
- int32_t ReadString(FX_WCHAR* pStr, int32_t iMaxLength, bool& bEOS) override {
+ int32_t ReadString(wchar_t* pStr, int32_t iMaxLength, bool& bEOS) override {
return 0;
}
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 { return false; }
@@ -197,7 +195,7 @@ class CFGAS_Stream : public IFGAS_Stream {
template <typename T, typename... Args>
friend CFX_RetainPtr<T> pdfium::MakeRetain(Args&&... args);
- bool LoadFile(const FX_WCHAR* pszSrcFileName, uint32_t dwAccess);
+ bool LoadFile(const wchar_t* pszSrcFileName, uint32_t dwAccess);
bool LoadBuffer(uint8_t* pData, int32_t iTotalSize, uint32_t dwAccess);
bool LoadFileRead(const CFX_RetainPtr<IFX_SeekableReadStream>& pFileRead,
uint32_t dwAccess);
@@ -214,9 +212,9 @@ class CFGAS_Stream : 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;
@@ -252,9 +250,9 @@ class CFGAS_TextStream : 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;
@@ -376,13 +374,13 @@ CFGAS_FileStreamImp::~CFGAS_FileStreamImp() {
FXSYS_fclose(m_hFile);
}
-bool CFGAS_FileStreamImp::LoadFile(const FX_WCHAR* pszSrcFileName,
+bool CFGAS_FileStreamImp::LoadFile(const wchar_t* pszSrcFileName,
uint32_t dwAccess) {
ASSERT(!m_hFile);
ASSERT(pszSrcFileName && FXSYS_wcslen(pszSrcFileName) > 0);
#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN32_MOBILE_ || \
_FX_OS_ == _FX_WIN64_
- const FX_WCHAR* wsMode;
+ const wchar_t* wsMode;
if (dwAccess & FX_STREAMACCESS_Write) {
if (dwAccess & FX_STREAMACCESS_Append) {
wsMode = L"a+b";
@@ -414,7 +412,7 @@ bool CFGAS_FileStreamImp::LoadFile(const FX_WCHAR* pszSrcFileName,
}
}
#else
- const FX_CHAR* wsMode = "rb";
+ const char* wsMode = "rb";
if (dwAccess & FX_STREAMACCESS_Write) {
if (dwAccess & FX_STREAMACCESS_Append) {
wsMode = "a+b";
@@ -476,7 +474,7 @@ int32_t CFGAS_FileStreamImp::ReadData(uint8_t* pBuffer, int32_t iBufferSize) {
ASSERT(pBuffer && iBufferSize > 0);
return FXSYS_fread(pBuffer, 1, iBufferSize, m_hFile);
}
-int32_t CFGAS_FileStreamImp::ReadString(FX_WCHAR* pStr,
+int32_t CFGAS_FileStreamImp::ReadString(wchar_t* pStr,
int32_t iMaxLength,
bool& bEOS) {
ASSERT(m_hFile);
@@ -514,8 +512,7 @@ int32_t CFGAS_FileStreamImp::WriteData(const uint8_t* pBuffer,
}
return iRet;
}
-int32_t CFGAS_FileStreamImp::WriteString(const FX_WCHAR* pStr,
- int32_t iLength) {
+int32_t CFGAS_FileStreamImp::WriteString(const wchar_t* pStr, int32_t iLength) {
ASSERT(m_hFile && (GetAccessModes() & FX_STREAMACCESS_Write) != 0);
ASSERT(pStr && iLength > 0);
int32_t iRet = FXSYS_fwrite(pStr, 2, iLength, m_hFile);
@@ -591,7 +588,7 @@ int32_t CFGAS_FileReadStreamImp::ReadData(uint8_t* pBuffer,
}
return 0;
}
-int32_t CFGAS_FileReadStreamImp::ReadString(FX_WCHAR* pStr,
+int32_t CFGAS_FileReadStreamImp::ReadString(wchar_t* pStr,
int32_t iMaxLength,
bool& bEOS) {
ASSERT(m_pFileRead);
@@ -716,7 +713,7 @@ int32_t CFGAS_BufferReadStreamImp::ReadData(uint8_t* pBuffer,
m_iPosition += dwOffsetTmp;
return dwOffsetTmp;
}
-int32_t CFGAS_BufferReadStreamImp::ReadString(FX_WCHAR* pStr,
+int32_t CFGAS_BufferReadStreamImp::ReadString(wchar_t* pStr,
int32_t iMaxLength,
bool& bEOS) {
ASSERT(m_pBufferRead);
@@ -788,9 +785,9 @@ int32_t CFGAS_FileWriteStreamImp::WriteData(const uint8_t* pBuffer,
}
return iBufferSize;
}
-int32_t CFGAS_FileWriteStreamImp::WriteString(const FX_WCHAR* pStr,
+int32_t CFGAS_FileWriteStreamImp::WriteString(const wchar_t* pStr,
int32_t iLength) {
- return WriteData((const uint8_t*)pStr, iLength * sizeof(FX_WCHAR));
+ return WriteData((const uint8_t*)pStr, iLength * sizeof(wchar_t));
}
void CFGAS_FileWriteStreamImp::Flush() {
if (m_pFileWrite) {
@@ -851,7 +848,7 @@ int32_t CFGAS_BufferStreamImp::ReadData(uint8_t* pBuffer, int32_t iBufferSize) {
m_iPosition += iLen;
return iLen;
}
-int32_t CFGAS_BufferStreamImp::ReadString(FX_WCHAR* pStr,
+int32_t CFGAS_BufferStreamImp::ReadString(wchar_t* pStr,
int32_t iMaxLength,
bool& bEOS) {
ASSERT(m_pData);
@@ -860,7 +857,7 @@ int32_t CFGAS_BufferStreamImp::ReadString(FX_WCHAR* pStr,
if (iLen <= 0) {
return 0;
}
- const FX_WCHAR* pSrc = (const FX_WCHAR*)(FX_CHAR*)(m_pData + m_iPosition);
+ const wchar_t* pSrc = (const wchar_t*)(char*)(m_pData + m_iPosition);
int32_t iCount = 0;
while (*pSrc && iCount < iLen) {
*pStr++ = *pSrc++;
@@ -885,7 +882,7 @@ int32_t CFGAS_BufferStreamImp::WriteData(const uint8_t* pBuffer,
}
return iLen;
}
-int32_t CFGAS_BufferStreamImp::WriteString(const FX_WCHAR* pStr,
+int32_t CFGAS_BufferStreamImp::WriteString(const wchar_t* pStr,
int32_t iLength) {
ASSERT(m_pData && (GetAccessModes() & FX_STREAMACCESS_Write) != 0);
ASSERT(pStr && iLength > 0);
@@ -1043,7 +1040,7 @@ uint16_t CFGAS_TextStream::SetCodePage(uint16_t wCodePage) {
return v;
}
-int32_t CFGAS_TextStream::ReadString(FX_WCHAR* pStr,
+int32_t CFGAS_TextStream::ReadString(wchar_t* pStr,
int32_t iMaxLength,
bool& bEOS) {
ASSERT(pStr && iMaxLength > 0);
@@ -1056,7 +1053,7 @@ int32_t CFGAS_TextStream::ReadString(FX_WCHAR* pStr,
int32_t iBytes = iMaxLength * 2;
iLen = m_pStreamImp->ReadData((uint8_t*)pStr, iBytes);
iMaxLength = iLen / 2;
- if (sizeof(FX_WCHAR) > 2) {
+ if (sizeof(wchar_t) > 2) {
FX_UTF16ToWChar(pStr, iMaxLength);
}
#if _FX_ENDIAN_ == _FX_BIG_ENDIAN_
@@ -1082,8 +1079,8 @@ int32_t CFGAS_TextStream::ReadString(FX_WCHAR* pStr,
}
iLen = m_pStreamImp->ReadData(m_pBuf, iBytes);
int32_t iSrc = iLen;
- int32_t iDecode = FX_DecodeString(m_wCodePage, (const FX_CHAR*)m_pBuf,
- &iSrc, pStr, &iMaxLength, true);
+ int32_t iDecode = FX_DecodeString(m_wCodePage, (const char*)m_pBuf, &iSrc,
+ pStr, &iMaxLength, true);
m_pStreamImp->Seek(FX_STREAMSEEK_Current, iSrc - iLen);
if (iDecode < 1) {
return -1;
@@ -1096,7 +1093,7 @@ int32_t CFGAS_TextStream::ReadString(FX_WCHAR* pStr,
return iMaxLength;
}
-int32_t CFGAS_TextStream::WriteString(const FX_WCHAR* pStr, int32_t iLength) {
+int32_t CFGAS_TextStream::WriteString(const wchar_t* pStr, int32_t iLength) {
ASSERT(pStr && iLength > 0);
if ((m_pStreamImp->GetAccessModes() & FX_STREAMACCESS_Write) == 0)
return -1;
@@ -1129,7 +1126,7 @@ CFGAS_Stream::~CFGAS_Stream() {
delete m_pStreamImp;
}
-bool CFGAS_Stream::LoadFile(const FX_WCHAR* pszSrcFileName, uint32_t dwAccess) {
+bool CFGAS_Stream::LoadFile(const wchar_t* pszSrcFileName, uint32_t dwAccess) {
if (m_eStreamType != FX_SREAMTYPE_Unknown || m_pStreamImp)
return false;
@@ -1303,7 +1300,7 @@ int32_t CFGAS_Stream::ReadData(uint8_t* pBuffer, int32_t iBufferSize) {
m_iPosition = m_pStreamImp->GetPosition();
return iLen;
}
-int32_t CFGAS_Stream::ReadString(FX_WCHAR* pStr,
+int32_t CFGAS_Stream::ReadString(wchar_t* pStr,
int32_t iMaxLength,
bool& bEOS) {
ASSERT(pStr && iMaxLength > 0);
@@ -1353,7 +1350,7 @@ int32_t CFGAS_Stream::WriteData(const uint8_t* pBuffer, int32_t iBufferSize) {
}
return iLen;
}
-int32_t CFGAS_Stream::WriteString(const FX_WCHAR* pStr, int32_t iLength) {
+int32_t CFGAS_Stream::WriteString(const wchar_t* pStr, int32_t iLength) {
ASSERT(pStr && iLength > 0);
if (!m_pStreamImp) {
return -1;
diff --git a/xfa/fgas/crt/fgas_stream.h b/xfa/fgas/crt/fgas_stream.h
index 79fda58d2a..fdfc08205a 100644
--- a/xfa/fgas/crt/fgas_stream.h
+++ b/xfa/fgas/crt/fgas_stream.h
@@ -51,11 +51,9 @@ class IFGAS_Stream : public CFX_Retainable {
virtual int32_t GetPosition() = 0;
virtual bool IsEOF() const = 0;
virtual int32_t ReadData(uint8_t* pBuffer, int32_t iBufferSize) = 0;
- virtual int32_t ReadString(FX_WCHAR* pStr,
- int32_t iMaxLength,
- bool& bEOS) = 0;
+ virtual int32_t ReadString(wchar_t* pStr, int32_t iMaxLength, bool& bEOS) = 0;
virtual int32_t WriteData(const uint8_t* pBuffer, int32_t iBufferSize) = 0;
- virtual int32_t WriteString(const FX_WCHAR* pStr, int32_t iLength) = 0;
+ virtual int32_t WriteString(const wchar_t* pStr, int32_t iLength) = 0;
virtual void Flush() = 0;
virtual bool SetLength(int32_t iLength) = 0;
virtual int32_t GetBOM(uint8_t bom[4]) const = 0;
diff --git a/xfa/fgas/font/cfgas_fontmgr.cpp b/xfa/fgas/font/cfgas_fontmgr.cpp
index aa41318f5d..0173a6a24c 100644
--- a/xfa/fgas/font/cfgas_fontmgr.cpp
+++ b/xfa/fgas/font/cfgas_fontmgr.cpp
@@ -113,7 +113,7 @@ CFGAS_FontMgr::~CFGAS_FontMgr() {}
CFX_RetainPtr<CFGAS_GEFont> CFGAS_FontMgr::GetFontByCodePage(
uint16_t wCodePage,
uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily) {
+ const wchar_t* pszFontFamily) {
uint32_t dwHash = FGAS_GetFontHashCode(wCodePage, dwFontStyles);
auto it = m_CPFonts.find(dwHash);
if (it != m_CPFonts.end()) {
@@ -141,9 +141,9 @@ CFX_RetainPtr<CFGAS_GEFont> CFGAS_FontMgr::GetFontByCodePage(
}
CFX_RetainPtr<CFGAS_GEFont> CFGAS_FontMgr::GetFontByUnicode(
- FX_WCHAR wUnicode,
+ wchar_t wUnicode,
uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily) {
+ const wchar_t* pszFontFamily) {
const FGAS_FONTUSB* pRet = FGAS_GetUnicodeBitField(wUnicode);
if (pRet->wBitField == 999)
return nullptr;
@@ -166,7 +166,7 @@ CFX_RetainPtr<CFGAS_GEFont> CFGAS_FontMgr::GetFontByUnicode(
return nullptr;
uint16_t wCodePage = FX_GetCodePageFromCharset(pFD->uCharSet);
- const FX_WCHAR* pFontFace = pFD->wsFontFace;
+ const wchar_t* pFontFace = pFD->wsFontFace;
CFX_RetainPtr<CFGAS_GEFont> pFont =
CFGAS_GEFont::LoadFont(pFontFace, dwFontStyles, wCodePage, this);
if (!pFont)
@@ -181,7 +181,7 @@ CFX_RetainPtr<CFGAS_GEFont> CFGAS_FontMgr::GetFontByUnicode(
}
CFX_RetainPtr<CFGAS_GEFont> CFGAS_FontMgr::LoadFont(
- const FX_WCHAR* pszFontFamily,
+ const wchar_t* pszFontFamily,
uint32_t dwFontStyles,
uint16_t wCodePage) {
CFX_RetainPtr<CFGAS_GEFont> pFont;
@@ -262,12 +262,12 @@ void CFGAS_FontMgr::RemoveFont(const CFX_RetainPtr<CFGAS_GEFont>& pFont) {
m_Fonts.erase(it);
}
-const FX_FONTDESCRIPTOR* CFGAS_FontMgr::FindFont(const FX_WCHAR* pszFontFamily,
+const FX_FONTDESCRIPTOR* CFGAS_FontMgr::FindFont(const wchar_t* pszFontFamily,
uint32_t dwFontStyles,
uint32_t dwMatchFlags,
uint16_t wCodePage,
uint32_t dwUSB,
- FX_WCHAR wUnicode) {
+ wchar_t wUnicode) {
FX_FONTMATCHPARAMS params;
FXSYS_memset(&params, 0, sizeof(params));
params.dwUSB = dwUSB;
@@ -325,7 +325,7 @@ static int32_t CALLBACK FX_GdiFontEnumProc(ENUMLOGFONTEX* lpelfe,
FXSYS_memset(pFont, 0, sizeof(FX_FONTDESCRIPTOR));
pFont->uCharSet = lf.lfCharSet;
pFont->dwFontStyles = FX_GetGdiFontStyles(lf);
- FXSYS_wcsncpy(pFont->wsFontFace, (const FX_WCHAR*)lf.lfFaceName, 31);
+ FXSYS_wcsncpy(pFont->wsFontFace, (const wchar_t*)lf.lfFaceName, 31);
pFont->wsFontFace[31] = 0;
FXSYS_memcpy(&pFont->FontSignature, &lpntme->ntmFontSig,
sizeof(lpntme->ntmFontSig));
@@ -335,8 +335,8 @@ static int32_t CALLBACK FX_GdiFontEnumProc(ENUMLOGFONTEX* lpelfe,
}
static void FX_EnumGdiFonts(std::deque<FX_FONTDESCRIPTOR>* fonts,
- const FX_WCHAR* pwsFaceName,
- FX_WCHAR wUnicode) {
+ const wchar_t* pwsFaceName,
+ wchar_t wUnicode) {
HDC hDC = ::GetDC(nullptr);
LOGFONTW lfFind;
FXSYS_memset(&lfFind, 0, sizeof(lfFind));
@@ -358,7 +358,7 @@ FX_LPEnumAllFonts FX_GetDefFontEnumerator() {
namespace {
-const FX_CHAR* g_FontFolders[] = {
+const char* g_FontFolders[] = {
#if _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_
"/usr/share/fonts", "/usr/share/X11/fonts/Type1",
"/usr/share/X11/fonts/TTF", "/usr/local/share/fonts",
@@ -396,7 +396,7 @@ uint16_t FX_GetCodePageBit(uint16_t wCodePage) {
return static_cast<uint16_t>(-1);
}
-uint16_t FX_GetUnicodeBit(FX_WCHAR wcUnicode) {
+uint16_t FX_GetUnicodeBit(wchar_t wcUnicode) {
const FGAS_FONTUSB* x = FGAS_GetUnicodeBitField(wcUnicode);
return x ? x->wBitField : 999;
}
@@ -616,7 +616,7 @@ bool CFGAS_FontMgr::EnumFonts() {
}
CFX_RetainPtr<CFGAS_GEFont> CFGAS_FontMgr::LoadFont(
- const FX_WCHAR* pszFontFamily,
+ const wchar_t* pszFontFamily,
uint32_t dwFontStyles,
uint16_t wCodePage) {
return GetFontByCodePage(wCodePage, dwFontStyles, pszFontFamily);
@@ -625,7 +625,7 @@ CFX_RetainPtr<CFGAS_GEFont> CFGAS_FontMgr::LoadFont(
CFX_RetainPtr<CFGAS_GEFont> CFGAS_FontMgr::GetFontByCodePage(
uint16_t wCodePage,
uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily) {
+ const wchar_t* pszFontFamily) {
CFX_ByteString bsHash;
bsHash.Format("%d, %d", wCodePage, dwFontStyles);
bsHash += FX_UTF8Encode(CFX_WideStringC(pszFontFamily));
@@ -658,9 +658,9 @@ CFX_RetainPtr<CFGAS_GEFont> CFGAS_FontMgr::GetFontByCodePage(
}
CFX_RetainPtr<CFGAS_GEFont> CFGAS_FontMgr::GetFontByUnicode(
- FX_WCHAR wUnicode,
+ wchar_t wUnicode,
uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily) {
+ const wchar_t* pszFontFamily) {
if (pdfium::ContainsKey(m_FailedUnicodesSet, wUnicode))
return nullptr;
@@ -706,7 +706,7 @@ CFX_RetainPtr<CFGAS_GEFont> CFGAS_FontMgr::GetFontByUnicode(
}
bool CFGAS_FontMgr::VerifyUnicode(CFX_FontDescriptor* pDesc,
- FX_WCHAR wcUnicode) {
+ wchar_t wcUnicode) {
CFX_RetainPtr<IFX_SeekableReadStream> pFileRead =
CreateFontStream(pDesc->m_wsFaceName.UTF8Encode());
if (!pFileRead)
@@ -726,7 +726,7 @@ bool CFGAS_FontMgr::VerifyUnicode(CFX_FontDescriptor* pDesc,
}
bool CFGAS_FontMgr::VerifyUnicode(const CFX_RetainPtr<CFGAS_GEFont>& pFont,
- FX_WCHAR wcUnicode) {
+ wchar_t wcUnicode) {
if (!pFont)
return false;
@@ -878,7 +878,7 @@ void CFGAS_FontMgr::MatchFonts(
uint16_t wCodePage,
uint32_t dwFontStyles,
const CFX_WideString& FontName,
- FX_WCHAR wcUnicode) {
+ wchar_t wcUnicode) {
pMatchedFonts->clear();
for (const auto& pFont : m_InstalledFonts) {
int32_t nPenalty =
@@ -896,7 +896,7 @@ int32_t CFGAS_FontMgr::CalcPenalty(CFX_FontDescriptor* pInstalled,
uint16_t wCodePage,
uint32_t dwFontStyles,
const CFX_WideString& FontName,
- FX_WCHAR wcUnicode) {
+ wchar_t wcUnicode) {
int32_t nPenalty = 30000;
if (FontName.GetLength() != 0) {
if (FontName != pInstalled->m_wsFaceName) {
@@ -1077,14 +1077,14 @@ void CFGAS_FontMgr::GetNames(const uint8_t* name_table,
wsFamily.clear();
if (nPlatformID != 1) {
for (uint16_t k = 0; k < nNameLength / 2; k++) {
- FX_WCHAR wcTemp = GetUInt16(lpStr + nNameOffset + k * 2);
+ wchar_t wcTemp = GetUInt16(lpStr + nNameOffset + k * 2);
wsFamily += wcTemp;
}
Names.push_back(wsFamily);
continue;
}
for (uint16_t k = 0; k < nNameLength; k++) {
- FX_WCHAR wcTemp = GetUInt8(lpStr + nNameOffset + k);
+ wchar_t wcTemp = GetUInt8(lpStr + nNameOffset + k);
wsFamily += wcTemp;
}
Names.push_back(wsFamily);
diff --git a/xfa/fgas/font/cfgas_fontmgr.h b/xfa/fgas/font/cfgas_fontmgr.h
index 23ab523e78..63a8d3b146 100644
--- a/xfa/fgas/font/cfgas_fontmgr.h
+++ b/xfa/fgas/font/cfgas_fontmgr.h
@@ -40,11 +40,11 @@ class CFGAS_GEFont;
#define FX_FONTMATCHPARA_MatchStyle 0x01
struct FX_FONTMATCHPARAMS {
- const FX_WCHAR* pwsFamily;
+ const wchar_t* pwsFamily;
uint32_t dwFontStyles;
uint32_t dwUSB;
uint32_t dwMatchFlags;
- FX_WCHAR wUnicode;
+ wchar_t wUnicode;
uint16_t wCodePage;
};
@@ -61,7 +61,7 @@ inline bool operator==(const FX_FONTSIGNATURE& left,
}
struct FX_FONTDESCRIPTOR {
- FX_WCHAR wsFontFace[32];
+ wchar_t wsFontFace[32];
uint32_t dwFontStyles;
uint8_t uCharSet;
FX_FONTSIGNATURE FontSignature;
@@ -76,8 +76,8 @@ inline bool operator==(const FX_FONTDESCRIPTOR& left,
}
typedef void (*FX_LPEnumAllFonts)(std::deque<FX_FONTDESCRIPTOR>* fonts,
- const FX_WCHAR* pwsFaceName,
- FX_WCHAR wUnicode);
+ const wchar_t* pwsFaceName,
+ wchar_t wUnicode);
FX_LPEnumAllFonts FX_GetDefFontEnumerator();
@@ -90,11 +90,11 @@ class CFGAS_FontMgr {
CFX_RetainPtr<CFGAS_GEFont> GetFontByCodePage(uint16_t wCodePage,
uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily);
- CFX_RetainPtr<CFGAS_GEFont> GetFontByUnicode(FX_WCHAR wUnicode,
+ const wchar_t* pszFontFamily);
+ CFX_RetainPtr<CFGAS_GEFont> GetFontByUnicode(wchar_t wUnicode,
uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily);
- CFX_RetainPtr<CFGAS_GEFont> LoadFont(const FX_WCHAR* pszFontFamily,
+ const wchar_t* pszFontFamily);
+ CFX_RetainPtr<CFGAS_GEFont> LoadFont(const wchar_t* pszFontFamily,
uint32_t dwFontStyles,
uint16_t wCodePage);
void RemoveFont(const CFX_RetainPtr<CFGAS_GEFont>& pFont);
@@ -106,12 +106,12 @@ class CFGAS_FontMgr {
uint16_t wCodePage);
void RemoveFont(std::map<uint32_t, CFX_RetainPtr<CFGAS_GEFont>>* pFontMap,
const CFX_RetainPtr<CFGAS_GEFont>& pFont);
- const FX_FONTDESCRIPTOR* FindFont(const FX_WCHAR* pszFontFamily,
+ const FX_FONTDESCRIPTOR* FindFont(const wchar_t* pszFontFamily,
uint32_t dwFontStyles,
uint32_t dwMatchFlags,
uint16_t wCodePage,
uint32_t dwUSB = 999,
- FX_WCHAR wUnicode = 0);
+ wchar_t wUnicode = 0);
FX_LPEnumAllFonts m_pEnumerator;
std::deque<FX_FONTDESCRIPTOR> m_FontFaces;
@@ -190,11 +190,11 @@ class CFGAS_FontMgr {
CFX_RetainPtr<CFGAS_GEFont> GetFontByCodePage(uint16_t wCodePage,
uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily);
- CFX_RetainPtr<CFGAS_GEFont> GetFontByUnicode(FX_WCHAR wUnicode,
+ const wchar_t* pszFontFamily);
+ CFX_RetainPtr<CFGAS_GEFont> GetFontByUnicode(wchar_t wUnicode,
uint32_t dwFontStyles,
- const FX_WCHAR* pszFontFamily);
- CFX_RetainPtr<CFGAS_GEFont> LoadFont(const FX_WCHAR* pszFontFamily,
+ const wchar_t* pszFontFamily);
+ CFX_RetainPtr<CFGAS_GEFont> LoadFont(const wchar_t* pszFontFamily,
uint32_t dwFontStyles,
uint16_t wCodePage);
void RemoveFont(const CFX_RetainPtr<CFGAS_GEFont>& pFont);
@@ -210,20 +210,20 @@ class CFGAS_FontMgr {
std::vector<uint16_t> GetCharsets(FXFT_Face pFace) const;
void GetUSBCSB(FXFT_Face pFace, uint32_t* USB, uint32_t* CSB);
uint32_t GetFlags(FXFT_Face pFace);
- bool VerifyUnicode(CFX_FontDescriptor* pDesc, FX_WCHAR wcUnicode);
+ bool VerifyUnicode(CFX_FontDescriptor* pDesc, wchar_t wcUnicode);
bool VerifyUnicode(const CFX_RetainPtr<CFGAS_GEFont>& pFont,
- FX_WCHAR wcUnicode);
+ wchar_t wcUnicode);
int32_t IsPartName(const CFX_WideString& Name1, const CFX_WideString& Name2);
void MatchFonts(std::vector<CFX_FontDescriptorInfo>* MatchedFonts,
uint16_t wCodePage,
uint32_t dwFontStyles,
const CFX_WideString& FontName,
- FX_WCHAR wcUnicode = 0xFFFE);
+ wchar_t wcUnicode = 0xFFFE);
int32_t CalcPenalty(CFX_FontDescriptor* pInstalled,
uint16_t wCodePage,
uint32_t dwFontStyles,
const CFX_WideString& FontName,
- FX_WCHAR wcUnicode = 0xFFFE);
+ wchar_t wcUnicode = 0xFFFE);
CFX_RetainPtr<CFGAS_GEFont> LoadFont(const CFX_WideString& wsFaceName,
int32_t iFaceIndex,
int32_t* pFaceCount);
@@ -243,7 +243,7 @@ class CFGAS_FontMgr {
std::map<uint32_t, std::vector<CFX_RetainPtr<CFGAS_GEFont>>> m_Hash2Fonts;
std::map<CFX_RetainPtr<CFGAS_GEFont>, CFX_RetainPtr<IFX_SeekableReadStream>>
m_IFXFont2FileRead;
- std::set<FX_WCHAR> m_FailedUnicodesSet;
+ std::set<wchar_t> m_FailedUnicodesSet;
};
#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
diff --git a/xfa/fgas/font/cfgas_gefont.cpp b/xfa/fgas/font/cfgas_gefont.cpp
index 2d5a927cde..769ce36417 100644
--- a/xfa/fgas/font/cfgas_gefont.cpp
+++ b/xfa/fgas/font/cfgas_gefont.cpp
@@ -18,11 +18,10 @@
#include "xfa/fxfa/xfa_fontmgr.h"
// static
-CFX_RetainPtr<CFGAS_GEFont> CFGAS_GEFont::LoadFont(
- const FX_WCHAR* pszFontFamily,
- uint32_t dwFontStyles,
- uint16_t wCodePage,
- CFGAS_FontMgr* pFontMgr) {
+CFX_RetainPtr<CFGAS_GEFont> CFGAS_GEFont::LoadFont(const wchar_t* pszFontFamily,
+ uint32_t dwFontStyles,
+ uint16_t wCodePage,
+ CFGAS_FontMgr* pFontMgr) {
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
if (!pFontMgr)
return nullptr;
@@ -123,7 +122,7 @@ CFGAS_GEFont::~CFGAS_GEFont() {
}
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
-bool CFGAS_GEFont::LoadFontInternal(const FX_WCHAR* pszFontFamily,
+bool CFGAS_GEFont::LoadFontInternal(const wchar_t* pszFontFamily,
uint32_t dwFontStyles,
uint16_t wCodePage) {
if (m_pFont)
@@ -259,13 +258,13 @@ uint32_t CFGAS_GEFont::GetFontStyles() const {
return dwStyles;
}
-bool CFGAS_GEFont::GetCharWidth(FX_WCHAR wUnicode,
+bool CFGAS_GEFont::GetCharWidth(wchar_t wUnicode,
int32_t& iWidth,
bool bCharCode) {
return GetCharWidthInternal(wUnicode, iWidth, true, bCharCode);
}
-bool CFGAS_GEFont::GetCharWidthInternal(FX_WCHAR wUnicode,
+bool CFGAS_GEFont::GetCharWidthInternal(wchar_t wUnicode,
int32_t& iWidth,
bool bRecursive,
bool bCharCode) {
@@ -299,13 +298,13 @@ bool CFGAS_GEFont::GetCharWidthInternal(FX_WCHAR wUnicode,
return iWidth > 0;
}
-bool CFGAS_GEFont::GetCharBBox(FX_WCHAR wUnicode,
+bool CFGAS_GEFont::GetCharBBox(wchar_t wUnicode,
CFX_Rect* bbox,
bool bCharCode) {
return GetCharBBoxInternal(wUnicode, bbox, true, bCharCode);
}
-bool CFGAS_GEFont::GetCharBBoxInternal(FX_WCHAR wUnicode,
+bool CFGAS_GEFont::GetCharBBoxInternal(wchar_t wUnicode,
CFX_Rect* bbox,
bool bRecursive,
bool bCharCode) {
@@ -345,11 +344,11 @@ bool CFGAS_GEFont::GetBBox(CFX_Rect* bbox) {
return true;
}
-int32_t CFGAS_GEFont::GetGlyphIndex(FX_WCHAR wUnicode, bool bCharCode) {
+int32_t CFGAS_GEFont::GetGlyphIndex(wchar_t wUnicode, bool bCharCode) {
return GetGlyphIndex(wUnicode, true, nullptr, bCharCode);
}
-int32_t CFGAS_GEFont::GetGlyphIndex(FX_WCHAR wUnicode,
+int32_t CFGAS_GEFont::GetGlyphIndex(wchar_t wUnicode,
bool bRecursive,
CFX_RetainPtr<CFGAS_GEFont>* ppFont,
bool bCharCode) {
diff --git a/xfa/fgas/font/cfgas_gefont.h b/xfa/fgas/font/cfgas_gefont.h
index 0a8e7bad76..b460cee496 100644
--- a/xfa/fgas/font/cfgas_gefont.h
+++ b/xfa/fgas/font/cfgas_gefont.h
@@ -28,7 +28,7 @@ class CFGAS_GEFont : public CFX_Retainable {
template <typename T, typename... Args>
friend CFX_RetainPtr<T> pdfium::MakeRetain(Args&&... args);
- static CFX_RetainPtr<CFGAS_GEFont> LoadFont(const FX_WCHAR* pszFontFamily,
+ static CFX_RetainPtr<CFGAS_GEFont> LoadFont(const wchar_t* pszFontFamily,
uint32_t dwFontStyles,
uint16_t wCodePage,
CFGAS_FontMgr* pFontMgr);
@@ -50,11 +50,11 @@ class CFGAS_GEFont : public CFX_Retainable {
CFX_RetainPtr<CFGAS_GEFont> Derive(uint32_t dwFontStyles,
uint16_t wCodePage = 0);
uint32_t GetFontStyles() const;
- bool GetCharWidth(FX_WCHAR wUnicode, int32_t& iWidth, bool bCharCode);
- int32_t GetGlyphIndex(FX_WCHAR wUnicode, bool bCharCode = false);
+ bool GetCharWidth(wchar_t wUnicode, int32_t& iWidth, bool bCharCode);
+ int32_t GetGlyphIndex(wchar_t wUnicode, bool bCharCode = false);
int32_t GetAscent() const;
int32_t GetDescent() const;
- bool GetCharBBox(FX_WCHAR wUnicode, CFX_Rect* bbox, bool bCharCode = false);
+ bool GetCharBBox(wchar_t wUnicode, CFX_Rect* bbox, bool bCharCode = false);
bool GetBBox(CFX_Rect* bbox);
CFX_RetainPtr<CFGAS_GEFont> GetSubstFont(int32_t iGlyphIndex);
CFX_Font* GetDevFont() const { return m_pFont; }
@@ -72,7 +72,7 @@ class CFGAS_GEFont : public CFX_Retainable {
~CFGAS_GEFont() override;
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
- bool LoadFontInternal(const FX_WCHAR* pszFontFamily,
+ bool LoadFontInternal(const wchar_t* pszFontFamily,
uint32_t dwFontStyles,
uint16_t wCodePage);
bool LoadFontInternal(const uint8_t* pBuffer, int32_t length);
@@ -82,15 +82,15 @@ class CFGAS_GEFont : public CFX_Retainable {
bool LoadFontInternal(CFX_Font* pExternalFont);
bool LoadFontInternal(std::unique_ptr<CFX_Font> pInternalFont);
bool InitFont();
- bool GetCharBBoxInternal(FX_WCHAR wUnicode,
+ bool GetCharBBoxInternal(wchar_t wUnicode,
CFX_Rect* bbox,
bool bRecursive,
bool bCharCode = false);
- bool GetCharWidthInternal(FX_WCHAR wUnicode,
+ bool GetCharWidthInternal(wchar_t wUnicode,
int32_t& iWidth,
bool bRecursive,
bool bCharCode);
- int32_t GetGlyphIndex(FX_WCHAR wUnicode,
+ int32_t GetGlyphIndex(wchar_t wUnicode,
bool bRecursive,
CFX_RetainPtr<CFGAS_GEFont>* ppFont,
bool bCharCode = false);
@@ -107,11 +107,11 @@ class CFGAS_GEFont : public CFX_Retainable {
CFX_RetainPtr<IFGAS_Stream> m_pStream;
CFX_RetainPtr<IFX_SeekableReadStream> m_pFileRead;
std::unique_ptr<CFX_UnicodeEncoding> m_pFontEncoding;
- std::map<FX_WCHAR, int32_t> m_CharWidthMap;
- std::map<FX_WCHAR, CFX_Rect> m_BBoxMap;
+ std::map<wchar_t, int32_t> m_CharWidthMap;
+ std::map<wchar_t, CFX_Rect> m_BBoxMap;
CXFA_PDFFontMgr* m_pProvider; // not owned.
std::vector<CFX_RetainPtr<CFGAS_GEFont>> m_SubstFonts;
- std::map<FX_WCHAR, CFX_RetainPtr<CFGAS_GEFont>> m_FontMapper;
+ std::map<wchar_t, CFX_RetainPtr<CFGAS_GEFont>> m_FontMapper;
};
#endif // XFA_FGAS_FONT_CFGAS_GEFONT_H_
diff --git a/xfa/fgas/font/fgas_fontutils.cpp b/xfa/fgas/font/fgas_fontutils.cpp
index e74056b53e..e775ebdf0c 100644
--- a/xfa/fgas/font/fgas_fontutils.cpp
+++ b/xfa/fgas/font/fgas_fontutils.cpp
@@ -31,7 +31,7 @@ uint32_t FGAS_GetFontHashCode(uint16_t wCodePage, uint32_t dwFontStyles) {
}
return dwHash;
}
-uint32_t FGAS_GetFontFamilyHash(const FX_WCHAR* pszFontFamily,
+uint32_t FGAS_GetFontFamilyHash(const wchar_t* pszFontFamily,
uint32_t dwFontStyles,
uint16_t wCodePage) {
CFX_WideString wsFont(pszFontFamily);
@@ -134,7 +134,7 @@ static const FGAS_FONTUSB g_FXGdiFontUSBTable[] = {
{0xFFA0, 0xFFEF, 68, 0xFFFF},
};
-const FGAS_FONTUSB* FGAS_GetUnicodeBitField(FX_WCHAR wUnicode) {
+const FGAS_FONTUSB* FGAS_GetUnicodeBitField(wchar_t wUnicode) {
int32_t iEnd = sizeof(g_FXGdiFontUSBTable) / sizeof(FGAS_FONTUSB) - 1;
ASSERT(iEnd >= 0);
int32_t iStart = 0, iMid;
diff --git a/xfa/fgas/font/fgas_fontutils.h b/xfa/fgas/font/fgas_fontutils.h
index d7055ced9b..d92b469e7b 100644
--- a/xfa/fgas/font/fgas_fontutils.h
+++ b/xfa/fgas/font/fgas_fontutils.h
@@ -17,9 +17,9 @@ struct FGAS_FONTUSB {
};
uint32_t FGAS_GetFontHashCode(uint16_t wCodePage, uint32_t dwFontStyles);
-uint32_t FGAS_GetFontFamilyHash(const FX_WCHAR* pszFontFamily,
+uint32_t FGAS_GetFontFamilyHash(const wchar_t* pszFontFamily,
uint32_t dwFontStyles,
uint16_t wCodePage);
-const FGAS_FONTUSB* FGAS_GetUnicodeBitField(FX_WCHAR wUnicode);
+const FGAS_FONTUSB* FGAS_GetUnicodeBitField(wchar_t wUnicode);
#endif // XFA_FGAS_FONT_FGAS_FONTUTILS_H_
diff --git a/xfa/fgas/layout/cfx_breakline.cpp b/xfa/fgas/layout/cfx_breakline.cpp
index 4e9d8ad5ae..65860e4013 100644
--- a/xfa/fgas/layout/cfx_breakline.cpp
+++ b/xfa/fgas/layout/cfx_breakline.cpp
@@ -37,9 +37,9 @@ const CFX_BreakPiece* CFX_BreakLine::GetPiece(int32_t index) const {
void CFX_BreakLine::GetString(CFX_WideString& wsStr) const {
int32_t iCount = pdfium::CollectionSize<int32_t>(m_LineChars);
- FX_WCHAR* pBuf = wsStr.GetBuffer(iCount);
+ wchar_t* pBuf = wsStr.GetBuffer(iCount);
for (int32_t i = 0; i < iCount; i++)
- *pBuf++ = static_cast<FX_WCHAR>(m_LineChars[i].m_wCharCode);
+ *pBuf++ = static_cast<wchar_t>(m_LineChars[i].m_wCharCode);
wsStr.ReleaseBuffer(iCount);
}
diff --git a/xfa/fgas/layout/cfx_breakpiece.cpp b/xfa/fgas/layout/cfx_breakpiece.cpp
index d31c53f964..dd8b451790 100644
--- a/xfa/fgas/layout/cfx_breakpiece.cpp
+++ b/xfa/fgas/layout/cfx_breakpiece.cpp
@@ -40,7 +40,7 @@ CFX_WideString CFX_BreakPiece::GetString() const {
CFX_WideString ret;
ret.Reserve(m_iChars);
for (int32_t i = m_iStartChar; i < m_iStartChar + m_iChars; i++)
- ret += static_cast<FX_WCHAR>((*m_pChars)[i].m_wCharCode);
+ ret += static_cast<wchar_t>((*m_pChars)[i].m_wCharCode);
return ret;
}
diff --git a/xfa/fgas/layout/fgas_rtfbreak.cpp b/xfa/fgas/layout/fgas_rtfbreak.cpp
index 85edaf7f99..1e0cc9c25e 100644
--- a/xfa/fgas/layout/fgas_rtfbreak.cpp
+++ b/xfa/fgas/layout/fgas_rtfbreak.cpp
@@ -190,7 +190,7 @@ bool CFX_RTFBreak::GetPositionedTab(int32_t* iTabPos) const {
return true;
}
-CFX_BreakType CFX_RTFBreak::AppendChar(FX_WCHAR wch) {
+CFX_BreakType CFX_RTFBreak::AppendChar(wchar_t wch) {
ASSERT(m_pFont && m_pCurLine);
uint32_t dwProps = kTextLayoutCodeProperties[static_cast<uint16_t>(wch)];
@@ -313,7 +313,7 @@ CFX_BreakType CFX_RTFBreak::AppendChar_Control(CFX_Char* pCurChar) {
CFX_BreakType CFX_RTFBreak::AppendChar_Arabic(CFX_Char* pCurChar) {
CFX_Char* pLastChar = nullptr;
int32_t iCharWidth = 0;
- FX_WCHAR wForm;
+ wchar_t wForm;
bool bAlef = false;
if (m_eCharType >= FX_CHARTYPE_ArabicAlef &&
m_eCharType <= FX_CHARTYPE_ArabicDistortion) {
@@ -357,7 +357,7 @@ CFX_BreakType CFX_RTFBreak::AppendChar_Arabic(CFX_Char* pCurChar) {
CFX_BreakType CFX_RTFBreak::AppendChar_Others(CFX_Char* pCurChar) {
FX_CHARTYPE chartype = pCurChar->GetCharType();
- FX_WCHAR wForm = pCurChar->m_wCharCode;
+ wchar_t wForm = pCurChar->m_wCharCode;
int32_t iCharWidth = 0;
if (!m_pFont->GetCharWidth(wForm, iCharWidth, false))
iCharWidth = m_iDefChar;
@@ -842,8 +842,8 @@ int32_t CFX_RTFBreak::GetDisplayPos(const FX_RTFTEXTOBJ* pText,
FX_FLOAT fFontHeight = fFontSize;
FX_FLOAT fAscent = fFontHeight * static_cast<FX_FLOAT>(iAscent) /
static_cast<FX_FLOAT>(iMaxHeight);
- FX_WCHAR wPrev = 0xFEFF;
- FX_WCHAR wNext;
+ wchar_t wPrev = 0xFEFF;
+ wchar_t wNext;
FX_FLOAT fX = rtText.left;
int32_t iHorScale = pText->iHorizontalScale;
int32_t iVerScale = pText->iVerticalScale;
@@ -853,7 +853,7 @@ int32_t CFX_RTFBreak::GetDisplayPos(const FX_RTFTEXTOBJ* pText,
FX_FLOAT fY = rtText.top + fAscent;
int32_t iCount = 0;
for (int32_t i = 0; i < pText->iLength; ++i) {
- FX_WCHAR wch = pText->pStr[i];
+ wchar_t wch = pText->pStr[i];
int32_t iWidth = pText->pWidths[i];
uint32_t dwProps = FX_GetUnicodeProperties(wch);
uint32_t dwCharType = (dwProps & FX_CHARTYPEBITSMASK);
@@ -871,7 +871,7 @@ int32_t CFX_RTFBreak::GetDisplayPos(const FX_RTFTEXTOBJ* pText,
if (pCharPos) {
iCharWidth /= iFontSize;
- FX_WCHAR wForm = wch;
+ wchar_t wForm = wch;
if (dwCharType >= FX_CHARTYPE_ArabicAlef) {
if (i + 1 < pText->iLength) {
wNext = pText->pStr[i + 1];
diff --git a/xfa/fgas/layout/fgas_rtfbreak.h b/xfa/fgas/layout/fgas_rtfbreak.h
index b3def63251..339d2f4bcd 100644
--- a/xfa/fgas/layout/fgas_rtfbreak.h
+++ b/xfa/fgas/layout/fgas_rtfbreak.h
@@ -36,7 +36,7 @@ struct FX_RTFTEXTOBJ {
std::vector<int32_t> pWidths;
CFX_RetainPtr<CFGAS_GEFont> pFont;
const CFX_RectF* pRect;
- FX_WCHAR wLineBreakChar;
+ wchar_t wLineBreakChar;
FX_FLOAT fFontSize;
int32_t iLength;
int32_t iBidiLevel;
@@ -74,7 +74,7 @@ class CFX_RTFBreak {
FXTEXT_CHARPOS* pCharPos,
bool bCharCode) const;
- CFX_BreakType AppendChar(FX_WCHAR wch);
+ CFX_BreakType AppendChar(wchar_t wch);
CFX_BreakLine* GetCurrentLineForTesting() const { return m_pCurLine; }
@@ -116,9 +116,9 @@ class CFX_RTFBreak {
int32_t m_iFontSize;
int32_t m_iTabWidth;
std::vector<int32_t> m_PositionedTabs;
- FX_WCHAR m_wDefChar;
+ wchar_t m_wDefChar;
int32_t m_iDefChar;
- FX_WCHAR m_wLineBreakChar;
+ wchar_t m_wLineBreakChar;
int32_t m_iHorizontalScale;
int32_t m_iVerticalScale;
int32_t m_iCharSpace;
diff --git a/xfa/fgas/layout/fgas_textbreak.cpp b/xfa/fgas/layout/fgas_textbreak.cpp
index 9343f94cc6..eabe381621 100644
--- a/xfa/fgas/layout/fgas_textbreak.cpp
+++ b/xfa/fgas/layout/fgas_textbreak.cpp
@@ -29,7 +29,7 @@ const FX_TxtBreak_LPFAppendChar g_FX_TxtBreak_lpfAppendChar[16] = {
&CFX_TxtBreak::AppendChar_Others, &CFX_TxtBreak::AppendChar_Others,
};
-bool IsCtrlCode(FX_WCHAR ch) {
+bool IsCtrlCode(wchar_t ch) {
uint32_t dwRet = (FX_GetUnicodeProperties(ch) & FX_CHARTYPEBITSMASK);
return dwRet == FX_CHARTYPE_Tab || dwRet == FX_CHARTYPE_Control;
}
@@ -112,7 +112,7 @@ void CFX_TxtBreak::SetTabWidth(FX_FLOAT fTabWidth, bool bEquidistant) {
m_bEquidistant = bEquidistant;
}
-void CFX_TxtBreak::SetDefaultChar(FX_WCHAR wch) {
+void CFX_TxtBreak::SetDefaultChar(wchar_t wch) {
m_wDefChar = wch;
m_iDefChar = 0;
if (m_wDefChar == 0xFEFF || !m_pFont)
@@ -125,7 +125,7 @@ void CFX_TxtBreak::SetDefaultChar(FX_WCHAR wch) {
m_iDefChar *= m_iFontSize;
}
-void CFX_TxtBreak::SetParagraphBreakChar(FX_WCHAR wch) {
+void CFX_TxtBreak::SetParagraphBreakChar(wchar_t wch) {
if (wch != L'\r' && wch != L'\n')
return;
m_wParagBreakChar = wch;
@@ -208,8 +208,8 @@ void CFX_TxtBreak::AppendChar_PageLoad(CFX_Char* pCurChar, uint32_t dwProps) {
}
CFX_BreakType CFX_TxtBreak::AppendChar_Combination(CFX_Char* pCurChar) {
- FX_WCHAR wch = pCurChar->m_wCharCode;
- FX_WCHAR wForm;
+ wchar_t wch = pCurChar->m_wCharCode;
+ wchar_t wForm;
int32_t iCharWidth = 0;
pCurChar->m_iCharWidth = -1;
if (m_bCombText) {
@@ -221,7 +221,7 @@ CFX_BreakType CFX_TxtBreak::AppendChar_Combination(CFX_Char* pCurChar) {
(pLastChar->m_dwCharStyles & FX_TXTCHARSTYLE_ArabicShadda) == 0) {
bool bShadda = false;
if (wch == 0x0651) {
- FX_WCHAR wLast = pLastChar->m_wCharCode;
+ wchar_t wLast = pLastChar->m_wCharCode;
if (wLast >= 0x064C && wLast <= 0x0650) {
wForm = FX_GetArabicFromShaddaTable(wLast);
bShadda = true;
@@ -257,7 +257,7 @@ CFX_BreakType CFX_TxtBreak::AppendChar_Control(CFX_Char* pCurChar) {
m_eCharType = FX_CHARTYPE_Control;
CFX_BreakType dwRet = CFX_BreakType::None;
if (!m_bSingleLine) {
- FX_WCHAR wch = pCurChar->m_wCharCode;
+ wchar_t wch = pCurChar->m_wCharCode;
switch (wch) {
case L'\v':
case 0x2028:
@@ -283,7 +283,7 @@ CFX_BreakType CFX_TxtBreak::AppendChar_Control(CFX_Char* pCurChar) {
CFX_BreakType CFX_TxtBreak::AppendChar_Arabic(CFX_Char* pCurChar) {
FX_CHARTYPE chartype = pCurChar->GetCharType();
int32_t& iLineWidth = m_pCurLine->m_iWidth;
- FX_WCHAR wForm;
+ wchar_t wForm;
int32_t iCharWidth = 0;
CFX_Char* pLastChar = nullptr;
bool bAlef = false;
@@ -339,8 +339,8 @@ CFX_BreakType CFX_TxtBreak::AppendChar_Others(CFX_Char* pCurChar) {
int32_t& iLineWidth = m_pCurLine->m_iWidth;
int32_t iCharWidth = 0;
m_eCharType = chartype;
- FX_WCHAR wch = pCurChar->m_wCharCode;
- FX_WCHAR wForm = wch;
+ wchar_t wch = pCurChar->m_wCharCode;
+ wchar_t wForm = wch;
if (m_bCombText) {
iCharWidth = m_iCombWidth;
@@ -363,7 +363,7 @@ CFX_BreakType CFX_TxtBreak::AppendChar_Others(CFX_Char* pCurChar) {
return CFX_BreakType::None;
}
-CFX_BreakType CFX_TxtBreak::AppendChar(FX_WCHAR wch) {
+CFX_BreakType CFX_TxtBreak::AppendChar(wchar_t wch) {
uint32_t dwProps = kTextLayoutCodeProperties[static_cast<uint16_t>(wch)];
FX_CHARTYPE chartype = GetCharTypeFromProp(dwProps);
m_pCurLine->m_LineChars.emplace_back();
@@ -834,7 +834,7 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
CFDE_TxtEdtPage* pAccess = pTxtRun->pAccess;
const FDE_TEXTEDITPIECE* pIdentity = pTxtRun->pIdentity;
- const FX_WCHAR* pStr = pTxtRun->wsStr.c_str();
+ const wchar_t* pStr = pTxtRun->wsStr.c_str();
int32_t* pWidths = pTxtRun->pWidths;
int32_t iLength = pTxtRun->iLength - 1;
CFX_RetainPtr<CFGAS_GEFont> pFont = pTxtRun->pFont;
@@ -866,15 +866,15 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
int32_t iCount = 0;
int32_t iNext = 0;
- FX_WCHAR wPrev = 0xFEFF;
- FX_WCHAR wNext = 0xFEFF;
- FX_WCHAR wForm = 0xFEFF;
- FX_WCHAR wLast = 0xFEFF;
+ wchar_t wPrev = 0xFEFF;
+ wchar_t wNext = 0xFEFF;
+ wchar_t wForm = 0xFEFF;
+ wchar_t wLast = 0xFEFF;
bool bShadda = false;
bool bLam = false;
for (int32_t i = 0; i <= iLength; i++) {
int32_t iWidth;
- FX_WCHAR wch;
+ wchar_t wch;
if (pAccess) {
wch = pAccess->GetChar(pIdentity, i);
iWidth = pAccess->GetWidth(pIdentity, i);
@@ -1006,12 +1006,12 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
}
for (int32_t j = 0; j < iForms; j++) {
- wForm = (FX_WCHAR)formChars[j].wForm;
+ wForm = (wchar_t)formChars[j].wForm;
iCharWidth = formChars[j].iWidth;
if (j > 0) {
chartype = FX_CHARTYPE_Combination;
wch = wForm;
- wLast = (FX_WCHAR)formChars[j - 1].wForm;
+ wLast = (wchar_t)formChars[j - 1].wForm;
}
if (!bEmptyChar || (bEmptyChar && !bSkipSpace)) {
pCharPos->m_GlyphIndex =
@@ -1085,7 +1085,7 @@ int32_t CFX_TxtBreak::GetDisplayPos(const FX_TXTRUN* pTxtRun,
}
}
if (iWidth > 0)
- wPrev = static_cast<FX_WCHAR>(formChars[0].wch);
+ wPrev = static_cast<wchar_t>(formChars[0].wch);
wLast = wch;
}
return iCount;
@@ -1098,7 +1098,7 @@ std::vector<CFX_RectF> CFX_TxtBreak::GetCharRects(const FX_TXTRUN* pTxtRun,
CFDE_TxtEdtPage* pAccess = pTxtRun->pAccess;
const FDE_TEXTEDITPIECE* pIdentity = pTxtRun->pIdentity;
- const FX_WCHAR* pStr = pTxtRun->wsStr.c_str();
+ const wchar_t* pStr = pTxtRun->wsStr.c_str();
int32_t* pWidths = pTxtRun->pWidths;
int32_t iLength = pTxtRun->iLength;
CFX_RectF rect(*pTxtRun->pRect);
@@ -1118,8 +1118,8 @@ std::vector<CFX_RectF> CFX_TxtBreak::GetCharRects(const FX_TXTRUN* pTxtRun,
bool bRTLPiece = !!(pTxtRun->dwCharStyles & FX_TXTCHARSTYLE_OddBidiLevel);
bool bSingleLine = !!(pTxtRun->dwStyles & FX_TXTLAYOUTSTYLE_SingleLine);
bool bCombText = !!(pTxtRun->dwStyles & FX_TXTLAYOUTSTYLE_CombText);
- FX_WCHAR wch;
- FX_WCHAR wLineBreakChar = pTxtRun->wLineBreakChar;
+ wchar_t wch;
+ wchar_t wLineBreakChar = pTxtRun->wLineBreakChar;
int32_t iCharSize;
FX_FLOAT fCharSize;
FX_FLOAT fStart = bRTLPiece ? rect.right() : rect.left;
diff --git a/xfa/fgas/layout/fgas_textbreak.h b/xfa/fgas/layout/fgas_textbreak.h
index 9aa576f380..fd864f1296 100644
--- a/xfa/fgas/layout/fgas_textbreak.h
+++ b/xfa/fgas/layout/fgas_textbreak.h
@@ -61,7 +61,7 @@ struct FX_TXTRUN {
int32_t iVerticalScale;
uint32_t dwCharStyles;
const CFX_RectF* pRect;
- FX_WCHAR wLineBreakChar;
+ wchar_t wLineBreakChar;
bool bSkipSpace;
};
@@ -76,8 +76,8 @@ class CFX_TxtBreak {
void SetFont(const CFX_RetainPtr<CFGAS_GEFont>& pFont);
void SetFontSize(FX_FLOAT fFontSize);
void SetTabWidth(FX_FLOAT fTabWidth, bool bEquidistant);
- void SetDefaultChar(FX_WCHAR wch);
- void SetParagraphBreakChar(FX_WCHAR wch);
+ void SetDefaultChar(wchar_t wch);
+ void SetParagraphBreakChar(wchar_t wch);
void SetLineBreakTolerance(FX_FLOAT fTolerance);
void SetHorizontalScale(int32_t iScale);
void SetCharSpace(FX_FLOAT fCharSpace);
@@ -95,7 +95,7 @@ class CFX_TxtBreak {
std::vector<CFX_RectF> GetCharRects(const FX_TXTRUN* pTxtRun,
bool bCharBBox = false) const;
void AppendChar_PageLoad(CFX_Char* pCurChar, uint32_t dwProps);
- CFX_BreakType AppendChar(FX_WCHAR wch);
+ CFX_BreakType AppendChar(wchar_t wch);
CFX_BreakType AppendChar_Combination(CFX_Char* pCurChar);
CFX_BreakType AppendChar_Tab(CFX_Char* pCurChar);
CFX_BreakType AppendChar_Control(CFX_Char* pCurChar);
@@ -133,8 +133,8 @@ class CFX_TxtBreak {
CFX_RetainPtr<CFGAS_GEFont> m_pFont;
int32_t m_iFontSize;
int32_t m_iTabWidth;
- FX_WCHAR m_wDefChar;
- FX_WCHAR m_wParagBreakChar;
+ wchar_t m_wDefChar;
+ wchar_t m_wParagBreakChar;
int32_t m_iDefChar;
int32_t m_iAlignment;
uint32_t m_dwContextCharStyles;
diff --git a/xfa/fgas/localization/fgas_locale.cpp b/xfa/fgas/localization/fgas_locale.cpp
index 7d538411f5..430215662e 100644
--- a/xfa/fgas/localization/fgas_locale.cpp
+++ b/xfa/fgas/localization/fgas_locale.cpp
@@ -23,7 +23,7 @@
struct FX_LOCALESUBCATEGORYINFO {
uint32_t uHash;
- const FX_WCHAR* pName;
+ const wchar_t* pName;
int32_t eSubCategory;
};
@@ -59,11 +59,11 @@ static const FX_LOCALETIMEZONEINFO g_FXLocaleTimeZoneData[] = {
{FXBSTR_ID(0, 'P', 'D', 'T'), -7, 0}, {FXBSTR_ID(0, 'P', 'S', 'T'), -8, 0},
};
-static const FX_WCHAR gs_wsTimeSymbols[] = L"hHkKMSFAzZ";
-static const FX_WCHAR gs_wsDateSymbols[] = L"DJMEeGgYwW";
-static const FX_WCHAR gs_wsConstChars[] = L",-:/. ";
+static const wchar_t gs_wsTimeSymbols[] = L"hHkKMSFAzZ";
+static const wchar_t gs_wsDateSymbols[] = L"DJMEeGgYwW";
+static const wchar_t gs_wsConstChars[] = L",-:/. ";
-static int32_t FX_ParseTimeZone(const FX_WCHAR* pStr,
+static int32_t FX_ParseTimeZone(const wchar_t* pStr,
int32_t iLen,
FX_TIMEZONE& tz) {
tz.tzHour = 0;
@@ -122,7 +122,7 @@ static bool FX_WStringToNumeric(const CFX_WideString& wsValue,
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();
while (cc < len && FXSYS_iswspace(str[cc]))
cc++;
@@ -270,9 +270,9 @@ void CFX_FormatString::SplitFormatString(
const CFX_WideString& wsFormatString,
std::vector<CFX_WideString>& wsPatterns) {
int32_t iStrLen = wsFormatString.GetLength();
- const FX_WCHAR* pStr = wsFormatString.c_str();
- const FX_WCHAR* pToken = pStr;
- const FX_WCHAR* pEnd = pStr + iStrLen;
+ const wchar_t* pStr = wsFormatString.c_str();
+ const wchar_t* pToken = pStr;
+ const wchar_t* pEnd = pStr + iStrLen;
bool iQuote = false;
while (true) {
if (pStr >= pEnd) {
@@ -289,7 +289,7 @@ void CFX_FormatString::SplitFormatString(
}
}
-static CFX_WideString FX_GetLiteralText(const FX_WCHAR* pStrPattern,
+static CFX_WideString FX_GetLiteralText(const wchar_t* pStrPattern,
int32_t& iPattern,
int32_t iLenPattern) {
CFX_WideString wsOutput;
@@ -314,7 +314,7 @@ static CFX_WideString FX_GetLiteralText(const FX_WCHAR* pStrPattern,
iPattern += 2;
int32_t i = 0;
while (iPattern < iLenPattern && i++ < 4) {
- FX_WCHAR ch = pStrPattern[iPattern++];
+ wchar_t ch = pStrPattern[iPattern++];
if ((ch >= '0' && ch <= '9')) {
iKeyValue = iKeyValue * 16 + ch - '0';
} else if ((ch >= 'a' && ch <= 'f')) {
@@ -324,7 +324,7 @@ static CFX_WideString FX_GetLiteralText(const FX_WCHAR* pStrPattern,
}
}
if (iKeyValue != 0) {
- wsOutput += (FX_WCHAR)(iKeyValue & 0x0000FFFF);
+ wsOutput += (wchar_t)(iKeyValue & 0x0000FFFF);
}
continue;
}
@@ -332,7 +332,7 @@ static CFX_WideString FX_GetLiteralText(const FX_WCHAR* pStrPattern,
}
return wsOutput;
}
-static CFX_WideString FX_GetLiteralTextReverse(const FX_WCHAR* pStrPattern,
+static CFX_WideString FX_GetLiteralTextReverse(const wchar_t* pStrPattern,
int32_t& iPattern) {
CFX_WideString wsOutput;
if (pStrPattern[iPattern] != '\'') {
@@ -356,7 +356,7 @@ static CFX_WideString FX_GetLiteralTextReverse(const FX_WCHAR* pStrPattern,
int32_t iLen = wsOutput.GetLength();
int32_t i = 1;
for (; i < iLen && i < 5; i++) {
- FX_WCHAR ch = wsOutput[i];
+ wchar_t ch = wsOutput[i];
if ((ch >= '0' && ch <= '9')) {
iKeyValue = iKeyValue * 16 + ch - '0';
} else if ((ch >= 'a' && ch <= 'f')) {
@@ -367,7 +367,7 @@ static CFX_WideString FX_GetLiteralTextReverse(const FX_WCHAR* pStrPattern,
}
if (iKeyValue != 0) {
wsOutput.Delete(0, i);
- wsOutput = (FX_WCHAR)(iKeyValue & 0x0000FFFF) + wsOutput;
+ wsOutput = (wchar_t)(iKeyValue & 0x0000FFFF) + wsOutput;
}
continue;
}
@@ -380,7 +380,7 @@ FX_LOCALECATEGORY CFX_FormatString::GetCategory(
FX_LOCALECATEGORY eCategory = FX_LOCALECATEGORY_Unknown;
int32_t ccf = 0;
int32_t iLenf = wsPattern.GetLength();
- const FX_WCHAR* pStr = wsPattern.c_str();
+ const wchar_t* pStr = wsPattern.c_str();
bool bBraceOpen = false;
CFX_WideStringC wsConstChars(gs_wsConstChars);
while (ccf < iLenf) {
@@ -432,7 +432,7 @@ FX_LOCALECATEGORY CFX_FormatString::GetCategory(
}
return eCategory;
}
-static uint16_t FX_WStringToLCID(const FX_WCHAR* pstrLCID) {
+static uint16_t FX_WStringToLCID(const wchar_t* pstrLCID) {
if (!pstrLCID) {
return 0;
}
@@ -446,7 +446,7 @@ CFX_WideString CFX_FormatString::GetLocaleName(
const CFX_WideString& wsPattern) {
int32_t ccf = 0;
int32_t iLenf = wsPattern.GetLength();
- const FX_WCHAR* pStr = wsPattern.c_str();
+ const wchar_t* pStr = wsPattern.c_str();
while (ccf < iLenf) {
if (pStr[ccf] == '\'') {
FX_GetLiteralText(pStr, ccf, iLenf);
@@ -468,7 +468,7 @@ IFX_Locale* CFX_FormatString::GetTextFormat(const CFX_WideString& wsPattern,
IFX_Locale* pLocale = nullptr;
int32_t ccf = 0;
int32_t iLenf = wsPattern.GetLength();
- const FX_WCHAR* pStr = wsPattern.c_str();
+ const wchar_t* pStr = wsPattern.c_str();
bool bBrackOpen = false;
CFX_WideStringC wsConstChars(gs_wsConstChars);
while (ccf < iLenf) {
@@ -525,7 +525,7 @@ IFX_Locale* CFX_FormatString::GetNumericFormat(const CFX_WideString& wsPattern,
IFX_Locale* pLocale = nullptr;
int32_t ccf = 0;
int32_t iLenf = wsPattern.GetLength();
- const FX_WCHAR* pStr = wsPattern.c_str();
+ const wchar_t* pStr = wsPattern.c_str();
bool bFindDot = false;
bool bBrackOpen = false;
CFX_WideStringC wsConstChars(gs_wsConstChars);
@@ -625,7 +625,7 @@ static bool FX_GetNumericDotIndex(const CFX_WideString& wsNum,
int32_t& iDotIndex) {
int32_t ccf = 0;
int32_t iLenf = wsNum.GetLength();
- const FX_WCHAR* pStr = wsNum.c_str();
+ const wchar_t* pStr = wsNum.c_str();
int32_t iLenDot = wsDotSymbol.GetLength();
while (ccf < iLenf) {
if (pStr[ccf] == '\'') {
@@ -657,9 +657,9 @@ bool CFX_FormatString::ParseText(const CFX_WideString& wsSrcText,
return false;
}
int32_t iText = 0, iPattern = 0;
- const FX_WCHAR* pStrText = wsSrcText.c_str();
+ const wchar_t* pStrText = wsSrcText.c_str();
int32_t iLenText = wsSrcText.GetLength();
- const FX_WCHAR* pStrPattern = wsTextFormat.c_str();
+ const wchar_t* pStrPattern = wsTextFormat.c_str();
int32_t iLenPattern = wsTextFormat.GetLength();
while (iPattern < iLenPattern && iText < iLenText) {
switch (pStrPattern[iPattern]) {
@@ -741,9 +741,9 @@ bool CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum,
pLocale->GetNumbericSymbol(FX_LOCALENUMSYMBOL_Minus, wsMinus);
int32_t iMinusLen = wsMinus.GetLength();
int cc = 0, ccf = 0;
- const FX_WCHAR* str = wsSrcNum.c_str();
+ const wchar_t* str = wsSrcNum.c_str();
int len = wsSrcNum.GetLength();
- const FX_WCHAR* strf = wsNumFormat.c_str();
+ const wchar_t* strf = wsNumFormat.c_str();
int lenf = wsNumFormat.GetLength();
double dbRetValue = 0;
double coeff = 1;
@@ -1449,9 +1449,9 @@ bool CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum,
pLocale->GetNumbericSymbol(FX_LOCALENUMSYMBOL_Minus, wsMinus);
int32_t iMinusLen = wsMinus.GetLength();
int cc = 0, ccf = 0;
- const FX_WCHAR* str = wsSrcNum.c_str();
+ const wchar_t* str = wsSrcNum.c_str();
int len = wsSrcNum.GetLength();
- const FX_WCHAR* strf = wsNumFormat.c_str();
+ const wchar_t* strf = wsNumFormat.c_str();
int lenf = wsNumFormat.GetLength();
bool bHavePercentSymbol = false;
bool bNeg = false;
@@ -1915,7 +1915,7 @@ FX_DATETIMETYPE CFX_FormatString::GetDateTimeFormat(
FX_LOCALECATEGORY eCategory = FX_LOCALECATEGORY_Unknown;
int32_t ccf = 0;
int32_t iLenf = wsPattern.GetLength();
- const FX_WCHAR* pStr = wsPattern.c_str();
+ const wchar_t* pStr = wsPattern.c_str();
int32_t iFindCategory = 0;
bool bBraceOpen = false;
CFX_WideStringC wsConstChars(gs_wsConstChars);
@@ -2052,9 +2052,9 @@ static bool FX_ParseLocaleDate(const CFX_WideString& wsDate,
int32_t month = 1;
int32_t day = 1;
int32_t ccf = 0;
- const FX_WCHAR* str = wsDate.c_str();
+ const wchar_t* str = wsDate.c_str();
int32_t len = wsDate.GetLength();
- const FX_WCHAR* strf = wsDatePattern.c_str();
+ const wchar_t* strf = wsDatePattern.c_str();
int32_t lenf = wsDatePattern.GetLength();
CFX_WideStringC wsDateSymbols(gs_wsDateSymbols);
while (cc < len && ccf < lenf) {
@@ -2076,7 +2076,7 @@ static bool FX_ParseLocaleDate(const CFX_WideString& wsDate,
continue;
}
uint32_t dwSymbolNum = 1;
- FX_WCHAR dwCharSymbol = strf[ccf++];
+ wchar_t dwCharSymbol = strf[ccf++];
while (ccf < lenf && strf[ccf] == dwCharSymbol) {
ccf++;
dwSymbolNum++;
@@ -2270,9 +2270,9 @@ static bool FX_ParseLocaleTime(const CFX_WideString& wsTime,
uint8_t second = 0;
uint16_t millisecond = 0;
int32_t ccf = 0;
- const FX_WCHAR* str = wsTime.c_str();
+ const wchar_t* str = wsTime.c_str();
int len = wsTime.GetLength();
- const FX_WCHAR* strf = wsTimePattern.c_str();
+ const wchar_t* strf = wsTimePattern.c_str();
int lenf = wsTimePattern.GetLength();
bool bHasA = false;
bool bPM = false;
@@ -2296,7 +2296,7 @@ static bool FX_ParseLocaleTime(const CFX_WideString& wsTime,
continue;
}
uint32_t dwSymbolNum = 1;
- FX_WCHAR dwCharSymbol = strf[ccf++];
+ wchar_t dwCharSymbol = strf[ccf++];
while (ccf < lenf && strf[ccf] == dwCharSymbol) {
ccf++;
dwSymbolNum++;
@@ -2508,9 +2508,9 @@ bool CFX_FormatString::ParseZero(const CFX_WideString& wsSrcText,
CFX_WideString wsTextFormat;
GetTextFormat(wsPattern, L"zero", wsTextFormat);
int32_t iText = 0, iPattern = 0;
- const FX_WCHAR* pStrText = wsSrcText.c_str();
+ const wchar_t* pStrText = wsSrcText.c_str();
int32_t iLenText = wsSrcText.GetLength();
- const FX_WCHAR* pStrPattern = wsTextFormat.c_str();
+ const wchar_t* pStrPattern = wsTextFormat.c_str();
int32_t iLenPattern = wsTextFormat.GetLength();
while (iPattern < iLenPattern && iText < iLenText) {
if (pStrPattern[iPattern] == '\'') {
@@ -2538,9 +2538,9 @@ bool CFX_FormatString::ParseNull(const CFX_WideString& wsSrcText,
CFX_WideString wsTextFormat;
GetTextFormat(wsPattern, L"null", wsTextFormat);
int32_t iText = 0, iPattern = 0;
- const FX_WCHAR* pStrText = wsSrcText.c_str();
+ const wchar_t* pStrText = wsSrcText.c_str();
int32_t iLenText = wsSrcText.GetLength();
- const FX_WCHAR* pStrPattern = wsTextFormat.c_str();
+ const wchar_t* pStrPattern = wsTextFormat.c_str();
int32_t iLenPattern = wsTextFormat.GetLength();
while (iPattern < iLenPattern && iText < iLenText) {
if (pStrPattern[iPattern] == '\'') {
@@ -2576,8 +2576,8 @@ bool CFX_FormatString::FormatText(const CFX_WideString& wsSrcText,
CFX_WideString wsTextFormat;
GetTextFormat(wsPattern, L"text", wsTextFormat);
int32_t iText = 0, iPattern = 0;
- const FX_WCHAR* pStrText = wsSrcText.c_str();
- const FX_WCHAR* pStrPattern = wsTextFormat.c_str();
+ const wchar_t* pStrText = wsSrcText.c_str();
+ const wchar_t* pStrPattern = wsTextFormat.c_str();
int32_t iLenPattern = wsTextFormat.GetLength();
while (iPattern < iLenPattern) {
switch (pStrPattern[iPattern]) {
@@ -2632,7 +2632,7 @@ static int32_t FX_GetNumTrailingLimit(const CFX_WideString& wsFormat,
int32_t iCount = wsFormat.GetLength();
int32_t iTreading = 0;
for (iDotPos++; iDotPos < iCount; iDotPos++) {
- FX_WCHAR wc = wsFormat[iDotPos];
+ wchar_t wc = wsFormat[iDotPos];
if (wc == L'z' || wc == L'9' || wc == 'Z') {
iTreading++;
bTrimTailZeros = (wc == L'9' ? false : true);
@@ -2655,7 +2655,7 @@ bool CFX_FormatString::FormatStrNum(const CFX_WideStringC& wsInputNum,
return false;
}
int32_t cc = 0, ccf = 0;
- const FX_WCHAR* strf = wsNumFormat.c_str();
+ const wchar_t* strf = wsNumFormat.c_str();
int lenf = wsNumFormat.GetLength();
CFX_WideString wsSrcNum(wsInputNum);
wsSrcNum.TrimLeft('0');
@@ -2725,7 +2725,7 @@ bool CFX_FormatString::FormatStrNum(const CFX_WideStringC& wsInputNum,
wsSrcNum.Delete(0, 1);
}
bool bAddNeg = false;
- const FX_WCHAR* str = wsSrcNum.c_str();
+ const wchar_t* str = wsSrcNum.c_str();
int len = wsSrcNum.GetLength();
int dot_index = wsSrcNum.Find('.');
if (dot_index == -1) {
@@ -3088,7 +3088,7 @@ bool CFX_FormatString::FormatLCNumeric(CFX_LCNumeric& lcNum,
return false;
}
int32_t cc = 0, ccf = 0;
- const FX_WCHAR* strf = wsNumFormat.c_str();
+ const wchar_t* strf = wsNumFormat.c_str();
int lenf = wsNumFormat.GetLength();
double dbOrgRaw = lcNum.GetDouble();
double dbRetValue = dbOrgRaw;
@@ -3151,7 +3151,7 @@ bool CFX_FormatString::FormatLCNumeric(CFX_LCNumeric& lcNum,
wsNumeric.Delete(0, 1);
}
bool bAddNeg = false;
- const FX_WCHAR* str = wsNumeric.c_str();
+ const wchar_t* str = wsNumeric.c_str();
int len = wsNumeric.GetLength();
int dot_index = wsNumeric.Find('.');
if (dot_index == -1) {
@@ -3507,7 +3507,7 @@ bool FX_DateFromCanonical(const CFX_WideString& wsDate, CFX_Unitime& datetime) {
int32_t day = 1;
uint16_t wYear = 0;
int cc_start = 0, cc = 0;
- const FX_WCHAR* str = wsDate.c_str();
+ const wchar_t* str = wsDate.c_str();
int len = wsDate.GetLength();
if (len > 10) {
return false;
@@ -3590,7 +3590,7 @@ bool FX_TimeFromCanonical(const CFX_WideStringC& wsTime,
uint8_t second = 0;
uint16_t millisecond = 0;
int cc_start = 0, cc = cc_start;
- const FX_WCHAR* str = wsTime.c_str();
+ const wchar_t* str = wsTime.c_str();
int len = wsTime.GetLength();
while (cc < len && cc < 2) {
if (!FXSYS_isDecimalDigit(str[cc])) {
@@ -3711,7 +3711,7 @@ static bool FX_DateFormat(const CFX_WideString& wsDatePattern,
uint8_t month = datetime.GetMonth();
uint8_t day = datetime.GetDay();
int32_t ccf = 0;
- const FX_WCHAR* strf = wsDatePattern.c_str();
+ const wchar_t* strf = wsDatePattern.c_str();
int32_t lenf = wsDatePattern.GetLength();
CFX_WideStringC wsDateSymbols(gs_wsDateSymbols);
while (ccf < lenf) {
@@ -3724,7 +3724,7 @@ static bool FX_DateFormat(const CFX_WideString& wsDatePattern,
continue;
}
uint32_t dwSymbolNum = 1;
- FX_WCHAR dwCharSymbol = strf[ccf++];
+ wchar_t dwCharSymbol = strf[ccf++];
while (ccf < lenf && strf[ccf] == dwCharSymbol) {
ccf++;
dwSymbolNum++;
@@ -3831,7 +3831,7 @@ static bool FX_TimeFormat(const CFX_WideString& wsTimePattern,
uint8_t second = datetime.GetSecond();
uint16_t millisecond = datetime.GetMillisecond();
int32_t ccf = 0;
- const FX_WCHAR* strf = wsTimePattern.c_str();
+ const wchar_t* strf = wsTimePattern.c_str();
int32_t lenf = wsTimePattern.GetLength();
uint16_t wHour = hour;
bool bPM = false;
@@ -3851,7 +3851,7 @@ static bool FX_TimeFormat(const CFX_WideString& wsTimePattern,
continue;
}
uint32_t dwSymbolNum = 1;
- FX_WCHAR dwCharSymbol = strf[ccf++];
+ wchar_t dwCharSymbol = strf[ccf++];
while (ccf < lenf && strf[ccf] == dwCharSymbol) {
ccf++;
dwSymbolNum++;
@@ -4081,7 +4081,7 @@ bool CFX_FormatString::FormatZero(const CFX_WideString& wsPattern,
CFX_WideString wsTextFormat;
GetTextFormat(wsPattern, L"zero", wsTextFormat);
int32_t iPattern = 0;
- const FX_WCHAR* pStrPattern = wsTextFormat.c_str();
+ const wchar_t* pStrPattern = wsTextFormat.c_str();
int32_t iLenPattern = wsTextFormat.GetLength();
while (iPattern < iLenPattern) {
if (pStrPattern[iPattern] == '\'') {
@@ -4103,7 +4103,7 @@ bool CFX_FormatString::FormatNull(const CFX_WideString& wsPattern,
CFX_WideString wsTextFormat;
GetTextFormat(wsPattern, L"null", wsTextFormat);
int32_t iPattern = 0;
- const FX_WCHAR* pStrPattern = wsTextFormat.c_str();
+ const wchar_t* pStrPattern = wsTextFormat.c_str();
int32_t iLenPattern = wsTextFormat.GetLength();
while (iPattern < iLenPattern) {
if (pStrPattern[iPattern] == '\'') {
@@ -4433,8 +4433,8 @@ CFX_Decimal::CFX_Decimal(FX_FLOAT val, uint8_t scale) {
m_uFlags = FXMATH_DECIMAL_MAKEFLAGS(val < 0 && IsNotZero(), scale);
}
CFX_Decimal::CFX_Decimal(const CFX_WideStringC& strObj) {
- const FX_WCHAR* str = strObj.c_str();
- const FX_WCHAR* strBound = str + strObj.GetLength();
+ const wchar_t* str = strObj.c_str();
+ const wchar_t* strBound = str + strObj.GetLength();
bool pointmet = 0;
bool negmet = 0;
uint8_t scale = 0;
diff --git a/xfa/fwl/cfwl_barcode.cpp b/xfa/fwl/cfwl_barcode.cpp
index 0412b86958..e894d25d64 100644
--- a/xfa/fwl/cfwl_barcode.cpp
+++ b/xfa/fwl/cfwl_barcode.cpp
@@ -136,12 +136,12 @@ void CFWL_Barcode::SetWideNarrowRatio(int32_t ratio) {
m_nWideNarrowRatio = ratio;
}
-void CFWL_Barcode::SetStartChar(FX_CHAR startChar) {
+void CFWL_Barcode::SetStartChar(char startChar) {
m_dwAttributeMask |= FWL_BCDATTRIBUTE_STARTCHAR;
m_cStartChar = startChar;
}
-void CFWL_Barcode::SetEndChar(FX_CHAR endChar) {
+void CFWL_Barcode::SetEndChar(char endChar) {
m_dwAttributeMask |= FWL_BCDATTRIBUTE_ENDCHAR;
m_cEndChar = endChar;
}
diff --git a/xfa/fwl/cfwl_barcode.h b/xfa/fwl/cfwl_barcode.h
index 2e9799172b..101cc602fb 100644
--- a/xfa/fwl/cfwl_barcode.h
+++ b/xfa/fwl/cfwl_barcode.h
@@ -63,8 +63,8 @@ class CFWL_Barcode : public CFWL_Edit {
void SetPrintChecksum(bool printChecksum);
void SetTextLocation(BC_TEXT_LOC location);
void SetWideNarrowRatio(int32_t ratio);
- void SetStartChar(FX_CHAR startChar);
- void SetEndChar(FX_CHAR endChar);
+ void SetStartChar(char startChar);
+ void SetEndChar(char endChar);
void SetErrorCorrectionLevel(int32_t ecLevel);
void SetTruncated(bool truncated);
@@ -83,8 +83,8 @@ class CFWL_Barcode : public CFWL_Edit {
bool m_bPrintChecksum;
BC_TEXT_LOC m_eTextLocation;
int32_t m_nWideNarrowRatio;
- FX_CHAR m_cStartChar;
- FX_CHAR m_cEndChar;
+ char m_cStartChar;
+ char m_cEndChar;
int32_t m_nECLevel;
bool m_bTruncated;
uint32_t m_dwAttributeMask;
diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp
index a7c85d57b7..b3b05a52d0 100644
--- a/xfa/fwl/cfwl_edit.cpp
+++ b/xfa/fwl/cfwl_edit.cpp
@@ -38,7 +38,7 @@ namespace {
const int kEditMargin = 3;
-bool FX_EDIT_ISLATINWORD(FX_WCHAR c) {
+bool FX_EDIT_ISLATINWORD(wchar_t c) {
return c == 0x2D || (c <= 0x005A && c >= 0x0041) ||
(c <= 0x007A && c >= 0x0061) || (c <= 0x02AF && c >= 0x00C0) ||
c == 0x0027;
@@ -203,7 +203,7 @@ void CFWL_Edit::DrawSpellCheck(CFX_Graphics* pGraphics,
if (FX_EDIT_ISLATINWORD(wsSpell[i])) {
if (sLatinWord.IsEmpty())
nStart = i;
- sLatinWord += (FX_CHAR)wsSpell[i];
+ sLatinWord += (char)wsSpell[i];
continue;
}
checkWordEvent.bsWord = sLatinWord;
@@ -314,7 +314,7 @@ void CFWL_Edit::SetLimit(int32_t nLimit) {
m_EdtEngine.SetLimit(nLimit);
}
-void CFWL_Edit::SetAliasChar(FX_WCHAR wAlias) {
+void CFWL_Edit::SetAliasChar(wchar_t wAlias) {
m_EdtEngine.SetAliasChar(wAlias);
}
@@ -1137,7 +1137,7 @@ void CFWL_Edit::HideCaret(CFX_RectF* pRect) {
pDocEnvironment->DisplayCaret(pXFAWidget, false, pRect);
}
-bool CFWL_Edit::ValidateNumberChar(FX_WCHAR cNum) {
+bool CFWL_Edit::ValidateNumberChar(wchar_t cNum) {
if (!m_bSetRange)
return true;
@@ -1434,7 +1434,7 @@ void CFWL_Edit::OnChar(CFWL_MessageKey* pMsg) {
}
int32_t iError = 0;
- FX_WCHAR c = static_cast<FX_WCHAR>(pMsg->m_dwKeyCode);
+ wchar_t c = static_cast<wchar_t>(pMsg->m_dwKeyCode);
int32_t nCaret = m_EdtEngine.GetCaretPos();
switch (c) {
case FWL_VKEY_Back:
diff --git a/xfa/fwl/cfwl_edit.h b/xfa/fwl/cfwl_edit.h
index 154e286331..13e4be2c68 100644
--- a/xfa/fwl/cfwl_edit.h
+++ b/xfa/fwl/cfwl_edit.h
@@ -80,7 +80,7 @@ class CFWL_Edit : public CFWL_Widget {
void ClearSelections();
int32_t GetLimit() const;
void SetLimit(int32_t nLimit);
- void SetAliasChar(FX_WCHAR wAlias);
+ void SetAliasChar(wchar_t wAlias);
bool Copy(CFX_WideString& wsCopy);
bool Cut(CFX_WideString& wsCut);
bool Paste(const CFX_WideString& wsPaste);
@@ -132,7 +132,7 @@ class CFWL_Edit : public CFWL_Widget {
void InitHorizontalScrollBar();
void InitEngine();
void InitCaret();
- bool ValidateNumberChar(FX_WCHAR cNum);
+ bool ValidateNumberChar(wchar_t cNum);
void ClearRecord();
bool IsShowScrollBar(bool bVert);
bool IsContentHeightOverflow();
diff --git a/xfa/fwl/cfwl_monthcalendar.cpp b/xfa/fwl/cfwl_monthcalendar.cpp
index 6882d709bf..2dcac03731 100644
--- a/xfa/fwl/cfwl_monthcalendar.cpp
+++ b/xfa/fwl/cfwl_monthcalendar.cpp
@@ -674,10 +674,10 @@ void CFWL_MonthCalendar::JumpToToday() {
CFX_WideString CFWL_MonthCalendar::GetHeadText(int32_t iYear, int32_t iMonth) {
ASSERT(iMonth > 0 && iMonth < 13);
- static const FX_WCHAR* const pMonth[] = {
- L"January", L"February", L"March", L"April",
- L"May", L"June", L"July", L"August",
- L"September", L"October", L"November", L"December"};
+ static const wchar_t* const pMonth[] = {L"January", L"February", L"March",
+ L"April", L"May", L"June",
+ L"July", L"August", L"September",
+ L"October", L"November", L"December"};
CFX_WideString wsHead;
wsHead.Format(L"%s, %d", pMonth[iMonth - 1], iYear);
return wsHead;
diff --git a/xfa/fwl/cfx_barcode.cpp b/xfa/fwl/cfx_barcode.cpp
index 7af3aa1888..1c22367901 100644
--- a/xfa/fwl/cfx_barcode.cpp
+++ b/xfa/fwl/cfx_barcode.cpp
@@ -235,8 +235,8 @@ bool CFX_Barcode::SetWideNarrowRatio(int32_t ratio) {
return m_pBCEngine && memptr ? (m_pBCEngine.get()->*memptr)(ratio) : false;
}
-bool CFX_Barcode::SetStartChar(FX_CHAR start) {
- typedef bool (CBC_CodeBase::*memptrtype)(FX_CHAR);
+bool CFX_Barcode::SetStartChar(char start) {
+ typedef bool (CBC_CodeBase::*memptrtype)(char);
memptrtype memptr = nullptr;
switch (GetType()) {
case BC_CODABAR:
@@ -248,8 +248,8 @@ bool CFX_Barcode::SetStartChar(FX_CHAR start) {
return m_pBCEngine && memptr ? (m_pBCEngine.get()->*memptr)(start) : false;
}
-bool CFX_Barcode::SetEndChar(FX_CHAR end) {
- typedef bool (CBC_CodeBase::*memptrtype)(FX_CHAR);
+bool CFX_Barcode::SetEndChar(char end) {
+ typedef bool (CBC_CodeBase::*memptrtype)(char);
memptrtype memptr = nullptr;
switch (GetType()) {
case BC_CODABAR:
diff --git a/xfa/fwl/cfx_barcode.h b/xfa/fwl/cfx_barcode.h
index f639977cfc..3f4b340d95 100644
--- a/xfa/fwl/cfx_barcode.h
+++ b/xfa/fwl/cfx_barcode.h
@@ -52,8 +52,8 @@ class CFX_Barcode {
bool SetTextLocation(BC_TEXT_LOC location);
bool SetWideNarrowRatio(int32_t ratio);
- bool SetStartChar(FX_CHAR start);
- bool SetEndChar(FX_CHAR end);
+ bool SetStartChar(char start);
+ bool SetEndChar(char end);
bool SetVersion(int32_t version);
bool SetErrorCorrectionLevel(int32_t level);
bool SetTruncated(bool truncated);
diff --git a/xfa/fxbarcode/BC_Dimension.cpp b/xfa/fxbarcode/BC_Dimension.cpp
index 0cb076ce22..7a4b256f31 100644
--- a/xfa/fxbarcode/BC_Dimension.cpp
+++ b/xfa/fxbarcode/BC_Dimension.cpp
@@ -42,5 +42,5 @@ int32_t CBC_Dimension::hashCode() {
return m_width * 32713 + m_height;
}
CFX_WideString CBC_Dimension::toString() {
- return (FX_WCHAR)(m_width + (FX_WCHAR)'x' + m_height);
+ return (wchar_t)(m_width + (wchar_t)'x' + m_height);
}
diff --git a/xfa/fxbarcode/BC_Utils.cpp b/xfa/fxbarcode/BC_Utils.cpp
index 5d881c7be1..b1dcf4a973 100644
--- a/xfa/fxbarcode/BC_Utils.cpp
+++ b/xfa/fxbarcode/BC_Utils.cpp
@@ -11,7 +11,7 @@ bool BC_FX_ByteString_Replace(CFX_ByteString& dst,
uint32_t first,
uint32_t last,
int32_t count,
- FX_CHAR c) {
+ char c) {
if (first > last || count <= 0) {
return false;
}
@@ -21,7 +21,7 @@ bool BC_FX_ByteString_Replace(CFX_ByteString& dst,
}
return true;
}
-void BC_FX_ByteString_Append(CFX_ByteString& dst, int32_t count, FX_CHAR c) {
+void BC_FX_ByteString_Append(CFX_ByteString& dst, int32_t count, char c) {
for (int32_t i = 0; i < count; i++) {
dst += c;
}
diff --git a/xfa/fxbarcode/cbc_codabar.cpp b/xfa/fxbarcode/cbc_codabar.cpp
index 6f6ab4a96c..53e351d5a2 100644
--- a/xfa/fxbarcode/cbc_codabar.cpp
+++ b/xfa/fxbarcode/cbc_codabar.cpp
@@ -27,14 +27,14 @@ CBC_Codabar::CBC_Codabar() : CBC_OneCode(new CBC_OnedCodaBarWriter) {}
CBC_Codabar::~CBC_Codabar() {}
-bool CBC_Codabar::SetStartChar(FX_CHAR start) {
+bool CBC_Codabar::SetStartChar(char start) {
if (!m_pBCWriter)
return false;
return static_cast<CBC_OnedCodaBarWriter*>(m_pBCWriter.get())
->SetStartChar(start);
}
-bool CBC_Codabar::SetEndChar(FX_CHAR end) {
+bool CBC_Codabar::SetEndChar(char end) {
if (m_pBCWriter)
return static_cast<CBC_OnedCodaBarWriter*>(m_pBCWriter.get())
->SetEndChar(end);
diff --git a/xfa/fxbarcode/cbc_codabar.h b/xfa/fxbarcode/cbc_codabar.h
index 28631a9cb5..43f1a010c0 100644
--- a/xfa/fxbarcode/cbc_codabar.h
+++ b/xfa/fxbarcode/cbc_codabar.h
@@ -27,8 +27,8 @@ class CBC_Codabar : public CBC_OneCode {
bool RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) override;
BC_TYPE GetType() override;
- bool SetStartChar(FX_CHAR start);
- bool SetEndChar(FX_CHAR end);
+ bool SetStartChar(char start);
+ bool SetEndChar(char end);
bool SetTextLocation(BC_TEXT_LOC location);
bool SetWideNarrowRatio(int32_t ratio);
diff --git a/xfa/fxbarcode/cbc_ean13.cpp b/xfa/fxbarcode/cbc_ean13.cpp
index 450fba04c9..abd5f198a3 100644
--- a/xfa/fxbarcode/cbc_ean13.cpp
+++ b/xfa/fxbarcode/cbc_ean13.cpp
@@ -34,7 +34,7 @@ CFX_WideString CBC_EAN13::Preprocess(const CFX_WideStringC& contents) {
int32_t length = encodeContents.GetLength();
if (length <= 12) {
for (int32_t i = 0; i < 12 - length; i++)
- encodeContents = FX_WCHAR('0') + encodeContents;
+ encodeContents = wchar_t('0') + encodeContents;
CFX_ByteString byteString = encodeContents.UTF8Encode();
int32_t checksum = static_cast<CBC_OnedEAN13Writer*>(m_pBCWriter.get())
diff --git a/xfa/fxbarcode/cbc_ean8.cpp b/xfa/fxbarcode/cbc_ean8.cpp
index 64ba617331..bfb458521e 100644
--- a/xfa/fxbarcode/cbc_ean8.cpp
+++ b/xfa/fxbarcode/cbc_ean8.cpp
@@ -34,12 +34,12 @@ CFX_WideString CBC_EAN8::Preprocess(const CFX_WideStringC& contents) {
int32_t length = encodeContents.GetLength();
if (length <= 7) {
for (int32_t i = 0; i < 7 - length; i++)
- encodeContents = FX_WCHAR('0') + encodeContents;
+ encodeContents = wchar_t('0') + encodeContents;
CFX_ByteString byteString = encodeContents.UTF8Encode();
int32_t checksum = static_cast<CBC_OnedEAN8Writer*>(m_pBCWriter.get())
->CalcChecksum(byteString);
- encodeContents += FX_WCHAR(checksum - 0 + '0');
+ encodeContents += wchar_t(checksum - 0 + '0');
}
if (length > 8)
encodeContents = encodeContents.Mid(0, 8);
diff --git a/xfa/fxbarcode/cbc_upca.cpp b/xfa/fxbarcode/cbc_upca.cpp
index b282d5cd79..87f58093ae 100644
--- a/xfa/fxbarcode/cbc_upca.cpp
+++ b/xfa/fxbarcode/cbc_upca.cpp
@@ -34,7 +34,7 @@ CFX_WideString CBC_UPCA::Preprocess(const CFX_WideStringC& contents) {
int32_t length = encodeContents.GetLength();
if (length <= 11) {
for (int32_t i = 0; i < 11 - length; i++)
- encodeContents = FX_WCHAR('0') + encodeContents;
+ encodeContents = wchar_t('0') + encodeContents;
CFX_ByteString byteString = encodeContents.UTF8Encode();
int32_t checksum = pWriter->CalcChecksum(byteString);
diff --git a/xfa/fxbarcode/datamatrix/BC_ASCIIEncoder.cpp b/xfa/fxbarcode/datamatrix/BC_ASCIIEncoder.cpp
index 00d8fc1615..88a12b23a2 100644
--- a/xfa/fxbarcode/datamatrix/BC_ASCIIEncoder.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_ASCIIEncoder.cpp
@@ -37,16 +37,15 @@ void CBC_ASCIIEncoder::Encode(CBC_EncoderContext& context, int32_t& e) {
int32_t n = CBC_HighLevelEncoder::determineConsecutiveDigitCount(
context.m_msg, context.m_pos);
if (n >= 2) {
- FX_WCHAR code =
- encodeASCIIDigits(context.m_msg.GetAt(context.m_pos),
- context.m_msg.GetAt(context.m_pos + 1), e);
+ wchar_t code = encodeASCIIDigits(context.m_msg.GetAt(context.m_pos),
+ context.m_msg.GetAt(context.m_pos + 1), e);
if (e != BCExceptionNO) {
return;
}
context.writeCodeword(code);
context.m_pos += 2;
} else {
- FX_WCHAR c = context.getCurrentChar();
+ wchar_t c = context.getCurrentChar();
int32_t newMode = CBC_HighLevelEncoder::lookAheadTest(
context.m_msg, context.m_pos, getEncodingMode());
if (newMode != getEncodingMode()) {
@@ -77,21 +76,21 @@ void CBC_ASCIIEncoder::Encode(CBC_EncoderContext& context, int32_t& e) {
}
} else if (CBC_HighLevelEncoder::isExtendedASCII(c)) {
context.writeCodeword(CBC_HighLevelEncoder::UPPER_SHIFT);
- context.writeCodeword((FX_WCHAR)(c - 128 + 1));
+ context.writeCodeword((wchar_t)(c - 128 + 1));
context.m_pos++;
} else {
- context.writeCodeword((FX_WCHAR)(c + 1));
+ context.writeCodeword((wchar_t)(c + 1));
context.m_pos++;
}
}
}
-FX_WCHAR CBC_ASCIIEncoder::encodeASCIIDigits(FX_WCHAR digit1,
- FX_WCHAR digit2,
- int32_t& e) {
+wchar_t CBC_ASCIIEncoder::encodeASCIIDigits(wchar_t digit1,
+ wchar_t digit2,
+ int32_t& e) {
if (CBC_HighLevelEncoder::isDigit(digit1) &&
CBC_HighLevelEncoder::isDigit(digit2)) {
int32_t num = (digit1 - 48) * 10 + (digit2 - 48);
- return (FX_WCHAR)(num + 130);
+ return (wchar_t)(num + 130);
}
e = BCExceptionIllegalArgumentNotGigits;
return 0;
diff --git a/xfa/fxbarcode/datamatrix/BC_ASCIIEncoder.h b/xfa/fxbarcode/datamatrix/BC_ASCIIEncoder.h
index 40559b532d..a0cfaa76ed 100644
--- a/xfa/fxbarcode/datamatrix/BC_ASCIIEncoder.h
+++ b/xfa/fxbarcode/datamatrix/BC_ASCIIEncoder.h
@@ -21,9 +21,7 @@ class CBC_ASCIIEncoder : public CBC_Encoder {
void Encode(CBC_EncoderContext& context, int32_t& e) override;
private:
- static FX_WCHAR encodeASCIIDigits(FX_WCHAR digit1,
- FX_WCHAR digit2,
- int32_t& e);
+ static wchar_t encodeASCIIDigits(wchar_t digit1, wchar_t digit2, int32_t& e);
};
#endif // XFA_FXBARCODE_DATAMATRIX_BC_ASCIIENCODER_H_
diff --git a/xfa/fxbarcode/datamatrix/BC_Base256Encoder.cpp b/xfa/fxbarcode/datamatrix/BC_Base256Encoder.cpp
index b8e427c7fc..333377e392 100644
--- a/xfa/fxbarcode/datamatrix/BC_Base256Encoder.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_Base256Encoder.cpp
@@ -35,9 +35,9 @@ int32_t CBC_Base256Encoder::getEncodingMode() {
}
void CBC_Base256Encoder::Encode(CBC_EncoderContext& context, int32_t& e) {
CFX_WideString buffer;
- buffer += (FX_WCHAR)'\0';
+ buffer += (wchar_t)'\0';
while (context.hasMoreCharacters()) {
- FX_WCHAR c = context.getCurrentChar();
+ wchar_t c = context.getCurrentChar();
buffer += c;
context.m_pos++;
int32_t newMode = CBC_HighLevelEncoder::lookAheadTest(
@@ -48,9 +48,9 @@ void CBC_Base256Encoder::Encode(CBC_EncoderContext& context, int32_t& e) {
}
}
int32_t dataCount = buffer.GetLength() - 1;
- FX_CHAR buf[128];
+ char buf[128];
FXSYS_itoa(dataCount, buf, 10);
- buffer.SetAt(0, FX_WCHAR(*buf) - '0');
+ buffer.SetAt(0, wchar_t(*buf) - '0');
int32_t lengthFieldSize = 1;
int32_t currentSize =
context.getCodewordCount() + dataCount + lengthFieldSize;
@@ -61,10 +61,10 @@ void CBC_Base256Encoder::Encode(CBC_EncoderContext& context, int32_t& e) {
bool mustPad = (context.m_symbolInfo->m_dataCapacity - currentSize) > 0;
if (context.hasMoreCharacters() || mustPad) {
if (dataCount <= 249) {
- buffer.SetAt(0, (FX_WCHAR)dataCount);
+ buffer.SetAt(0, (wchar_t)dataCount);
} else if (dataCount > 249 && dataCount <= 1555) {
- buffer.SetAt(0, (FX_WCHAR)((dataCount / 250) + 249));
- buffer.Insert(1, (FX_WCHAR)(dataCount % 250));
+ buffer.SetAt(0, (wchar_t)((dataCount / 250) + 249));
+ buffer.Insert(1, (wchar_t)(dataCount % 250));
} else {
e = BCExceptionIllegalStateMessageLengthInvalid;
return;
@@ -75,13 +75,13 @@ void CBC_Base256Encoder::Encode(CBC_EncoderContext& context, int32_t& e) {
randomize255State(buffer.GetAt(i), context.getCodewordCount() + 1));
}
}
-FX_WCHAR CBC_Base256Encoder::randomize255State(FX_WCHAR ch,
- int32_t codewordPosition) {
+wchar_t CBC_Base256Encoder::randomize255State(wchar_t ch,
+ int32_t codewordPosition) {
int32_t pseudoRandom = ((149 * codewordPosition) % 255) + 1;
int32_t tempVariable = ch + pseudoRandom;
if (tempVariable <= 255) {
- return (FX_WCHAR)tempVariable;
+ return (wchar_t)tempVariable;
} else {
- return (FX_WCHAR)(tempVariable - 256);
+ return (wchar_t)(tempVariable - 256);
}
}
diff --git a/xfa/fxbarcode/datamatrix/BC_Base256Encoder.h b/xfa/fxbarcode/datamatrix/BC_Base256Encoder.h
index c41c79db08..41229afb80 100644
--- a/xfa/fxbarcode/datamatrix/BC_Base256Encoder.h
+++ b/xfa/fxbarcode/datamatrix/BC_Base256Encoder.h
@@ -19,7 +19,7 @@ class CBC_Base256Encoder : public CBC_Encoder {
void Encode(CBC_EncoderContext& context, int32_t& e) override;
private:
- static FX_WCHAR randomize255State(FX_WCHAR ch, int32_t codewordPosition);
+ static wchar_t randomize255State(wchar_t ch, int32_t codewordPosition);
};
#endif // XFA_FXBARCODE_DATAMATRIX_BC_BASE256ENCODER_H_
diff --git a/xfa/fxbarcode/datamatrix/BC_C40Encoder.cpp b/xfa/fxbarcode/datamatrix/BC_C40Encoder.cpp
index 50f02ca52d..04fcb6b541 100644
--- a/xfa/fxbarcode/datamatrix/BC_C40Encoder.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_C40Encoder.cpp
@@ -37,7 +37,7 @@ int32_t CBC_C40Encoder::getEncodingMode() {
void CBC_C40Encoder::Encode(CBC_EncoderContext& context, int32_t& e) {
CFX_WideString buffer;
while (context.hasMoreCharacters()) {
- FX_WCHAR c = context.getCurrentChar();
+ wchar_t c = context.getCurrentChar();
context.m_pos++;
int32_t lastCharSize = encodeChar(c, buffer, e);
if (e != BCExceptionNO) {
@@ -100,7 +100,7 @@ void CBC_C40Encoder::handleEOD(CBC_EncoderContext& context,
}
int32_t available = context.m_symbolInfo->m_dataCapacity - curCodewordCount;
if (rest == 2) {
- buffer += (FX_WCHAR)'\0';
+ buffer += (wchar_t)'\0';
while (buffer.GetLength() >= 3) {
writeNextTriplet(context, buffer);
}
@@ -128,39 +128,39 @@ void CBC_C40Encoder::handleEOD(CBC_EncoderContext& context,
}
context.signalEncoderChange(ASCII_ENCODATION);
}
-int32_t CBC_C40Encoder::encodeChar(FX_WCHAR c, CFX_WideString& sb, int32_t& e) {
+int32_t CBC_C40Encoder::encodeChar(wchar_t c, CFX_WideString& sb, int32_t& e) {
if (c == ' ') {
- sb += (FX_WCHAR)'\3';
+ sb += (wchar_t)'\3';
return 1;
} else if ((c >= '0') && (c <= '9')) {
- sb += (FX_WCHAR)(c - 48 + 4);
+ sb += (wchar_t)(c - 48 + 4);
return 1;
} else if ((c >= 'A') && (c <= 'Z')) {
- sb += (FX_WCHAR)(c - 65 + 14);
+ sb += (wchar_t)(c - 65 + 14);
return 1;
} else if (c <= 0x1f) {
- sb += (FX_WCHAR)'\0';
+ sb += (wchar_t)'\0';
sb += c;
return 2;
} else if ((c >= '!') && (c <= '/')) {
- sb += (FX_WCHAR)'\1';
- sb += (FX_WCHAR)(c - 33);
+ sb += (wchar_t)'\1';
+ sb += (wchar_t)(c - 33);
return 2;
} else if ((c >= ':') && (c <= '@')) {
- sb += (FX_WCHAR)'\1';
- sb += (FX_WCHAR)(c - 58 + 15);
+ sb += (wchar_t)'\1';
+ sb += (wchar_t)(c - 58 + 15);
return 2;
} else if ((c >= '[') && (c <= '_')) {
- sb += (FX_WCHAR)'\1';
- sb += (FX_WCHAR)(c - 91 + 22);
+ sb += (wchar_t)'\1';
+ sb += (wchar_t)(c - 91 + 22);
return 2;
} else if ((c >= 60) && (c <= 0x7f)) {
- sb += (FX_WCHAR)'\2';
- sb += (FX_WCHAR)(c - 96);
+ sb += (wchar_t)'\2';
+ sb += (wchar_t)(c - 96);
return 2;
} else if (c >= 80) {
- sb += (FX_WCHAR)'\1';
- sb += (FX_WCHAR)0x001e;
+ sb += (wchar_t)'\1';
+ sb += (wchar_t)0x001e;
int32_t len = 2;
len += encodeChar((c - 128), sb, e);
if (e != BCExceptionNO)
@@ -179,7 +179,7 @@ int32_t CBC_C40Encoder::backtrackOneCharacter(CBC_EncoderContext& context,
int32_t count = buffer.GetLength();
buffer.Delete(count - lastCharSize, count);
context.m_pos--;
- FX_WCHAR c = context.getCurrentChar();
+ wchar_t c = context.getCurrentChar();
lastCharSize = encodeChar(c, removed, e);
if (e != BCExceptionNO)
return -1;
@@ -188,12 +188,12 @@ int32_t CBC_C40Encoder::backtrackOneCharacter(CBC_EncoderContext& context,
}
CFX_WideString CBC_C40Encoder::encodeToCodewords(CFX_WideString sb,
int32_t startPos) {
- FX_WCHAR c1 = sb.GetAt(startPos);
- FX_WCHAR c2 = sb.GetAt(startPos + 1);
- FX_WCHAR c3 = sb.GetAt(startPos + 2);
+ wchar_t c1 = sb.GetAt(startPos);
+ wchar_t c2 = sb.GetAt(startPos + 1);
+ wchar_t c3 = sb.GetAt(startPos + 2);
int32_t v = (1600 * c1) + (40 * c2) + c3 + 1;
- FX_WCHAR cw1 = (FX_WCHAR)(v / 256);
- FX_WCHAR cw2 = (FX_WCHAR)(v % 256);
+ wchar_t cw1 = (wchar_t)(v / 256);
+ wchar_t cw2 = (wchar_t)(v % 256);
CFX_WideString b1(cw1);
CFX_WideString b2(cw2);
return b1 + b2;
diff --git a/xfa/fxbarcode/datamatrix/BC_C40Encoder.h b/xfa/fxbarcode/datamatrix/BC_C40Encoder.h
index 9737981f75..03dee140df 100644
--- a/xfa/fxbarcode/datamatrix/BC_C40Encoder.h
+++ b/xfa/fxbarcode/datamatrix/BC_C40Encoder.h
@@ -24,7 +24,7 @@ class CBC_C40Encoder : public CBC_Encoder {
virtual void handleEOD(CBC_EncoderContext& context,
CFX_WideString& buffer,
int32_t& e);
- virtual int32_t encodeChar(FX_WCHAR c, CFX_WideString& sb, int32_t& e);
+ virtual int32_t encodeChar(wchar_t c, CFX_WideString& sb, int32_t& e);
private:
int32_t backtrackOneCharacter(CBC_EncoderContext& context,
diff --git a/xfa/fxbarcode/datamatrix/BC_EdifactEncoder.cpp b/xfa/fxbarcode/datamatrix/BC_EdifactEncoder.cpp
index 7db117d003..2ffc8413a3 100644
--- a/xfa/fxbarcode/datamatrix/BC_EdifactEncoder.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_EdifactEncoder.cpp
@@ -37,7 +37,7 @@ int32_t CBC_EdifactEncoder::getEncodingMode() {
void CBC_EdifactEncoder::Encode(CBC_EncoderContext& context, int32_t& e) {
CFX_WideString buffer;
while (context.hasMoreCharacters()) {
- FX_WCHAR c = context.getCurrentChar();
+ wchar_t c = context.getCurrentChar();
encodeChar(c, buffer, e);
if (e != BCExceptionNO) {
return;
@@ -58,7 +58,7 @@ void CBC_EdifactEncoder::Encode(CBC_EncoderContext& context, int32_t& e) {
}
}
}
- buffer += (FX_WCHAR)31;
+ buffer += (wchar_t)31;
handleEOD(context, buffer, e);
}
void CBC_EdifactEncoder::handleEOD(CBC_EncoderContext& context,
@@ -115,13 +115,11 @@ void CBC_EdifactEncoder::handleEOD(CBC_EncoderContext& context,
}
context.signalEncoderChange(ASCII_ENCODATION);
}
-void CBC_EdifactEncoder::encodeChar(FX_WCHAR c,
- CFX_WideString& sb,
- int32_t& e) {
+void CBC_EdifactEncoder::encodeChar(wchar_t c, CFX_WideString& sb, int32_t& e) {
if (c >= ' ' && c <= '?') {
sb += c;
} else if (c >= '@' && c <= '^') {
- sb += (FX_WCHAR)(c - 64);
+ sb += (wchar_t)(c - 64);
} else {
CBC_HighLevelEncoder::illegalCharacter(c, e);
}
@@ -134,14 +132,14 @@ CFX_WideString CBC_EdifactEncoder::encodeToCodewords(CFX_WideString sb,
e = BCExceptionNoContents;
return CFX_WideString();
}
- FX_WCHAR c1 = sb.GetAt(startPos);
- FX_WCHAR c2 = len >= 2 ? sb.GetAt(startPos + 1) : 0;
- FX_WCHAR c3 = len >= 3 ? sb.GetAt(startPos + 2) : 0;
- FX_WCHAR c4 = len >= 4 ? sb.GetAt(startPos + 3) : 0;
+ wchar_t c1 = sb.GetAt(startPos);
+ wchar_t c2 = len >= 2 ? sb.GetAt(startPos + 1) : 0;
+ wchar_t c3 = len >= 3 ? sb.GetAt(startPos + 2) : 0;
+ wchar_t c4 = len >= 4 ? sb.GetAt(startPos + 3) : 0;
int32_t v = (c1 << 18) + (c2 << 12) + (c3 << 6) + c4;
- FX_WCHAR cw1 = (FX_WCHAR)((v >> 16) & 255);
- FX_WCHAR cw2 = (FX_WCHAR)((v >> 8) & 255);
- FX_WCHAR cw3 = (FX_WCHAR)(v & 255);
+ wchar_t cw1 = (wchar_t)((v >> 16) & 255);
+ wchar_t cw2 = (wchar_t)((v >> 8) & 255);
+ wchar_t cw3 = (wchar_t)(v & 255);
CFX_WideString res;
res += cw1;
if (len >= 2) {
diff --git a/xfa/fxbarcode/datamatrix/BC_EdifactEncoder.h b/xfa/fxbarcode/datamatrix/BC_EdifactEncoder.h
index 3eb762fe6d..afe013e02e 100644
--- a/xfa/fxbarcode/datamatrix/BC_EdifactEncoder.h
+++ b/xfa/fxbarcode/datamatrix/BC_EdifactEncoder.h
@@ -22,7 +22,7 @@ class CBC_EdifactEncoder : public CBC_Encoder {
static void handleEOD(CBC_EncoderContext& context,
CFX_WideString buffer,
int32_t& e);
- static void encodeChar(FX_WCHAR c, CFX_WideString& sb, int32_t& e);
+ static void encodeChar(wchar_t c, CFX_WideString& sb, int32_t& e);
static CFX_WideString encodeToCodewords(CFX_WideString sb,
int32_t startPos,
int32_t& e);
diff --git a/xfa/fxbarcode/datamatrix/BC_EncoderContext.cpp b/xfa/fxbarcode/datamatrix/BC_EncoderContext.cpp
index b01b3120e3..6af2bc4e83 100644
--- a/xfa/fxbarcode/datamatrix/BC_EncoderContext.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_EncoderContext.cpp
@@ -36,7 +36,7 @@ CBC_EncoderContext::CBC_EncoderContext(const CFX_WideString msg,
CFX_WideString sb;
int32_t c = dststr.GetLength();
for (int32_t i = 0; i < c; i++) {
- FX_WCHAR ch = (FX_WCHAR)(dststr.GetAt(i) & 0xff);
+ wchar_t ch = (wchar_t)(dststr.GetAt(i) & 0xff);
if (ch == '?' && dststr.GetAt(i) != '?') {
e = BCExceptionCharactersOutsideISO88591Encoding;
}
@@ -66,16 +66,16 @@ CFX_WideString CBC_EncoderContext::getMessage() {
void CBC_EncoderContext::setSkipAtEnd(int32_t count) {
m_skipAtEnd = count;
}
-FX_WCHAR CBC_EncoderContext::getCurrentChar() {
+wchar_t CBC_EncoderContext::getCurrentChar() {
return m_msg.GetAt(m_pos);
}
-FX_WCHAR CBC_EncoderContext::getCurrent() {
+wchar_t CBC_EncoderContext::getCurrent() {
return m_msg.GetAt(m_pos);
}
void CBC_EncoderContext::writeCodewords(CFX_WideString codewords) {
m_codewords += codewords;
}
-void CBC_EncoderContext::writeCodeword(FX_WCHAR codeword) {
+void CBC_EncoderContext::writeCodeword(wchar_t codeword) {
m_codewords += codeword;
}
int32_t CBC_EncoderContext::getCodewordCount() {
diff --git a/xfa/fxbarcode/datamatrix/BC_EncoderContext.h b/xfa/fxbarcode/datamatrix/BC_EncoderContext.h
index 8d0ea5d7ed..03018b2ffe 100644
--- a/xfa/fxbarcode/datamatrix/BC_EncoderContext.h
+++ b/xfa/fxbarcode/datamatrix/BC_EncoderContext.h
@@ -23,10 +23,10 @@ class CBC_EncoderContext : public CBC_SymbolShapeHint {
void setSizeConstraints(CBC_Dimension* minSize, CBC_Dimension* maxSize);
CFX_WideString getMessage();
void setSkipAtEnd(int32_t count);
- FX_WCHAR getCurrentChar();
- FX_WCHAR getCurrent();
+ wchar_t getCurrentChar();
+ wchar_t getCurrent();
void writeCodewords(CFX_WideString codewords);
- void writeCodeword(FX_WCHAR codeword);
+ void writeCodeword(wchar_t codeword);
int32_t getCodewordCount();
void signalEncoderChange(int32_t encoding);
void resetEncoderSignal();
diff --git a/xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp b/xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp
index 17eec1ee4f..ffdd308d54 100644
--- a/xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_ErrorCorrection.cpp
@@ -150,7 +150,7 @@ CFX_WideString CBC_ErrorCorrection::encodeECC200(CFX_WideString codewords,
for (int32_t block = 0; block < blockCount; block++) {
CFX_WideString temp;
for (int32_t d = block; d < symbolInfo->m_dataCapacity; d += blockCount) {
- temp += (FX_WCHAR)codewords.GetAt(d);
+ temp += (wchar_t)codewords.GetAt(d);
}
CFX_WideString ecc = createECCBlock(temp, errorSizes[block], e);
if (e != BCExceptionNO)
@@ -203,7 +203,7 @@ CFX_WideString CBC_ErrorCorrection::createECCBlock(CFX_WideString codewords,
}
CFX_WideString strecc;
for (int32_t j = 0; j < numECWords; j++) {
- strecc += (FX_WCHAR)ecc[numECWords - j - 1];
+ strecc += (wchar_t)ecc[numECWords - j - 1];
}
FX_Free(ecc);
return strecc;
diff --git a/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp b/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
index abd3584761..ec6eb02b1c 100644
--- a/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
@@ -40,17 +40,17 @@
#include "xfa/fxbarcode/datamatrix/BC_X12Encoder.h"
#include "xfa/fxbarcode/utils.h"
-FX_WCHAR CBC_HighLevelEncoder::LATCH_TO_C40 = 230;
-FX_WCHAR CBC_HighLevelEncoder::LATCH_TO_BASE256 = 231;
-FX_WCHAR CBC_HighLevelEncoder::UPPER_SHIFT = 235;
-FX_WCHAR CBC_HighLevelEncoder::LATCH_TO_ANSIX12 = 238;
-FX_WCHAR CBC_HighLevelEncoder::LATCH_TO_TEXT = 239;
-FX_WCHAR CBC_HighLevelEncoder::LATCH_TO_EDIFACT = 240;
-FX_WCHAR CBC_HighLevelEncoder::C40_UNLATCH = 254;
-FX_WCHAR CBC_HighLevelEncoder::X12_UNLATCH = 254;
-FX_WCHAR CBC_HighLevelEncoder::PAD = 129;
-FX_WCHAR CBC_HighLevelEncoder::MACRO_05 = 236;
-FX_WCHAR CBC_HighLevelEncoder::MACRO_06 = 237;
+wchar_t CBC_HighLevelEncoder::LATCH_TO_C40 = 230;
+wchar_t CBC_HighLevelEncoder::LATCH_TO_BASE256 = 231;
+wchar_t CBC_HighLevelEncoder::UPPER_SHIFT = 235;
+wchar_t CBC_HighLevelEncoder::LATCH_TO_ANSIX12 = 238;
+wchar_t CBC_HighLevelEncoder::LATCH_TO_TEXT = 239;
+wchar_t CBC_HighLevelEncoder::LATCH_TO_EDIFACT = 240;
+wchar_t CBC_HighLevelEncoder::C40_UNLATCH = 254;
+wchar_t CBC_HighLevelEncoder::X12_UNLATCH = 254;
+wchar_t CBC_HighLevelEncoder::PAD = 129;
+wchar_t CBC_HighLevelEncoder::MACRO_05 = 236;
+wchar_t CBC_HighLevelEncoder::MACRO_06 = 237;
const wchar_t* CBC_HighLevelEncoder::MACRO_05_HEADER = L"[)>05";
const wchar_t* CBC_HighLevelEncoder::MACRO_06_HEADER = L"[)>06";
const wchar_t CBC_HighLevelEncoder::MACRO_TRAILER = 0x0004;
@@ -184,7 +184,7 @@ int32_t CBC_HighLevelEncoder::lookAheadTest(CFX_WideString msg,
}
return C40_ENCODATION;
}
- FX_WCHAR c = msg.GetAt(startpos + charsProcessed);
+ wchar_t c = msg.GetAt(startpos + charsProcessed);
charsProcessed++;
if (isDigit(c)) {
charCounts[ASCII_ENCODATION] += 0.5;
@@ -271,7 +271,7 @@ int32_t CBC_HighLevelEncoder::lookAheadTest(CFX_WideString msg,
if (intCharCounts[C40_ENCODATION] == intCharCounts[X12_ENCODATION]) {
int32_t p = startpos + charsProcessed + 1;
while (p < msg.GetLength()) {
- FX_WCHAR tc = msg.GetAt(p);
+ wchar_t tc = msg.GetAt(p);
if (isX12TermSep(tc)) {
return X12_ENCODATION;
}
@@ -286,10 +286,10 @@ int32_t CBC_HighLevelEncoder::lookAheadTest(CFX_WideString msg,
}
}
}
-bool CBC_HighLevelEncoder::isDigit(FX_WCHAR ch) {
+bool CBC_HighLevelEncoder::isDigit(wchar_t ch) {
return ch >= '0' && ch <= '9';
}
-bool CBC_HighLevelEncoder::isExtendedASCII(FX_WCHAR ch) {
+bool CBC_HighLevelEncoder::isExtendedASCII(wchar_t ch) {
return ch >= 128 && ch <= 255;
}
int32_t CBC_HighLevelEncoder::determineConsecutiveDigitCount(CFX_WideString msg,
@@ -298,7 +298,7 @@ int32_t CBC_HighLevelEncoder::determineConsecutiveDigitCount(CFX_WideString msg,
int32_t len = msg.GetLength();
int32_t idx = startpos;
if (idx < len) {
- FX_WCHAR ch = msg.GetAt(idx);
+ wchar_t ch = msg.GetAt(idx);
while (isDigit(ch) && idx < len) {
count++;
idx++;
@@ -309,15 +309,15 @@ int32_t CBC_HighLevelEncoder::determineConsecutiveDigitCount(CFX_WideString msg,
}
return count;
}
-void CBC_HighLevelEncoder::illegalCharacter(FX_WCHAR c, int32_t& e) {
+void CBC_HighLevelEncoder::illegalCharacter(wchar_t c, int32_t& e) {
e = BCExceptionIllegalArgument;
}
-FX_WCHAR CBC_HighLevelEncoder::randomize253State(FX_WCHAR ch,
- int32_t codewordPosition) {
+wchar_t CBC_HighLevelEncoder::randomize253State(wchar_t ch,
+ int32_t codewordPosition) {
int32_t pseudoRandom = ((149 * codewordPosition) % 253) + 1;
int32_t tempVariable = ch + pseudoRandom;
- return tempVariable <= 254 ? (FX_WCHAR)tempVariable
- : (FX_WCHAR)(tempVariable - 254);
+ return tempVariable <= 254 ? (wchar_t)tempVariable
+ : (wchar_t)(tempVariable - 254);
}
int32_t CBC_HighLevelEncoder::findMinimums(
std::vector<FX_FLOAT>& charCounts,
@@ -350,22 +350,22 @@ int32_t CBC_HighLevelEncoder::getMinimumCount(
}
return minCount;
}
-bool CBC_HighLevelEncoder::isNativeC40(FX_WCHAR ch) {
+bool CBC_HighLevelEncoder::isNativeC40(wchar_t ch) {
return (ch == ' ') || (ch >= '0' && ch <= '9') || (ch >= 'A' && ch <= 'Z');
}
-bool CBC_HighLevelEncoder::isNativeText(FX_WCHAR ch) {
+bool CBC_HighLevelEncoder::isNativeText(wchar_t ch) {
return (ch == ' ') || (ch >= '0' && ch <= '9') || (ch >= 'a' && ch <= 'z');
}
-bool CBC_HighLevelEncoder::isNativeX12(FX_WCHAR ch) {
+bool CBC_HighLevelEncoder::isNativeX12(wchar_t ch) {
return isX12TermSep(ch) || (ch == ' ') || (ch >= '0' && ch <= '9') ||
(ch >= 'A' && ch <= 'Z');
}
-bool CBC_HighLevelEncoder::isX12TermSep(FX_WCHAR ch) {
+bool CBC_HighLevelEncoder::isX12TermSep(wchar_t ch) {
return (ch == '\r') || (ch == '*') || (ch == '>');
}
-bool CBC_HighLevelEncoder::isNativeEDIFACT(FX_WCHAR ch) {
+bool CBC_HighLevelEncoder::isNativeEDIFACT(wchar_t ch) {
return ch >= ' ' && ch <= '^';
}
-bool CBC_HighLevelEncoder::isSpecialB256(FX_WCHAR ch) {
+bool CBC_HighLevelEncoder::isSpecialB256(wchar_t ch) {
return false;
}
diff --git a/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.h b/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.h
index 5d72f1074e..cfd16ed676 100644
--- a/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.h
+++ b/xfa/fxbarcode/datamatrix/BC_HighLevelEncoder.h
@@ -36,44 +36,44 @@ class CBC_HighLevelEncoder : public CBC_SymbolShapeHint {
static int32_t lookAheadTest(CFX_WideString msg,
int32_t startpos,
int32_t currentMode);
- static bool isDigit(FX_WCHAR ch);
- static bool isExtendedASCII(FX_WCHAR ch);
+ static bool isDigit(wchar_t ch);
+ static bool isExtendedASCII(wchar_t ch);
static int32_t determineConsecutiveDigitCount(CFX_WideString msg,
int32_t startpos);
- static void illegalCharacter(FX_WCHAR c, int32_t& e);
+ static void illegalCharacter(wchar_t c, int32_t& e);
public:
- static FX_WCHAR LATCH_TO_C40;
- static FX_WCHAR LATCH_TO_BASE256;
- static FX_WCHAR UPPER_SHIFT;
- static FX_WCHAR LATCH_TO_ANSIX12;
- static FX_WCHAR LATCH_TO_TEXT;
- static FX_WCHAR LATCH_TO_EDIFACT;
- static FX_WCHAR C40_UNLATCH;
- static FX_WCHAR X12_UNLATCH;
+ static wchar_t LATCH_TO_C40;
+ static wchar_t LATCH_TO_BASE256;
+ static wchar_t UPPER_SHIFT;
+ static wchar_t LATCH_TO_ANSIX12;
+ static wchar_t LATCH_TO_TEXT;
+ static wchar_t LATCH_TO_EDIFACT;
+ static wchar_t C40_UNLATCH;
+ static wchar_t X12_UNLATCH;
private:
- static FX_WCHAR PAD;
- static FX_WCHAR MACRO_05;
- static FX_WCHAR MACRO_06;
+ static wchar_t PAD;
+ static wchar_t MACRO_05;
+ static wchar_t MACRO_06;
static const wchar_t* MACRO_05_HEADER;
static const wchar_t* MACRO_06_HEADER;
static const wchar_t MACRO_TRAILER;
CFX_ArrayTemplate<uint8_t> m_bytearray;
private:
- static FX_WCHAR randomize253State(FX_WCHAR ch, int32_t codewordPosition);
+ static wchar_t randomize253State(wchar_t ch, int32_t codewordPosition);
static int32_t findMinimums(std::vector<FX_FLOAT>& charCounts,
CFX_ArrayTemplate<int32_t>& intCharCounts,
int32_t min,
CFX_ArrayTemplate<uint8_t>& mins);
static int32_t getMinimumCount(CFX_ArrayTemplate<uint8_t>& mins);
- static bool isNativeC40(FX_WCHAR ch);
- static bool isNativeText(FX_WCHAR ch);
- static bool isNativeX12(FX_WCHAR ch);
- static bool isX12TermSep(FX_WCHAR ch);
- static bool isNativeEDIFACT(FX_WCHAR ch);
- static bool isSpecialB256(FX_WCHAR ch);
+ static bool isNativeC40(wchar_t ch);
+ static bool isNativeText(wchar_t ch);
+ static bool isNativeX12(wchar_t ch);
+ static bool isX12TermSep(wchar_t ch);
+ static bool isNativeEDIFACT(wchar_t ch);
+ static bool isSpecialB256(wchar_t ch);
};
#endif // XFA_FXBARCODE_DATAMATRIX_BC_HIGHLEVELENCODER_H_
diff --git a/xfa/fxbarcode/datamatrix/BC_TextEncoder.cpp b/xfa/fxbarcode/datamatrix/BC_TextEncoder.cpp
index e3eb4a8c4e..cc02661c26 100644
--- a/xfa/fxbarcode/datamatrix/BC_TextEncoder.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_TextEncoder.cpp
@@ -35,61 +35,59 @@ CBC_TextEncoder::~CBC_TextEncoder() {}
int32_t CBC_TextEncoder::getEncodingMode() {
return TEXT_ENCODATION;
}
-int32_t CBC_TextEncoder::encodeChar(FX_WCHAR c,
- CFX_WideString& sb,
- int32_t& e) {
+int32_t CBC_TextEncoder::encodeChar(wchar_t c, CFX_WideString& sb, int32_t& e) {
if (c == ' ') {
- sb += (FX_WCHAR)'\3';
+ sb += (wchar_t)'\3';
return 1;
}
if (c >= '0' && c <= '9') {
- sb += (FX_WCHAR)(c - 48 + 4);
+ sb += (wchar_t)(c - 48 + 4);
return 1;
}
if (c >= 'a' && c <= 'z') {
- sb += (FX_WCHAR)(c - 97 + 14);
+ sb += (wchar_t)(c - 97 + 14);
return 1;
}
if (c <= 0x1f) {
- sb += (FX_WCHAR)'\0';
+ sb += (wchar_t)'\0';
sb += c;
return 2;
}
if (c >= '!' && c <= '/') {
- sb += (FX_WCHAR)'\1';
- sb += (FX_WCHAR)(c - 33);
+ sb += (wchar_t)'\1';
+ sb += (wchar_t)(c - 33);
return 2;
}
if (c >= ':' && c <= '@') {
- sb += (FX_WCHAR)'\1';
- sb += (FX_WCHAR)(c - 58 + 15);
+ sb += (wchar_t)'\1';
+ sb += (wchar_t)(c - 58 + 15);
return 2;
}
if (c >= '[' && c <= '_') {
- sb += (FX_WCHAR)'\1';
- sb += (FX_WCHAR)(c - 91 + 22);
+ sb += (wchar_t)'\1';
+ sb += (wchar_t)(c - 91 + 22);
return 2;
}
if (c == 0x0060) {
- sb += (FX_WCHAR)'\2';
- sb += (FX_WCHAR)(c - 96);
+ sb += (wchar_t)'\2';
+ sb += (wchar_t)(c - 96);
return 2;
}
if (c >= 'A' && c <= 'Z') {
- sb += (FX_WCHAR)'\2';
- sb += (FX_WCHAR)(c - 65 + 1);
+ sb += (wchar_t)'\2';
+ sb += (wchar_t)(c - 65 + 1);
return 2;
}
if (c >= '{' && c <= 0x007f) {
- sb += (FX_WCHAR)'\2';
- sb += (FX_WCHAR)(c - 123 + 27);
+ sb += (wchar_t)'\2';
+ sb += (wchar_t)(c - 123 + 27);
return 2;
}
if (c >= 0x0080) {
- sb += (FX_WCHAR)'\1';
- sb += (FX_WCHAR)0x001e;
+ sb += (wchar_t)'\1';
+ sb += (wchar_t)0x001e;
int32_t len = 2;
- len += encodeChar((FX_WCHAR)(c - 128), sb, e);
+ len += encodeChar((wchar_t)(c - 128), sb, e);
if (e != BCExceptionNO)
return -1;
return len;
diff --git a/xfa/fxbarcode/datamatrix/BC_TextEncoder.h b/xfa/fxbarcode/datamatrix/BC_TextEncoder.h
index e6013b9508..71092023da 100644
--- a/xfa/fxbarcode/datamatrix/BC_TextEncoder.h
+++ b/xfa/fxbarcode/datamatrix/BC_TextEncoder.h
@@ -16,7 +16,7 @@ class CBC_TextEncoder : public CBC_C40Encoder {
// CBC_C40Encoder
int32_t getEncodingMode() override;
- int32_t encodeChar(FX_WCHAR c, CFX_WideString& sb, int32_t& e) override;
+ int32_t encodeChar(wchar_t c, CFX_WideString& sb, int32_t& e) override;
};
#endif // XFA_FXBARCODE_DATAMATRIX_BC_TEXTENCODER_H_
diff --git a/xfa/fxbarcode/datamatrix/BC_X12Encoder.cpp b/xfa/fxbarcode/datamatrix/BC_X12Encoder.cpp
index d77af9318a..570076b348 100644
--- a/xfa/fxbarcode/datamatrix/BC_X12Encoder.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_X12Encoder.cpp
@@ -38,7 +38,7 @@ int32_t CBC_X12Encoder::getEncodingMode() {
void CBC_X12Encoder::Encode(CBC_EncoderContext& context, int32_t& e) {
CFX_WideString buffer;
while (context.hasMoreCharacters()) {
- FX_WCHAR c = context.getCurrentChar();
+ wchar_t c = context.getCurrentChar();
context.m_pos++;
encodeChar(c, buffer, e);
if (e != BCExceptionNO) {
@@ -79,19 +79,19 @@ void CBC_X12Encoder::handleEOD(CBC_EncoderContext& context,
context.signalEncoderChange(ASCII_ENCODATION);
}
}
-int32_t CBC_X12Encoder::encodeChar(FX_WCHAR c, CFX_WideString& sb, int32_t& e) {
+int32_t CBC_X12Encoder::encodeChar(wchar_t c, CFX_WideString& sb, int32_t& e) {
if (c == '\r') {
- sb += (FX_WCHAR)'\0';
+ sb += (wchar_t)'\0';
} else if (c == '*') {
- sb += (FX_WCHAR)'\1';
+ sb += (wchar_t)'\1';
} else if (c == '>') {
- sb += (FX_WCHAR)'\2';
+ sb += (wchar_t)'\2';
} else if (c == ' ') {
- sb += (FX_WCHAR)'\3';
+ sb += (wchar_t)'\3';
} else if (c >= '0' && c <= '9') {
- sb += (FX_WCHAR)(c - 48 + 4);
+ sb += (wchar_t)(c - 48 + 4);
} else if (c >= 'A' && c <= 'Z') {
- sb += (FX_WCHAR)(c - 65 + 14);
+ sb += (wchar_t)(c - 65 + 14);
} else {
CBC_HighLevelEncoder::illegalCharacter(c, e);
if (e != BCExceptionNO)
diff --git a/xfa/fxbarcode/datamatrix/BC_X12Encoder.h b/xfa/fxbarcode/datamatrix/BC_X12Encoder.h
index 52239ce529..693b9bba6c 100644
--- a/xfa/fxbarcode/datamatrix/BC_X12Encoder.h
+++ b/xfa/fxbarcode/datamatrix/BC_X12Encoder.h
@@ -20,7 +20,7 @@ class CBC_X12Encoder : public CBC_C40Encoder {
void handleEOD(CBC_EncoderContext& context,
CFX_WideString& buffer,
int32_t& e) override;
- int32_t encodeChar(FX_WCHAR c, CFX_WideString& sb, int32_t& e) override;
+ int32_t encodeChar(wchar_t c, CFX_WideString& sb, int32_t& e) override;
};
#endif // XFA_FXBARCODE_DATAMATRIX_BC_X12ENCODER_H_
diff --git a/xfa/fxbarcode/oned/BC_OneDimWriter.cpp b/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
index bc0d61fd25..dd7fcaa864 100644
--- a/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
+++ b/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
@@ -83,7 +83,7 @@ void CBC_OneDimWriter::SetFontColor(FX_ARGB color) {
m_fontColor = color;
}
-FX_WCHAR CBC_OneDimWriter::Upper(FX_WCHAR ch) {
+wchar_t CBC_OneDimWriter::Upper(wchar_t ch) {
if (ch >= 'a' && ch <= 'z') {
ch = ch - ('a' - 'A');
}
diff --git a/xfa/fxbarcode/oned/BC_OneDimWriter.h b/xfa/fxbarcode/oned/BC_OneDimWriter.h
index e37d774341..b7c5cebe06 100644
--- a/xfa/fxbarcode/oned/BC_OneDimWriter.h
+++ b/xfa/fxbarcode/oned/BC_OneDimWriter.h
@@ -96,7 +96,7 @@ class CBC_OneDimWriter : public CBC_Writer {
int32_t startColor,
int32_t& e);
- FX_WCHAR Upper(FX_WCHAR ch);
+ wchar_t Upper(wchar_t ch);
bool m_bPrintChecksum;
int32_t m_iDataLenth;
diff --git a/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.cpp b/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
index 399e5e7d40..7d51fa8f94 100644
--- a/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
@@ -28,17 +28,17 @@
namespace {
-const FX_CHAR ALPHABET_STRING[] = "0123456789-$:/.+ABCDTN";
+const char ALPHABET_STRING[] = "0123456789-$:/.+ABCDTN";
const int32_t CHARACTER_ENCODINGS[22] = {
0x003, 0x006, 0x009, 0x060, 0x012, 0x042, 0x021, 0x024,
0x030, 0x048, 0x00c, 0x018, 0x045, 0x051, 0x054, 0x015,
0x01A, 0x029, 0x00B, 0x00E, 0x01A, 0x029};
-const FX_CHAR START_END_CHARS[] = {'A', 'B', 'C', 'D', 'T', 'N', '*', 'E',
- 'a', 'b', 'c', 'd', 't', 'n', 'e'};
-const FX_CHAR CONTENT_CHARS[] = {'0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', '-', '$', '/', ':', '+', '.'};
+const char START_END_CHARS[] = {'A', 'B', 'C', 'D', 'T', 'N', '*', 'E',
+ 'a', 'b', 'c', 'd', 't', 'n', 'e'};
+const char CONTENT_CHARS[] = {'0', '1', '2', '3', '4', '5', '6', '7',
+ '8', '9', '-', '$', '/', ':', '+', '.'};
} // namespace
@@ -48,7 +48,7 @@ CBC_OnedCodaBarWriter::CBC_OnedCodaBarWriter() {
m_iWideNarrRatio = 2;
}
CBC_OnedCodaBarWriter::~CBC_OnedCodaBarWriter() {}
-bool CBC_OnedCodaBarWriter::SetStartChar(FX_CHAR start) {
+bool CBC_OnedCodaBarWriter::SetStartChar(char start) {
for (size_t i = 0; i < FX_ArraySize(START_END_CHARS); ++i) {
if (START_END_CHARS[i] == start) {
m_chStart = start;
@@ -58,7 +58,7 @@ bool CBC_OnedCodaBarWriter::SetStartChar(FX_CHAR start) {
return false;
}
-bool CBC_OnedCodaBarWriter::SetEndChar(FX_CHAR end) {
+bool CBC_OnedCodaBarWriter::SetEndChar(char end) {
for (size_t i = 0; i < FX_ArraySize(START_END_CHARS); ++i) {
if (START_END_CHARS[i] == end) {
m_chEnd = end;
@@ -84,22 +84,22 @@ bool CBC_OnedCodaBarWriter::SetWideNarrowRatio(int32_t ratio) {
m_iWideNarrRatio = ratio;
return true;
}
-bool CBC_OnedCodaBarWriter::FindChar(FX_WCHAR ch, bool isContent) {
+bool CBC_OnedCodaBarWriter::FindChar(wchar_t ch, bool isContent) {
if (isContent) {
for (size_t i = 0; i < FX_ArraySize(CONTENT_CHARS); ++i) {
- if (ch == (FX_WCHAR)CONTENT_CHARS[i]) {
+ if (ch == (wchar_t)CONTENT_CHARS[i]) {
return true;
}
}
for (size_t j = 0; j < FX_ArraySize(START_END_CHARS); ++j) {
- if (ch == (FX_WCHAR)START_END_CHARS[j]) {
+ if (ch == (wchar_t)START_END_CHARS[j]) {
return true;
}
}
return false;
} else {
for (size_t i = 0; i < FX_ArraySize(CONTENT_CHARS); ++i) {
- if (ch == (FX_WCHAR)CONTENT_CHARS[i]) {
+ if (ch == (wchar_t)CONTENT_CHARS[i]) {
return true;
}
}
@@ -108,7 +108,7 @@ bool CBC_OnedCodaBarWriter::FindChar(FX_WCHAR ch, bool isContent) {
}
bool CBC_OnedCodaBarWriter::CheckContentValidity(
const CFX_WideStringC& contents) {
- FX_WCHAR ch;
+ wchar_t ch;
int32_t index = 0;
for (index = 0; index < contents.GetLength(); index++) {
ch = contents.GetAt(index);
@@ -123,7 +123,7 @@ bool CBC_OnedCodaBarWriter::CheckContentValidity(
CFX_WideString CBC_OnedCodaBarWriter::FilterContents(
const CFX_WideStringC& contents) {
CFX_WideString filtercontents;
- FX_WCHAR ch;
+ wchar_t ch;
for (int32_t index = 0; index < contents.GetLength(); index++) {
ch = contents.GetAt(index);
if (ch > 175) {
@@ -170,7 +170,7 @@ uint8_t* CBC_OnedCodaBarWriter::Encode(const CFX_ByteString& contents,
CFX_ByteString data = m_chStart + contents + m_chEnd;
m_iContentLen = data.GetLength();
uint8_t* result = FX_Alloc2D(uint8_t, m_iWideNarrRatio * 7, data.GetLength());
- FX_CHAR ch;
+ char ch;
int32_t position = 0;
for (int32_t index = 0; index < data.GetLength(); index++) {
ch = data.GetAt(index);
diff --git a/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h b/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h
index 301c34a751..0d01ad9242 100644
--- a/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h
+++ b/xfa/fxbarcode/oned/BC_OnedCodaBarWriter.h
@@ -37,11 +37,11 @@ class CBC_OnedCodaBarWriter : public CBC_OneDimWriter {
void SetDataLength(int32_t length) override;
virtual CFX_WideString encodedContents(const CFX_WideStringC& contents);
- virtual bool SetStartChar(FX_CHAR start);
- virtual bool SetEndChar(FX_CHAR end);
+ virtual bool SetStartChar(char start);
+ virtual bool SetEndChar(char end);
virtual bool SetTextLocation(BC_TEXT_LOC location);
virtual bool SetWideNarrowRatio(int32_t ratio);
- virtual bool FindChar(FX_WCHAR ch, bool isContent);
+ virtual bool FindChar(wchar_t ch, bool isContent);
private:
void RenderResult(const CFX_WideStringC& contents,
@@ -50,8 +50,8 @@ class CBC_OnedCodaBarWriter : public CBC_OneDimWriter {
bool isDevice,
int32_t& e) override;
- FX_CHAR m_chStart;
- FX_CHAR m_chEnd;
+ char m_chStart;
+ char m_chEnd;
int32_t m_iWideNarrRatio;
};
diff --git a/xfa/fxbarcode/oned/BC_OnedCode128Writer.cpp b/xfa/fxbarcode/oned/BC_OnedCode128Writer.cpp
index f163b18663..c1e28a50c1 100644
--- a/xfa/fxbarcode/oned/BC_OnedCode128Writer.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedCode128Writer.cpp
@@ -102,7 +102,7 @@ bool CBC_OnedCode128Writer::CheckContentValidity(
CFX_WideString CBC_OnedCode128Writer::FilterContents(
const CFX_WideStringC& contents) {
CFX_WideString filterChineseChar;
- FX_WCHAR ch;
+ wchar_t ch;
for (int32_t i = 0; i < contents.GetLength(); i++) {
ch = contents.GetAt(i);
if (ch > 175) {
@@ -253,7 +253,7 @@ int32_t CBC_OnedCode128Writer::Encode128C(
checkSum += CODE_START_C * checkWeight;
while (position < contents.GetLength()) {
int32_t patternIndex = 0;
- FX_CHAR ch = contents.GetAt(position);
+ char ch = contents.GetAt(position);
if (ch < '0' || ch > '9') {
patternIndex = (int32_t)ch;
position++;
diff --git a/xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp b/xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp
index a1ba5c8086..bd0607d3cd 100644
--- a/xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedCode39Writer.cpp
@@ -27,10 +27,9 @@
namespace {
-const FX_CHAR ALPHABET_STRING[] =
- "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. *$/+%";
+const char ALPHABET_STRING[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. *$/+%";
-const FX_CHAR CHECKSUM_STRING[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%";
+const char CHECKSUM_STRING[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%";
const int32_t CHARACTER_ENCODINGS[44] = {
0x034, 0x121, 0x061, 0x160, 0x031, 0x130, 0x070, 0x025, 0x124,
@@ -48,12 +47,12 @@ CBC_OnedCode39Writer::~CBC_OnedCode39Writer() {}
bool CBC_OnedCode39Writer::CheckContentValidity(
const CFX_WideStringC& contents) {
for (int32_t i = 0; i < contents.GetLength(); i++) {
- FX_WCHAR ch = contents.GetAt(i);
- if ((ch >= (FX_WCHAR)'0' && ch <= (FX_WCHAR)'9') ||
- (ch >= (FX_WCHAR)'A' && ch <= (FX_WCHAR)'Z') || ch == (FX_WCHAR)'-' ||
- ch == (FX_WCHAR)'.' || ch == (FX_WCHAR)' ' || ch == (FX_WCHAR)'*' ||
- ch == (FX_WCHAR)'$' || ch == (FX_WCHAR)'/' || ch == (FX_WCHAR)'+' ||
- ch == (FX_WCHAR)'%') {
+ wchar_t ch = contents.GetAt(i);
+ if ((ch >= (wchar_t)'0' && ch <= (wchar_t)'9') ||
+ (ch >= (wchar_t)'A' && ch <= (wchar_t)'Z') || ch == (wchar_t)'-' ||
+ ch == (wchar_t)'.' || ch == (wchar_t)' ' || ch == (wchar_t)'*' ||
+ ch == (wchar_t)'$' || ch == (wchar_t)'/' || ch == (wchar_t)'+' ||
+ ch == (wchar_t)'%') {
continue;
}
return false;
@@ -65,8 +64,8 @@ CFX_WideString CBC_OnedCode39Writer::FilterContents(
const CFX_WideStringC& contents) {
CFX_WideString filtercontents;
for (int32_t i = 0; i < contents.GetLength(); i++) {
- FX_WCHAR ch = contents.GetAt(i);
- if (ch == (FX_WCHAR)'*' && (i == 0 || i == contents.GetLength() - 1)) {
+ wchar_t ch = contents.GetAt(i);
+ if (ch == (wchar_t)'*' && (i == 0 || i == contents.GetLength() - 1)) {
continue;
}
if (ch > 175) {
@@ -75,11 +74,11 @@ CFX_WideString CBC_OnedCode39Writer::FilterContents(
} else {
ch = Upper(ch);
}
- if ((ch >= (FX_WCHAR)'0' && ch <= (FX_WCHAR)'9') ||
- (ch >= (FX_WCHAR)'A' && ch <= (FX_WCHAR)'Z') || ch == (FX_WCHAR)'-' ||
- ch == (FX_WCHAR)'.' || ch == (FX_WCHAR)' ' || ch == (FX_WCHAR)'*' ||
- ch == (FX_WCHAR)'$' || ch == (FX_WCHAR)'/' || ch == (FX_WCHAR)'+' ||
- ch == (FX_WCHAR)'%') {
+ if ((ch >= (wchar_t)'0' && ch <= (wchar_t)'9') ||
+ (ch >= (wchar_t)'A' && ch <= (wchar_t)'Z') || ch == (wchar_t)'-' ||
+ ch == (wchar_t)'.' || ch == (wchar_t)' ' || ch == (wchar_t)'*' ||
+ ch == (wchar_t)'$' || ch == (wchar_t)'/' || ch == (wchar_t)'+' ||
+ ch == (wchar_t)'%') {
filtercontents += ch;
}
}
@@ -90,20 +89,20 @@ CFX_WideString CBC_OnedCode39Writer::RenderTextContents(
const CFX_WideStringC& contents) {
CFX_WideString renderContents;
for (int32_t i = 0; i < contents.GetLength(); i++) {
- FX_WCHAR ch = contents.GetAt(i);
- if (ch == (FX_WCHAR)'*' && (i == 0 || i == contents.GetLength() - 1)) {
+ wchar_t ch = contents.GetAt(i);
+ if (ch == (wchar_t)'*' && (i == 0 || i == contents.GetLength() - 1)) {
continue;
}
if (ch > 175) {
i++;
continue;
}
- if ((ch >= (FX_WCHAR)'0' && ch <= (FX_WCHAR)'9') ||
- (ch >= (FX_WCHAR)'A' && ch <= (FX_WCHAR)'Z') ||
- (ch >= (FX_WCHAR)'a' && ch <= (FX_WCHAR)'z') || ch == (FX_WCHAR)'-' ||
- ch == (FX_WCHAR)'.' || ch == (FX_WCHAR)' ' || ch == (FX_WCHAR)'*' ||
- ch == (FX_WCHAR)'$' || ch == (FX_WCHAR)'/' || ch == (FX_WCHAR)'+' ||
- ch == (FX_WCHAR)'%') {
+ if ((ch >= (wchar_t)'0' && ch <= (wchar_t)'9') ||
+ (ch >= (wchar_t)'A' && ch <= (wchar_t)'Z') ||
+ (ch >= (wchar_t)'a' && ch <= (wchar_t)'z') || ch == (wchar_t)'-' ||
+ ch == (wchar_t)'.' || ch == (wchar_t)' ' || ch == (wchar_t)'*' ||
+ ch == (wchar_t)'$' || ch == (wchar_t)'/' || ch == (wchar_t)'+' ||
+ ch == (wchar_t)'%') {
renderContents += ch;
}
}
@@ -155,8 +154,8 @@ void CBC_OnedCode39Writer::ToIntArray(int32_t a, int32_t* toReturn) {
toReturn[i] = (a & (1 << i)) == 0 ? 1 : m_iWideNarrRatio;
}
}
-FX_CHAR CBC_OnedCode39Writer::CalcCheckSum(const CFX_ByteString& contents,
- int32_t& e) {
+char CBC_OnedCode39Writer::CalcCheckSum(const CFX_ByteString& contents,
+ int32_t& e) {
int32_t length = contents.GetLength();
if (length > 80) {
e = BCExceptionContentsLengthShouldBetween1and80;
@@ -187,7 +186,7 @@ FX_CHAR CBC_OnedCode39Writer::CalcCheckSum(const CFX_ByteString& contents,
uint8_t* CBC_OnedCode39Writer::Encode(const CFX_ByteString& contents,
int32_t& outlength,
int32_t& e) {
- FX_CHAR checksum = CalcCheckSum(contents, e);
+ char checksum = CalcCheckSum(contents, e);
if (checksum == '*') {
return nullptr;
}
@@ -263,7 +262,7 @@ CFX_WideString CBC_OnedCode39Writer::encodedContents(
if (m_bCalcChecksum && m_bPrintChecksum) {
CFX_WideString checksumContent = FilterContents(contents);
CFX_ByteString str = checksumContent.UTF8Encode();
- FX_CHAR checksum;
+ char checksum;
checksum = CalcCheckSum(str, e);
if (e != BCExceptionNO)
return CFX_WideString();
diff --git a/xfa/fxbarcode/oned/BC_OnedCode39Writer.h b/xfa/fxbarcode/oned/BC_OnedCode39Writer.h
index c8755a3e69..5f7c294c2b 100644
--- a/xfa/fxbarcode/oned/BC_OnedCode39Writer.h
+++ b/xfa/fxbarcode/oned/BC_OnedCode39Writer.h
@@ -46,7 +46,7 @@ class CBC_OnedCode39Writer : public CBC_OneDimWriter {
private:
void ToIntArray(int32_t a, int32_t* toReturn);
- FX_CHAR CalcCheckSum(const CFX_ByteString& contents, int32_t& e);
+ char CalcCheckSum(const CFX_ByteString& contents, int32_t& e);
int32_t m_iWideNarrRatio;
};
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
index bcbc80a61d..47e47eaddb 100644
--- a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
@@ -62,7 +62,7 @@ bool CBC_OnedEAN13Writer::CheckContentValidity(
CFX_WideString CBC_OnedEAN13Writer::FilterContents(
const CFX_WideStringC& contents) {
CFX_WideString filtercontents;
- FX_WCHAR ch;
+ wchar_t ch;
for (int32_t i = 0; i < contents.GetLength(); i++) {
ch = contents.GetAt(i);
if (ch > 175) {
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp b/xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp
index c40223818f..cd21759a19 100644
--- a/xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp
@@ -65,7 +65,7 @@ bool CBC_OnedEAN8Writer::CheckContentValidity(const CFX_WideStringC& contents) {
CFX_WideString CBC_OnedEAN8Writer::FilterContents(
const CFX_WideStringC& contents) {
CFX_WideString filtercontents;
- FX_WCHAR ch;
+ wchar_t ch;
for (int32_t i = 0; i < contents.GetLength(); i++) {
ch = contents.GetAt(i);
if (ch > 175) {
diff --git a/xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp b/xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp
index 6d6e79637c..3cb72f204a 100644
--- a/xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp
@@ -50,7 +50,7 @@ bool CBC_OnedUPCAWriter::CheckContentValidity(const CFX_WideStringC& contents) {
CFX_WideString CBC_OnedUPCAWriter::FilterContents(
const CFX_WideStringC& contents) {
CFX_WideString filtercontents;
- FX_WCHAR ch;
+ wchar_t ch;
for (int32_t i = 0; i < contents.GetLength(); i++) {
ch = contents.GetAt(i);
if (ch > 175) {
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417.cpp b/xfa/fxbarcode/pdf417/BC_PDF417.cpp
index 2f01564b11..94c65b8538 100644
--- a/xfa/fxbarcode/pdf417/BC_PDF417.cpp
+++ b/xfa/fxbarcode/pdf417/BC_PDF417.cpp
@@ -427,10 +427,10 @@ void CBC_PDF417::generateBarcodeLogic(CFX_WideString msg,
}
int32_t n = sourceCodeWords + pad + 1;
CFX_WideString sb;
- sb += (FX_WCHAR)n;
+ sb += (wchar_t)n;
sb += highLevel;
for (int32_t i = 0; i < pad; i++) {
- sb += (FX_WCHAR)900;
+ sb += (wchar_t)900;
}
CFX_WideString dataCodewords(sb);
CFX_WideString ec = CBC_PDF417ErrorCorrection::generateErrorCorrection(
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp b/xfa/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp
index bdec403970..71cdc351db 100644
--- a/xfa/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp
+++ b/xfa/fxbarcode/pdf417/BC_PDF417ErrorCorrection.cpp
@@ -163,8 +163,8 @@ CFX_WideString CBC_PDF417ErrorCorrection::generateErrorCorrection(
int32_t k = getErrorCorrectionCodewordCount(errorCorrectionLevel, e);
if (e != BCExceptionNO)
return L" ";
- FX_WCHAR* ech = FX_Alloc(FX_WCHAR, k);
- FXSYS_memset(ech, 0, k * sizeof(FX_WCHAR));
+ wchar_t* ech = FX_Alloc(wchar_t, k);
+ FXSYS_memset(ech, 0, k * sizeof(wchar_t));
int32_t sld = dataCodewords.GetLength();
for (int32_t i = 0; i < sld; i++) {
int32_t t1 = (dataCodewords.GetAt(i) + ech[k - 1]) % 929;
@@ -173,18 +173,18 @@ CFX_WideString CBC_PDF417ErrorCorrection::generateErrorCorrection(
for (int32_t j = k - 1; j >= 1; j--) {
t2 = (t1 * EC_COEFFICIENTS[errorCorrectionLevel][j]) % 929;
t3 = 929 - t2;
- ech[j] = (FX_WCHAR)((ech[j - 1] + t3) % 929);
+ ech[j] = (wchar_t)((ech[j - 1] + t3) % 929);
}
t2 = (t1 * EC_COEFFICIENTS[errorCorrectionLevel][0]) % 929;
t3 = 929 - t2;
- ech[0] = (FX_WCHAR)(t3 % 929);
+ ech[0] = (wchar_t)(t3 % 929);
}
CFX_WideString sb;
for (int32_t j = k - 1; j >= 0; j--) {
if (ech[j] != 0) {
- ech[j] = (FX_WCHAR)(929 - ech[j]);
+ ech[j] = (wchar_t)(929 - ech[j]);
}
- sb += (FX_WCHAR)ech[j];
+ sb += (wchar_t)ech[j];
}
FX_Free(ech);
return sb;
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp b/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp
index 08a40c51b3..0d9c7cfbd0 100644
--- a/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp
+++ b/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp
@@ -64,7 +64,7 @@ CFX_WideString CBC_PDF417HighLevelEncoder::encodeHighLevel(
CFX_WideString msg;
int32_t len = bytes.GetLength();
for (int32_t i = 0; i < len; i++) {
- FX_WCHAR ch = (FX_WCHAR)(bytes.GetAt(i) & 0xff);
+ wchar_t ch = (wchar_t)(bytes.GetAt(i) & 0xff);
if (ch == '?' && bytes.GetAt(i) != '?') {
e = BCExceptionCharactersOutsideISO88591Encoding;
return CFX_WideString();
@@ -84,14 +84,14 @@ CFX_WideString CBC_PDF417HighLevelEncoder::encodeHighLevel(
} else if (compaction == BYTES) {
encodeBinary(&byteArr, p, byteArr.GetSize(), BYTE_COMPACTION, sb);
} else if (compaction == NUMERIC) {
- sb += (FX_WCHAR)LATCH_TO_NUMERIC;
+ sb += (wchar_t)LATCH_TO_NUMERIC;
encodeNumeric(msg, p, len, sb);
} else {
int32_t encodingMode = LATCH_TO_TEXT;
while (p < len) {
int32_t n = determineConsecutiveDigitCount(msg, p);
if (n >= 13) {
- sb += (FX_WCHAR)LATCH_TO_NUMERIC;
+ sb += (wchar_t)LATCH_TO_NUMERIC;
encodingMode = NUMERIC_COMPACTION;
textSubMode = SUBMODE_ALPHA;
encodeNumeric(msg, p, n, sb);
@@ -100,7 +100,7 @@ CFX_WideString CBC_PDF417HighLevelEncoder::encodeHighLevel(
int32_t t = determineConsecutiveTextCount(msg, p);
if (t >= 5 || n == len) {
if (encodingMode != TEXT_COMPACTION) {
- sb += (FX_WCHAR)LATCH_TO_TEXT;
+ sb += (wchar_t)LATCH_TO_TEXT;
encodingMode = TEXT_COMPACTION;
textSubMode = SUBMODE_ALPHA;
}
@@ -157,26 +157,26 @@ int32_t CBC_PDF417HighLevelEncoder::encodeText(CFX_WideString msg,
int32_t submode = initialSubmode;
int32_t idx = 0;
while (true) {
- FX_WCHAR ch = msg.GetAt(startpos + idx);
+ wchar_t ch = msg.GetAt(startpos + idx);
switch (submode) {
case SUBMODE_ALPHA:
if (isAlphaUpper(ch)) {
if (ch == ' ') {
- tmp += (FX_WCHAR)26;
+ tmp += (wchar_t)26;
} else {
- tmp += (FX_WCHAR)(ch - 65);
+ tmp += (wchar_t)(ch - 65);
}
} else {
if (isAlphaLower(ch)) {
submode = SUBMODE_LOWER;
- tmp += (FX_WCHAR)27;
+ tmp += (wchar_t)27;
continue;
} else if (isMixed(ch)) {
submode = SUBMODE_MIXED;
- tmp += (FX_WCHAR)28;
+ tmp += (wchar_t)28;
continue;
} else {
- tmp += (FX_WCHAR)29;
+ tmp += (wchar_t)29;
tmp += PUNCTUATION[ch];
break;
}
@@ -185,21 +185,21 @@ int32_t CBC_PDF417HighLevelEncoder::encodeText(CFX_WideString msg,
case SUBMODE_LOWER:
if (isAlphaLower(ch)) {
if (ch == ' ') {
- tmp += (FX_WCHAR)26;
+ tmp += (wchar_t)26;
} else {
- tmp += (FX_WCHAR)(ch - 97);
+ tmp += (wchar_t)(ch - 97);
}
} else {
if (isAlphaUpper(ch)) {
- tmp += (FX_WCHAR)27;
- tmp += (FX_WCHAR)(ch - 65);
+ tmp += (wchar_t)27;
+ tmp += (wchar_t)(ch - 65);
break;
} else if (isMixed(ch)) {
submode = SUBMODE_MIXED;
- tmp += (FX_WCHAR)28;
+ tmp += (wchar_t)28;
continue;
} else {
- tmp += (FX_WCHAR)29;
+ tmp += (wchar_t)29;
tmp += PUNCTUATION[ch];
break;
}
@@ -211,22 +211,22 @@ int32_t CBC_PDF417HighLevelEncoder::encodeText(CFX_WideString msg,
} else {
if (isAlphaUpper(ch)) {
submode = SUBMODE_ALPHA;
- tmp += (FX_WCHAR)28;
+ tmp += (wchar_t)28;
continue;
} else if (isAlphaLower(ch)) {
submode = SUBMODE_LOWER;
- tmp += (FX_WCHAR)27;
+ tmp += (wchar_t)27;
continue;
} else {
if (startpos + idx + 1 < count) {
- FX_WCHAR next = msg.GetAt(startpos + idx + 1);
+ wchar_t next = msg.GetAt(startpos + idx + 1);
if (isPunctuation(next)) {
submode = SUBMODE_PUNCTUATION;
- tmp += (FX_WCHAR)25;
+ tmp += (wchar_t)25;
continue;
}
}
- tmp += (FX_WCHAR)29;
+ tmp += (wchar_t)29;
tmp += PUNCTUATION[ch];
}
}
@@ -236,7 +236,7 @@ int32_t CBC_PDF417HighLevelEncoder::encodeText(CFX_WideString msg,
tmp += PUNCTUATION[ch];
} else {
submode = SUBMODE_ALPHA;
- tmp += (FX_WCHAR)29;
+ tmp += (wchar_t)29;
continue;
}
}
@@ -245,19 +245,19 @@ int32_t CBC_PDF417HighLevelEncoder::encodeText(CFX_WideString msg,
break;
}
}
- FX_WCHAR h = 0;
+ wchar_t h = 0;
int32_t len = tmp.GetLength();
for (int32_t i = 0; i < len; i++) {
bool odd = (i % 2) != 0;
if (odd) {
- h = (FX_WCHAR)((h * 30) + tmp.GetAt(i));
+ h = (wchar_t)((h * 30) + tmp.GetAt(i));
sb += h;
} else {
h = tmp.GetAt(i);
}
}
if ((len % 2) != 0) {
- sb += (FX_WCHAR)((h * 30) + 29);
+ sb += (wchar_t)((h * 30) + 29);
}
return submode;
}
@@ -267,13 +267,13 @@ void CBC_PDF417HighLevelEncoder::encodeBinary(CFX_ArrayTemplate<uint8_t>* bytes,
int32_t startmode,
CFX_WideString& sb) {
if (count == 1 && startmode == TEXT_COMPACTION) {
- sb += (FX_WCHAR)SHIFT_TO_BYTE;
+ sb += (wchar_t)SHIFT_TO_BYTE;
}
int32_t idx = startpos;
int32_t i = 0;
if (count >= 6) {
- sb += (FX_WCHAR)LATCH_TO_BYTE;
- FX_WCHAR chars[5];
+ sb += (wchar_t)LATCH_TO_BYTE;
+ wchar_t chars[5];
while ((startpos + count - idx) >= 6) {
int64_t t = 0;
for (i = 0; i < 6; i++) {
@@ -281,7 +281,7 @@ void CBC_PDF417HighLevelEncoder::encodeBinary(CFX_ArrayTemplate<uint8_t>* bytes,
t += bytes->GetAt(idx + i) & 0xff;
}
for (i = 0; i < 5; i++) {
- chars[i] = (FX_WCHAR)(t % 900);
+ chars[i] = (wchar_t)(t % 900);
t /= 900;
}
for (i = 4; i >= 0; i--) {
@@ -291,11 +291,11 @@ void CBC_PDF417HighLevelEncoder::encodeBinary(CFX_ArrayTemplate<uint8_t>* bytes,
}
}
if (idx < startpos + count) {
- sb += (FX_WCHAR)LATCH_TO_BYTE_PADDED;
+ sb += (wchar_t)LATCH_TO_BYTE_PADDED;
}
for (i = idx; i < startpos + count; i++) {
int32_t ch = bytes->GetAt(i) & 0xff;
- sb += (FX_WCHAR)ch;
+ sb += (wchar_t)ch;
}
}
void CBC_PDF417HighLevelEncoder::encodeNumeric(CFX_WideString msg,
@@ -308,11 +308,11 @@ void CBC_PDF417HighLevelEncoder::encodeNumeric(CFX_WideString msg,
CFX_WideString tmp;
int32_t len = 44 < count - idx ? 44 : count - idx;
CFX_ByteString part =
- ((FX_WCHAR)'1' + msg.Mid(startpos + idx, len)).UTF8Encode();
+ ((wchar_t)'1' + msg.Mid(startpos + idx, len)).UTF8Encode();
BigInteger bigint = stringToBigInteger(part.c_str());
do {
int32_t c = (bigint % num900).toInt();
- tmp += (FX_WCHAR)(c);
+ tmp += (wchar_t)(c);
bigint = bigint / num900;
} while (!bigint.isZero());
for (int32_t i = tmp.GetLength() - 1; i >= 0; i--) {
@@ -321,22 +321,22 @@ void CBC_PDF417HighLevelEncoder::encodeNumeric(CFX_WideString msg,
idx += len;
}
}
-bool CBC_PDF417HighLevelEncoder::isDigit(FX_WCHAR ch) {
+bool CBC_PDF417HighLevelEncoder::isDigit(wchar_t ch) {
return ch >= '0' && ch <= '9';
}
-bool CBC_PDF417HighLevelEncoder::isAlphaUpper(FX_WCHAR ch) {
+bool CBC_PDF417HighLevelEncoder::isAlphaUpper(wchar_t ch) {
return ch == ' ' || (ch >= 'A' && ch <= 'Z');
}
-bool CBC_PDF417HighLevelEncoder::isAlphaLower(FX_WCHAR ch) {
+bool CBC_PDF417HighLevelEncoder::isAlphaLower(wchar_t ch) {
return ch == ' ' || (ch >= 'a' && ch <= 'z');
}
-bool CBC_PDF417HighLevelEncoder::isMixed(FX_WCHAR ch) {
+bool CBC_PDF417HighLevelEncoder::isMixed(wchar_t ch) {
return MIXED[ch] != -1;
}
-bool CBC_PDF417HighLevelEncoder::isPunctuation(FX_WCHAR ch) {
+bool CBC_PDF417HighLevelEncoder::isPunctuation(wchar_t ch) {
return PUNCTUATION[ch] != -1;
}
-bool CBC_PDF417HighLevelEncoder::isText(FX_WCHAR ch) {
+bool CBC_PDF417HighLevelEncoder::isText(wchar_t ch) {
return ch == '\t' || ch == '\n' || ch == '\r' || (ch >= 32 && ch <= 126);
}
int32_t CBC_PDF417HighLevelEncoder::determineConsecutiveDigitCount(
@@ -346,7 +346,7 @@ int32_t CBC_PDF417HighLevelEncoder::determineConsecutiveDigitCount(
int32_t len = msg.GetLength();
int32_t idx = startpos;
if (idx < len) {
- FX_WCHAR ch = msg.GetAt(idx);
+ wchar_t ch = msg.GetAt(idx);
while (isDigit(ch) && idx < len) {
count++;
idx++;
@@ -363,7 +363,7 @@ int32_t CBC_PDF417HighLevelEncoder::determineConsecutiveTextCount(
int32_t len = msg.GetLength();
int32_t idx = startpos;
while (idx < len) {
- FX_WCHAR ch = msg.GetAt(idx);
+ wchar_t ch = msg.GetAt(idx);
int32_t numericCount = 0;
while (numericCount < 13 && isDigit(ch) && idx < len) {
numericCount++;
@@ -394,7 +394,7 @@ int32_t CBC_PDF417HighLevelEncoder::determineConsecutiveBinaryCount(
int32_t len = msg.GetLength();
int32_t idx = startpos;
while (idx < len) {
- FX_WCHAR ch = msg.GetAt(idx);
+ wchar_t ch = msg.GetAt(idx);
int32_t numericCount = 0;
while (numericCount < 13 && isDigit(ch)) {
numericCount++;
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h b/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h
index 38382c891c..01c2be02f8 100644
--- a/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h
+++ b/xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h
@@ -48,12 +48,12 @@ class CBC_PDF417HighLevelEncoder {
int32_t startpos,
int32_t count,
CFX_WideString& sb);
- static bool isDigit(FX_WCHAR ch);
- static bool isAlphaUpper(FX_WCHAR ch);
- static bool isAlphaLower(FX_WCHAR ch);
- static bool isMixed(FX_WCHAR ch);
- static bool isPunctuation(FX_WCHAR ch);
- static bool isText(FX_WCHAR ch);
+ static bool isDigit(wchar_t ch);
+ static bool isAlphaUpper(wchar_t ch);
+ static bool isAlphaLower(wchar_t ch);
+ static bool isMixed(wchar_t ch);
+ static bool isPunctuation(wchar_t ch);
+ static bool isText(wchar_t ch);
static int32_t determineConsecutiveDigitCount(CFX_WideString msg,
int32_t startpos);
static int32_t determineConsecutiveTextCount(CFX_WideString msg,
diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.cpp b/xfa/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.cpp
index a5450cf085..2990d980fc 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.cpp
+++ b/xfa/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.cpp
@@ -30,7 +30,7 @@ CBC_QRCoderErrorCorrectionLevel* CBC_QRCoderErrorCorrectionLevel::H = nullptr;
CBC_QRCoderErrorCorrectionLevel::CBC_QRCoderErrorCorrectionLevel(
int32_t ordinal,
int32_t bits,
- const FX_CHAR* name)
+ const char* name)
: m_ordinal(ordinal), m_bits(bits), m_name(name) {}
CBC_QRCoderErrorCorrectionLevel::~CBC_QRCoderErrorCorrectionLevel() {}
diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h b/xfa/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h
index e433ee1127..2f0d22eb29 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h
+++ b/xfa/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h
@@ -30,7 +30,7 @@ class CBC_QRCoderErrorCorrectionLevel {
private:
CBC_QRCoderErrorCorrectionLevel(int32_t ordinal,
int32_t bits,
- const FX_CHAR* name);
+ const char* name);
CBC_QRCoderErrorCorrectionLevel();
int32_t m_ordinal;
diff --git a/xfa/fxbarcode/utils.h b/xfa/fxbarcode/utils.h
index 1cb8d85013..21ef3830ef 100644
--- a/xfa/fxbarcode/utils.h
+++ b/xfa/fxbarcode/utils.h
@@ -13,8 +13,8 @@ bool BC_FX_ByteString_Replace(CFX_ByteString& dst,
uint32_t first,
uint32_t last,
int32_t count,
- FX_CHAR c);
-void BC_FX_ByteString_Append(CFX_ByteString& dst, int32_t count, FX_CHAR c);
+ char c);
+void BC_FX_ByteString_Append(CFX_ByteString& dst, int32_t count, char c);
void BC_FX_ByteString_Append(CFX_ByteString& dst,
const CFX_ArrayTemplate<uint8_t>& ba);
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);