| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef FPDFSDK_INCLUDE_CPDFDOC_ENVIRONMENT_H_ | 7 #ifndef FPDFSDK_INCLUDE_CPDFDOC_ENVIRONMENT_H_ |
| 8 #define FPDFSDK_INCLUDE_CPDFDOC_ENVIRONMENT_H_ | 8 #define FPDFSDK_INCLUDE_CPDFDOC_ENVIRONMENT_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 const CFX_WideStringC& wsURL, | 195 const CFX_WideStringC& wsURL, |
| 196 FX_BOOL bAppend) { | 196 FX_BOOL bAppend) { |
| 197 if (m_pInfo && m_pInfo->FFI_GotoURL) { | 197 if (m_pInfo && m_pInfo->FFI_GotoURL) { |
| 198 CFX_ByteString bsTo = CFX_WideString(wsURL).UTF16LE_Encode(); | 198 CFX_ByteString bsTo = CFX_WideString(wsURL).UTF16LE_Encode(); |
| 199 FPDF_WIDESTRING pTo = (FPDF_WIDESTRING)bsTo.GetBuffer(wsURL.GetLength()); | 199 FPDF_WIDESTRING pTo = (FPDF_WIDESTRING)bsTo.GetBuffer(wsURL.GetLength()); |
| 200 m_pInfo->FFI_GotoURL(m_pInfo, document, pTo); | 200 m_pInfo->FFI_GotoURL(m_pInfo, document, pTo); |
| 201 bsTo.ReleaseBuffer(); | 201 bsTo.ReleaseBuffer(); |
| 202 } | 202 } |
| 203 } | 203 } |
| 204 | 204 |
| 205 void FFI_GetURL(FPDF_DOCUMENT document, CFX_WideString& wsURL) { | |
| 206 wsURL = CFX_WideString(); | |
| 207 } | |
| 208 | |
| 209 void FFI_GetPageViewRect(FPDF_PAGE page, FS_RECTF& dstRect) { | 205 void FFI_GetPageViewRect(FPDF_PAGE page, FS_RECTF& dstRect) { |
| 210 if (m_pInfo && m_pInfo->FFI_GetPageViewRect) { | 206 if (m_pInfo && m_pInfo->FFI_GetPageViewRect) { |
| 211 double left; | 207 double left; |
| 212 double top; | 208 double top; |
| 213 double right; | 209 double right; |
| 214 double bottom; | 210 double bottom; |
| 215 m_pInfo->FFI_GetPageViewRect(m_pInfo, page, &left, &top, &right, &bottom); | 211 m_pInfo->FFI_GetPageViewRect(m_pInfo, page, &left, &top, &right, &bottom); |
| 216 | 212 |
| 217 dstRect.left = static_cast<float>(left); | 213 dstRect.left = static_cast<float>(left); |
| 218 dstRect.top = static_cast<float>(top < bottom ? bottom : top); | 214 dstRect.top = static_cast<float>(top < bottom ? bottom : top); |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 std::unique_ptr<CPDFSDK_ActionHandler> m_pActionHandler; | 426 std::unique_ptr<CPDFSDK_ActionHandler> m_pActionHandler; |
| 431 std::unique_ptr<IJS_Runtime> m_pJSRuntime; | 427 std::unique_ptr<IJS_Runtime> m_pJSRuntime; |
| 432 FPDF_FORMFILLINFO* const m_pInfo; | 428 FPDF_FORMFILLINFO* const m_pInfo; |
| 433 CPDFSDK_Document* m_pSDKDoc; | 429 CPDFSDK_Document* m_pSDKDoc; |
| 434 UnderlyingDocumentType* const m_pUnderlyingDoc; | 430 UnderlyingDocumentType* const m_pUnderlyingDoc; |
| 435 std::unique_ptr<CFFL_IFormFiller> m_pIFormFiller; | 431 std::unique_ptr<CFFL_IFormFiller> m_pIFormFiller; |
| 436 std::unique_ptr<CFX_SystemHandler> m_pSysHandler; | 432 std::unique_ptr<CFX_SystemHandler> m_pSysHandler; |
| 437 }; | 433 }; |
| 438 | 434 |
| 439 #endif // FPDFSDK_INCLUDE_CPDFDOC_ENVIRONMENT_H_ | 435 #endif // FPDFSDK_INCLUDE_CPDFDOC_ENVIRONMENT_H_ |
| OLD | NEW |