OLD | NEW |
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_ffdocview.h" | 7 #include "xfa/fxfa/include/xfa_ffdocview.h" |
8 | 8 |
9 #include "core/fxcrt/include/fx_ext.h" | 9 #include "core/fxcrt/include/fx_ext.h" |
10 #include "xfa/fxfa/app/xfa_ffbarcode.h" | 10 #include "xfa/fxfa/app/xfa_ffbarcode.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 CFX_WideString wsLimit; | 156 CFX_WideString wsLimit; |
157 pAppProvider->LoadString(XFA_IDS_ValidateLimit, wsLimit); | 157 pAppProvider->LoadString(XFA_IDS_ValidateLimit, wsLimit); |
158 if (!wsLimit.IsEmpty()) { | 158 if (!wsLimit.IsEmpty()) { |
159 CFX_WideString wsTemp; | 159 CFX_WideString wsTemp; |
160 wsTemp.Format((const FX_WCHAR*)wsLimit, iRemain); | 160 wsTemp.Format((const FX_WCHAR*)wsLimit, iRemain); |
161 wsMsg += FX_WSTRC(L"\n") + wsTemp; | 161 wsMsg += FX_WSTRC(L"\n") + wsTemp; |
162 } | 162 } |
163 } | 163 } |
164 CFX_WideString wsTitle; | 164 CFX_WideString wsTitle; |
165 pAppProvider->LoadString(XFA_IDS_AppName, wsTitle); | 165 pAppProvider->LoadString(XFA_IDS_AppName, wsTitle); |
166 pAppProvider->MsgBox(wsMsg.AsWideStringC(), wsTitle.AsWideStringC(), | 166 pAppProvider->MsgBox(wsMsg.AsStringC(), wsTitle.AsStringC(), |
167 XFA_MBICON_Status, XFA_MB_OK); | 167 XFA_MBICON_Status, XFA_MB_OK); |
168 } | 168 } |
169 m_arrNullTestMsg.RemoveAll(); | 169 m_arrNullTestMsg.RemoveAll(); |
170 } | 170 } |
171 void CXFA_FFDocView::UpdateDocView() { | 171 void CXFA_FFDocView::UpdateDocView() { |
172 if (IsUpdateLocked()) { | 172 if (IsUpdateLocked()) { |
173 return; | 173 return; |
174 } | 174 } |
175 LockUpdate(); | 175 LockUpdate(); |
176 int32_t iNewAdds = m_NewAddedNodes.GetSize(); | 176 int32_t iNewAdds = m_NewAddedNodes.GetSize(); |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 } | 511 } |
512 CXFA_Node* refNode = NULL; | 512 CXFA_Node* refNode = NULL; |
513 if (pRefWidgetAcc) { | 513 if (pRefWidgetAcc) { |
514 refNode = pRefWidgetAcc->GetNode(); | 514 refNode = pRefWidgetAcc->GetNode(); |
515 wsExpression = wsName; | 515 wsExpression = wsName; |
516 } else { | 516 } else { |
517 wsExpression = L"$form." + wsName; | 517 wsExpression = L"$form." + wsName; |
518 } | 518 } |
519 XFA_RESOLVENODE_RS resoveNodeRS; | 519 XFA_RESOLVENODE_RS resoveNodeRS; |
520 int32_t iRet = pScriptContext->ResolveObjects( | 520 int32_t iRet = pScriptContext->ResolveObjects( |
521 refNode, wsExpression.AsWideStringC(), resoveNodeRS, dwStyle); | 521 refNode, wsExpression.AsStringC(), resoveNodeRS, dwStyle); |
522 if (iRet < 1) { | 522 if (iRet < 1) { |
523 return NULL; | 523 return NULL; |
524 } | 524 } |
525 if (resoveNodeRS.dwFlags == XFA_RESOVENODE_RSTYPE_Nodes) { | 525 if (resoveNodeRS.dwFlags == XFA_RESOVENODE_RSTYPE_Nodes) { |
526 CXFA_Node* pNode = resoveNodeRS.nodes[0]->AsNode(); | 526 CXFA_Node* pNode = resoveNodeRS.nodes[0]->AsNode(); |
527 if (pNode) { | 527 if (pNode) { |
528 return (CXFA_WidgetAcc*)pNode->GetWidgetData(); | 528 return (CXFA_WidgetAcc*)pNode->GetWidgetData(); |
529 } | 529 } |
530 } | 530 } |
531 return NULL; | 531 return NULL; |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
917 CXFA_WidgetAcc* CXFA_WidgetAccIterator::GetCurrentWidgetAcc() { | 917 CXFA_WidgetAcc* CXFA_WidgetAccIterator::GetCurrentWidgetAcc() { |
918 return NULL; | 918 return NULL; |
919 } | 919 } |
920 FX_BOOL CXFA_WidgetAccIterator::SetCurrentWidgetAcc(CXFA_WidgetAcc* hWidget) { | 920 FX_BOOL CXFA_WidgetAccIterator::SetCurrentWidgetAcc(CXFA_WidgetAcc* hWidget) { |
921 return FALSE; | 921 return FALSE; |
922 } | 922 } |
923 void CXFA_WidgetAccIterator::SkipTree() { | 923 void CXFA_WidgetAccIterator::SkipTree() { |
924 m_ContentIterator.SkipChildrenAndMoveToNext(); | 924 m_ContentIterator.SkipChildrenAndMoveToNext(); |
925 m_pCurWidgetAcc = NULL; | 925 m_pCurWidgetAcc = NULL; |
926 } | 926 } |
OLD | NEW |