summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/cxfa_node.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index ac1398822d..9a1dec6716 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -621,6 +621,15 @@ CXFA_WidgetData* CXFA_Node::GetContainerWidgetData() {
: nullptr;
}
+IFX_Locale* CXFA_Node::GetLocale() {
+ WideString wsLocaleName;
+ if (!GetLocaleName(wsLocaleName))
+ return nullptr;
+ if (wsLocaleName == L"ambient")
+ return GetDocument()->GetLocalMgr()->GetDefLocale();
+ return GetDocument()->GetLocalMgr()->GetLocaleByName(wsLocaleName);
+}
+
bool CXFA_Node::GetLocaleName(WideString& wsLocaleName) {
CXFA_Node* pForm = GetDocument()->GetXFAObject(XFA_HASHCODE_Form)->AsNode();
CXFA_Subform* pTopSubform =