cono <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]:

>> I understood that. Yours suggestion works "as is" only if you don't  
>> need text both to be in the other language AND use a different custom  
>> character style. However, since I already use custom character  styles, 
>> and you can't have multiple character styles for the same  text, I need 
>> to make two copies of each of my custom character  styles, one for each 
>> language.
> 
> Sorry, I missed that point. Obviously because I do not use many 
> character-styles in on document.
> 
> 

Here is an example macro that changes _only_ the language of the previously 
styled text. Select the text you want and run.

Sub SetSwedish
dim aLocale as new com.sun.star.lang.Locale
aLocale.Language="sv"
aLocale.Country="SE"
oDoc=thiscomponent
otext=oDoc.getCurrentController.getViewCursor().getText
oTC=oText.createTextCursorByRange(otext)
oTC.charLocale=aLocale
end Sub

I hope this is some help. By changing the language codes, you can extend it 
to any language. At the moment, it changes whatever is selected. Could be 
altered to move a word at a time. Long-term development would make it a 
drop-down box in a toolbar, but that is beyond my capacities. I only wanted 
to show that macros could provide a way around these difficulties. 


-- 
Andrew Brown
The email in the header does not work.
Contact details and possibly useful macros from
http://www.darwinwars.com/lunatic/bugs/oo_macros.html


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to