summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdf_catalog_unittest.cpp2
-rw-r--r--fpdfsdk/fpdf_doc_unittest.cpp2
-rw-r--r--fpdfsdk/fpdf_editpage.cpp2
-rw-r--r--fpdfsdk/fpdf_view.cpp8
-rw-r--r--fpdfsdk/pwl/cpwl_font_map.cpp2
5 files changed, 6 insertions, 10 deletions
diff --git a/fpdfsdk/fpdf_catalog_unittest.cpp b/fpdfsdk/fpdf_catalog_unittest.cpp
index ca48ffb972..bd51257e3c 100644
--- a/fpdfsdk/fpdf_catalog_unittest.cpp
+++ b/fpdfsdk/fpdf_catalog_unittest.cpp
@@ -18,7 +18,7 @@
class CPDF_TestDocument : public CPDF_Document {
public:
- CPDF_TestDocument() : CPDF_Document(nullptr) {}
+ CPDF_TestDocument() : CPDF_Document() {}
void SetRoot(CPDF_Dictionary* root) {
m_pRootDict = root;
diff --git a/fpdfsdk/fpdf_doc_unittest.cpp b/fpdfsdk/fpdf_doc_unittest.cpp
index 58b8ffd42d..8ef16aaf28 100644
--- a/fpdfsdk/fpdf_doc_unittest.cpp
+++ b/fpdfsdk/fpdf_doc_unittest.cpp
@@ -25,7 +25,7 @@
class CPDF_TestDocument : public CPDF_Document {
public:
- CPDF_TestDocument() : CPDF_Document(nullptr) {}
+ CPDF_TestDocument() : CPDF_Document() {}
void SetRoot(CPDF_Dictionary* root) { m_pRootDict = root; }
CPDF_IndirectObjectHolder* GetHolder() { return this; }
diff --git a/fpdfsdk/fpdf_editpage.cpp b/fpdfsdk/fpdf_editpage.cpp
index 2d9a2c7aa0..36853c70c6 100644
--- a/fpdfsdk/fpdf_editpage.cpp
+++ b/fpdfsdk/fpdf_editpage.cpp
@@ -128,7 +128,7 @@ unsigned int GetUnsignedAlpha(float alpha) {
} // namespace
FPDF_EXPORT FPDF_DOCUMENT FPDF_CALLCONV FPDF_CreateNewDocument() {
- auto pDoc = pdfium::MakeUnique<CPDF_Document>(nullptr);
+ auto pDoc = pdfium::MakeUnique<CPDF_Document>();
pDoc->CreateNewDoc();
time_t currentTime;
diff --git a/fpdfsdk/fpdf_view.cpp b/fpdfsdk/fpdf_view.cpp
index 0e76548abf..8aca6fb9f1 100644
--- a/fpdfsdk/fpdf_view.cpp
+++ b/fpdfsdk/fpdf_view.cpp
@@ -141,12 +141,8 @@ FPDF_DOCUMENT LoadDocumentImpl(
return nullptr;
}
- auto pParser = pdfium::MakeUnique<CPDF_Parser>();
- pParser->SetPassword(password);
-
- auto pDocument = pdfium::MakeUnique<CPDF_Document>(std::move(pParser));
- CPDF_Parser::Error error =
- pDocument->GetParser()->StartParse(pFileAccess, pDocument.get());
+ auto pDocument = pdfium::MakeUnique<CPDF_Document>();
+ CPDF_Parser::Error error = pDocument->LoadDoc(pFileAccess, password);
if (error != CPDF_Parser::SUCCESS) {
ProcessParseError(error);
return nullptr;
diff --git a/fpdfsdk/pwl/cpwl_font_map.cpp b/fpdfsdk/pwl/cpwl_font_map.cpp
index f60e7d2fb1..47365f8f42 100644
--- a/fpdfsdk/pwl/cpwl_font_map.cpp
+++ b/fpdfsdk/pwl/cpwl_font_map.cpp
@@ -50,7 +50,7 @@ CPWL_FontMap::~CPWL_FontMap() {
CPDF_Document* CPWL_FontMap::GetDocument() {
if (!m_pPDFDoc) {
if (CPDF_ModuleMgr::Get()) {
- m_pPDFDoc = pdfium::MakeUnique<CPDF_Document>(nullptr);
+ m_pPDFDoc = pdfium::MakeUnique<CPDF_Document>();
m_pPDFDoc->CreateNewDoc();
}
}