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

Side by Side Diff: xfa/fxfa/parser/cxfa_data.cpp

Issue 2082573007: Update GetClassID to GetElementType (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@remove_script_obj_hash
Patch Set: Created 4 years, 6 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
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 "xfa/fxfa/parser/cxfa_data.h" 7 #include "xfa/fxfa/parser/cxfa_data.h"
8 8
9 #include "xfa/fxfa/parser/xfa_object.h" 9 #include "xfa/fxfa/parser/xfa_object.h"
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 break; 52 break;
53 53
54 b = b * 10 + str[cc] - '0'; 54 b = b * 10 + str[cc] - '0';
55 cc++; 55 cc++;
56 } 56 }
57 } 57 }
58 } 58 }
59 return (0xff << 24) | (r << 16) | (g << 8) | b; 59 return (0xff << 24) | (r << 16) | (g << 8) | b;
60 } 60 }
61 61
62 XFA_Element CXFA_Data::GetClassID() const { 62 XFA_Element CXFA_Data::GetElementType() const {
63 return m_pNode ? m_pNode->GetClassID() : XFA_Element::Unknown; 63 return m_pNode ? m_pNode->GetElementType() : XFA_Element::Unknown;
64 } 64 }
65 65
66 FX_BOOL CXFA_Data::TryMeasure(XFA_ATTRIBUTE eAttr, 66 FX_BOOL CXFA_Data::TryMeasure(XFA_ATTRIBUTE eAttr,
67 FX_FLOAT& fValue, 67 FX_FLOAT& fValue,
68 FX_BOOL bUseDefault) const { 68 FX_BOOL bUseDefault) const {
69 CXFA_Measurement ms; 69 CXFA_Measurement ms;
70 if (m_pNode->TryMeasure(eAttr, ms, bUseDefault)) { 70 if (m_pNode->TryMeasure(eAttr, ms, bUseDefault)) {
71 fValue = ms.ToUnit(XFA_UNIT_Pt); 71 fValue = ms.ToUnit(XFA_UNIT_Pt);
72 return TRUE; 72 return TRUE;
73 } 73 }
74 return FALSE; 74 return FALSE;
75 } 75 }
76 76
77 FX_BOOL CXFA_Data::SetMeasure(XFA_ATTRIBUTE eAttr, FX_FLOAT fValue) { 77 FX_BOOL CXFA_Data::SetMeasure(XFA_ATTRIBUTE eAttr, FX_FLOAT fValue) {
78 CXFA_Measurement ms(fValue, XFA_UNIT_Pt); 78 CXFA_Measurement ms(fValue, XFA_UNIT_Pt);
79 return m_pNode->SetMeasure(eAttr, ms); 79 return m_pNode->SetMeasure(eAttr, ms);
80 } 80 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698