diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-08-14 18:22:06 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-14 18:22:06 +0000 |
commit | b9c3e2712f75363372622282023143b86b72f2df (patch) | |
tree | b8b4443fbf792143ade73b0fdd2ccf3e50c9a1e1 /fpdfsdk | |
parent | f46d49b52d39f8a56e40a95e0d9d2b574301fa04 (diff) | |
download | pdfium-b9c3e2712f75363372622282023143b86b72f2df.tar.xz |
Remove more default arg = nullptr cases.
Bring in line with standards.
Remove argument entirely for mac code that is always nullptr.
Change-Id: I0710bdbd51fc0bc2e1d428ef44976be39a631147
Reviewed-on: https://pdfium-review.googlesource.com/40091
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/cpdfsdk_interform.h | 2 | ||||
-rw-r--r-- | fpdfsdk/fpdf_annot_embeddertest.cpp | 8 | ||||
-rw-r--r-- | fpdfsdk/fpdf_edit_embeddertest.cpp | 38 | ||||
-rw-r--r-- | fpdfsdk/fpdf_editpath_embeddertest.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/fpdf_save_embeddertest.cpp | 2 |
5 files changed, 26 insertions, 26 deletions
diff --git a/fpdfsdk/cpdfsdk_interform.h b/fpdfsdk/cpdfsdk_interform.h index 14772efe8f..c44688f6dd 100644 --- a/fpdfsdk/cpdfsdk_interform.h +++ b/fpdfsdk/cpdfsdk_interform.h @@ -67,7 +67,7 @@ class CPDFSDK_InterForm : public IPDF_FormNotify { bool OnKeyStrokeCommit(CPDF_FormField* pFormField, const WideString& csValue); bool OnValidate(CPDF_FormField* pFormField, const WideString& csValue); - void OnCalculate(CPDF_FormField* pFormField = nullptr); + void OnCalculate(CPDF_FormField* pFormField); WideString OnFormat(CPDF_FormField* pFormField, bool& bFormatted); void ResetFieldAppearance(CPDF_FormField* pFormField, diff --git a/fpdfsdk/fpdf_annot_embeddertest.cpp b/fpdfsdk/fpdf_annot_embeddertest.cpp index 5fd5d587bc..767a5c78c0 100644 --- a/fpdfsdk/fpdf_annot_embeddertest.cpp +++ b/fpdfsdk/fpdf_annot_embeddertest.cpp @@ -320,7 +320,7 @@ TEST_F(FPDFAnnotEmbeddertest, AddAndSaveUnderlineAnnotation) { // Open the saved document. const char md5[] = "dba153419f67b7c0c0e3d22d3e8910d5"; - OpenSavedDocument(); + OpenSavedDocument(nullptr); page = LoadSavedPage(0); VerifySavedRendering(page, 612, 792, md5); @@ -762,7 +762,7 @@ TEST_F(FPDFAnnotEmbeddertest, AddAndModifyPath) { UnloadPage(page); // Open the saved document. - OpenSavedDocument(); + OpenSavedDocument(nullptr); page = LoadSavedPage(0); VerifySavedRendering(page, 595, 842, md5_new_annot); @@ -1076,7 +1076,7 @@ TEST_F(FPDFAnnotEmbeddertest, GetSetStringValue) { #endif // Open the saved annotation. - OpenSavedDocument(); + OpenSavedDocument(nullptr); page = LoadSavedPage(0); VerifySavedRendering(page, 595, 842, md5); { @@ -1198,7 +1198,7 @@ TEST_F(FPDFAnnotEmbeddertest, GetSetAP) { EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); UnloadPage(page); - OpenSavedDocument(); + OpenSavedDocument(nullptr); page = LoadSavedPage(0); { ScopedFPDFAnnotation new_annot(FPDFPage_GetAnnot(page, 0)); diff --git a/fpdfsdk/fpdf_edit_embeddertest.cpp b/fpdfsdk/fpdf_edit_embeddertest.cpp index 3c2b05ed8a..e692a94e04 100644 --- a/fpdfsdk/fpdf_edit_embeddertest.cpp +++ b/fpdfsdk/fpdf_edit_embeddertest.cpp @@ -464,7 +464,7 @@ TEST_F(FPDFEditEmbeddertest, SetText) { UnloadPage(page); // Re-open the file and check the changes were kept in the saved .pdf. - OpenSavedDocument(); + OpenSavedDocument(nullptr); FPDF_PAGE saved_page = LoadSavedPage(0); EXPECT_EQ(2, FPDFPage_CountObjects(saved_page)); { @@ -732,7 +732,7 @@ TEST_F(FPDFEditEmbeddertest, RemoveMarks) { UnloadPage(page); // Re-open the file and check the prime marks are not there anymore. - OpenSavedDocument(); + OpenSavedDocument(nullptr); FPDF_PAGE saved_page = LoadSavedPage(0); CheckMarkCounts(saved_page, 1, kExpectedObjectCount, 0, 4, 9, 1); @@ -784,7 +784,7 @@ TEST_F(FPDFEditEmbeddertest, RemoveMarkParam) { UnloadPage(page); // Re-open the file and check the "Factor" parameters are still gone. - OpenSavedDocument(); + OpenSavedDocument(nullptr); FPDF_PAGE saved_page = LoadSavedPage(0); size_t square_count = 0; @@ -839,7 +839,7 @@ TEST_F(FPDFEditEmbeddertest, MaintainMarkedObjects) { UnloadPage(page); - OpenSavedDocument(); + OpenSavedDocument(nullptr); FPDF_PAGE saved_page = LoadSavedPage(0); CheckMarkCounts(saved_page, 2, 18, 8, 3, 9, 1); @@ -870,7 +870,7 @@ TEST_F(FPDFEditEmbeddertest, MaintainIndirectMarkedObjects) { UnloadPage(page); - OpenSavedDocument(); + OpenSavedDocument(nullptr); FPDF_PAGE saved_page = LoadSavedPage(0); CheckMarkCounts(saved_page, 2, 18, 8, 3, 9, 1); @@ -901,7 +901,7 @@ TEST_F(FPDFEditEmbeddertest, RemoveExistingPageObject) { FPDFPageObj_Destroy(page_object); // Re-open the file and check the page object count is still 1. - OpenSavedDocument(); + OpenSavedDocument(nullptr); FPDF_PAGE saved_page = LoadSavedPage(0); EXPECT_EQ(1, FPDFPage_CountObjects(saved_page)); CloseSavedPage(saved_page); @@ -942,7 +942,7 @@ TEST_F(FPDFEditEmbeddertest, RemoveExistingPageObjectSplitStreamsNotLonely) { FPDFPageObj_Destroy(page_object); // Re-open the file and check the page object count is still 2. - OpenSavedDocument(); + OpenSavedDocument(nullptr); FPDF_PAGE saved_page = LoadSavedPage(0); EXPECT_EQ(2, FPDFPage_CountObjects(saved_page)); @@ -989,7 +989,7 @@ TEST_F(FPDFEditEmbeddertest, RemoveExistingPageObjectSplitStreamsLonely) { FPDFPageObj_Destroy(page_object); // Re-open the file and check the page object count is still 2. - OpenSavedDocument(); + OpenSavedDocument(nullptr); FPDF_PAGE saved_page = LoadSavedPage(0); EXPECT_EQ(2, FPDFPage_CountObjects(saved_page)); @@ -1104,7 +1104,7 @@ TEST_F(FPDFEditEmbeddertest, RemoveAllFromStream) { // Re-open the file and check the page object count is still 16, and that // content stream 1 was removed. - OpenSavedDocument(); + OpenSavedDocument(nullptr); FPDF_PAGE saved_page = LoadSavedPage(0); // Content stream 0: page objects 0-14. @@ -1171,7 +1171,7 @@ TEST_F(FPDFEditEmbeddertest, RemoveAllFromSingleStream) { UnloadPage(page); // Re-open the file and check the page object count is still 0. - OpenSavedDocument(); + OpenSavedDocument(nullptr); FPDF_PAGE saved_page = LoadSavedPage(0); EXPECT_EQ(0, FPDFPage_CountObjects(saved_page)); @@ -1235,7 +1235,7 @@ TEST_F(FPDFEditEmbeddertest, RemoveFirstFromSingleStream) { UnloadPage(page); // Re-open the file and check the page object count is still 0. - OpenSavedDocument(); + OpenSavedDocument(nullptr); FPDF_PAGE saved_page = LoadSavedPage(0); ASSERT_EQ(1, FPDFPage_CountObjects(saved_page)); @@ -1303,7 +1303,7 @@ TEST_F(FPDFEditEmbeddertest, RemoveLastFromSingleStream) { UnloadPage(page); // Re-open the file and check the page object count is still 0. - OpenSavedDocument(); + OpenSavedDocument(nullptr); FPDF_PAGE saved_page = LoadSavedPage(0); ASSERT_EQ(1, FPDFPage_CountObjects(saved_page)); @@ -1359,7 +1359,7 @@ TEST_F(FPDFEditEmbeddertest, RemoveAllFromMultipleStreams) { UnloadPage(page); // Re-open the file and check the page object count is still 0. - OpenSavedDocument(); + OpenSavedDocument(nullptr); FPDF_PAGE saved_page = LoadSavedPage(0); EXPECT_EQ(0, FPDFPage_CountObjects(saved_page)); @@ -1394,7 +1394,7 @@ TEST_F(FPDFEditEmbeddertest, InsertPageObjectAndSave) { UnloadPage(page); // Re-open the file and check the page object count is still 3. - OpenSavedDocument(); + OpenSavedDocument(nullptr); FPDF_PAGE saved_page = LoadSavedPage(0); EXPECT_EQ(3, FPDFPage_CountObjects(saved_page)); CloseSavedPage(saved_page); @@ -1427,7 +1427,7 @@ TEST_F(FPDFEditEmbeddertest, InsertPageObjectEditAndSave) { UnloadPage(page); // Re-open the file and check the page object count is still 3. - OpenSavedDocument(); + OpenSavedDocument(nullptr); FPDF_PAGE saved_page = LoadSavedPage(0); EXPECT_EQ(3, FPDFPage_CountObjects(saved_page)); CloseSavedPage(saved_page); @@ -1563,7 +1563,7 @@ TEST_F(FPDFEditEmbeddertest, EditOverExistingContent) { EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); UnloadPage(page); - OpenSavedDocument(); + OpenSavedDocument(nullptr); FPDF_PAGE saved_page = LoadSavedPage(0); VerifySavedRendering(saved_page, 612, 792, "ad04e5bd0f471a9a564fb034bd0fb073"); @@ -2359,7 +2359,7 @@ TEST_F(FPDFEditEmbeddertest, AddMark) { UnloadPage(page); // Re-open the file and check the new mark is present. - OpenSavedDocument(); + OpenSavedDocument(nullptr); FPDF_PAGE saved_page = LoadSavedPage(0); CheckMarkCounts(saved_page, 1, kExpectedObjectCount, 8, 4, 9, 2); @@ -2415,7 +2415,7 @@ TEST_F(FPDFEditEmbeddertest, SetMarkParam) { UnloadPage(page); // Re-open the file and cerify "Position" still maps to "End". - OpenSavedDocument(); + OpenSavedDocument(nullptr); FPDF_PAGE saved_page = LoadSavedPage(0); CheckMarkCounts(saved_page, 1, kExpectedObjectCount, 8, 4, 9, 1); @@ -2525,7 +2525,7 @@ TEST_F(FPDFEditEmbeddertest, AddMarkedText) { FPDF_ClosePage(page); // Re-open the file and check the changes were kept in the saved .pdf. - OpenSavedDocument(); + OpenSavedDocument(nullptr); FPDF_PAGE saved_page = LoadSavedPage(0); EXPECT_EQ(1, FPDFPage_CountObjects(saved_page)); diff --git a/fpdfsdk/fpdf_editpath_embeddertest.cpp b/fpdfsdk/fpdf_editpath_embeddertest.cpp index 59e5dbbabf..dcf3f2c351 100644 --- a/fpdfsdk/fpdf_editpath_embeddertest.cpp +++ b/fpdfsdk/fpdf_editpath_embeddertest.cpp @@ -31,7 +31,7 @@ TEST_F(FPDFEditPathEmbedderTest, VerifyCorrectColoursReturned) { FPDF_ClosePage(page); page = nullptr; - OpenSavedDocument(); + OpenSavedDocument(nullptr); page = LoadSavedPage(0); ASSERT(page); diff --git a/fpdfsdk/fpdf_save_embeddertest.cpp b/fpdfsdk/fpdf_save_embeddertest.cpp index 64a305fa86..510660ee82 100644 --- a/fpdfsdk/fpdf_save_embeddertest.cpp +++ b/fpdfsdk/fpdf_save_embeddertest.cpp @@ -82,7 +82,7 @@ TEST_F(FPDFSaveEmbedderTest, SaveLinearizedDoc) { EXPECT_EQ(8219u, GetString().length()); // Make sure new document renders the same as the old one. - EXPECT_TRUE(OpenSavedDocument()); + EXPECT_TRUE(OpenSavedDocument(nullptr)); for (int i = 0; i < kPageCount; ++i) { FPDF_PAGE page = LoadSavedPage(i); ASSERT_TRUE(page); |