diff options
author | Lei Zhang <thestig@chromium.org> | 2015-09-23 15:35:25 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-09-23 15:35:25 -0700 |
commit | 600d4078309f9f41df24e2f12bc4b5d9e05567ba (patch) | |
tree | 0a500893efd6a9e98c865caca94f1d476fa67e6e | |
parent | 6f62d53b7650311afc490bfdaa48f5e8536b8b4e (diff) | |
download | pdfium-600d4078309f9f41df24e2f12bc4b5d9e05567ba.tar.xz |
Merge to XFA: Flip conditionals to positive logic in pdfium_test.
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1362143002 .
(cherry picked from commit c4e940d803113552a146cd059b1ca793a1f72a22)
Review URL: https://codereview.chromium.org/1362953006 .
-rw-r--r-- | samples/pdfium_test.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc index bf10675573..056ba0b6db 100644 --- a/samples/pdfium_test.cc +++ b/samples/pdfium_test.cc @@ -469,12 +469,12 @@ void RenderPdf(const std::string& name, const char* pBuf, size_t len, (void)FPDFAvail_IsDocAvail(pdf_avail, &hints); - if (!FPDFAvail_IsLinearized(pdf_avail)) { - fprintf(stderr, "Non-linearized path...\n"); - doc = FPDF_LoadCustomDocument(&file_access, nullptr); - } else { + if (FPDFAvail_IsLinearized(pdf_avail)) { fprintf(stderr, "Linearized path...\n"); doc = FPDFAvail_GetDocument(pdf_avail, nullptr); + } else { + fprintf(stderr, "Non-linearized path...\n"); + doc = FPDF_LoadCustomDocument(&file_access, nullptr); } if (!doc) { @@ -621,7 +621,9 @@ int main(int argc, const char* argv[]) { v8::V8::SetSnapshotDataBlob(&snapshot); #endif // V8_USE_EXTERNAL_STARTUP_DATA - if (!options.font_directory.empty()) { + if (options.font_directory.empty()) { + FPDF_InitLibrary(); + } else { const char* path_array[2]; path_array[0] = options.font_directory.c_str(); path_array[1] = nullptr; @@ -629,8 +631,6 @@ int main(int argc, const char* argv[]) { config.version = 1; config.m_pUserFontPaths = path_array; FPDF_InitLibraryWithConfig(&config); - } else { - FPDF_InitLibrary(); } UNSUPPORT_INFO unsuppored_info; |