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

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

Issue 1891673003: Pass CFX_WideString to CXFA_FFDocView::GetWidgetByName. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Nits 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_ffdocview.cpp ('k') | xfa/fxfa/include/xfa_ffdocview.h » ('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_ffpageview.h" 7 #include "xfa/fxfa/include/xfa_ffpageview.h"
8 8
9 #include "xfa/fde/fde_render.h" 9 #include "xfa/fde/fde_render.h"
10 #include "xfa/fxfa/app/xfa_ffcheckbutton.h" 10 #include "xfa/fxfa/app/xfa_ffcheckbutton.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 } 225 }
226 CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::GetTraverseWidget( 226 CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::GetTraverseWidget(
227 CXFA_FFWidget* pWidget) { 227 CXFA_FFWidget* pWidget) {
228 CXFA_WidgetAcc* pAcc = pWidget->GetDataAcc(); 228 CXFA_WidgetAcc* pAcc = pWidget->GetDataAcc();
229 CXFA_Node* pTraversal = pAcc->GetNode()->GetChild(0, XFA_ELEMENT_Traversal); 229 CXFA_Node* pTraversal = pAcc->GetNode()->GetChild(0, XFA_ELEMENT_Traversal);
230 if (pTraversal) { 230 if (pTraversal) {
231 CXFA_Node* pTraverse = pTraversal->GetChild(0, XFA_ELEMENT_Traverse); 231 CXFA_Node* pTraverse = pTraversal->GetChild(0, XFA_ELEMENT_Traverse);
232 if (pTraverse) { 232 if (pTraverse) {
233 CFX_WideString wsTraverseWidgetName; 233 CFX_WideString wsTraverseWidgetName;
234 if (pTraverse->GetAttribute(XFA_ATTRIBUTE_Ref, wsTraverseWidgetName)) { 234 if (pTraverse->GetAttribute(XFA_ATTRIBUTE_Ref, wsTraverseWidgetName)) {
235 return FindWidgetByName(wsTraverseWidgetName.AsStringC(), pWidget); 235 return FindWidgetByName(wsTraverseWidgetName, pWidget);
236 } 236 }
237 } 237 }
238 } 238 }
239 return NULL; 239 return NULL;
240 } 240 }
241 CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::FindWidgetByName( 241 CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::FindWidgetByName(
242 const CFX_WideStringC& wsWidgetName, 242 const CFX_WideString& wsWidgetName,
243 CXFA_FFWidget* pRefWidget) { 243 CXFA_FFWidget* pRefWidget) {
244 return pRefWidget->GetDocView()->GetWidgetByName(wsWidgetName, pRefWidget); 244 return pRefWidget->GetDocView()->GetWidgetByName(wsWidgetName, pRefWidget);
245 } 245 }
246 void CXFA_FFTabOrderPageWidgetIterator::CreateTabOrderWidgetArray() { 246 void CXFA_FFTabOrderPageWidgetIterator::CreateTabOrderWidgetArray() {
247 m_TabOrderWidgetArray.RemoveAll(); 247 m_TabOrderWidgetArray.RemoveAll();
248 CXFA_WidgetArray SpaceOrderWidgetArray; 248 CXFA_WidgetArray SpaceOrderWidgetArray;
249 CreateSpaceOrderWidgetArray(SpaceOrderWidgetArray); 249 CreateSpaceOrderWidgetArray(SpaceOrderWidgetArray);
250 int32_t nWidgetCount = SpaceOrderWidgetArray.GetSize(); 250 int32_t nWidgetCount = SpaceOrderWidgetArray.GetSize();
251 if (nWidgetCount < 1) { 251 if (nWidgetCount < 1) {
252 return; 252 return;
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 CXFA_LayoutItem* pLayoutItem) { 375 CXFA_LayoutItem* pLayoutItem) {
376 if (CXFA_FFWidget* pWidget = XFA_GetWidgetFromLayoutItem(pLayoutItem)) { 376 if (CXFA_FFWidget* pWidget = XFA_GetWidgetFromLayoutItem(pLayoutItem)) {
377 if (!pWidget->IsLoaded() && 377 if (!pWidget->IsLoaded() &&
378 (pWidget->GetStatus() & XFA_WIDGETSTATUS_Visible)) { 378 (pWidget->GetStatus() & XFA_WIDGETSTATUS_Visible)) {
379 pWidget->LoadWidget(); 379 pWidget->LoadWidget();
380 } 380 }
381 return pWidget; 381 return pWidget;
382 } 382 }
383 return NULL; 383 return NULL;
384 } 384 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_ffdocview.cpp ('k') | xfa/fxfa/include/xfa_ffdocview.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698