summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_contentmark.cpp
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-07-11 20:55:02 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-07-11 20:55:02 +0000
commit10a7ddb596f0089ba12d0db29b5752a61919a208 (patch)
tree3a5470ac4240e50e12a22d40daf7aad866b62ac9 /core/fpdfapi/page/cpdf_contentmark.cpp
parent75625a8a8a84fffcfe09a09b57d77c99b5261f7d (diff)
downloadpdfium-10a7ddb596f0089ba12d0db29b5752a61919a208.tar.xz
Store property name for marked content with an indirect dict.
The name of the property is now stored in the CPDF_ContentMarkItem, which will be needed to properly write back these content marks after a change in the stream. Bug: pdfium:1118 Change-Id: I1296f488b35ee0684efa33d17400ed22a88383a2 Reviewed-on: https://pdfium-review.googlesource.com/37370 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_contentmark.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_contentmark.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/core/fpdfapi/page/cpdf_contentmark.cpp b/core/fpdfapi/page/cpdf_contentmark.cpp
index 8b4609586d..29d1bba210 100644
--- a/core/fpdfapi/page/cpdf_contentmark.cpp
+++ b/core/fpdfapi/page/cpdf_contentmark.cpp
@@ -57,10 +57,12 @@ void CPDF_ContentMark::AddMarkWithDirectDict(ByteString name,
m_pMarkData->AddMarkWithDirectDict(std::move(name), pDict);
}
-void CPDF_ContentMark::AddMarkWithPropertiesDict(ByteString name,
- CPDF_Dictionary* pDict) {
+void CPDF_ContentMark::AddMarkWithPropertiesDict(
+ ByteString name,
+ CPDF_Dictionary* pDict,
+ const ByteString& property_name) {
EnsureMarkDataExists();
- m_pMarkData->AddMarkWithPropertiesDict(std::move(name), pDict);
+ m_pMarkData->AddMarkWithPropertiesDict(std::move(name), pDict, property_name);
}
void CPDF_ContentMark::EnsureMarkDataExists() {
@@ -120,9 +122,10 @@ void CPDF_ContentMark::MarkData::AddMarkWithDirectDict(ByteString name,
void CPDF_ContentMark::MarkData::AddMarkWithPropertiesDict(
ByteString name,
- CPDF_Dictionary* pDict) {
+ CPDF_Dictionary* pDict,
+ const ByteString& property_name) {
auto pItem = pdfium::MakeRetain<CPDF_ContentMarkItem>(std::move(name));
- pItem->SetPropertiesDict(pDict);
+ pItem->SetPropertiesDict(pDict, property_name);
m_Marks.push_back(pItem);
}