Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: xfa/fxfa/parser/cxfa_widgetdata.cpp

Issue 1862053003: Fix spelling for SetSelectedItems (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fxfa/parser/cxfa_widgetdata.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fxfa/parser/cxfa_widgetdata.h" 7 #include "xfa/fxfa/parser/cxfa_widgetdata.h"
8 8
9 #include "xfa/fxfa/parser/xfa_object.h" 9 #include "xfa/fxfa/parser/xfa_object.h"
10 #include "xfa/fxfa/parser/cxfa_event.h" 10 #include "xfa/fxfa/parser/cxfa_event.h"
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 } 806 }
807 } else if (iSel >= 0) { 807 } else if (iSel >= 0) {
808 CFX_Int32Array iSelArray; 808 CFX_Int32Array iSelArray;
809 GetSelectedItems(iSelArray); 809 GetSelectedItems(iSelArray);
810 for (int32_t i = 0; i < iSelArray.GetSize(); i++) { 810 for (int32_t i = 0; i < iSelArray.GetSize(); i++) {
811 if (iSelArray[i] == nIndex) { 811 if (iSelArray[i] == nIndex) {
812 iSelArray.RemoveAt(i); 812 iSelArray.RemoveAt(i);
813 break; 813 break;
814 } 814 }
815 } 815 }
816 SetSelectdItems(iSelArray, bNotify, bScriptModify, bSyncData); 816 SetSelectedItems(iSelArray, bNotify, bScriptModify, bSyncData);
817 } 817 }
818 } else { 818 } else {
819 if (bSelected) { 819 if (bSelected) {
820 if (iSel < 0) { 820 if (iSel < 0) {
821 CFX_WideString wsSaveText = wsSaveTextArray[nIndex]; 821 CFX_WideString wsSaveText = wsSaveTextArray[nIndex];
822 CFX_WideString wsFormatText(wsSaveText); 822 CFX_WideString wsFormatText(wsSaveText);
823 GetFormatDataValue(wsSaveText.AsWideStringC(), wsFormatText); 823 GetFormatDataValue(wsSaveText.AsWideStringC(), wsFormatText);
824 m_pNode->SetContent(wsSaveText, wsFormatText, bNotify, bScriptModify, 824 m_pNode->SetContent(wsSaveText, wsFormatText, bNotify, bScriptModify,
825 bSyncData); 825 bSyncData);
826 } 826 }
827 } else if (iSel >= 0) { 827 } else if (iSel >= 0) {
828 m_pNode->SetContent(CFX_WideString(), CFX_WideString(), bNotify, 828 m_pNode->SetContent(CFX_WideString(), CFX_WideString(), bNotify,
829 bScriptModify, bSyncData); 829 bScriptModify, bSyncData);
830 } 830 }
831 } 831 }
832 } 832 }
833 833
834 void CXFA_WidgetData::SetSelectdItems(CFX_Int32Array& iSelArray, 834 void CXFA_WidgetData::SetSelectedItems(CFX_Int32Array& iSelArray,
835 FX_BOOL bNotify, 835 FX_BOOL bNotify,
836 FX_BOOL bScriptModify, 836 FX_BOOL bScriptModify,
837 FX_BOOL bSyncData) { 837 FX_BOOL bSyncData) {
838 CFX_WideString wsValue; 838 CFX_WideString wsValue;
839 int32_t iSize = iSelArray.GetSize(); 839 int32_t iSize = iSelArray.GetSize();
840 if (iSize >= 1) { 840 if (iSize >= 1) {
841 CFX_WideStringArray wsSaveTextArray; 841 CFX_WideStringArray wsSaveTextArray;
842 GetChoiceListItems(wsSaveTextArray, TRUE); 842 GetChoiceListItems(wsSaveTextArray, TRUE);
843 CFX_WideString wsItemValue; 843 CFX_WideString wsItemValue;
844 for (int32_t i = 0; i < iSize; i++) { 844 for (int32_t i = 0; i < iSize; i++) {
845 wsItemValue = (iSize == 1) 845 wsItemValue = (iSize == 1)
846 ? wsSaveTextArray[iSelArray[i]] 846 ? wsSaveTextArray[iSelArray[i]]
847 : wsSaveTextArray[iSelArray[i]] + FX_WSTRC(L"\n"); 847 : wsSaveTextArray[iSelArray[i]] + FX_WSTRC(L"\n");
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
1788 } 1788 }
1789 } 1789 }
1790 } else if (wc == L'.') { 1790 } else if (wc == L'.') {
1791 iTread_ = 0; 1791 iTread_ = 0;
1792 iLead = -1; 1792 iLead = -1;
1793 } 1793 }
1794 wsRet += wc; 1794 wsRet += wc;
1795 } 1795 }
1796 return wsRet; 1796 return wsRet;
1797 } 1797 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/cxfa_widgetdata.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698