summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_editpage.cpp
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-04-17 20:34:38 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-17 20:34:38 +0000
commitaed62531a9b08deb236cc423dc27dbe0810d6d1a (patch)
tree6a46e06d0fdf97341c2282a30852b0d394a405ff /fpdfsdk/fpdf_editpage.cpp
parent884b33e78f8f12e143a0ebef725cb6a4b784ce43 (diff)
downloadpdfium-aed62531a9b08deb236cc423dc27dbe0810d6d1a.tar.xz
Create new FPDFPageObjMark_CountParams() API.
Bug: pdfium:1037 Change-Id: I1b7035eb199f9dd1d730b0b1112aa455f0fabcc2 Reviewed-on: https://pdfium-review.googlesource.com/30870 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_editpage.cpp')
-rw-r--r--fpdfsdk/fpdf_editpage.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_editpage.cpp b/fpdfsdk/fpdf_editpage.cpp
index 20d88942c8..7a8bbabf2d 100644
--- a/fpdfsdk/fpdf_editpage.cpp
+++ b/fpdfsdk/fpdf_editpage.cpp
@@ -269,6 +269,21 @@ FPDFPageObjMark_GetName(FPDF_PAGEOBJECTMARK mark,
buflen);
}
+FPDF_EXPORT int FPDF_CALLCONV
+FPDFPageObjMark_CountParams(FPDF_PAGEOBJECTMARK mark) {
+ if (!mark)
+ return -1;
+
+ const CPDF_ContentMarkItem* pMarkItem =
+ CPDFContentMarkItemFromFPDFPageObjectMark(mark);
+
+ const CPDF_Dictionary* pParams = pMarkItem->GetParam();
+ if (!pParams)
+ return 0;
+
+ return pParams->GetCount();
+}
+
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
FPDFPageObj_HasTransparency(FPDF_PAGEOBJECT pageObject) {
if (!pageObject)