summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_locale.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-11-11 17:23:48 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-11 17:23:48 -0800
commit211d4edbe2f71ca62c76f36ce25090342c58e43c (patch)
tree645a4823ce6df9021333552b55288cd13344a4f9 /xfa/fxfa/parser/xfa_locale.cpp
parent8f3eb6051c0465923d6694bd0f0b6dc5bb51cbe3 (diff)
downloadpdfium-211d4edbe2f71ca62c76f36ce25090342c58e43c.tar.xz
Add fpdfppo_embeddertest.cpp.
The lack of coverage of the fpdfppo APIs was noticed while trying to diagnose another issue. Adding basic calls to these APIs then kicked out an assert in XFA, where duplicate global CFXA_TimeZoneProviders were not expected. These are cheap to create except for the global C RTL tzset() call, so keep track of that and make these on demand. Review-Url: https://codereview.chromium.org/2488403004
Diffstat (limited to 'xfa/fxfa/parser/xfa_locale.cpp')
-rw-r--r--xfa/fxfa/parser/xfa_locale.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/xfa/fxfa/parser/xfa_locale.cpp b/xfa/fxfa/parser/xfa_locale.cpp
index 8c106209aa..5b18bcf64b 100644
--- a/xfa/fxfa/parser/xfa_locale.cpp
+++ b/xfa/fxfa/parser/xfa_locale.cpp
@@ -103,8 +103,9 @@ void CXFA_XMLLocale::GetMeridiemName(CFX_WideString& wsMeridiemName,
wsMeridiemName = GetCalendarSymbol("meridiem", bAM ? 0 : 1, false);
}
-void CXFA_XMLLocale::GetTimeZone(FX_TIMEZONE& tz) const {
- CXFA_TimeZoneProvider::Get()->GetTimeZone(tz);
+void CXFA_XMLLocale::GetTimeZone(FX_TIMEZONE* tz) const {
+ CXFA_TimeZoneProvider provider;
+ provider.GetTimeZone(tz);
}
void CXFA_XMLLocale::GetEraName(CFX_WideString& wsEraName, bool bAD) const {
@@ -288,8 +289,9 @@ void CXFA_NodeLocale::GetMeridiemName(CFX_WideString& wsMeridiemName,
GetCalendarSymbol(XFA_Element::MeridiemNames, bAM ? 0 : 1, false);
}
-void CXFA_NodeLocale::GetTimeZone(FX_TIMEZONE& tz) const {
- CXFA_TimeZoneProvider::Get()->GetTimeZone(tz);
+void CXFA_NodeLocale::GetTimeZone(FX_TIMEZONE* tz) const {
+ CXFA_TimeZoneProvider provider;
+ provider.GetTimeZone(tz);
}
void CXFA_NodeLocale::GetEraName(CFX_WideString& wsEraName, bool bAD) const {