I’m trying to set the locale of selected text in writer? I can’t use the pick list because the text has a complex text layout, and the locale is not in the pick list. At present the only method I have that works is to edit the underlying XML by hand.
I’ve been told that the key information is in http://api.libreoffice.org/docs/idl/ref/structcom_1_1sun_1_1star_1_1lang_1_1Locale.html , but I can’t work out how to set the fields. My best efforts are:
dim region as object
region = ThisComponent.CurrentSelection.getByIndex(0)
region.Variant ="khb-CN"
region.Locale.Language ="qlt"
However, neither the object designated by region has neither property Variant nor property Locale, so the code fails with an appropriate error message.