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

Side by Side Diff: fpdfsdk/fsdk_baseform.cpp

Issue 1809073004: Fix CPDFSDK_Widget::OnXFAAAction() (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 9 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 | « no previous file | 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 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 "fpdfsdk/include/fsdk_baseform.h" 7 #include "fpdfsdk/include/fsdk_baseform.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 data.nSelEnd - data.nSelStart); 229 data.nSelEnd - data.nSelStart);
230 for (int i = 0; i < data.sChange.GetLength(); i++) 230 for (int i = 0; i < data.sChange.GetLength(); i++)
231 param.m_wsNewText.Insert(data.nSelStart, data.sChange[i]); 231 param.m_wsNewText.Insert(data.nSelStart, data.sChange[i]);
232 param.m_wsPrevText = data.sValue; 232 param.m_wsPrevText = data.sValue;
233 233
234 if ((eEventType == XFA_EVENT_Click || eEventType == XFA_EVENT_Change) && 234 if ((eEventType == XFA_EVENT_Click || eEventType == XFA_EVENT_Change) &&
235 GetFieldType() == FIELDTYPE_RADIOBUTTON) { 235 GetFieldType() == FIELDTYPE_RADIOBUTTON) {
236 if (IXFA_Widget* hGroupWidget = GetGroupMixXFAWidget()) { 236 if (IXFA_Widget* hGroupWidget = GetGroupMixXFAWidget()) {
237 CXFA_WidgetAcc* pAcc = pXFAWidgetHandler->GetDataAcc(hGroupWidget); 237 CXFA_WidgetAcc* pAcc = pXFAWidgetHandler->GetDataAcc(hGroupWidget);
238 param.m_pTarget = pAcc; 238 param.m_pTarget = pAcc;
239 pXFAWidgetHandler->ProcessEvent(pAcc, &param); 239 if (pXFAWidgetHandler->ProcessEvent(pAcc, &param) !=
240 XFA_EVENTERROR_Success) {
241 return FALSE;
242 }
240 } 243 }
241
242 {
243 CXFA_WidgetAcc* pAcc = pXFAWidgetHandler->GetDataAcc(hWidget);
244 param.m_pTarget = pAcc;
245 int32_t nRet = pXFAWidgetHandler->ProcessEvent(pAcc, &param);
246 return nRet == XFA_EVENTERROR_Success;
247 }
248 } else {
249 CXFA_WidgetAcc* pAcc = pXFAWidgetHandler->GetDataAcc(hWidget);
250 param.m_pTarget = pAcc;
251 int32_t nRet = pXFAWidgetHandler->ProcessEvent(pAcc, &param);
252 return nRet == XFA_EVENTERROR_Success;
253 } 244 }
245 CXFA_WidgetAcc* pAcc = pXFAWidgetHandler->GetDataAcc(hWidget);
246 param.m_pTarget = pAcc;
247 int32_t nRet = pXFAWidgetHandler->ProcessEvent(pAcc, &param);
254 248
255 if (IXFA_DocView* pDocView = pDoc->GetXFADocView()) { 249 if (IXFA_DocView* pDocView = pDoc->GetXFADocView()) {
256 pDocView->UpdateDocView(); 250 pDocView->UpdateDocView();
257 } 251 }
252 return nRet == XFA_EVENTERROR_Success;
258 } 253 }
259 } 254 }
260 } 255 }
261 256
262 return FALSE; 257 return FALSE;
263 } 258 }
264 259
265 void CPDFSDK_Widget::Synchronize(FX_BOOL bSynchronizeElse) { 260 void CPDFSDK_Widget::Synchronize(FX_BOOL bSynchronizeElse) {
266 if (IXFA_Widget* hWidget = GetMixXFAWidget()) { 261 if (IXFA_Widget* hWidget = GetMixXFAWidget()) {
267 if (IXFA_WidgetHandler* pXFAWidgetHandler = GetXFAWidgetHandler()) { 262 if (IXFA_WidgetHandler* pXFAWidgetHandler = GetXFAWidgetHandler()) {
(...skipping 2596 matching lines...) Expand 10 before | Expand all | Expand 10 after
2864 break; 2859 break;
2865 } 2860 }
2866 } 2861 }
2867 } 2862 }
2868 2863
2869 CFX_FloatRect CBA_AnnotIterator::GetAnnotRect(const CPDFSDK_Annot* pAnnot) { 2864 CFX_FloatRect CBA_AnnotIterator::GetAnnotRect(const CPDFSDK_Annot* pAnnot) {
2870 CFX_FloatRect rcAnnot; 2865 CFX_FloatRect rcAnnot;
2871 pAnnot->GetPDFAnnot()->GetRect(rcAnnot); 2866 pAnnot->GetPDFAnnot()->GetRect(rcAnnot);
2872 return rcAnnot; 2867 return rcAnnot;
2873 } 2868 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698