diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2018-07-11 22:02:02 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-07-11 22:02:02 +0000 |
commit | 94230e5cfd8c5b78ab63536fa3c1b95ceb92fe0a (patch) | |
tree | 75b3dd3b79aab648a04c023adcc4f461f7fd6760 /fpdfsdk | |
parent | 140deadc0cb8035c05aaabebe05d6aa6c5291829 (diff) | |
download | pdfium-94230e5cfd8c5b78ab63536fa3c1b95ceb92fe0a.tar.xz |
Rename content mark parameter value getters.
The functions:
- FPDFPageObjMark_GetParamValueTypeByKey()
- FPDFPageObjMark_GetParamIntValueByKey()
- FPDFPageObjMark_GetParamStringValueByKey()
are renamed, respectively, to:
- FPDFPageObjMark_GetParamValueType()
- FPDFPageObjMark_GetParamIntValue()
- FPDFPageObjMark_GetParamStringValue()
Bug: pdfium:1037
Change-Id: Iac9cc8c0a9ccaea101bbaaab9063cd2c755c9d47
Reviewed-on: https://pdfium-review.googlesource.com/37611
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/fpdf_edit_embeddertest.cpp | 23 | ||||
-rw-r--r-- | fpdfsdk/fpdf_editpage.cpp | 21 | ||||
-rw-r--r-- | fpdfsdk/fpdf_view_c_api_test.c | 6 |
3 files changed, 24 insertions, 26 deletions
diff --git a/fpdfsdk/fpdf_edit_embeddertest.cpp b/fpdfsdk/fpdf_edit_embeddertest.cpp index ee80f3a20c..800fc70076 100644 --- a/fpdfsdk/fpdf_edit_embeddertest.cpp +++ b/fpdfsdk/fpdf_edit_embeddertest.cpp @@ -560,10 +560,10 @@ void CheckMarkCounts(FPDF_PAGE page, EXPECT_EQ(L"Factor", key); EXPECT_EQ(FPDF_OBJECT_NUMBER, - FPDFPageObjMark_GetParamValueTypeByKey(mark, "Factor")); + FPDFPageObjMark_GetParamValueType(mark, "Factor")); int square_root; - EXPECT_TRUE(FPDFPageObjMark_GetParamIntValueByKey(mark, "Factor", - &square_root)); + EXPECT_TRUE( + FPDFPageObjMark_GetParamIntValue(mark, "Factor", &square_root)); EXPECT_EQ(expected_square, square_root * square_root); } else if (name == L"GreaterThanTen") { greater_than_ten_count++; @@ -583,10 +583,10 @@ void CheckMarkCounts(FPDF_PAGE page, EXPECT_EQ(object_count - 1, i); EXPECT_EQ(FPDF_OBJECT_STRING, - FPDFPageObjMark_GetParamValueTypeByKey(mark, "Position")); + FPDFPageObjMark_GetParamValueType(mark, "Position")); unsigned long length; - EXPECT_TRUE(FPDFPageObjMark_GetParamStringValueByKey( - mark, "Position", buffer, 256, &length)); + EXPECT_TRUE(FPDFPageObjMark_GetParamStringValue(mark, "Position", + buffer, 256, &length)); ASSERT_GT(length, 0u); EXPECT_EQ((4u + 1u) * 2u, length); std::wstring value = @@ -2183,17 +2183,16 @@ TEST_F(FPDFEditEmbeddertest, AddMarkedText) { // Check the two parameters can be retrieved. EXPECT_EQ(FPDF_OBJECT_NUMBER, - FPDFPageObjMark_GetParamValueTypeByKey(mark, "IntKey")); + FPDFPageObjMark_GetParamValueType(mark, "IntKey")); int int_value; - EXPECT_TRUE( - FPDFPageObjMark_GetParamIntValueByKey(mark, "IntKey", &int_value)); + EXPECT_TRUE(FPDFPageObjMark_GetParamIntValue(mark, "IntKey", &int_value)); EXPECT_EQ(42, int_value); EXPECT_EQ(FPDF_OBJECT_STRING, - FPDFPageObjMark_GetParamValueTypeByKey(mark, "StringKey")); + FPDFPageObjMark_GetParamValueType(mark, "StringKey")); unsigned long out_buffer_len; - EXPECT_TRUE(FPDFPageObjMark_GetParamStringValueByKey( - mark, "StringKey", buffer, 256, &out_buffer_len)); + EXPECT_TRUE(FPDFPageObjMark_GetParamStringValue(mark, "StringKey", buffer, + 256, &out_buffer_len)); EXPECT_GT(out_buffer_len, 0u); name = GetPlatformWString(reinterpret_cast<unsigned short*>(buffer)); EXPECT_EQ(L"StringValue", name); diff --git a/fpdfsdk/fpdf_editpage.cpp b/fpdfsdk/fpdf_editpage.cpp index 968d857e8b..2ace03cccd 100644 --- a/fpdfsdk/fpdf_editpage.cpp +++ b/fpdfsdk/fpdf_editpage.cpp @@ -375,10 +375,9 @@ FPDFPageObjMark_GetParamKey(FPDF_PAGEOBJECTMARK mark, WideString::FromUTF8(param_pair->first.AsStringView()), buffer, buflen); } - FPDF_EXPORT FPDF_OBJECT_TYPE FPDF_CALLCONV -FPDFPageObjMark_GetParamValueTypeByKey(FPDF_PAGEOBJECTMARK mark, - FPDF_BYTESTRING key) { +FPDFPageObjMark_GetParamValueType(FPDF_PAGEOBJECTMARK mark, + FPDF_BYTESTRING key) { const CPDF_Dictionary* pParams = GetMarkParamDict(mark); if (!pParams) return FPDF_OBJECT_UNKNOWN; @@ -391,9 +390,9 @@ FPDFPageObjMark_GetParamValueTypeByKey(FPDF_PAGEOBJECTMARK mark, } FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV -FPDFPageObjMark_GetParamIntValueByKey(FPDF_PAGEOBJECTMARK mark, - FPDF_BYTESTRING key, - int* out_value) { +FPDFPageObjMark_GetParamIntValue(FPDF_PAGEOBJECTMARK mark, + FPDF_BYTESTRING key, + int* out_value) { const CPDF_Dictionary* pParams = GetMarkParamDict(mark); if (!pParams) return false; @@ -407,11 +406,11 @@ FPDFPageObjMark_GetParamIntValueByKey(FPDF_PAGEOBJECTMARK mark, } FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV -FPDFPageObjMark_GetParamStringValueByKey(FPDF_PAGEOBJECTMARK mark, - FPDF_BYTESTRING key, - void* buffer, - unsigned long buflen, - unsigned long* out_buflen) { +FPDFPageObjMark_GetParamStringValue(FPDF_PAGEOBJECTMARK mark, + FPDF_BYTESTRING key, + void* buffer, + unsigned long buflen, + unsigned long* out_buflen) { const CPDF_Dictionary* pParams = GetMarkParamDict(mark); if (!pParams) return false; diff --git a/fpdfsdk/fpdf_view_c_api_test.c b/fpdfsdk/fpdf_view_c_api_test.c index 6e6d2ce5c8..70db94fe96 100644 --- a/fpdfsdk/fpdf_view_c_api_test.c +++ b/fpdfsdk/fpdf_view_c_api_test.c @@ -139,10 +139,10 @@ int CheckPDFiumCApi() { CHK(FPDFImageObj_SetMatrix); CHK(FPDFPageObjMark_CountParams); CHK(FPDFPageObjMark_GetName); - CHK(FPDFPageObjMark_GetParamIntValueByKey); + CHK(FPDFPageObjMark_GetParamIntValue); CHK(FPDFPageObjMark_GetParamKey); - CHK(FPDFPageObjMark_GetParamStringValueByKey); - CHK(FPDFPageObjMark_GetParamValueTypeByKey); + CHK(FPDFPageObjMark_GetParamStringValue); + CHK(FPDFPageObjMark_GetParamValueType); CHK(FPDFPageObjMark_SetIntParam); CHK(FPDFPageObjMark_SetStringParam); CHK(FPDFPageObj_AddMark); |