From b557bdcbd1584a7e37f8883b0fc491e0641cfc9c Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Mon, 23 Apr 2018 18:04:26 +0000 Subject: Create FPDFPageObjMark_GetParamStringValue(). Bug: pdfium:1037 Change-Id: I05f992d2a4ee5a11b5c57ec51107c4b00011809c Reviewed-on: https://pdfium-review.googlesource.com/31190 Reviewed-by: dsinclair Commit-Queue: Henrique Nakashima --- public/fpdf_edit.h | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'public/fpdf_edit.h') diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h index 8228bb759a..023d955d00 100644 --- a/public/fpdf_edit.h +++ b/public/fpdf_edit.h @@ -319,7 +319,7 @@ FPDFPageObjMark_GetName(FPDF_PAGEOBJECTMARK mark, unsigned long buflen); // Experimental API. -// Get number of key/value pair parameters in |mark|. +// Get the number of key/value pair parameters in |mark|. // // mark - handle to a content mark. // @@ -345,7 +345,7 @@ FPDFPageObjMark_GetParamKey(FPDF_PAGEOBJECTMARK mark, unsigned long buflen); // Experimental API. -// Get type of the value of a property in a content mark. +// Get the type of the value of a property in a content mark. // // mark - handle to a content mark. // index - index of the property. @@ -356,7 +356,7 @@ FPDFPageObjMark_GetParamValueType(FPDF_PAGEOBJECTMARK mark, unsigned long index); // Experimental API. -// Get value of an int property in a content mark. +// Get the value of an int property in a content mark. // FPDFPageObjMark_GetParamValueType() should have returned FPDF_OBJECT_NUMBER // for this property. // @@ -367,6 +367,22 @@ FPDFPageObjMark_GetParamValueType(FPDF_PAGEOBJECTMARK mark, FPDF_EXPORT int FPDF_CALLCONV FPDFPageObjMark_GetParamIntValue(FPDF_PAGEOBJECTMARK mark, unsigned long index); +// Experimental API. +// Get the value of a string property in a content mark. +// |buffer| is only modified if |buflen| is longer than the length of the key. +// +// mark - handle to a content mark. +// index - index of the property. +// buffer - buffer for holding the returned key in UTF16-LE. +// buflen - length of the buffer. +// +// Returns the length of the value. +FPDF_EXPORT unsigned long FPDF_CALLCONV +FPDFPageObjMark_GetParamStringValue(FPDF_PAGEOBJECTMARK mark, + unsigned long index, + void* buffer, + unsigned long buflen); + // Load an image from a JPEG image file and then set it into |image_object|. // // pages - pointer to the start of all loaded pages, may be NULL. -- cgit v1.2.3