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

Side by Side Diff: xfa/fxfa/app/xfa_ffdocview.cpp

Issue 1882043004: Remove implicit cast from CFX_WideString to (const wchar_t*) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: win error #2 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/app/xfa_ffdoc.cpp ('k') | xfa/fxfa/app/xfa_ffimageedit.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 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/include/xfa_ffdocview.h" 7 #include "xfa/fxfa/include/xfa_ffdocview.h"
8 8
9 #include "core/fxcrt/include/fx_ext.h" 9 #include "core/fxcrt/include/fx_ext.h"
10 #include "xfa/fxfa/app/xfa_ffbarcode.h" 10 #include "xfa/fxfa/app/xfa_ffbarcode.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 iCount -= iRemain; 150 iCount -= iRemain;
151 CFX_WideString wsMsg; 151 CFX_WideString wsMsg;
152 for (int32_t i = 0; i < iCount; i++) { 152 for (int32_t i = 0; i < iCount; i++) {
153 wsMsg += m_arrNullTestMsg[i] + FX_WSTRC(L"\n"); 153 wsMsg += m_arrNullTestMsg[i] + FX_WSTRC(L"\n");
154 } 154 }
155 if (iRemain > 0) { 155 if (iRemain > 0) {
156 CFX_WideString wsLimit; 156 CFX_WideString wsLimit;
157 pAppProvider->LoadString(XFA_IDS_ValidateLimit, wsLimit); 157 pAppProvider->LoadString(XFA_IDS_ValidateLimit, wsLimit);
158 if (!wsLimit.IsEmpty()) { 158 if (!wsLimit.IsEmpty()) {
159 CFX_WideString wsTemp; 159 CFX_WideString wsTemp;
160 wsTemp.Format((const FX_WCHAR*)wsLimit, iRemain); 160 wsTemp.Format(wsLimit.c_str(), iRemain);
161 wsMsg += FX_WSTRC(L"\n") + wsTemp; 161 wsMsg += FX_WSTRC(L"\n") + wsTemp;
162 } 162 }
163 } 163 }
164 CFX_WideString wsTitle; 164 CFX_WideString wsTitle;
165 pAppProvider->LoadString(XFA_IDS_AppName, wsTitle); 165 pAppProvider->LoadString(XFA_IDS_AppName, wsTitle);
166 pAppProvider->MsgBox(wsMsg.AsStringC(), wsTitle.AsStringC(), 166 pAppProvider->MsgBox(wsMsg.AsStringC(), wsTitle.AsStringC(),
167 XFA_MBICON_Status, XFA_MB_OK); 167 XFA_MBICON_Status, XFA_MB_OK);
168 } 168 }
169 m_arrNullTestMsg.RemoveAll(); 169 m_arrNullTestMsg.RemoveAll();
170 } 170 }
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 } 785 }
786 CFX_WideStringC wsValueRef, wsLabelRef; 786 CFX_WideStringC wsValueRef, wsLabelRef;
787 binditems.GetValueRef(wsValueRef); 787 binditems.GetValueRef(wsValueRef);
788 binditems.GetLabelRef(wsLabelRef); 788 binditems.GetLabelRef(wsLabelRef);
789 const bool bUseValue = wsLabelRef.IsEmpty() || wsLabelRef == wsValueRef; 789 const bool bUseValue = wsLabelRef.IsEmpty() || wsLabelRef == wsValueRef;
790 const bool bLabelUseContent = 790 const bool bLabelUseContent =
791 wsLabelRef.IsEmpty() || wsLabelRef == FX_WSTRC(L"$"); 791 wsLabelRef.IsEmpty() || wsLabelRef == FX_WSTRC(L"$");
792 const bool bValueUseContent = 792 const bool bValueUseContent =
793 wsValueRef.IsEmpty() || wsValueRef == FX_WSTRC(L"$"); 793 wsValueRef.IsEmpty() || wsValueRef == FX_WSTRC(L"$");
794 CFX_WideString wsValue, wsLabel; 794 CFX_WideString wsValue, wsLabel;
795 uint32_t uValueHash = FX_HashCode_String_GetW(CFX_WideString(wsValueRef), 795 uint32_t uValueHash =
796 wsValueRef.GetLength()); 796 FX_HashCode_String_GetW(wsValueRef.c_str(), wsValueRef.GetLength());
797 for (int32_t i = 0; i < iCount; i++) { 797 for (int32_t i = 0; i < iCount; i++) {
798 CXFA_Object* refObj = rs.nodes[i]; 798 CXFA_Object* refObj = rs.nodes[i];
799 if (!refObj->IsNode()) { 799 if (!refObj->IsNode()) {
800 continue; 800 continue;
801 } 801 }
802 CXFA_Node* refNode = refObj->AsNode(); 802 CXFA_Node* refNode = refObj->AsNode();
803 if (bValueUseContent) { 803 if (bValueUseContent) {
804 wsValue = refNode->GetContent(); 804 wsValue = refNode->GetContent();
805 } else { 805 } else {
806 CXFA_Node* nodeValue = refNode->GetFirstChildByName(uValueHash); 806 CXFA_Node* nodeValue = refNode->GetFirstChildByName(uValueHash);
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 CXFA_WidgetAcc* CXFA_WidgetAccIterator::GetCurrentWidgetAcc() { 918 CXFA_WidgetAcc* CXFA_WidgetAccIterator::GetCurrentWidgetAcc() {
919 return NULL; 919 return NULL;
920 } 920 }
921 FX_BOOL CXFA_WidgetAccIterator::SetCurrentWidgetAcc(CXFA_WidgetAcc* hWidget) { 921 FX_BOOL CXFA_WidgetAccIterator::SetCurrentWidgetAcc(CXFA_WidgetAcc* hWidget) {
922 return FALSE; 922 return FALSE;
923 } 923 }
924 void CXFA_WidgetAccIterator::SkipTree() { 924 void CXFA_WidgetAccIterator::SkipTree() {
925 m_ContentIterator.SkipChildrenAndMoveToNext(); 925 m_ContentIterator.SkipChildrenAndMoveToNext();
926 m_pCurWidgetAcc = NULL; 926 m_pCurWidgetAcc = NULL;
927 } 927 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_ffdoc.cpp ('k') | xfa/fxfa/app/xfa_ffimageedit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698