summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_contentmarkitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_contentmarkitem.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_contentmarkitem.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/core/fpdfapi/page/cpdf_contentmarkitem.cpp b/core/fpdfapi/page/cpdf_contentmarkitem.cpp
index 4f56eea919..dd9f7e884c 100644
--- a/core/fpdfapi/page/cpdf_contentmarkitem.cpp
+++ b/core/fpdfapi/page/cpdf_contentmarkitem.cpp
@@ -26,6 +26,18 @@ const CPDF_Dictionary* CPDF_ContentMarkItem::GetParam() const {
}
}
+CPDF_Dictionary* CPDF_ContentMarkItem::GetParam() {
+ switch (m_ParamType) {
+ case PropertiesDict:
+ return m_pPropertiesDict.Get();
+ case DirectDict:
+ return m_pDirectDict.get();
+ case None:
+ default:
+ return nullptr;
+ }
+}
+
bool CPDF_ContentMarkItem::HasMCID() const {
const CPDF_Dictionary* pDict = GetParam();
return pDict && pDict->KeyExist("MCID");
@@ -37,7 +49,7 @@ void CPDF_ContentMarkItem::SetDirectDict(
m_pDirectDict = std::move(pDict);
}
-void CPDF_ContentMarkItem::SetPropertiesDict(const CPDF_Dictionary* pDict) {
+void CPDF_ContentMarkItem::SetPropertiesDict(CPDF_Dictionary* pDict) {
m_ParamType = PropertiesDict;
m_pPropertiesDict = pDict;
}