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

Side by Side Diff: fpdfsdk/cpdfsdk_baannot.cpp

Issue 2295953002: Use enum class for subtypes of CPDF_Annot. (Closed)
Patch Set: Use enum class for subtypes of CPDF_Annot. Created 4 years, 3 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 | « fpdfsdk/cpdfsdk_annothandlermgr.cpp ('k') | fpdfsdk/cpdfsdk_baannothandler.cpp » ('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 "fpdfsdk/include/cpdfsdk_baannot.h" 7 #include "fpdfsdk/include/cpdfsdk_baannot.h"
8 8
9 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" 9 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h"
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_number.h" 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_number.h"
(...skipping 24 matching lines...) Expand all
35 ASSERT(rect.right - rect.left >= GetMinWidth()); 35 ASSERT(rect.right - rect.left >= GetMinWidth());
36 ASSERT(rect.top - rect.bottom >= GetMinHeight()); 36 ASSERT(rect.top - rect.bottom >= GetMinHeight());
37 37
38 m_pAnnot->GetAnnotDict()->SetAtRect("Rect", rect); 38 m_pAnnot->GetAnnotDict()->SetAtRect("Rect", rect);
39 } 39 }
40 40
41 CFX_FloatRect CPDFSDK_BAAnnot::GetRect() const { 41 CFX_FloatRect CPDFSDK_BAAnnot::GetRect() const {
42 return m_pAnnot->GetRect(); 42 return m_pAnnot->GetRect();
43 } 43 }
44 44
45 CFX_ByteString CPDFSDK_BAAnnot::GetAnnotSubtype() const { 45 CPDF_Annot::Subtype CPDFSDK_BAAnnot::GetAnnotSubtype() const {
46 return m_pAnnot->GetSubtype(); 46 return m_pAnnot->GetSubtype();
47 } 47 }
48 48
49 void CPDFSDK_BAAnnot::DrawAppearance(CFX_RenderDevice* pDevice, 49 void CPDFSDK_BAAnnot::DrawAppearance(CFX_RenderDevice* pDevice,
50 const CFX_Matrix* pUser2Device, 50 const CFX_Matrix* pUser2Device,
51 CPDF_Annot::AppearanceMode mode, 51 CPDF_Annot::AppearanceMode mode,
52 const CPDF_RenderOptions* pOptions) { 52 const CPDF_RenderOptions* pOptions) {
53 m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device, 53 m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device,
54 mode, pOptions); 54 mode, pOptions);
55 } 55 }
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 CPDF_RenderOptions* pOptions) { 398 CPDF_RenderOptions* pOptions) {
399 m_pAnnot->GetAPForm(m_pPageView->GetPDFPage(), CPDF_Annot::Normal); 399 m_pAnnot->GetAPForm(m_pPageView->GetPDFPage(), CPDF_Annot::Normal);
400 m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device, 400 m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device,
401 CPDF_Annot::Normal, nullptr); 401 CPDF_Annot::Normal, nullptr);
402 } 402 }
403 403
404 void CPDFSDK_BAAnnot::SetOpenState(bool bOpenState) { 404 void CPDFSDK_BAAnnot::SetOpenState(bool bOpenState) {
405 if (CPDF_Annot* pAnnot = m_pAnnot->GetPopupAnnot()) 405 if (CPDF_Annot* pAnnot = m_pAnnot->GetPopupAnnot())
406 pAnnot->SetOpenState(bOpenState); 406 pAnnot->SetOpenState(bOpenState);
407 } 407 }
OLDNEW
« no previous file with comments | « fpdfsdk/cpdfsdk_annothandlermgr.cpp ('k') | fpdfsdk/cpdfsdk_baannothandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698