diff options
author | dsinclair <dsinclair@chromium.org> | 2016-12-06 09:53:27 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-12-06 09:53:27 -0800 |
commit | 6bdb56cad7f9e31183b90152324281ac52c4563d (patch) | |
tree | 5d857c81b4228a82b9480f8f9cc05762cc03f273 /fpdfsdk | |
parent | 1a1d7648d3e338b756e464cebb2ae1a815359afa (diff) | |
download | pdfium-6bdb56cad7f9e31183b90152324281ac52c4563d.tar.xz |
Fix FPDF_GetPageLabel API typo.
The API was originally committed as FPDF_GetPagelLabel but should be
FPDF_GetPageLabel.
BUG=pdfium:479
Review-Url: https://codereview.chromium.org/2559513002
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/fpdfdoc.cpp | 8 | ||||
-rw-r--r-- | fpdfsdk/fpdfdoc_embeddertest.cpp | 24 | ||||
-rw-r--r-- | fpdfsdk/fpdfview_c_api_test.c | 2 |
3 files changed, 17 insertions, 17 deletions
diff --git a/fpdfsdk/fpdfdoc.cpp b/fpdfsdk/fpdfdoc.cpp index 2dcf606a7c..ce4fc34982 100644 --- a/fpdfsdk/fpdfdoc.cpp +++ b/fpdfsdk/fpdfdoc.cpp @@ -396,10 +396,10 @@ DLLEXPORT unsigned long STDCALL FPDF_GetMetaText(FPDF_DOCUMENT document, return Utf16EncodeMaybeCopyAndReturnLength(text, buffer, buflen); } -DLLEXPORT unsigned long STDCALL FPDF_GetPagelLabel(FPDF_DOCUMENT document, - int page_index, - void* buffer, - unsigned long buflen) { +DLLEXPORT unsigned long STDCALL FPDF_GetPageLabel(FPDF_DOCUMENT document, + int page_index, + void* buffer, + unsigned long buflen) { if (page_index < 0) return 0; diff --git a/fpdfsdk/fpdfdoc_embeddertest.cpp b/fpdfsdk/fpdfdoc_embeddertest.cpp index 67934c5626..5441bb3ecf 100644 --- a/fpdfsdk/fpdfdoc_embeddertest.cpp +++ b/fpdfsdk/fpdfdoc_embeddertest.cpp @@ -177,7 +177,7 @@ TEST_F(FPDFDocEmbeddertest, NoPageLabels) { EXPECT_TRUE(OpenDocument("about_blank.pdf")); EXPECT_EQ(1, FPDF_GetPageCount(document())); - ASSERT_EQ(0u, FPDF_GetPagelLabel(document(), 0, nullptr, 0)); + ASSERT_EQ(0u, FPDF_GetPageLabel(document(), 0, nullptr, 0)); } TEST_F(FPDFDocEmbeddertest, GetPageLabels) { @@ -185,44 +185,44 @@ TEST_F(FPDFDocEmbeddertest, GetPageLabels) { EXPECT_EQ(7, FPDF_GetPageCount(document())); unsigned short buf[128]; - EXPECT_EQ(0u, FPDF_GetPagelLabel(document(), -2, buf, sizeof(buf))); - EXPECT_EQ(0u, FPDF_GetPagelLabel(document(), -1, buf, sizeof(buf))); + EXPECT_EQ(0u, FPDF_GetPageLabel(document(), -2, buf, sizeof(buf))); + EXPECT_EQ(0u, FPDF_GetPageLabel(document(), -1, buf, sizeof(buf))); const FX_WCHAR kExpectedPageLabel0[] = L"i"; - ASSERT_EQ(4u, FPDF_GetPagelLabel(document(), 0, buf, sizeof(buf))); + ASSERT_EQ(4u, FPDF_GetPageLabel(document(), 0, buf, sizeof(buf))); EXPECT_EQ(CFX_WideString(kExpectedPageLabel0), CFX_WideString::FromUTF16LE(buf, FXSYS_len(kExpectedPageLabel0))); const FX_WCHAR kExpectedPageLabel1[] = L"ii"; - ASSERT_EQ(6u, FPDF_GetPagelLabel(document(), 1, buf, sizeof(buf))); + ASSERT_EQ(6u, FPDF_GetPageLabel(document(), 1, buf, sizeof(buf))); EXPECT_EQ(CFX_WideString(kExpectedPageLabel1), CFX_WideString::FromUTF16LE(buf, FXSYS_len(kExpectedPageLabel1))); const FX_WCHAR kExpectedPageLabel2[] = L"1"; - ASSERT_EQ(4u, FPDF_GetPagelLabel(document(), 2, buf, sizeof(buf))); + ASSERT_EQ(4u, FPDF_GetPageLabel(document(), 2, buf, sizeof(buf))); EXPECT_EQ(CFX_WideString(kExpectedPageLabel2), CFX_WideString::FromUTF16LE(buf, FXSYS_len(kExpectedPageLabel2))); const FX_WCHAR kExpectedPageLabel3[] = L"2"; - ASSERT_EQ(4u, FPDF_GetPagelLabel(document(), 3, buf, sizeof(buf))); + ASSERT_EQ(4u, FPDF_GetPageLabel(document(), 3, buf, sizeof(buf))); EXPECT_EQ(CFX_WideString(kExpectedPageLabel3), CFX_WideString::FromUTF16LE(buf, FXSYS_len(kExpectedPageLabel3))); const FX_WCHAR kExpectedPageLabel4[] = L"zzA"; - ASSERT_EQ(8u, FPDF_GetPagelLabel(document(), 4, buf, sizeof(buf))); + ASSERT_EQ(8u, FPDF_GetPageLabel(document(), 4, buf, sizeof(buf))); EXPECT_EQ(CFX_WideString(kExpectedPageLabel4), CFX_WideString::FromUTF16LE(buf, FXSYS_len(kExpectedPageLabel4))); const FX_WCHAR kExpectedPageLabel5[] = L"zzB"; - ASSERT_EQ(8u, FPDF_GetPagelLabel(document(), 5, buf, sizeof(buf))); + ASSERT_EQ(8u, FPDF_GetPageLabel(document(), 5, buf, sizeof(buf))); EXPECT_EQ(CFX_WideString(kExpectedPageLabel5), CFX_WideString::FromUTF16LE(buf, FXSYS_len(kExpectedPageLabel5))); const FX_WCHAR kExpectedPageLabel6[] = L""; - ASSERT_EQ(2u, FPDF_GetPagelLabel(document(), 6, buf, sizeof(buf))); + ASSERT_EQ(2u, FPDF_GetPageLabel(document(), 6, buf, sizeof(buf))); EXPECT_EQ(CFX_WideString(kExpectedPageLabel6), CFX_WideString::FromUTF16LE(buf, FXSYS_len(kExpectedPageLabel6))); - ASSERT_EQ(0u, FPDF_GetPagelLabel(document(), 7, buf, sizeof(buf))); - ASSERT_EQ(0u, FPDF_GetPagelLabel(document(), 8, buf, sizeof(buf))); + ASSERT_EQ(0u, FPDF_GetPageLabel(document(), 7, buf, sizeof(buf))); + ASSERT_EQ(0u, FPDF_GetPageLabel(document(), 8, buf, sizeof(buf))); } diff --git a/fpdfsdk/fpdfview_c_api_test.c b/fpdfsdk/fpdfview_c_api_test.c index 8cbbf4f3db..98478f0410 100644 --- a/fpdfsdk/fpdfview_c_api_test.c +++ b/fpdfsdk/fpdfview_c_api_test.c @@ -65,7 +65,7 @@ int CheckPDFiumCApi() { CHK(FPDFLink_CountQuadPoints); CHK(FPDFLink_GetQuadPoints); CHK(FPDF_GetMetaText); - CHK(FPDF_GetPagelLabel); + CHK(FPDF_GetPageLabel); // fpdf_edit.h CHK(FPDF_CreateNewDocument); |