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

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

Issue 2328573002: Split CPDFXFA_Document apart (Closed)
Patch Set: Fix merge Created 4 years, 3 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_ffwidgetacc.cpp ('k') | xfa/fxfa/app/xfa_fwladapter.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_ffwidgethandler.h" 7 #include "xfa/fxfa/include/xfa_ffwidgethandler.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 28 matching lines...) Expand all
39 } 39 }
40 40
41 FX_BOOL CXFA_FFWidgetHandler::OnLButtonDown(CXFA_FFWidget* hWidget, 41 FX_BOOL CXFA_FFWidgetHandler::OnLButtonDown(CXFA_FFWidget* hWidget,
42 uint32_t dwFlags, 42 uint32_t dwFlags,
43 FX_FLOAT fx, 43 FX_FLOAT fx,
44 FX_FLOAT fy) { 44 FX_FLOAT fy) {
45 m_pDocView->LockUpdate(); 45 m_pDocView->LockUpdate();
46 hWidget->Rotate2Normal(fx, fy); 46 hWidget->Rotate2Normal(fx, fy);
47 FX_BOOL bRet = hWidget->OnLButtonDown(dwFlags, fx, fy); 47 FX_BOOL bRet = hWidget->OnLButtonDown(dwFlags, fx, fy);
48 if (bRet && m_pDocView->SetFocus(hWidget)) { 48 if (bRet && m_pDocView->SetFocus(hWidget)) {
49 m_pDocView->GetDoc()->GetDocProvider()->SetFocusWidget(m_pDocView->GetDoc(), 49 m_pDocView->GetDoc()->GetDocEnvironment()->SetFocusWidget(
50 hWidget); 50 m_pDocView->GetDoc(), hWidget);
51 } 51 }
52 m_pDocView->UnlockUpdate(); 52 m_pDocView->UnlockUpdate();
53 m_pDocView->UpdateDocView(); 53 m_pDocView->UpdateDocView();
54 return bRet; 54 return bRet;
55 } 55 }
56 56
57 FX_BOOL CXFA_FFWidgetHandler::OnLButtonUp(CXFA_FFWidget* hWidget, 57 FX_BOOL CXFA_FFWidgetHandler::OnLButtonUp(CXFA_FFWidget* hWidget,
58 uint32_t dwFlags, 58 uint32_t dwFlags,
59 FX_FLOAT fx, 59 FX_FLOAT fx,
60 FX_FLOAT fy) { 60 FX_FLOAT fy) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 return bRet; 98 return bRet;
99 } 99 }
100 100
101 FX_BOOL CXFA_FFWidgetHandler::OnRButtonDown(CXFA_FFWidget* hWidget, 101 FX_BOOL CXFA_FFWidgetHandler::OnRButtonDown(CXFA_FFWidget* hWidget,
102 uint32_t dwFlags, 102 uint32_t dwFlags,
103 FX_FLOAT fx, 103 FX_FLOAT fx,
104 FX_FLOAT fy) { 104 FX_FLOAT fy) {
105 hWidget->Rotate2Normal(fx, fy); 105 hWidget->Rotate2Normal(fx, fy);
106 FX_BOOL bRet = hWidget->OnRButtonDown(dwFlags, fx, fy); 106 FX_BOOL bRet = hWidget->OnRButtonDown(dwFlags, fx, fy);
107 if (bRet && m_pDocView->SetFocus(hWidget)) { 107 if (bRet && m_pDocView->SetFocus(hWidget)) {
108 m_pDocView->GetDoc()->GetDocProvider()->SetFocusWidget(m_pDocView->GetDoc(), 108 m_pDocView->GetDoc()->GetDocEnvironment()->SetFocusWidget(
109 hWidget); 109 m_pDocView->GetDoc(), hWidget);
110 } 110 }
111 m_pDocView->RunInvalidate(); 111 m_pDocView->RunInvalidate();
112 return bRet; 112 return bRet;
113 } 113 }
114 114
115 FX_BOOL CXFA_FFWidgetHandler::OnRButtonUp(CXFA_FFWidget* hWidget, 115 FX_BOOL CXFA_FFWidgetHandler::OnRButtonUp(CXFA_FFWidget* hWidget,
116 uint32_t dwFlags, 116 uint32_t dwFlags,
117 FX_FLOAT fx, 117 FX_FLOAT fx,
118 FX_FLOAT fy) { 118 FX_FLOAT fy) {
119 hWidget->Rotate2Normal(fx, fy); 119 hWidget->Rotate2Normal(fx, fy);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 CXFA_EventParam* pParam) { 218 CXFA_EventParam* pParam) {
219 if (!pParam || pParam->m_eType == XFA_EVENT_Unknown) 219 if (!pParam || pParam->m_eType == XFA_EVENT_Unknown)
220 return XFA_EVENTERROR_NotExist; 220 return XFA_EVENTERROR_NotExist;
221 if (!pWidgetAcc || pWidgetAcc->GetElementType() == XFA_Element::Draw) 221 if (!pWidgetAcc || pWidgetAcc->GetElementType() == XFA_Element::Draw)
222 return XFA_EVENTERROR_NotExist; 222 return XFA_EVENTERROR_NotExist;
223 223
224 switch (pParam->m_eType) { 224 switch (pParam->m_eType) {
225 case XFA_EVENT_Calculate: 225 case XFA_EVENT_Calculate:
226 return pWidgetAcc->ProcessCalculate(); 226 return pWidgetAcc->ProcessCalculate();
227 case XFA_EVENT_Validate: 227 case XFA_EVENT_Validate:
228 if (m_pDocView->GetDoc()->GetDocProvider()->IsValidationsEnabled( 228 if (m_pDocView->GetDoc()->GetDocEnvironment()->IsValidationsEnabled(
229 m_pDocView->GetDoc())) { 229 m_pDocView->GetDoc())) {
230 return pWidgetAcc->ProcessValidate(); 230 return pWidgetAcc->ProcessValidate();
231 } 231 }
232 return XFA_EVENTERROR_Disabled; 232 return XFA_EVENTERROR_Disabled;
233 case XFA_EVENT_InitCalculate: { 233 case XFA_EVENT_InitCalculate: {
234 CXFA_Calculate calc = pWidgetAcc->GetCalculate(); 234 CXFA_Calculate calc = pWidgetAcc->GetCalculate();
235 if (!calc) 235 if (!calc)
236 return XFA_EVENTERROR_NotExist; 236 return XFA_EVENTERROR_NotExist;
237 if (pWidgetAcc->GetNode()->IsUserInteractive()) 237 if (pWidgetAcc->GetNode()->IsUserInteractive())
238 return XFA_EVENTERROR_Disabled; 238 return XFA_EVENTERROR_Disabled;
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 } 544 }
545 545
546 CXFA_Document* CXFA_FFWidgetHandler::GetObjFactory() const { 546 CXFA_Document* CXFA_FFWidgetHandler::GetObjFactory() const {
547 return GetXFADoc(); 547 return GetXFADoc();
548 } 548 }
549 549
550 CXFA_Document* CXFA_FFWidgetHandler::GetXFADoc() const { 550 CXFA_Document* CXFA_FFWidgetHandler::GetXFADoc() const {
551 return m_pDocView->GetDoc()->GetXFADoc(); 551 return m_pDocView->GetDoc()->GetXFADoc();
552 } 552 }
553 553
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_ffwidgetacc.cpp ('k') | xfa/fxfa/app/xfa_fwladapter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698