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

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

Issue 1830323006: Remove FX_DWORD from XFA. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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 | « xfa/fxfa/parser/xfa_object_imp.cpp ('k') | xfa/fxfa/parser/xfa_parser_imp.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 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 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/fxcrt/include/fx_ext.h" 7 #include "core/fxcrt/include/fx_ext.h"
8 #include "xfa/fxbarcode/include/BC_Library.h" 8 #include "xfa/fxbarcode/include/BC_Library.h"
9 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" 9 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h"
10 #include "xfa/fxfa/parser/xfa_docdata.h" 10 #include "xfa/fxfa/parser/xfa_docdata.h"
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 return m_pNode ? m_pNode->GetEnum(XFA_ATTRIBUTE_Join) 822 return m_pNode ? m_pNode->GetEnum(XFA_ATTRIBUTE_Join)
823 : XFA_ATTRIBUTEENUM_Square; 823 : XFA_ATTRIBUTEENUM_Square;
824 } 824 }
825 FX_BOOL CXFA_Stroke::IsInverted() const { 825 FX_BOOL CXFA_Stroke::IsInverted() const {
826 return m_pNode ? m_pNode->GetBoolean(XFA_ATTRIBUTE_Inverted) : FALSE; 826 return m_pNode ? m_pNode->GetBoolean(XFA_ATTRIBUTE_Inverted) : FALSE;
827 } 827 }
828 FX_FLOAT CXFA_Stroke::GetRadius() const { 828 FX_FLOAT CXFA_Stroke::GetRadius() const {
829 return m_pNode ? m_pNode->GetMeasure(XFA_ATTRIBUTE_Radius).ToUnit(XFA_UNIT_Pt) 829 return m_pNode ? m_pNode->GetMeasure(XFA_ATTRIBUTE_Radius).ToUnit(XFA_UNIT_Pt)
830 : 0; 830 : 0;
831 } 831 }
832 FX_BOOL CXFA_Stroke::SameStyles(CXFA_Stroke stroke, FX_DWORD dwFlags) const { 832 FX_BOOL CXFA_Stroke::SameStyles(CXFA_Stroke stroke, uint32_t dwFlags) const {
833 if (m_pNode == stroke.GetNode()) { 833 if (m_pNode == stroke.GetNode()) {
834 return TRUE; 834 return TRUE;
835 } 835 }
836 if (FXSYS_fabs(GetThickness() - stroke.GetThickness()) >= 0.01f) { 836 if (FXSYS_fabs(GetThickness() - stroke.GetThickness()) >= 0.01f) {
837 return FALSE; 837 return FALSE;
838 } 838 }
839 if ((dwFlags & XFA_STROKE_SAMESTYLE_NoPresence) == 0 && 839 if ((dwFlags & XFA_STROKE_SAMESTYLE_NoPresence) == 0 &&
840 IsVisible() != stroke.IsVisible()) { 840 IsVisible() != stroke.IsVisible()) {
841 return FALSE; 841 return FALSE;
842 } 842 }
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 if (widgetData.GetCheckState() == XFA_CHECKSTATE_On) { 1229 if (widgetData.GetCheckState() == XFA_CHECKSTATE_On) {
1230 pSelectedMember = pNode; 1230 pSelectedMember = pNode;
1231 break; 1231 break;
1232 } 1232 }
1233 } 1233 }
1234 return pSelectedMember; 1234 return pSelectedMember;
1235 } 1235 }
1236 CXFA_Node* CXFA_WidgetData::SetSelectedMember(const CFX_WideStringC& wsName, 1236 CXFA_Node* CXFA_WidgetData::SetSelectedMember(const CFX_WideStringC& wsName,
1237 FX_BOOL bNotify) { 1237 FX_BOOL bNotify) {
1238 CXFA_Node* pSelectedMember = NULL; 1238 CXFA_Node* pSelectedMember = NULL;
1239 FX_DWORD nameHash = 1239 uint32_t nameHash =
1240 FX_HashCode_String_GetW(wsName.GetPtr(), wsName.GetLength()); 1240 FX_HashCode_String_GetW(wsName.GetPtr(), wsName.GetLength());
1241 for (CXFA_Node* pNode = ToNode(m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild)); 1241 for (CXFA_Node* pNode = ToNode(m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild));
1242 pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { 1242 pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) {
1243 if (pNode->GetNameHash() == nameHash) { 1243 if (pNode->GetNameHash() == nameHash) {
1244 CXFA_WidgetData widgetData(pNode); 1244 CXFA_WidgetData widgetData(pNode);
1245 widgetData.SetCheckState(XFA_CHECKSTATE_On, bNotify); 1245 widgetData.SetCheckState(XFA_CHECKSTATE_On, bNotify);
1246 pSelectedMember = pNode; 1246 pSelectedMember = pNode;
1247 break; 1247 break;
1248 } 1248 }
1249 } 1249 }
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
2182 if (pPicture->TryContent(wsPicture)) { 2182 if (pPicture->TryContent(wsPicture)) {
2183 return TRUE; 2183 return TRUE;
2184 } 2184 }
2185 } 2185 }
2186 } 2186 }
2187 CFX_WideString wsDataPicture, wsTimePicture; 2187 CFX_WideString wsDataPicture, wsTimePicture;
2188 IFX_Locale* pLocale = GetLocal(); 2188 IFX_Locale* pLocale = GetLocal();
2189 if (!pLocale) { 2189 if (!pLocale) {
2190 return FALSE; 2190 return FALSE;
2191 } 2191 }
2192 FX_DWORD dwType = widgetValue.GetType(); 2192 uint32_t dwType = widgetValue.GetType();
2193 switch (dwType) { 2193 switch (dwType) {
2194 case XFA_VT_DATE: 2194 case XFA_VT_DATE:
2195 pLocale->GetDatePattern(FX_LOCALEDATETIMESUBCATEGORY_Medium, 2195 pLocale->GetDatePattern(FX_LOCALEDATETIMESUBCATEGORY_Medium,
2196 wsPicture); 2196 wsPicture);
2197 break; 2197 break;
2198 case XFA_VT_TIME: 2198 case XFA_VT_TIME:
2199 pLocale->GetTimePattern(FX_LOCALEDATETIMESUBCATEGORY_Medium, 2199 pLocale->GetTimePattern(FX_LOCALEDATETIMESUBCATEGORY_Medium,
2200 wsPicture); 2200 wsPicture);
2201 break; 2201 break;
2202 case XFA_VT_DATETIME: 2202 case XFA_VT_DATETIME:
(...skipping 19 matching lines...) Expand all
2222 return TRUE; 2222 return TRUE;
2223 } 2223 }
2224 } 2224 }
2225 } 2225 }
2226 { 2226 {
2227 CFX_WideString wsDataPicture, wsTimePicture; 2227 CFX_WideString wsDataPicture, wsTimePicture;
2228 IFX_Locale* pLocale = GetLocal(); 2228 IFX_Locale* pLocale = GetLocal();
2229 if (!pLocale) { 2229 if (!pLocale) {
2230 return FALSE; 2230 return FALSE;
2231 } 2231 }
2232 FX_DWORD dwType = widgetValue.GetType(); 2232 uint32_t dwType = widgetValue.GetType();
2233 switch (dwType) { 2233 switch (dwType) {
2234 case XFA_VT_DATE: 2234 case XFA_VT_DATE:
2235 pLocale->GetDatePattern(FX_LOCALEDATETIMESUBCATEGORY_Short, 2235 pLocale->GetDatePattern(FX_LOCALEDATETIMESUBCATEGORY_Short,
2236 wsPicture); 2236 wsPicture);
2237 break; 2237 break;
2238 case XFA_VT_TIME: 2238 case XFA_VT_TIME:
2239 pLocale->GetTimePattern(FX_LOCALEDATETIMESUBCATEGORY_Short, 2239 pLocale->GetTimePattern(FX_LOCALEDATETIMESUBCATEGORY_Short,
2240 wsPicture); 2240 wsPicture);
2241 break; 2241 break;
2242 case XFA_VT_DATETIME: 2242 case XFA_VT_DATETIME:
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
2647 XFA_ATTRIBUTE attributeValue = XFA_ATTRIBUTE_Type, 2647 XFA_ATTRIBUTE attributeValue = XFA_ATTRIBUTE_Type,
2648 XFA_ATTRIBUTEENUM eDefaultValue = XFA_ATTRIBUTEENUM_Optional) { 2648 XFA_ATTRIBUTEENUM eDefaultValue = XFA_ATTRIBUTEENUM_Optional) {
2649 XFA_ATTRIBUTEENUM eType = eDefaultValue; 2649 XFA_ATTRIBUTEENUM eType = eDefaultValue;
2650 if (pNode) { 2650 if (pNode) {
2651 if (!pNode->TryEnum(attributeValue, eType, TRUE)) { 2651 if (!pNode->TryEnum(attributeValue, eType, TRUE)) {
2652 eType = eDefaultValue; 2652 eType = eDefaultValue;
2653 } 2653 }
2654 } 2654 }
2655 return eType; 2655 return eType;
2656 } 2656 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_object_imp.cpp ('k') | xfa/fxfa/parser/xfa_parser_imp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698