Bonjour,
J'ai un pb avec les macros ci-dessous qui fonctionnaient bien jusqu'a la
3.2.1:
/Sub Main
cNodePath = ".org.openoffice.Office/Addons/AddonUI/OfficeToolbar"
bWriteAccess = True
GetConfigAccess(cNodePath,bWriteAccess)
End Sub
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",Array(
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
Function MakePropertyValue( Optional cName As String, Optional uValue )
As com.sun.star.beans.PropertyValue
Dim oPropertyValue As New com.sun.star.beans.PropertyValue
If Not IsMissing( cName ) Then
oPropertyValue.Name = cName
EndIf
If Not IsMissing( uValue ) Then
oPropertyValue.Value = uValue
EndIf
MakePropertyValue() = oPropertyValue
End Function/
Le paramètre "enableasync" semble invalide, contrairement à ce que dit
le SDk pour la 3.3.
On peut tester avec
cNodePath = ".org.openoffice.Office/Addons/AddonUI/OfficeToolbar"
/bWriteAccess = True
Merci pour vos réponses.
/
--
Didier Dorange-Pattoret
Soutenez le projet Dmaths : rejoignez le club ou faites adhérer votre
établissement !
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]