https://bz.apache.org/bugzilla/show_bug.cgi?id=60422

--- Comment #11 from Javen O'Neal <one...@apache.org> ---
Calling LocaleUtil.setUserLocale inside the CellNumberFormatter.formatValue
means that the function has a side effect, which may be surprising to a user.
If we restore the UserLocale at the exit of formatValue, then there are still
side effects from parallel execution.

Are there parts of the Microsoft Office file format spec that use the user's OS
language and locale, some that use language and locale that are set in
Microsoft Office by the user or by the installation medium, and some that are
hard-coded to a particular value?

If these are distinct concepts, perhaps we should have different getters and
setters in LocaleUtil, and we can use the appropriate kind of locale (user, os,
hard-coded) throughout POI according to how Microsoft Office interprets the
files.

Rather than picking between ROOT and US as the default Locale, we could alias
the "Microsoft Excel default locale", using that locale throughout our code,
which would mean the only place we'd have to change it is where that alias is
assigned. We could also let the user change that alias if that's needed for any
reason.
setUserLocale and setDefaultLocale...

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to