summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_streamcontentparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_streamcontentparser.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_streamcontentparser.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
index 01fb347a9a..ae55390eb2 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
@@ -607,17 +607,19 @@ void CPDF_StreamContentParser::Handle_BeginMarkedContent_Dictionary() {
if (!pProperty)
return;
- bool bDirect = true;
- if (pProperty->IsName()) {
+ bool bIndirect = pProperty->IsName();
+ if (bIndirect) {
pProperty = FindResourceObj("Properties", pProperty->GetString());
if (!pProperty)
return;
- bDirect = false;
}
if (CPDF_Dictionary* pDict = pProperty->AsDictionary()) {
std::unique_ptr<CPDF_ContentMark> new_marks =
m_ContentMarksStack.top()->Clone();
- new_marks->AddMark(std::move(tag), pDict, bDirect);
+ if (bIndirect)
+ new_marks->AddMarkWithPropertiesDict(std::move(tag), pDict);
+ else
+ new_marks->AddMarkWithDirectDict(std::move(tag), pDict);
m_ContentMarksStack.push(std::move(new_marks));
}
}
@@ -685,7 +687,7 @@ void CPDF_StreamContentParser::Handle_BeginImage() {
void CPDF_StreamContentParser::Handle_BeginMarkedContent() {
std::unique_ptr<CPDF_ContentMark> new_marks =
m_ContentMarksStack.top()->Clone();
- new_marks->AddMark(GetString(0), nullptr, false);
+ new_marks->AddMark(GetString(0));
m_ContentMarksStack.push(std::move(new_marks));
}