diff options
author | Miklos Vajna <vmiklos@vmiklos.hu> | 2017-04-03 16:02:39 +0200 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-03 14:39:52 +0000 |
commit | 1423319f52c5e80253d337ad02b19187c6d66ff1 (patch) | |
tree | d55a242b73938df48606811d0d698575acb9e3f7 /fpdfsdk/fpdfeditpage.cpp | |
parent | adca63003f36da06caeecefbdaaa566131d9957c (diff) | |
download | pdfium-1423319f52c5e80253d337ad02b19187c6d66ff1.tar.xz |
Add public method FPDFPageObj_GetType to get type of a page object.
The possible return values were already part of the public header in the
form of a set of defines.
Change-Id: I040e0f330fdd7a3cd29f74fc6ee06d122afd2dd0
Reviewed-on: https://pdfium-review.googlesource.com/3570
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfeditpage.cpp')
-rw-r--r-- | fpdfsdk/fpdfeditpage.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fpdfsdk/fpdfeditpage.cpp b/fpdfsdk/fpdfeditpage.cpp index 7b55e4d99d..511b7f5b4b 100644 --- a/fpdfsdk/fpdfeditpage.cpp +++ b/fpdfsdk/fpdfeditpage.cpp @@ -246,6 +246,14 @@ FPDFPageObj_HasTransparency(FPDF_PAGEOBJECT pageObject) { return false; } +DLLEXPORT int STDCALL FPDFPageObj_GetType(FPDF_PAGEOBJECT pageObject) { + if (!pageObject) + return FPDF_PAGEOBJ_UNKNOWN; + + CPDF_PageObject* pPageObj = reinterpret_cast<CPDF_PageObject*>(pageObject); + return pPageObj->GetType(); +} + DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GenerateContent(FPDF_PAGE page) { CPDF_Page* pPage = CPDFPageFromFPDFPage(page); if (!IsPageObject(pPage)) |