Grammalecte  Diff

Differences From Artifact [0c0cec83d0]:

To Artifact [f3ef6493bc]:


27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
    try:
        xMri = ctx.ServiceManager.createInstanceWithContext("mytools.Mri", ctx)
        xMri.inspect(xTarget)
    except:
        raise _rtex("\nPython extension MRI is not installed", uno.getComponentContext())


def getConfigSetting (sNodeConfig, bUpdate):
    "get a configuration node"
    # example: xNode = getConfigSetting("/org.openoffice.Office.Common/Path/Current", False)
    xSvMgr = uno.getComponentContext().ServiceManager
    xConfigProvider = xSvMgr.createInstanceWithContext("com.sun.star.configuration.ConfigurationProvider", uno.getComponentContext())
    xPropertyValue = uno.createUnoStruct("com.sun.star.beans.PropertyValue")
    xPropertyValue.Name = "nodepath"
    xPropertyValue.Value = sNodeConfig







|







27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
    try:
        xMri = ctx.ServiceManager.createInstanceWithContext("mytools.Mri", ctx)
        xMri.inspect(xTarget)
    except:
        raise _rtex("\nPython extension MRI is not installed", uno.getComponentContext())


def getConfigSetting (sNodeConfig, bUpdate=False):
    "get a configuration node"
    # example: xNode = getConfigSetting("/org.openoffice.Office.Common/Path/Current", False)
    xSvMgr = uno.getComponentContext().ServiceManager
    xConfigProvider = xSvMgr.createInstanceWithContext("com.sun.star.configuration.ConfigurationProvider", uno.getComponentContext())
    xPropertyValue = uno.createUnoStruct("com.sun.star.beans.PropertyValue")
    xPropertyValue.Name = "nodepath"
    xPropertyValue.Value = sNodeConfig