diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-03-13 16:43:37 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-03-14 14:14:51 +0000 |
commit | 812e96c2b4c5908a1979da5e27cdcecda0d1dfc9 (patch) | |
tree | f0b0607f6b757eb22237527215094bd87b5d03ba /xfa/fxfa/parser | |
parent | 893822aa5b6254591f8e80fbffcbb4fa6ad849aa (diff) | |
download | pdfium-812e96c2b4c5908a1979da5e27cdcecda0d1dfc9.tar.xz |
Replace FX_CHAR and FX_WCHAR with underlying types.
Change-Id: I96e0a20d66b9184d22f64d8e4ce0dadd5a78c1e8
Reviewed-on: https://pdfium-review.googlesource.com/2967
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r-- | xfa/fxfa/parser/cscript_hostpseudomodel.cpp | 6 | ||||
-rw-r--r-- | xfa/fxfa/parser/cscript_layoutpseudomodel.cpp | 4 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_data.cpp | 2 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_dataexporter.cpp | 22 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_dataexporter.h | 4 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_node.cpp | 14 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_nodehelper.cpp | 4 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_nodehelper.h | 2 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_object.cpp | 2 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_resolveprocessor.cpp | 16 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_widetextread.cpp | 10 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_widetextread.h | 4 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_widgetdata.cpp | 12 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_widgetdata.h | 4 | ||||
-rw-r--r-- | xfa/fxfa/parser/xfa_layout_itemlayout.cpp | 8 | ||||
-rw-r--r-- | xfa/fxfa/parser/xfa_locale.cpp | 8 | ||||
-rw-r--r-- | xfa/fxfa/parser/xfa_localevalue.cpp | 18 | ||||
-rw-r--r-- | xfa/fxfa/parser/xfa_object.h | 2 | ||||
-rw-r--r-- | xfa/fxfa/parser/xfa_utils.cpp | 2 | ||||
-rw-r--r-- | xfa/fxfa/parser/xfa_utils.h | 2 |
20 files changed, 73 insertions, 73 deletions
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( |