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