| 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 "fpdfsdk/include/fpdfxfa/fpdfxfa_app.h" | 7 #include "fpdfsdk/include/fpdfxfa/fpdfxfa_app.h" |
| 8 #include "fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h" | 8 #include "fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h" |
| 9 #include "fpdfsdk/include/fpdfxfa/fpdfxfa_page.h" | 9 #include "fpdfsdk/include/fpdfxfa/fpdfxfa_page.h" |
| 10 #include "fpdfsdk/include/fpdfxfa/fpdfxfa_util.h" | 10 #include "fpdfsdk/include/fpdfxfa/fpdfxfa_util.h" |
| (...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1041 CFX_WideString srcURL = csURL; | 1041 CFX_WideString srcURL = csURL; |
| 1042 srcURL.TrimLeft(); | 1042 srcURL.TrimLeft(); |
| 1043 if (0 != srcURL.Left(7).CompareNoCase(L"mailto:")) | 1043 if (0 != srcURL.Left(7).CompareNoCase(L"mailto:")) |
| 1044 return FALSE; | 1044 return FALSE; |
| 1045 int pos = srcURL.Find(L'?', 0); | 1045 int pos = srcURL.Find(L'?', 0); |
| 1046 CFX_WideString tmp; | 1046 CFX_WideString tmp; |
| 1047 if (pos == -1) { | 1047 if (pos == -1) { |
| 1048 pos = srcURL.Find(L'@', 0); | 1048 pos = srcURL.Find(L'@', 0); |
| 1049 if (pos == -1) | 1049 if (pos == -1) |
| 1050 return FALSE; | 1050 return FALSE; |
| 1051 else { | 1051 |
| 1052 tmp = srcURL.Right(csURL.GetLength() - 7); | 1052 tmp = srcURL.Right(csURL.GetLength() - 7); |
| 1053 tmp.TrimLeft(); | 1053 tmp.TrimLeft(); |
| 1054 tmp.TrimRight(); | 1054 tmp.TrimRight(); |
| 1055 } | |
| 1056 } else { | 1055 } else { |
| 1057 tmp = srcURL.Left(pos); | 1056 tmp = srcURL.Left(pos); |
| 1058 tmp = tmp.Right(tmp.GetLength() - 7); | 1057 tmp = tmp.Right(tmp.GetLength() - 7); |
| 1059 tmp.TrimLeft(); | 1058 tmp.TrimLeft(); |
| 1060 tmp.TrimRight(); | 1059 tmp.TrimRight(); |
| 1061 } | 1060 } |
| 1062 | 1061 |
| 1063 csToAddress = tmp; | 1062 csToAddress = tmp; |
| 1064 | 1063 |
| 1065 srcURL = srcURL.Right(srcURL.GetLength() - (pos + 1)); | 1064 srcURL = srcURL.Right(srcURL.GetLength() - (pos + 1)); |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1249 } | 1248 } |
| 1250 | 1249 |
| 1251 return _GetHValueByName(szPropName, hValue, | 1250 return _GetHValueByName(szPropName, hValue, |
| 1252 m_pSDKDoc->GetEnv()->GetJSRuntime()); | 1251 m_pSDKDoc->GetEnv()->GetJSRuntime()); |
| 1253 } | 1252 } |
| 1254 FX_BOOL CPDFXFA_Document::_GetHValueByName(const CFX_ByteStringC& utf8Name, | 1253 FX_BOOL CPDFXFA_Document::_GetHValueByName(const CFX_ByteStringC& utf8Name, |
| 1255 FXJSE_HVALUE hValue, | 1254 FXJSE_HVALUE hValue, |
| 1256 IJS_Runtime* runTime) { | 1255 IJS_Runtime* runTime) { |
| 1257 return runTime->GetHValueByName(utf8Name, hValue); | 1256 return runTime->GetHValueByName(utf8Name, hValue); |
| 1258 } | 1257 } |
| OLD | NEW |