diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2018-04-23 18:04:26 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-04-23 18:04:26 +0000 |
commit | b557bdcbd1584a7e37f8883b0fc491e0641cfc9c (patch) | |
tree | 447c0360d9f2f2555c1c2d19e6f8d7e007e58503 /fpdfsdk/fpdf_editpage.cpp | |
parent | 0784c7317e3aaa2c65d098cf2593b6b49986307d (diff) | |
download | pdfium-b557bdcbd1584a7e37f8883b0fc491e0641cfc9c.tar.xz |
Create FPDFPageObjMark_GetParamStringValue().
Bug: pdfium:1037
Change-Id: I05f992d2a4ee5a11b5c57ec51107c4b00011809c
Reviewed-on: https://pdfium-review.googlesource.com/31190
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_editpage.cpp')
-rw-r--r-- | fpdfsdk/fpdf_editpage.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_editpage.cpp b/fpdfsdk/fpdf_editpage.cpp index 241025f3a6..fc6b21f24c 100644 --- a/fpdfsdk/fpdf_editpage.cpp +++ b/fpdfsdk/fpdf_editpage.cpp @@ -339,6 +339,20 @@ FPDFPageObjMark_GetParamIntValue(FPDF_PAGEOBJECTMARK mark, return param_pair->second->GetInteger(); } +FPDF_EXPORT unsigned long FPDF_CALLCONV +FPDFPageObjMark_GetParamStringValue(FPDF_PAGEOBJECTMARK mark, + unsigned long index, + void* buffer, + unsigned long buflen) { + auto* param_pair = GetMarkParamPairAtIndex(mark, index); + if (!param_pair) + return 0; + + return Utf16EncodeMaybeCopyAndReturnLength( + WideString::FromUTF8(param_pair->second->GetString().AsStringView()), + buffer, buflen); +} + FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPageObj_HasTransparency(FPDF_PAGEOBJECT pageObject) { if (!pageObject) |