| 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 "../../third_party/base/nonstd_unique_ptr.h" | 7 #include "../../third_party/base/nonstd_unique_ptr.h" |
| 8 #include "../include/fsdk_define.h" | 8 #include "../include/fsdk_define.h" |
| 9 #include "../include/fpdfxfa/fpdfxfa_doc.h" | 9 #include "../include/fpdfxfa/fpdfxfa_doc.h" |
| 10 #include "../include/fpdfxfa/fpdfxfa_util.h" | 10 #include "../include/fpdfxfa/fpdfxfa_util.h" |
| (...skipping 2612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2623 | 2623 |
| 2624 #ifdef _WIN32 | 2624 #ifdef _WIN32 |
| 2625 CPDF_Stream* CPDFSDK_InterForm::LoadImageFromFile(const CFX_WideString& sFile) | 2625 CPDF_Stream* CPDFSDK_InterForm::LoadImageFromFile(const CFX_WideString& sFile) |
| 2626 { | 2626 { |
| 2627 ASSERT(m_pDocument != NULL); | 2627 ASSERT(m_pDocument != NULL); |
| 2628 CPDF_Document* pDocument = m_pDocument->GetDocument()->GetPDFDoc(); | 2628 CPDF_Document* pDocument = m_pDocument->GetDocument()->GetPDFDoc(); |
| 2629 ASSERT(pDocument != NULL); | 2629 ASSERT(pDocument != NULL); |
| 2630 | 2630 |
| 2631 CPDF_Stream* pRetStream = NULL; | 2631 CPDF_Stream* pRetStream = NULL; |
| 2632 | 2632 |
| 2633 » if (CFX_DIBitmap* pBmp = CFX_WindowsDIB::LoadFromFile(sFile)) | 2633 » if (CFX_DIBitmap* pBmp = CFX_WindowsDIB::LoadFromFile(sFile.c_str())) |
| 2634 { | 2634 { |
| 2635 int nWidth = pBmp->GetWidth(); | 2635 int nWidth = pBmp->GetWidth(); |
| 2636 int nHeight = pBmp->GetHeight(); | 2636 int nHeight = pBmp->GetHeight(); |
| 2637 | 2637 |
| 2638 CPDF_Image Image(pDocument); | 2638 CPDF_Image Image(pDocument); |
| 2639 Image.SetImage(pBmp, FALSE); | 2639 Image.SetImage(pBmp, FALSE); |
| 2640 CPDF_Stream* pImageStream = Image.GetStream(); | 2640 CPDF_Stream* pImageStream = Image.GetStream(); |
| 2641 if (pImageStream) | 2641 if (pImageStream) |
| 2642 { | 2642 { |
| 2643 if (pImageStream->GetObjNum() == 0) | 2643 if (pImageStream->GetObjNum() == 0) |
| (...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3788 | 3788 |
| 3789 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); | 3789 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); |
| 3790 ASSERT(pPDFAnnot != NULL); | 3790 ASSERT(pPDFAnnot != NULL); |
| 3791 | 3791 |
| 3792 CPDF_Rect rcAnnot; | 3792 CPDF_Rect rcAnnot; |
| 3793 pPDFAnnot->GetRect(rcAnnot); | 3793 pPDFAnnot->GetRect(rcAnnot); |
| 3794 | 3794 |
| 3795 return rcAnnot; | 3795 return rcAnnot; |
| 3796 } | 3796 } |
| 3797 | 3797 |
| OLD | NEW |