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 "core/fxcrt/include/fx_ext.h" | 7 #include "core/fxcrt/include/fx_ext.h" |
8 #include "xfa/fxfa/app/xfa_ffnotify.h" | 8 #include "xfa/fxfa/app/xfa_ffnotify.h" |
9 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" | 9 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" |
10 #include "xfa/fxfa/parser/xfa_basic_imp.h" | 10 #include "xfa/fxfa/parser/xfa_basic_imp.h" |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 FX_POSITION pos = sUseNodes.GetStartPosition(); | 381 FX_POSITION pos = sUseNodes.GetStartPosition(); |
382 while (pos) { | 382 while (pos) { |
383 CXFA_Node* pUseHrefNode = NULL; | 383 CXFA_Node* pUseHrefNode = NULL; |
384 sUseNodes.GetNextAssoc(pos, pUseHrefNode); | 384 sUseNodes.GetNextAssoc(pos, pUseHrefNode); |
385 CFX_WideString wsUseVal; | 385 CFX_WideString wsUseVal; |
386 CFX_WideStringC wsURI, wsID, wsSOM; | 386 CFX_WideStringC wsURI, wsID, wsSOM; |
387 if (pUseHrefNode->TryCData(XFA_ATTRIBUTE_Usehref, wsUseVal) && | 387 if (pUseHrefNode->TryCData(XFA_ATTRIBUTE_Usehref, wsUseVal) && |
388 !wsUseVal.IsEmpty()) { | 388 !wsUseVal.IsEmpty()) { |
389 FX_STRSIZE uSharpPos = wsUseVal.Find('#'); | 389 FX_STRSIZE uSharpPos = wsUseVal.Find('#'); |
390 if (uSharpPos < 0) { | 390 if (uSharpPos < 0) { |
391 wsURI = wsUseVal; | 391 wsURI = wsUseVal.AsStringC(); |
392 } else { | 392 } else { |
393 wsURI = CFX_WideStringC(wsUseVal.c_str(), uSharpPos); | 393 wsURI = CFX_WideStringC(wsUseVal.c_str(), uSharpPos); |
394 FX_STRSIZE uLen = wsUseVal.GetLength(); | 394 FX_STRSIZE uLen = wsUseVal.GetLength(); |
395 if (uLen >= uSharpPos + 5 && | 395 if (uLen >= uSharpPos + 5 && |
396 CFX_WideStringC(wsUseVal.c_str() + uSharpPos, 5) == | 396 CFX_WideStringC(wsUseVal.c_str() + uSharpPos, 5) == |
397 FX_WSTRC(L"#som(") && | 397 FX_WSTRC(L"#som(") && |
398 wsUseVal[uLen - 1] == ')') { | 398 wsUseVal[uLen - 1] == ')') { |
399 wsSOM = CFX_WideStringC(wsUseVal.c_str() + uSharpPos + 5, | 399 wsSOM = CFX_WideStringC(wsUseVal.c_str() + uSharpPos + 5, |
400 uLen - 1 - uSharpPos - 5); | 400 uLen - 1 - uSharpPos - 5); |
401 } else { | 401 } else { |
(...skipping 29 matching lines...) Expand all Loading... |
431 pProtoNode)) { | 431 pProtoNode)) { |
432 continue; | 432 continue; |
433 } | 433 } |
434 } | 434 } |
435 if (!pProtoNode) { | 435 if (!pProtoNode) { |
436 continue; | 436 continue; |
437 } | 437 } |
438 XFA_ProtoMerge_MergeNode(this, pUseHrefNode, pProtoNode); | 438 XFA_ProtoMerge_MergeNode(this, pUseHrefNode, pProtoNode); |
439 } | 439 } |
440 } | 440 } |
OLD | NEW |