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 <algorithm> | 7 #include <algorithm> |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "fpdfsdk/include/fsdk_mgr.h" | 10 #include "fpdfsdk/include/fsdk_mgr.h" |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 void CPDFDoc_Environment::JS_docmailForm(void* mailData, | 337 void CPDFDoc_Environment::JS_docmailForm(void* mailData, |
338 int length, | 338 int length, |
339 FPDF_BOOL bUI, | 339 FPDF_BOOL bUI, |
340 const FX_WCHAR* To, | 340 const FX_WCHAR* To, |
341 const FX_WCHAR* Subject, | 341 const FX_WCHAR* Subject, |
342 const FX_WCHAR* CC, | 342 const FX_WCHAR* CC, |
343 const FX_WCHAR* BCC, | 343 const FX_WCHAR* BCC, |
344 const FX_WCHAR* Msg) { | 344 const FX_WCHAR* Msg) { |
345 if (m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform->Doc_mail) { | 345 if (m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform->Doc_mail) { |
346 CFX_ByteString bsTo = CFX_WideString(To).UTF16LE_Encode(); | 346 CFX_ByteString bsTo = CFX_WideString(To).UTF16LE_Encode(); |
347 CFX_ByteString bsCC = CFX_WideString(Subject).UTF16LE_Encode(); | 347 CFX_ByteString bsSubject = CFX_WideString(Subject).UTF16LE_Encode(); |
| 348 CFX_ByteString bsCC = CFX_WideString(CC).UTF16LE_Encode(); |
348 CFX_ByteString bsBcc = CFX_WideString(BCC).UTF16LE_Encode(); | 349 CFX_ByteString bsBcc = CFX_WideString(BCC).UTF16LE_Encode(); |
349 CFX_ByteString bsSubject = CFX_WideString(Subject).UTF16LE_Encode(); | |
350 CFX_ByteString bsMsg = CFX_WideString(Msg).UTF16LE_Encode(); | 350 CFX_ByteString bsMsg = CFX_WideString(Msg).UTF16LE_Encode(); |
351 FPDF_WIDESTRING pTo = (FPDF_WIDESTRING)bsTo.GetBuffer(bsTo.GetLength()); | 351 FPDF_WIDESTRING pTo = (FPDF_WIDESTRING)bsTo.GetBuffer(bsTo.GetLength()); |
352 FPDF_WIDESTRING pCC = (FPDF_WIDESTRING)bsCC.GetBuffer(bsCC.GetLength()); | 352 FPDF_WIDESTRING pCC = (FPDF_WIDESTRING)bsCC.GetBuffer(bsCC.GetLength()); |
353 FPDF_WIDESTRING pBcc = (FPDF_WIDESTRING)bsBcc.GetBuffer(bsBcc.GetLength()); | 353 FPDF_WIDESTRING pBcc = (FPDF_WIDESTRING)bsBcc.GetBuffer(bsBcc.GetLength()); |
354 FPDF_WIDESTRING pSubject = | 354 FPDF_WIDESTRING pSubject = |
355 (FPDF_WIDESTRING)bsSubject.GetBuffer(bsSubject.GetLength()); | 355 (FPDF_WIDESTRING)bsSubject.GetBuffer(bsSubject.GetLength()); |
356 FPDF_WIDESTRING pMsg = (FPDF_WIDESTRING)bsMsg.GetBuffer(bsMsg.GetLength()); | 356 FPDF_WIDESTRING pMsg = (FPDF_WIDESTRING)bsMsg.GetBuffer(bsMsg.GetLength()); |
357 m_pInfo->m_pJsPlatform->Doc_mail(m_pInfo->m_pJsPlatform, mailData, length, | 357 m_pInfo->m_pJsPlatform->Doc_mail(m_pInfo->m_pJsPlatform, mailData, length, |
358 bUI, pTo, pSubject, pCC, pBcc, pMsg); | 358 bUI, pTo, pSubject, pCC, pBcc, pMsg); |
359 bsTo.ReleaseBuffer(); | 359 bsTo.ReleaseBuffer(); |
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 CPDFSDK_Annot* pFocusAnnot = m_pSDKDoc->GetFocusAnnot(); | 1179 CPDFSDK_Annot* pFocusAnnot = m_pSDKDoc->GetFocusAnnot(); |
1180 if (!pFocusAnnot) | 1180 if (!pFocusAnnot) |
1181 return nullptr; | 1181 return nullptr; |
1182 | 1182 |
1183 for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray) { | 1183 for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray) { |
1184 if (pAnnot == pFocusAnnot) | 1184 if (pAnnot == pFocusAnnot) |
1185 return pAnnot; | 1185 return pAnnot; |
1186 } | 1186 } |
1187 return nullptr; | 1187 return nullptr; |
1188 } | 1188 } |
OLD | NEW |