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

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

Issue 1846993002: Remove IXFA_* interfaces. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: 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_ffwidgetacc.h ('k') | xfa/fxfa/app/xfa_ffwidgethandler.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_ffwidgetacc.h" 7 #include "xfa/fxfa/app/xfa_ffwidgetacc.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
11 #include "xfa/fde/tto/fde_textout.h" 11 #include "xfa/fde/tto/fde_textout.h"
12 #include "xfa/fde/xml/fde_xml_imp.h" 12 #include "xfa/fde/xml/fde_xml_imp.h"
13 #include "xfa/fxfa/app/xfa_ffapp.h"
14 #include "xfa/fxfa/app/xfa_ffcheckbutton.h" 13 #include "xfa/fxfa/app/xfa_ffcheckbutton.h"
15 #include "xfa/fxfa/app/xfa_ffchoicelist.h" 14 #include "xfa/fxfa/app/xfa_ffchoicelist.h"
16 #include "xfa/fxfa/app/xfa_ffdoc.h"
17 #include "xfa/fxfa/app/xfa_ffdocview.h"
18 #include "xfa/fxfa/app/xfa_fffield.h" 15 #include "xfa/fxfa/app/xfa_fffield.h"
19 #include "xfa/fxfa/app/xfa_ffpageview.h"
20 #include "xfa/fxfa/app/xfa_ffwidget.h" 16 #include "xfa/fxfa/app/xfa_ffwidget.h"
21 #include "xfa/fxfa/app/xfa_fontmgr.h"
22 #include "xfa/fxfa/app/xfa_fwladapter.h" 17 #include "xfa/fxfa/app/xfa_fwladapter.h"
23 #include "xfa/fxfa/app/xfa_textlayout.h" 18 #include "xfa/fxfa/app/xfa_textlayout.h"
19 #include "xfa/fxfa/parser/xfa_document_layout_imp.h"
24 #include "xfa/fxfa/parser/xfa_localevalue.h" 20 #include "xfa/fxfa/parser/xfa_localevalue.h"
25 #include "xfa/fxfa/parser/xfa_script.h" 21 #include "xfa/fxfa/parser/xfa_script.h"
22 #include "xfa/fxfa/parser/xfa_script_imp.h"
23 #include "xfa/include/fxfa/xfa_ffapp.h"
24 #include "xfa/include/fxfa/xfa_ffdoc.h"
25 #include "xfa/include/fxfa/xfa_ffdocview.h"
26 #include "xfa/include/fxfa/xfa_ffpageview.h"
27 #include "xfa/include/fxfa/xfa_fontmgr.h"
26 28
27 static void XFA_FFDeleteCalcData(void* pData) { 29 static void XFA_FFDeleteCalcData(void* pData) {
28 if (pData) { 30 if (pData) {
29 delete ((CXFA_CalcData*)pData); 31 delete ((CXFA_CalcData*)pData);
30 } 32 }
31 } 33 }
32 static XFA_MAPDATABLOCKCALLBACKINFO gs_XFADeleteCalcData = { 34 static XFA_MAPDATABLOCKCALLBACKINFO gs_XFADeleteCalcData = {
33 XFA_FFDeleteCalcData, NULL}; 35 XFA_FFDeleteCalcData, NULL};
34 class CXFA_WidgetLayoutData { 36 class CXFA_WidgetLayoutData {
35 public: 37 public:
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 CFX_WideString wsExpression; 654 CFX_WideString wsExpression;
653 script.GetExpression(wsExpression); 655 script.GetExpression(wsExpression);
654 if (wsExpression.IsEmpty()) { 656 if (wsExpression.IsEmpty()) {
655 return XFA_EVENTERROR_NotExist; 657 return XFA_EVENTERROR_NotExist;
656 } 658 }
657 XFA_SCRIPTTYPE eScriptType = script.GetContentType(); 659 XFA_SCRIPTTYPE eScriptType = script.GetContentType();
658 if (eScriptType == XFA_SCRIPTTYPE_Unkown) { 660 if (eScriptType == XFA_SCRIPTTYPE_Unkown) {
659 return XFA_EVENTERROR_Success; 661 return XFA_EVENTERROR_Success;
660 } 662 }
661 CXFA_FFDoc* pDoc = GetDoc(); 663 CXFA_FFDoc* pDoc = GetDoc();
662 IXFA_ScriptContext* pContext = pDoc->GetXFADoc()->GetScriptContext(); 664 CXFA_ScriptContext* pContext = pDoc->GetXFADoc()->GetScriptContext();
663 pContext->SetEventParam(*pEventParam); 665 pContext->SetEventParam(*pEventParam);
664 pContext->SetRunAtType((XFA_ATTRIBUTEENUM)script.GetRunAt()); 666 pContext->SetRunAtType((XFA_ATTRIBUTEENUM)script.GetRunAt());
665 CXFA_NodeArray refNodes; 667 CXFA_NodeArray refNodes;
666 if (pEventParam->m_eType == XFA_EVENT_InitCalculate || 668 if (pEventParam->m_eType == XFA_EVENT_InitCalculate ||
667 pEventParam->m_eType == XFA_EVENT_Calculate) { 669 pEventParam->m_eType == XFA_EVENT_Calculate) {
668 pContext->SetNodesOfRunScript(&refNodes); 670 pContext->SetNodesOfRunScript(&refNodes);
669 } 671 }
670 FXJSE_HVALUE hRetValue = FXJSE_Value_Create(pContext->GetRuntime()); 672 FXJSE_HVALUE hRetValue = FXJSE_Value_Create(pContext->GetRuntime());
671 ++m_nRecursionDepth; 673 ++m_nRecursionDepth;
672 FX_BOOL bRet = pContext->RunScript((XFA_SCRIPTLANGTYPE)eScriptType, 674 FX_BOOL bRet = pContext->RunScript((XFA_SCRIPTLANGTYPE)eScriptType,
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after
1707 if (pIDNode) { 1709 if (pIDNode) {
1708 pEmbAcc = (CXFA_WidgetAcc*)pIDNode->GetWidgetData(); 1710 pEmbAcc = (CXFA_WidgetAcc*)pIDNode->GetWidgetData();
1709 } 1711 }
1710 if (pEmbAcc) { 1712 if (pEmbAcc) {
1711 pEmbAcc->GetValue(wsValue, XFA_VALUEPICTURE_Display); 1713 pEmbAcc->GetValue(wsValue, XFA_VALUEPICTURE_Display);
1712 return TRUE; 1714 return TRUE;
1713 } 1715 }
1714 } 1716 }
1715 return FALSE; 1717 return FALSE;
1716 } 1718 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_ffwidgetacc.h ('k') | xfa/fxfa/app/xfa_ffwidgethandler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698