summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_structtree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdf_structtree.cpp')
-rw-r--r--fpdfsdk/fpdf_structtree.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_structtree.cpp b/fpdfsdk/fpdf_structtree.cpp
index 30b7c3fce7..676824ef99 100644
--- a/fpdfsdk/fpdf_structtree.cpp
+++ b/fpdfsdk/fpdf_structtree.cpp
@@ -83,6 +83,14 @@ FPDF_StructElement_GetAltText(FPDF_STRUCTELEMENT struct_element,
: 0;
}
+FPDF_EXPORT int FPDF_CALLCONV
+FPDF_StructElement_GetMarkedContentID(FPDF_STRUCTELEMENT struct_element) {
+ CPDF_StructElement* elem = ToStructTreeElement(struct_element);
+ CPDF_Object* p =
+ (elem && elem->GetDict()) ? elem->GetDict()->GetObjectFor("K") : nullptr;
+ return p && p->IsNumber() ? p->GetInteger() : -1;
+}
+
FPDF_EXPORT unsigned long FPDF_CALLCONV
FPDF_StructElement_GetType(FPDF_STRUCTELEMENT struct_element,
void* buffer,