Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Side by Side Diff: core/fpdfapi/fpdf_page/fpdf_page_parser.cpp

Issue 1879683002: Remove CPDF_Object::GetConstString and overrides (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Move bLuminosity down. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/fpdfapi/fpdf_page/fpdf_page_doc.cpp ('k') | core/fpdfapi/fpdf_parser/cpdf_array.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "core/fpdfapi/fpdf_page/pageint.h" 7 #include "core/fpdfapi/fpdf_page/pageint.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 if (m_pDocument->IsFormStream(pRes->GetRefObjNum(), bForm) && !bForm) 729 if (m_pDocument->IsFormStream(pRes->GetRefObjNum(), bForm) && !bForm)
730 return; 730 return;
731 } 731 }
732 732
733 CPDF_Stream* pXObject = ToStream(FindResourceObj("XObject", name)); 733 CPDF_Stream* pXObject = ToStream(FindResourceObj("XObject", name));
734 if (!pXObject) { 734 if (!pXObject) {
735 m_bResourceMissing = TRUE; 735 m_bResourceMissing = TRUE;
736 return; 736 return;
737 } 737 }
738 738
739 CFX_ByteStringC type = pXObject->GetDict() 739 CFX_ByteString type;
740 ? pXObject->GetDict()->GetConstStringBy("Subtype") 740 if (pXObject->GetDict())
741 : CFX_ByteStringC(); 741 type = pXObject->GetDict()->GetStringBy("Subtype");
742
742 if (type == "Image") { 743 if (type == "Image") {
743 if (m_Options.m_bTextOnly) { 744 if (m_Options.m_bTextOnly) {
744 return; 745 return;
745 } 746 }
746 CPDF_ImageObject* pObj = AddImage(pXObject, NULL, FALSE); 747 CPDF_ImageObject* pObj = AddImage(pXObject, NULL, FALSE);
747 m_LastImageName = name; 748 m_LastImageName = name;
748 m_pLastImage = pObj->m_pImage; 749 m_pLastImage = pObj->m_pImage;
749 if (!m_pObjectHolder->HasImageMask()) 750 if (!m_pObjectHolder->HasImageMask())
750 m_pObjectHolder->SetHasImageMask(m_pLastImage->IsMask()); 751 m_pObjectHolder->SetHasImageMask(m_pLastImage->IsMask());
751 } else if (type == "Form") { 752 } else if (type == "Form") {
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1814 } else { 1815 } else {
1815 PDF_ReplaceAbbr(pElement); 1816 PDF_ReplaceAbbr(pElement);
1816 } 1817 }
1817 } 1818 }
1818 break; 1819 break;
1819 } 1820 }
1820 default: 1821 default:
1821 break; 1822 break;
1822 } 1823 }
1823 } 1824 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/fpdf_page_doc.cpp ('k') | core/fpdfapi/fpdf_parser/cpdf_array.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698