diff options
-rw-r--r-- | fxjs/cfxjse_formcalc_context.cpp | 18 | ||||
-rw-r--r-- | xfa/fxfa/cxfa_ffdatetimeedit.cpp | 2 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_document.cpp | 10 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_document.h | 4 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_node.cpp | 30 | ||||
-rw-r--r-- | xfa/fxfa/parser/xfa_utils.cpp | 2 |
6 files changed, 33 insertions, 33 deletions
diff --git a/fxjs/cfxjse_formcalc_context.cpp b/fxjs/cfxjse_formcalc_context.cpp index 40f4249ab7..d8f7aff09f 100644 --- a/fxjs/cfxjse_formcalc_context.cpp +++ b/fxjs/cfxjse_formcalc_context.cpp @@ -1238,7 +1238,7 @@ void CFXJSE_FormCalcContext::IsoTime2Num(CFXJSE_Value* pThis, } CXFA_Document* pDoc = pContext->GetDocument(); - CXFA_LocaleMgr* pMgr = pDoc->GetLocalMgr(); + CXFA_LocaleMgr* pMgr = pDoc->GetLocaleMgr(); ByteString szArgString = ValueToUTF8String(argOne.get()); auto pos = szArgString.Find('T', 0); if (!pos.has_value() || pos.value() == szArgString.GetLength() - 1) { @@ -1639,7 +1639,7 @@ void CFXJSE_FormCalcContext::Time2Num(CFXJSE_Value* pThis, } CXFA_Document* pDoc = ToFormCalcContext(pThis)->GetDocument(); - CXFA_LocaleMgr* pMgr = pDoc->GetLocalMgr(); + CXFA_LocaleMgr* pMgr = pDoc->GetLocaleMgr(); LocaleIface* pLocale = nullptr; if (localString.IsEmpty()) { CXFA_Node* pThisNode = ToNode(pDoc->GetScriptContext()->GetThisObject()); @@ -1999,7 +1999,7 @@ ByteString CFXJSE_FormCalcContext::Local2IsoDate( if (!pDoc) return ByteString(); - CXFA_LocaleMgr* pMgr = pDoc->GetLocalMgr(); + CXFA_LocaleMgr* pMgr = pDoc->GetLocaleMgr(); LocaleIface* pLocale = LocaleFromString(pDoc, pMgr, szLocale); if (!pLocale) return ByteString(); @@ -2023,7 +2023,7 @@ ByteString CFXJSE_FormCalcContext::IsoDate2Local( if (!pDoc) return ByteString(); - CXFA_LocaleMgr* pMgr = pDoc->GetLocalMgr(); + CXFA_LocaleMgr* pMgr = pDoc->GetLocaleMgr(); LocaleIface* pLocale = LocaleFromString(pDoc, pMgr, szLocale); if (!pLocale) return ByteString(); @@ -2045,7 +2045,7 @@ ByteString CFXJSE_FormCalcContext::IsoTime2Local( if (!pDoc) return ByteString(); - CXFA_LocaleMgr* pMgr = pDoc->GetLocalMgr(); + CXFA_LocaleMgr* pMgr = pDoc->GetLocaleMgr(); LocaleIface* pLocale = LocaleFromString(pDoc, pMgr, szLocale); if (!pLocale) return ByteString(); @@ -2127,7 +2127,7 @@ ByteString CFXJSE_FormCalcContext::GetLocalDateFormat( if (!pDoc) return ByteString(); - CXFA_LocaleMgr* pMgr = pDoc->GetLocalMgr(); + CXFA_LocaleMgr* pMgr = pDoc->GetLocaleMgr(); LocaleIface* pLocale = LocaleFromString(pDoc, pMgr, szLocale); if (!pLocale) return ByteString(); @@ -2150,7 +2150,7 @@ ByteString CFXJSE_FormCalcContext::GetLocalTimeFormat( if (!pDoc) return ByteString(); - CXFA_LocaleMgr* pMgr = pDoc->GetLocalMgr(); + CXFA_LocaleMgr* pMgr = pDoc->GetLocaleMgr(); LocaleIface* pLocale = LocaleFromString(pDoc, pMgr, szLocale); if (!pLocale) return ByteString(); @@ -3766,7 +3766,7 @@ void CFXJSE_FormCalcContext::Format(CFXJSE_Value* pThis, ByteString szValue = ValueToUTF8String(argTwo.get()); CXFA_Document* pDoc = pContext->GetDocument(); - CXFA_LocaleMgr* pMgr = pDoc->GetLocalMgr(); + CXFA_LocaleMgr* pMgr = pDoc->GetLocaleMgr(); CXFA_Node* pThisNode = ToNode(pDoc->GetScriptContext()->GetThisObject()); ASSERT(pThisNode); @@ -3941,7 +3941,7 @@ void CFXJSE_FormCalcContext::Parse(CFXJSE_Value* pThis, ByteString szPattern = ValueToUTF8String(argOne.get()); ByteString szValue = ValueToUTF8String(argTwo.get()); CXFA_Document* pDoc = pContext->GetDocument(); - CXFA_LocaleMgr* pMgr = pDoc->GetLocalMgr(); + CXFA_LocaleMgr* pMgr = pDoc->GetLocaleMgr(); CXFA_Node* pThisNode = ToNode(pDoc->GetScriptContext()->GetThisObject()); ASSERT(pThisNode); diff --git a/xfa/fxfa/cxfa_ffdatetimeedit.cpp b/xfa/fxfa/cxfa_ffdatetimeedit.cpp index 6218e29826..c1bea362b5 100644 --- a/xfa/fxfa/cxfa_ffdatetimeedit.cpp +++ b/xfa/fxfa/cxfa_ffdatetimeedit.cpp @@ -184,7 +184,7 @@ void CXFA_FFDateTimeEdit::OnSelectChanged(CFWL_Widget* pWidget, int32_t iDay) { WideString wsPicture = m_pNode->GetPictureContent(XFA_VALUEPICTURE_Edit); - CXFA_LocaleValue date(XFA_VT_DATE, GetDoc()->GetXFADoc()->GetLocalMgr()); + CXFA_LocaleValue date(XFA_VT_DATE, GetDoc()->GetXFADoc()->GetLocaleMgr()); date.SetDate(CFX_DateTime(iYear, iMonth, iDay, 0, 0, 0, 0)); WideString wsDate; diff --git a/xfa/fxfa/parser/cxfa_document.cpp b/xfa/fxfa/parser/cxfa_document.cpp index 4d51c0b0b8..d42bfb5601 100644 --- a/xfa/fxfa/parser/cxfa_document.cpp +++ b/xfa/fxfa/parser/cxfa_document.cpp @@ -1294,7 +1294,7 @@ CXFA_LayoutProcessor* CXFA_Document::GetLayoutProcessor() { void CXFA_Document::ClearLayoutData() { m_pLayoutProcessor.reset(); m_pScriptContext.reset(); - m_pLocalMgr.reset(); + m_pLocaleMgr.reset(); m_pScriptDataWindow.reset(); m_pScriptEvent.reset(); m_pScriptHost.reset(); @@ -1421,13 +1421,13 @@ bool CXFA_Document::IsInteractive() { return false; } -CXFA_LocaleMgr* CXFA_Document::GetLocalMgr() { - if (!m_pLocalMgr) { - m_pLocalMgr = pdfium::MakeUnique<CXFA_LocaleMgr>( +CXFA_LocaleMgr* CXFA_Document::GetLocaleMgr() { + if (!m_pLocaleMgr) { + m_pLocaleMgr = pdfium::MakeUnique<CXFA_LocaleMgr>( ToNode(GetXFAObject(XFA_HASHCODE_LocaleSet)), GetNotify()->GetAppProvider()->GetLanguage()); } - return m_pLocalMgr.get(); + return m_pLocaleMgr.get(); } CFXJSE_Engine* CXFA_Document::InitScriptContext(CJS_Runtime* fxjs_runtime) { diff --git a/xfa/fxfa/parser/cxfa_document.h b/xfa/fxfa/parser/cxfa_document.h index 8bddcb2035..5260b1873f 100644 --- a/xfa/fxfa/parser/cxfa_document.h +++ b/xfa/fxfa/parser/cxfa_document.h @@ -62,7 +62,7 @@ class CXFA_Document : public CXFA_NodeOwner { CXFA_Node* GetRoot() const { return m_pRootNode; } CXFA_FFNotify* GetNotify() const { return notify_.Get(); } - CXFA_LocaleMgr* GetLocalMgr(); + CXFA_LocaleMgr* GetLocaleMgr(); CXFA_Object* GetXFAObject(XFA_HashCode wsNodeNameHash); CXFA_Node* GetNodeByID(CXFA_Node* pRoot, const WideStringView& wsID) const; CXFA_Node* GetNotBindNode(const std::vector<CXFA_Object*>& arrayNodes) const; @@ -107,7 +107,7 @@ class CXFA_Document : public CXFA_NodeOwner { std::map<uint32_t, CXFA_Node*> m_rgGlobalBinding; std::unique_ptr<CFXJSE_Engine> m_pScriptContext; std::unique_ptr<CXFA_LayoutProcessor> m_pLayoutProcessor; - std::unique_ptr<CXFA_LocaleMgr> m_pLocalMgr; + std::unique_ptr<CXFA_LocaleMgr> m_pLocaleMgr; std::unique_ptr<CScript_DataWindow> m_pScriptDataWindow; std::unique_ptr<CScript_EventPseudoModel> m_pScriptEvent; std::unique_ptr<CScript_HostPseudoModel> m_pScriptHost; diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp index 3fe4f915bc..f9bc9a4dee 100644 --- a/xfa/fxfa/parser/cxfa_node.cpp +++ b/xfa/fxfa/parser/cxfa_node.cpp @@ -961,8 +961,8 @@ LocaleIface* CXFA_Node::GetLocale() { if (!localeName) return nullptr; if (localeName.value() == L"ambient") - return GetDocument()->GetLocalMgr()->GetDefLocale(); - return GetDocument()->GetLocalMgr()->GetLocaleByName(localeName.value()); + return GetDocument()->GetLocaleMgr()->GetDefLocale(); + return GetDocument()->GetLocaleMgr()->GetLocaleByName(localeName.value()); } Optional<WideString> CXFA_Node::GetLocaleName() { @@ -983,7 +983,7 @@ Optional<WideString> CXFA_Node::GetLocaleName() { CXFA_Node* pConfig = ToNode(GetDocument()->GetXFAObject(XFA_HASHCODE_Config)); Optional<WideString> localeName = { - GetDocument()->GetLocalMgr()->GetConfigLocaleName(pConfig)}; + GetDocument()->GetLocaleMgr()->GetConfigLocaleName(pConfig)}; if (localeName && !localeName->IsEmpty()) return localeName; @@ -994,7 +994,7 @@ Optional<WideString> CXFA_Node::GetLocaleName() { return localeName; } - LocaleIface* pLocale = GetDocument()->GetLocalMgr()->GetDefLocale(); + LocaleIface* pLocale = GetDocument()->GetLocaleMgr()->GetDefLocale(); if (!pLocale) return {}; @@ -4310,14 +4310,14 @@ bool CXFA_Node::SetValue(XFA_VALUEPICTURE eValueType, XFA_Element eType = pNode->GetElementType(); if (!wsPicture.IsEmpty()) { - CXFA_LocaleMgr* pLocalMgr = GetDocument()->GetLocalMgr(); + CXFA_LocaleMgr* pLocaleMgr = GetDocument()->GetLocaleMgr(); LocaleIface* pLocale = GetLocale(); CXFA_LocaleValue widgetValue = XFA_GetLocaleValue(this); bValidate = widgetValue.ValidateValue(wsValue, wsPicture, pLocale, &wsPicture); if (bValidate) { widgetValue = CXFA_LocaleValue(widgetValue.GetType(), wsNewText, - wsPicture, pLocale, pLocalMgr); + wsPicture, pLocale, pLocaleMgr); wsNewText = widgetValue.GetValue(); if (eType == XFA_Element::NumericEdit) wsNewText = NumericLimit(wsNewText); @@ -4453,12 +4453,12 @@ WideString CXFA_Node::GetValue(XFA_VALUEPICTURE eValueType) { if (LocaleIface* pLocale = GetLocale()) { CXFA_LocaleValue widgetValue = XFA_GetLocaleValue(this); - CXFA_LocaleMgr* pLocalMgr = GetDocument()->GetLocalMgr(); + CXFA_LocaleMgr* pLocaleMgr = GetDocument()->GetLocaleMgr(); switch (widgetValue.GetType()) { case XFA_VT_DATE: { WideString wsDate, wsTime; if (SplitDateTime(wsValue, wsDate, wsTime)) { - CXFA_LocaleValue date(XFA_VT_DATE, wsDate, pLocalMgr); + CXFA_LocaleValue date(XFA_VT_DATE, wsDate, pLocaleMgr); if (date.FormatPatterns(wsValue, wsPicture, pLocale, eValueType)) return wsValue; } @@ -4467,7 +4467,7 @@ WideString CXFA_Node::GetValue(XFA_VALUEPICTURE eValueType) { case XFA_VT_TIME: { WideString wsDate, wsTime; if (SplitDateTime(wsValue, wsDate, wsTime)) { - CXFA_LocaleValue time(XFA_VT_TIME, wsTime, pLocalMgr); + CXFA_LocaleValue time(XFA_VT_TIME, wsTime, pLocaleMgr); if (time.FormatPatterns(wsValue, wsPicture, pLocale, eValueType)) return wsValue; } @@ -4489,12 +4489,12 @@ WideString CXFA_Node::GetNormalizeDataValue(const WideString& wsValue) { if (wsPicture.IsEmpty()) return wsValue; - CXFA_LocaleMgr* pLocalMgr = GetDocument()->GetLocalMgr(); + CXFA_LocaleMgr* pLocaleMgr = GetDocument()->GetLocaleMgr(); LocaleIface* pLocale = GetLocale(); CXFA_LocaleValue widgetValue = XFA_GetLocaleValue(this); if (widgetValue.ValidateValue(wsValue, wsPicture, pLocale, &wsPicture)) { widgetValue = CXFA_LocaleValue(widgetValue.GetType(), wsValue, wsPicture, - pLocale, pLocalMgr); + pLocale, pLocaleMgr); return widgetValue.GetValue(); } return wsValue; @@ -4548,13 +4548,13 @@ WideString CXFA_Node::GetFormatDataValue(const WideString& wsValue) { iVTType = XFA_VT_NULL; break; } - CXFA_LocaleMgr* pLocalMgr = GetDocument()->GetLocalMgr(); - CXFA_LocaleValue widgetValue(iVTType, wsValue, pLocalMgr); + CXFA_LocaleMgr* pLocaleMgr = GetDocument()->GetLocaleMgr(); + CXFA_LocaleValue widgetValue(iVTType, wsValue, pLocaleMgr); switch (widgetValue.GetType()) { case XFA_VT_DATE: { WideString wsDate, wsTime; if (SplitDateTime(wsValue, wsDate, wsTime)) { - CXFA_LocaleValue date(XFA_VT_DATE, wsDate, pLocalMgr); + CXFA_LocaleValue date(XFA_VT_DATE, wsDate, pLocaleMgr); if (date.FormatPatterns(wsFormattedValue, wsPicture, pLocale, XFA_VALUEPICTURE_DataBind)) { return wsFormattedValue; @@ -4565,7 +4565,7 @@ WideString CXFA_Node::GetFormatDataValue(const WideString& wsValue) { case XFA_VT_TIME: { WideString wsDate, wsTime; if (SplitDateTime(wsValue, wsDate, wsTime)) { - CXFA_LocaleValue time(XFA_VT_TIME, wsTime, pLocalMgr); + CXFA_LocaleValue time(XFA_VT_TIME, wsTime, pLocaleMgr); if (time.FormatPatterns(wsFormattedValue, wsPicture, pLocale, XFA_VALUEPICTURE_DataBind)) { return wsFormattedValue; diff --git a/xfa/fxfa/parser/xfa_utils.cpp b/xfa/fxfa/parser/xfa_utils.cpp index 1331a43756..5a8f1c8711 100644 --- a/xfa/fxfa/parser/xfa_utils.cpp +++ b/xfa/fxfa/parser/xfa_utils.cpp @@ -450,7 +450,7 @@ CXFA_LocaleValue XFA_GetLocaleValue(CXFA_Node* pNode) { break; } return CXFA_LocaleValue(iVTType, pNode->GetRawValue(), - pNode->GetDocument()->GetLocalMgr()); + pNode->GetDocument()->GetLocaleMgr()); } bool XFA_FDEExtension_ResolveNamespaceQualifier(CFX_XMLElement* pNode, |