diff options
Diffstat (limited to 'core/fpdfapi/edit')
-rw-r--r-- | core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp index 9693bc48ff..e2fa801a58 100644 --- a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp +++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp @@ -264,13 +264,20 @@ const CPDF_ContentMark* CPDF_PageContentGenerator::ProcessContentMarks( } // If there are parameters, write properties, direct or indirect. - if (item->GetParamType() == CPDF_ContentMarkItem::DirectDict) { - CPDF_StringArchiveStream archive_stream(buf); - item->GetParam()->WriteTo(&archive_stream, nullptr); - *buf << " "; - } else { - ASSERT(item->GetParamType() == CPDF_ContentMarkItem::PropertiesDict); - *buf << "/" << item->GetPropertyName() << " "; + switch (item->GetParamType()) { + case CPDF_ContentMarkItem::DirectDict: { + CPDF_StringArchiveStream archive_stream(buf); + item->GetParam()->WriteTo(&archive_stream, nullptr); + *buf << " "; + break; + } + case CPDF_ContentMarkItem::PropertiesDict: { + *buf << "/" << item->GetPropertyName() << " "; + break; + } + default: + NOTREACHED(); + break; } // Write BDC (begin dictionary content) operator. |