summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_widgetdata.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-04 10:26:49 -0500
committerChromium commit bot <commit-bot@chromium.org>2018-01-04 16:45:31 +0000
commit8ee5207f4f792295badd21f90727e8c810e7dbdf (patch)
treebb4138654ad69cd8c3750b687f494d6fefeef803 /xfa/fxfa/parser/cxfa_widgetdata.cpp
parent72fe435e80807c91dbf8edc41d5bf3ec3c9bd9e4 (diff)
downloadpdfium-8ee5207f4f792295badd21f90727e8c810e7dbdf.tar.xz
Make CXFA_WidgetData constructor protected
This CL removes all the direct creation of CXFA_WidgetData elements and makes the constructor protected. Change-Id: I2e9aa11cab8c1e26f7cfa9fd32329f0841fab010 Reviewed-on: https://pdfium-review.googlesource.com/22251 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_widgetdata.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp
index 7771d33d01..68063e2a07 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.cpp
+++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp
@@ -1500,15 +1500,7 @@ WideString CXFA_WidgetData::GetPictureContent(XFA_VALUEPICTURE ePicture) {
}
IFX_Locale* CXFA_WidgetData::GetLocale() {
- if (!m_pNode)
- return nullptr;
-
- WideString wsLocaleName;
- if (!m_pNode->GetLocaleName(wsLocaleName))
- return nullptr;
- if (wsLocaleName == L"ambient")
- return m_pNode->GetDocument()->GetLocalMgr()->GetDefLocale();
- return m_pNode->GetDocument()->GetLocalMgr()->GetLocaleByName(wsLocaleName);
+ return m_pNode ? m_pNode->GetLocale() : nullptr;
}
WideString CXFA_WidgetData::GetValue(XFA_VALUEPICTURE eValueType) {