List Info

Thread: OfficeToolbar titlebar?




OfficeToolbar titlebar?
user name
2006-04-20 15:12:01
Didier Dorange-Pattoret wrote:
> Hello Tim,
> 
> I hope that this code will work for you ... 
> The user have to restart OOo, included quickstarter.
> 
>    oConfigAccess = GetConfigAccess( 
>
"/org.openoffice.Office.UI.WriterWindowState/UIElement
s/States", True )
>    If oConfigAccess.HasByName(
"private:resource/toolbar/addon_1") Then
>    oAddon = oConfigAccess.getByName(
"private:resource/toolbar/addon_1")
>    oAddon.UIName = "Essbase"
>    oConfigAccess.commitChanges()
> 
> Function GetConfigAccess( ByVal cNodePath As
String,ByVal bWriteAccess 
> As Boolean,Optional bEnableSync,Optional bLazyWrite) As
Object
>    If IsMissing(bEnableSync) Then     bEnableSync =
True
>    If IsMissing( bLazyWrite ) Then bLazyWrite = False
>    Dim oConfigProvider, oConfigAccess as Object
>    oConfigProvider = 
>
GetProcessServiceManager.createInstanceWithArguments("
com.sun.star.configuration.ConfigurationProvider",Arra
y( 
> MakePropertyValue( "enableasync",
bEnableSync)))
>    If bWriteAccess Then
>        cServiceName = 
>
"com.sun.star.configuration.ConfigurationUpdateAccess
"
>    Else
>        cServiceName =
"com.sun.star.configuration.ConfigurationAccess"
>    EndIf
>    oConfigAccess =
oConfigProvider.createInstanceWithArguments( 
> cServiceName, Array( MakePropertyValue(
"nodepath", cNodePath ), 
> MakePropertyValue( "lazywrite", bLazyWrite
)))
>    GetConfigAccess() = oConfigAccess
> End Function

Hi Didier,

your "solution" can only work if you install
exactly one add-on. You 
have to know which add-on you are, which is not really
possible. We have 
another problem with the entries in the
<AppModule>WindowState 
configuration. The order of add-on toolbars is not
persistent and can 
change when you install another add-on. So your add-on_1 can
become 
add-on_2!. We also hope to fix this for OOo 2.0.3 where we
want to use 
the "Node" name in the Addon.xcu to have unique
entries in the 
WindowState configuration.

Regards,
Carsten

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

[1]

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