[Libreoffice-bugs] [Bug 139588] New: API: textRegion.CharLocale uses changed type Variant/Empty to signal mixed languages. Should return .Language = "und" or similar.
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Wed Jan 13 14:23:38 UTC 2021
https://bugs.documentfoundation.org/show_bug.cgi?id=139588
Bug ID: 139588
Summary: API: textRegion.CharLocale uses changed type
Variant/Empty to signal mixed languages. Should return
.Language = "und" or similar.
Product: LibreOffice
Version: 3.3.0 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: jag at psilosoph.de
Created attachment 168855
--> https://bugs.documentfoundation.org/attachment.cgi?id=168855&action=edit
The announced example.
Testing by user code for the locale of a given text region is complicated by
the fact that the Object property (structure) textRegion.CharLocale is replaced
by a property of type Variant/Empty if no unambiguous result is found (multiple
language e.g.).
Bad idea.
ISO 639 offers "und" or "mul" as values for .Language in the respective cases.
The attached example contains code for the demonstration of the issue, and for
the unnecessary complications it may cause when user code needs to evaluate the
locale related properties of text. The code also demonstrates a workaround.
If old code needs to be protected, a property .CharLocale2 might help.
--
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/20210113/62ddb7fd/attachment.htm>
More information about the Libreoffice-bugs
mailing list