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

Side by Side Diff: core/fpdfdoc/cpdf_bookmark.cpp

Issue 2377393002: Move core/fxge/include to core/fxge (Closed)
Patch Set: Rebase to master Created 4 years, 2 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
« no previous file with comments | « core/fpdfdoc/cpdf_apsettings.h ('k') | core/fpdfdoc/cpdf_defaultappearance.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "core/fpdfdoc/cpdf_bookmark.h" 7 #include "core/fpdfdoc/cpdf_bookmark.h"
8 8
9 #include "core/fpdfapi/fpdf_parser/cpdf_array.h" 9 #include "core/fpdfapi/fpdf_parser/cpdf_array.h"
10 #include "core/fpdfapi/fpdf_parser/cpdf_string.h" 10 #include "core/fpdfapi/fpdf_parser/cpdf_string.h"
11 #include "core/fpdfdoc/cpdf_nametree.h" 11 #include "core/fpdfdoc/cpdf_nametree.h"
12 #include "core/fxge/include/fx_dib.h" 12 #include "core/fxge/fx_dib.h"
13 13
14 uint32_t CPDF_Bookmark::GetColorRef() const { 14 uint32_t CPDF_Bookmark::GetColorRef() const {
15 if (!m_pDict) 15 if (!m_pDict)
16 return FXSYS_RGB(0, 0, 0); 16 return FXSYS_RGB(0, 0, 0);
17 17
18 CPDF_Array* pColor = m_pDict->GetArrayFor("C"); 18 CPDF_Array* pColor = m_pDict->GetArrayFor("C");
19 if (!pColor) 19 if (!pColor)
20 return FXSYS_RGB(0, 0, 0); 20 return FXSYS_RGB(0, 0, 0);
21 21
22 int r = FXSYS_round(pColor->GetNumberAt(0) * 255); 22 int r = FXSYS_round(pColor->GetNumberAt(0) * 255);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 return CPDF_Dest(name_tree.LookupNamedDest(pDocument, pDest->GetString())); 62 return CPDF_Dest(name_tree.LookupNamedDest(pDocument, pDest->GetString()));
63 } 63 }
64 if (CPDF_Array* pArray = pDest->AsArray()) 64 if (CPDF_Array* pArray = pDest->AsArray())
65 return CPDF_Dest(pArray); 65 return CPDF_Dest(pArray);
66 return CPDF_Dest(); 66 return CPDF_Dest();
67 } 67 }
68 68
69 CPDF_Action CPDF_Bookmark::GetAction() const { 69 CPDF_Action CPDF_Bookmark::GetAction() const {
70 return m_pDict ? CPDF_Action(m_pDict->GetDictFor("A")) : CPDF_Action(); 70 return m_pDict ? CPDF_Action(m_pDict->GetDictFor("A")) : CPDF_Action();
71 } 71 }
OLDNEW
« no previous file with comments | « core/fpdfdoc/cpdf_apsettings.h ('k') | core/fpdfdoc/cpdf_defaultappearance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698