OLD | NEW |
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 2254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2265 } | 2265 } |
2266 IFX_Locale* CXFA_WidgetData::GetLocal() { | 2266 IFX_Locale* CXFA_WidgetData::GetLocal() { |
2267 IFX_Locale* pLocale = NULL; | 2267 IFX_Locale* pLocale = NULL; |
2268 if (!m_pNode) { | 2268 if (!m_pNode) { |
2269 return pLocale; | 2269 return pLocale; |
2270 } | 2270 } |
2271 FX_BOOL bLocale = FALSE; | 2271 FX_BOOL bLocale = FALSE; |
2272 CFX_WideString wsLocaleName; | 2272 CFX_WideString wsLocaleName; |
2273 bLocale = m_pNode->GetLocaleName(wsLocaleName); | 2273 bLocale = m_pNode->GetLocaleName(wsLocaleName); |
2274 if (bLocale) { | 2274 if (bLocale) { |
2275 if (wsLocaleName.Equal(FX_WSTRC(L"ambient"))) { | 2275 if (wsLocaleName == FX_WSTRC(L"ambient")) { |
2276 pLocale = m_pNode->GetDocument()->GetLocalMgr()->GetDefLocale(); | 2276 pLocale = m_pNode->GetDocument()->GetLocalMgr()->GetDefLocale(); |
2277 } else { | 2277 } else { |
2278 pLocale = | 2278 pLocale = |
2279 m_pNode->GetDocument()->GetLocalMgr()->GetLocaleByName(wsLocaleName); | 2279 m_pNode->GetDocument()->GetLocalMgr()->GetLocaleByName(wsLocaleName); |
2280 } | 2280 } |
2281 } | 2281 } |
2282 return pLocale; | 2282 return pLocale; |
2283 } | 2283 } |
2284 static FX_BOOL XFA_SplitDateTime(const CFX_WideString& wsDateTime, | 2284 static FX_BOOL XFA_SplitDateTime(const CFX_WideString& wsDateTime, |
2285 CFX_WideString& wsDate, | 2285 CFX_WideString& wsDate, |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } |
OLD | NEW |