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

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

Issue 2593163002: remove some CFX_ArrayTemplate in xfa_ffdocview.h (Closed)
Patch Set: duplicate code Created 3 years, 11 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/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/app/xfa_ffnotify.h" 7 #include "xfa/fxfa/app/xfa_ffnotify.h"
8 8
9 #include "fxjs/cfxjse_value.h" 9 #include "fxjs/cfxjse_value.h"
10 #include "xfa/fxfa/app/xfa_ffbarcode.h" 10 #include "xfa/fxfa/app/xfa_ffbarcode.h"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 return; 319 return;
320 320
321 XFA_Element eType = pNode->GetElementType(); 321 XFA_Element eType = pNode->GetElementType();
322 if (XFA_IsCreateWidget(eType)) { 322 if (XFA_IsCreateWidget(eType)) {
323 CXFA_WidgetAcc* pAcc = new CXFA_WidgetAcc(pDocView, pNode); 323 CXFA_WidgetAcc* pAcc = new CXFA_WidgetAcc(pDocView, pNode);
324 pNode->SetObject(XFA_ATTRIBUTE_WidgetData, pAcc, &gs_XFADeleteWidgetAcc); 324 pNode->SetObject(XFA_ATTRIBUTE_WidgetData, pAcc, &gs_XFADeleteWidgetAcc);
325 return; 325 return;
326 } 326 }
327 switch (eType) { 327 switch (eType) {
328 case XFA_Element::BindItems: 328 case XFA_Element::BindItems:
329 pDocView->m_BindItems.Add(pNode); 329 pDocView->m_BindItems.push_back(pNode);
330 break; 330 break;
331 case XFA_Element::Validate: { 331 case XFA_Element::Validate: {
332 pNode->SetFlag(XFA_NodeFlag_NeedsInitApp, false); 332 pNode->SetFlag(XFA_NodeFlag_NeedsInitApp, false);
333 } break; 333 } break;
334 default: 334 default:
335 break; 335 break;
336 } 336 }
337 } 337 }
338 338
339 void CXFA_FFNotify::OnValueChanging(CXFA_Node* pSender, XFA_ATTRIBUTE eAttr) { 339 void CXFA_FFNotify::OnValueChanging(CXFA_Node* pSender, XFA_ATTRIBUTE eAttr) {
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 return; 504 return;
505 505
506 CXFA_FFWidget* pWidget = XFA_GetWidgetFromLayoutItem(pSender); 506 CXFA_FFWidget* pWidget = XFA_GetWidgetFromLayoutItem(pSender);
507 if (!pWidget) 507 if (!pWidget)
508 return; 508 return;
509 509
510 pDocView->DeleteLayoutItem(pWidget); 510 pDocView->DeleteLayoutItem(pWidget);
511 m_pDoc->GetDocEnvironment()->WidgetPreRemove(pWidget, pWidget->GetDataAcc()); 511 m_pDoc->GetDocEnvironment()->WidgetPreRemove(pWidget, pWidget->GetDataAcc());
512 pWidget->AddInvalidateRect(nullptr); 512 pWidget->AddInvalidateRect(nullptr);
513 } 513 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_ffdocview.cpp ('k') | xfa/fxfa/xfa_ffdocview.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698