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

Unified Diff: core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp

Issue 333753002: Enable security removal in FPDF_Doc_Save (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/include/fpdfapi/fpdf_serial.h ('k') | fpdfsdk/include/fpdfsave.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
index e5bb1cf98505d86a290275360ab8572696b36979..bdbcccdf06dc5d47cc9832e2648e85a6524743db 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
@@ -1,7 +1,7 @@
// Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-
+
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../../include/fpdfapi/fpdf_serial.h"
@@ -2113,6 +2113,13 @@ FX_BOOL CPDF_Creator::SetFileVersion(FX_INT32 fileVersion )
m_FileVersion = fileVersion;
return TRUE;
}
+void CPDF_Creator::RemoveSecurity()
+{
+ ResetStandardSecurity();
+ m_bSecurityChanged = TRUE;
+ m_pEncryptDict = NULL;
+ m_pCryptoHandler = NULL;
+}
void CPDF_Creator::ResetStandardSecurity()
{
if ((m_bStandardSecurity || m_bNewCrypto) && m_pCryptoHandler) {
« no previous file with comments | « core/include/fpdfapi/fpdf_serial.h ('k') | fpdfsdk/include/fpdfsave.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698