On Wed, 24 Jun 2015 20:54:54 +0100 Richard Wordingham <richard.wording...@ntlworld.com> wrote:
> On Wed, 24 Jun 2015 12:31:16 +0200 > Eike Rathke <er...@redhat.com> wrote: > > Simply in a css::lang::Locale set the Language field to "qlt" and in > > the Variant have the language tag, see > > http://api.libreoffice.org/docs/idl/ref/structcom_1_1sun_1_1star_1_1lang_1_1Locale.html > It may be 'simply' to you, but my macro to set the language doesn't > progress beyond the '::' before 'Locale', failing with "Object not > accessible. Part of my trouble was using '::' instead of '.' in the multi-part names when writing in Basic. Another part was forgetting that I could pass an integer or a struct in the same field. However, the approach using executeDispatch() failed. The unusual languages were simply reported as en-GB, and were recorded thus in saved .odt files. However, I now have successful macros of the form: Sub Lue dim region as object dim aLocale As New com.sun.star.lang.Locale aLocale.Country = "" aLocale.Language = "qlt" aLocale.Variant = "khb-CN" region = ThisComponent.CurrentSelection.getByIndex(0) region.CharLocaleComplex = aLocale end sub As I can now fairly readily mark complex-script text as khb-CN, kkh-MM, nod-TH and tts-TH (and all within a few lines of one another), what problems should I expect? (I suppose I should try to make this into an extension.) Richard. _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice