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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 void CPDFDoc_Environment::JS_docmailForm(void* mailData, | 325 void CPDFDoc_Environment::JS_docmailForm(void* mailData, |
326 int length, | 326 int length, |
327 FPDF_BOOL bUI, | 327 FPDF_BOOL bUI, |
328 const FX_WCHAR* To, | 328 const FX_WCHAR* To, |
329 const FX_WCHAR* Subject, | 329 const FX_WCHAR* Subject, |
330 const FX_WCHAR* CC, | 330 const FX_WCHAR* CC, |
331 const FX_WCHAR* BCC, | 331 const FX_WCHAR* BCC, |
332 const FX_WCHAR* Msg) { | 332 const FX_WCHAR* Msg) { |
333 if (m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform->Doc_mail) { | 333 if (m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform->Doc_mail) { |
334 CFX_ByteString bsTo = CFX_WideString(To).UTF16LE_Encode(); | 334 CFX_ByteString bsTo = CFX_WideString(To).UTF16LE_Encode(); |
335 CFX_ByteString bsCC = CFX_WideString(Subject).UTF16LE_Encode(); | 335 CFX_ByteString bsSubject = CFX_WideString(Subject).UTF16LE_Encode(); |
| 336 CFX_ByteString bsCC = CFX_WideString(CC).UTF16LE_Encode(); |
336 CFX_ByteString bsBcc = CFX_WideString(BCC).UTF16LE_Encode(); | 337 CFX_ByteString bsBcc = CFX_WideString(BCC).UTF16LE_Encode(); |
337 CFX_ByteString bsSubject = CFX_WideString(Subject).UTF16LE_Encode(); | |
338 CFX_ByteString bsMsg = CFX_WideString(Msg).UTF16LE_Encode(); | 338 CFX_ByteString bsMsg = CFX_WideString(Msg).UTF16LE_Encode(); |
339 FPDF_WIDESTRING pTo = (FPDF_WIDESTRING)bsTo.GetBuffer(bsTo.GetLength()); | 339 FPDF_WIDESTRING pTo = (FPDF_WIDESTRING)bsTo.GetBuffer(bsTo.GetLength()); |
340 FPDF_WIDESTRING pCC = (FPDF_WIDESTRING)bsCC.GetBuffer(bsCC.GetLength()); | 340 FPDF_WIDESTRING pCC = (FPDF_WIDESTRING)bsCC.GetBuffer(bsCC.GetLength()); |
341 FPDF_WIDESTRING pBcc = (FPDF_WIDESTRING)bsBcc.GetBuffer(bsBcc.GetLength()); | 341 FPDF_WIDESTRING pBcc = (FPDF_WIDESTRING)bsBcc.GetBuffer(bsBcc.GetLength()); |
342 FPDF_WIDESTRING pSubject = | 342 FPDF_WIDESTRING pSubject = |
343 (FPDF_WIDESTRING)bsSubject.GetBuffer(bsSubject.GetLength()); | 343 (FPDF_WIDESTRING)bsSubject.GetBuffer(bsSubject.GetLength()); |
344 FPDF_WIDESTRING pMsg = (FPDF_WIDESTRING)bsMsg.GetBuffer(bsMsg.GetLength()); | 344 FPDF_WIDESTRING pMsg = (FPDF_WIDESTRING)bsMsg.GetBuffer(bsMsg.GetLength()); |
345 m_pInfo->m_pJsPlatform->Doc_mail(m_pInfo->m_pJsPlatform, mailData, length, | 345 m_pInfo->m_pJsPlatform->Doc_mail(m_pInfo->m_pJsPlatform, mailData, length, |
346 bUI, pTo, pSubject, pCC, pBcc, pMsg); | 346 bUI, pTo, pSubject, pCC, pBcc, pMsg); |
347 bsTo.ReleaseBuffer(); | 347 bsTo.ReleaseBuffer(); |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
924 CPDFSDK_Annot* pFocusAnnot = m_pSDKDoc->GetFocusAnnot(); | 924 CPDFSDK_Annot* pFocusAnnot = m_pSDKDoc->GetFocusAnnot(); |
925 if (!pFocusAnnot) | 925 if (!pFocusAnnot) |
926 return nullptr; | 926 return nullptr; |
927 | 927 |
928 for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray) { | 928 for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray) { |
929 if (pAnnot == pFocusAnnot) | 929 if (pAnnot == pFocusAnnot) |
930 return pAnnot; | 930 return pAnnot; |
931 } | 931 } |
932 return nullptr; | 932 return nullptr; |
933 } | 933 } |
OLD | NEW |