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

Side by Side Diff: core/fpdfapi/fpdf_edit/fpdf_edit_create.cpp

Issue 2060973002: Make code compile with clang_use_chrome_plugin (part I) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 6 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 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_edit/editint.h" 7 #include "core/fpdfapi/fpdf_edit/editint.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 510
511 CPDF_Encryptor::~CPDF_Encryptor() { 511 CPDF_Encryptor::~CPDF_Encryptor() {
512 if (m_bNewBuf) 512 if (m_bNewBuf)
513 FX_Free(m_pData); 513 FX_Free(m_pData);
514 } 514 }
515 515
516 } // namespace 516 } // namespace
517 517
518 CPDF_ObjectStream::CPDF_ObjectStream() : m_dwObjNum(0), m_index(0) {} 518 CPDF_ObjectStream::CPDF_ObjectStream() : m_dwObjNum(0), m_index(0) {}
519 519
520 CPDF_ObjectStream::~CPDF_ObjectStream() {}
521
520 void CPDF_ObjectStream::Start() { 522 void CPDF_ObjectStream::Start() {
521 m_Items.clear(); 523 m_Items.clear();
522 m_Buffer.Clear(); 524 m_Buffer.Clear();
523 m_dwObjNum = 0; 525 m_dwObjNum = 0;
524 m_index = 0; 526 m_index = 0;
525 } 527 }
526 528
527 void CPDF_ObjectStream::CompressIndirectObject(uint32_t dwObjNum, 529 void CPDF_ObjectStream::CompressIndirectObject(uint32_t dwObjNum,
528 const CPDF_Object* pObj) { 530 const CPDF_Object* pObj) {
529 m_Items.push_back({dwObjNum, m_Buffer.GetLength()}); 531 m_Items.push_back({dwObjNum, m_Buffer.GetLength()});
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 if (pFile->AppendBlock(encryptor.m_pData, encryptor.m_dwSize) < 0) { 598 if (pFile->AppendBlock(encryptor.m_pData, encryptor.m_dwSize) < 0) {
597 return -1; 599 return -1;
598 } 600 }
599 offset += len + encryptor.m_dwSize; 601 offset += len + encryptor.m_dwSize;
600 if ((len = pFile->AppendString("\r\nendstream\r\nendobj\r\n")) < 0) { 602 if ((len = pFile->AppendString("\r\nendstream\r\nendobj\r\n")) < 0) {
601 return -1; 603 return -1;
602 } 604 }
603 offset += len; 605 offset += len;
604 return ObjOffset; 606 return ObjOffset;
605 } 607 }
608
606 CPDF_XRefStream::CPDF_XRefStream() 609 CPDF_XRefStream::CPDF_XRefStream()
607 : m_PrevOffset(0), m_dwTempObjNum(0), m_iSeg(0) {} 610 : m_PrevOffset(0), m_dwTempObjNum(0), m_iSeg(0) {}
611
612 CPDF_XRefStream::~CPDF_XRefStream() {}
613
608 FX_BOOL CPDF_XRefStream::Start() { 614 FX_BOOL CPDF_XRefStream::Start() {
609 m_IndexArray.clear(); 615 m_IndexArray.clear();
610 m_Buffer.Clear(); 616 m_Buffer.Clear();
611 m_iSeg = 0; 617 m_iSeg = 0;
612 return TRUE; 618 return TRUE;
613 } 619 }
614 int32_t CPDF_XRefStream::CompressIndirectObject(uint32_t dwObjNum, 620 int32_t CPDF_XRefStream::CompressIndirectObject(uint32_t dwObjNum,
615 const CPDF_Object* pObj, 621 const CPDF_Object* pObj,
616 CPDF_Creator* pCreator) { 622 CPDF_Creator* pCreator) {
617 if (!pCreator) 623 if (!pCreator)
(...skipping 1392 matching lines...) Expand 10 before | Expand all | Expand 10 after
2010 m_pCryptoHandler = nullptr; 2016 m_pCryptoHandler = nullptr;
2011 } 2017 }
2012 void CPDF_Creator::ResetStandardSecurity() { 2018 void CPDF_Creator::ResetStandardSecurity() {
2013 if (!m_bLocalCryptoHandler) 2019 if (!m_bLocalCryptoHandler)
2014 return; 2020 return;
2015 2021
2016 delete m_pCryptoHandler; 2022 delete m_pCryptoHandler;
2017 m_pCryptoHandler = nullptr; 2023 m_pCryptoHandler = nullptr;
2018 m_bLocalCryptoHandler = FALSE; 2024 m_bLocalCryptoHandler = FALSE;
2019 } 2025 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_edit/editint.h ('k') | core/fpdfapi/fpdf_edit/include/cpdf_pagecontentgenerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698