Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: core/fpdfapi/fpdf_page/cpdf_contentmark.cpp

Issue 1811053002: Move core/include/fpdfapi/fpdf_pageobj.h into core/fpdfapi. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_contentmark.h"
8
9 FX_BOOL CPDF_ContentMark::HasMark(const CFX_ByteStringC& mark) const {
10 if (!m_pObject)
11 return FALSE;
12
13 for (int i = 0; i < m_pObject->CountItems(); i++) {
14 CPDF_ContentMarkItem& item = m_pObject->GetItem(i);
15 if (item.GetName() == mark)
16 return TRUE;
17 }
18 return FALSE;
19 }
20
21 FX_BOOL CPDF_ContentMark::LookupMark(const CFX_ByteStringC& mark,
22 CPDF_Dictionary*& pDict) const {
23 if (!m_pObject)
24 return FALSE;
25
26 for (int i = 0; i < m_pObject->CountItems(); i++) {
27 CPDF_ContentMarkItem& item = m_pObject->GetItem(i);
28 if (item.GetName() == mark) {
29 pDict = nullptr;
30 if (item.GetParamType() == CPDF_ContentMarkItem::PropertiesDict ||
31 item.GetParamType() == CPDF_ContentMarkItem::DirectDict) {
32 pDict = item.GetParam();
33 }
34 return TRUE;
35 }
36 }
37 return FALSE;
38 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_contentmark.h ('k') | core/fpdfapi/fpdf_page/cpdf_contentmarkdata.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698