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

Side by Side Diff: core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp

Issue 1889863002: Make CPDF_Dictionary methods take CFX_ByteString arguments (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: One last caller. 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
OLDNEW
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 #include "core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h" 7 #include "core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 GetObject(pObjList, objnum, gennum, true)); 583 GetObject(pObjList, objnum, gennum, true));
584 if (!obj) { 584 if (!obj) {
585 uint8_t ch; 585 uint8_t ch;
586 while (GetNextChar(ch) && ch != 0x0A && ch != 0x0D) { 586 while (GetNextChar(ch) && ch != 0x0A && ch != 0x0D) {
587 continue; 587 continue;
588 } 588 }
589 return nullptr; 589 return nullptr;
590 } 590 }
591 591
592 if (key.GetLength() > 1) { 592 if (key.GetLength() > 1) {
593 pDict->SetAt(CFX_ByteStringC(key.c_str() + 1, key.GetLength() - 1), 593 pDict->SetAt(CFX_ByteString(key.c_str() + 1, key.GetLength() - 1),
594 obj.release()); 594 obj.release());
595 } 595 }
596 } 596 }
597 597
598 FX_FILESIZE SavedPos = m_Pos; 598 FX_FILESIZE SavedPos = m_Pos;
599 CFX_ByteString nextword = GetNextWord(nullptr); 599 CFX_ByteString nextword = GetNextWord(nullptr);
600 if (nextword != "stream") { 600 if (nextword != "stream") {
601 m_Pos = SavedPos; 601 m_Pos = SavedPos;
602 return pDict.release(); 602 return pDict.release();
603 } 603 }
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 if (limit && m_Pos == limit) 981 if (limit && m_Pos == limit)
982 return -1; 982 return -1;
983 } 983 }
984 return -1; 984 return -1;
985 } 985 }
986 986
987 void CPDF_SyntaxParser::SetEncrypt( 987 void CPDF_SyntaxParser::SetEncrypt(
988 std::unique_ptr<IPDF_CryptoHandler> pCryptoHandler) { 988 std::unique_ptr<IPDF_CryptoHandler> pCryptoHandler) {
989 m_pCryptoHandler = std::move(pCryptoHandler); 989 m_pCryptoHandler = std::move(pCryptoHandler);
990 } 990 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_parser.cpp ('k') | core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698