diff options
author | tsepez <tsepez@chromium.org> | 2017-01-20 12:59:50 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2017-01-20 12:59:50 -0800 |
commit | 82aa396188ec26f22fe730f4e35b5a54ebffb5dc (patch) | |
tree | 3950a96204c68fed27d1812cdd9d30de1a6226c0 /xfa/fxfa/parser | |
parent | 6db6fbcdee9f1887ac02c647210bd5013358f12d (diff) | |
download | pdfium-82aa396188ec26f22fe730f4e35b5a54ebffb5dc.tar.xz |
Replace CFX_ByteArray with CFX_ArrayTemplate<uint8_t>chromium/2990chromium/2989chromium/2988
Also replace CFX_Int32Array typedef with CFX_ArrayTemplate<int32_t>.
Removing the typedefs makes subsequent conversion to std::vector<>
easier on a case-by-case basis.
Review-Url: https://codereview.chromium.org/2649563003
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r-- | xfa/fxfa/parser/cxfa_resolveprocessor.cpp | 5 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_resolveprocessor.h | 2 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_widgetdata.cpp | 6 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_widgetdata.h | 4 |
4 files changed, 9 insertions, 8 deletions
diff --git a/xfa/fxfa/parser/cxfa_resolveprocessor.cpp b/xfa/fxfa/parser/cxfa_resolveprocessor.cpp index 271e14be6c..9bd34726c5 100644 --- a/xfa/fxfa/parser/cxfa_resolveprocessor.cpp +++ b/xfa/fxfa/parser/cxfa_resolveprocessor.cpp @@ -497,7 +497,8 @@ int32_t CXFA_ResolveProcessor::ResolveAsterisk(CXFA_ResolveNodesData& rnd) { nodes.Append((CXFA_ObjArray&)array); return nodes.GetSize(); } -int32_t CXFA_ResolveProcessor::ResolvePopStack(CFX_Int32Array& stack) { +int32_t CXFA_ResolveProcessor::ResolvePopStack( + CFX_ArrayTemplate<int32_t>& stack) { int32_t nType = -1; int32_t iSize = stack.GetSize() - 1; if (iSize > -1) { @@ -520,7 +521,7 @@ int32_t CXFA_ResolveProcessor::GetFilter(const CFX_WideStringC& wsExpression, FX_WCHAR* pConditionBuf = wsCondition.GetBuffer(iLength - nStart); int32_t nNameCount = 0; int32_t nConditionCount = 0; - CFX_Int32Array stack; + CFX_ArrayTemplate<int32_t> stack; int32_t nType = -1; const FX_WCHAR* pSrc = wsExpression.c_str(); FX_WCHAR wPrev = 0, wCur; diff --git a/xfa/fxfa/parser/cxfa_resolveprocessor.h b/xfa/fxfa/parser/cxfa_resolveprocessor.h index 2590021cdb..d806d57b93 100644 --- a/xfa/fxfa/parser/cxfa_resolveprocessor.h +++ b/xfa/fxfa/parser/cxfa_resolveprocessor.h @@ -60,7 +60,7 @@ class CXFA_ResolveProcessor { int32_t ResolveNumberSign(CXFA_ResolveNodesData& rnd); int32_t ResolveAsterisk(CXFA_ResolveNodesData& rnd); int32_t ResolveNormal(CXFA_ResolveNodesData& rnd); - int32_t ResolvePopStack(CFX_Int32Array& stack); + int32_t ResolvePopStack(CFX_ArrayTemplate<int32_t>& stack); void SetStylesForChild(uint32_t dwParentStyles, CXFA_ResolveNodesData& rnd); void ConditionArray(int32_t iCurIndex, diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp index 80c50b781e..31c5cf48e6 100644 --- a/xfa/fxfa/parser/cxfa_widgetdata.cpp +++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp @@ -874,7 +874,7 @@ int32_t CXFA_WidgetData::GetSelectedItem(int32_t nIndex) { return -1; } -void CXFA_WidgetData::GetSelectedItems(CFX_Int32Array& iSelArray) { +void CXFA_WidgetData::GetSelectedItems(CFX_ArrayTemplate<int32_t>& iSelArray) { std::vector<CFX_WideString> wsValueArray; GetSelectedItemsValue(wsValueArray); int32_t iValues = pdfium::CollectionSize<int32_t>(wsValueArray); @@ -973,7 +973,7 @@ void CXFA_WidgetData::SetItemState(int32_t nIndex, bSyncData); } } else if (iSel >= 0) { - CFX_Int32Array iSelArray; + CFX_ArrayTemplate<int32_t> iSelArray; GetSelectedItems(iSelArray); for (int32_t i = 0; i < iSelArray.GetSize(); i++) { if (iSelArray[i] == nIndex) { @@ -999,7 +999,7 @@ void CXFA_WidgetData::SetItemState(int32_t nIndex, } } -void CXFA_WidgetData::SetSelectedItems(CFX_Int32Array& iSelArray, +void CXFA_WidgetData::SetSelectedItems(CFX_ArrayTemplate<int32_t>& iSelArray, bool bNotify, bool bScriptModify, bool bSyncData) { diff --git a/xfa/fxfa/parser/cxfa_widgetdata.h b/xfa/fxfa/parser/cxfa_widgetdata.h index 7986fa9d82..4f5db3bad6 100644 --- a/xfa/fxfa/parser/cxfa_widgetdata.h +++ b/xfa/fxfa/parser/cxfa_widgetdata.h @@ -102,7 +102,7 @@ class CXFA_WidgetData : public CXFA_Data { bool bSaveValue = false); int32_t CountSelectedItems(); int32_t GetSelectedItem(int32_t nIndex = 0); - void GetSelectedItems(CFX_Int32Array& iSelArray); + void GetSelectedItems(CFX_ArrayTemplate<int32_t>& iSelArray); void GetSelectedItemsValue(std::vector<CFX_WideString>& wsSelTextArray); bool GetItemState(int32_t nIndex); void SetItemState(int32_t nIndex, @@ -110,7 +110,7 @@ class CXFA_WidgetData : public CXFA_Data { bool bNotify, bool bScriptModify, bool bSyncData); - void SetSelectedItems(CFX_Int32Array& iSelArray, + void SetSelectedItems(CFX_ArrayTemplate<int32_t>& iSelArray, bool bNotify, bool bScriptModify, bool bSyncData); |