List Info

Thread: Re: NodePath-name for LanguageSettings




Re: NodePath-name for LanguageSettings
user name
2007-09-05 04:14:08
Hello Fernand,

> the my code is now somthing like:
> 
> Sub ChangeSystemLanguage
> dim aArgs(0) as  Object
> dim aPropValue as new 
com.sun.star.beans.PropertyValue
> 
> xconfig = 
>
createunoservice("com.sun.star.configuration.Configurat
ionProvider")
> aPropValue.Name = "nodepath"
> aPropValue.Value =
"org.openoffice.Office.Linguistic"
> aArgs(0) = aPropValue
> 
> 
> xAccess = 
>
xconfig.createinstanceWithArguments("com.sun.star.confi
guration.ConfigurationUpdateAccess",aArgs())
> 
>  slocale = xAccess.General.defaultLocale
>  sLocale = "nl-BE"
>  xAccess.General.defaultLocale = slocale
>  xAccess.commitchanges
> End Sub
> 
> but how can i reset the "for current document
only" setting
> 
> i must looked over it, can simply not find this setting
in the "xaccess" 
> object structure
> 
> maybe you can help me out ?

A little experiment showed that the value for "current
document only" is
not persistent when restarting the Office. Thus it is most
likely that
there is no respective setting in the configuration, and
therefore you
can't change it's value via API.

Thomas

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org


Re: NodePath-name for LanguageSettings
user name
2007-09-05 05:34:17
Thomas Lange - Sun Germany - ham02 - Hamburg wrote:
> Hello Fernand,
>
>   
>> the my code is now somthing like:
>>
>> Sub ChangeSystemLanguage
>> dim aArgs(0) as  Object
>> dim aPropValue as new 
com.sun.star.beans.PropertyValue
>>
>> xconfig = 
>>
createunoservice("com.sun.star.configuration.Configurat
ionProvider")
>> aPropValue.Name = "nodepath"
>> aPropValue.Value =
"org.openoffice.Office.Linguistic"
>> aArgs(0) = aPropValue
>>
>>
>> xAccess = 
>>
xconfig.createinstanceWithArguments("com.sun.star.confi
guration.ConfigurationUpdateAccess",aArgs())
>>
>>  slocale = xAccess.General.defaultLocale
>>  sLocale = "nl-BE"
>>  xAccess.General.defaultLocale = slocale
>>  xAccess.commitchanges
>> End Sub
>>
>> but how can i reset the "for current document
only" setting
>>
>> i must looked over it, can simply not find this
setting in the "xaccess" 
>> object structure
>>
>> maybe you can help me out ?
>>     
>
> A little experiment showed that the value for
"current document only" is
> not persistent when restarting the Office. Thus it is
most likely that
> there is no respective setting in the configuration,
and therefore you
> can't change it's value via API.
>
> Thomas
>   
Thomas thanks for this reply,

In the mean time i came to the same conclusion,
In fact I think  that using
the "for curreent doc only" has an effect 
AFTER saving the doc
and must be an equivalent for
changing "odoc.charlocal" via the api

But befo a can be conslusif about this behaviour  i have to
resolve a 
other problem: the code changing the "DefaultLocale is
working but the 
changes maded , disapear  after i close the Quickstarter, so
all changes 
are done in memory.,
I just found that i gave the same problem when do the
changes with the 
UI I now downlaoding the lattest stable to be sure its not
due to my 
installed version (2.2.0)
an will continue the testing
I come back with my findings

 Greetz

Fernand
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
> For additional commands, e-mail: dev-helpapi.openoffice.org
>   

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )