[Libreoffice-bugs] [Bug 128122] BASIC CCur should obey locale setting
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Tue Mar 23 07:16:42 UTC 2021
https://bugs.documentfoundation.org/show_bug.cgi?id=128122
--- Comment #20 from Andreas Heinisch <andreas.heinisch at yahoo.de> ---
You may start with the number formatter:
LanguageType eLangType =
Application::GetSettings().GetLanguageTag().getLanguageType();
std::shared_ptr<SvNumberFormatter> pNumberFormatter =
std::make_shared<SvNumberFormatter>(
comphelper::getProcessComponentContext(), eLangType );
double fResult = 0;
sal_uInt32 nIndex = pNumberFormatter->GetStandardIndex( eLangType );
bool bSuccess = pNumberFormatter->IsNumberFormat( rStr, nIndex, fResult );
if ( bSuccess )
{
SvNumFormatType nType = pNumberFormatter->GetType( nIndex );
bSuccess = nType & SvNumFormatType::CURRENCY || nType &
SvNumFormatType::NUMBER;
}
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210323/65c3f169/attachment.htm>
More information about the Libreoffice-bugs
mailing list