OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 |
| 7 #include "core/fpdfapi/fpdf_page/cpdf_contentmarkitem.h" |
| 8 |
| 9 #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" |
| 10 |
| 11 CPDF_ContentMarkItem::CPDF_ContentMarkItem() { |
| 12 m_ParamType = None; |
| 13 } |
| 14 |
| 15 CPDF_ContentMarkItem::CPDF_ContentMarkItem(const CPDF_ContentMarkItem& src) { |
| 16 m_MarkName = src.m_MarkName; |
| 17 m_ParamType = src.m_ParamType; |
| 18 if (m_ParamType == DirectDict) { |
| 19 m_pParam = ToDictionary(src.m_pParam->Clone()); |
| 20 } else { |
| 21 m_pParam = src.m_pParam; |
| 22 } |
| 23 } |
| 24 |
| 25 CPDF_ContentMarkItem::~CPDF_ContentMarkItem() { |
| 26 if (m_ParamType == DirectDict && m_pParam) |
| 27 m_pParam->Release(); |
| 28 } |
| 29 |
| 30 FX_BOOL CPDF_ContentMarkItem::HasMCID() const { |
| 31 if (m_pParam && |
| 32 (m_ParamType == DirectDict || m_ParamType == PropertiesDict)) { |
| 33 return m_pParam->KeyExist("MCID"); |
| 34 } |
| 35 return FALSE; |
| 36 } |
OLD | NEW |