예제 #1
0
파일: logger.py 프로젝트: Vman45/DropboxOOo
def _getLoggerConfiguration(ctx, logger):
    nodepath = '/org.openoffice.Office.Logging/Settings'
    configuration = getConfiguration(ctx, nodepath, True)
    if not configuration.hasByName(logger):
        configuration.insertByName(logger, configuration.createInstance())
        configuration.commitChanges()
    nodepath += '/%s' % logger
    return getConfiguration(ctx, nodepath, True)
예제 #2
0
 def __init__(self, ctx, wizard):
     self.ctx = ctx
     self._wizard = wizard
     self._provider = createService(self.ctx, 'com.sun.star.awt.ContainerWindowProvider')
     self._stringResource = getStringResource(self.ctx, g_identifier, g_extension)
     self._configuration = getConfiguration(self.ctx, g_identifier, True)
     self._handler = WizardHandler(self.ctx, self._wizard)
     self._maxsize = self._configuration.getByName("MaxSizeMo") * MOTOBIT
예제 #3
0
 def _doViewDataSource(self, dialog):
     try:
         #path = getResourceLocation(ctx, g_identifier, 'hsqldb')
         #url = '%s/%s.odb' % (path, g_scheme)
         #desktop = createService(self.ctx, 'com.sun.star.frame.Desktop')
         #desktop.loadComponentFromURL(url, '_default', 0, ())
         configuration = getConfiguration(self.ctx, '/org.openoffice.Office.Common', True)
         mri = self.ctx.ServiceManager.createInstance('mytools.Mri')
         if mri is not None:
             mri.inspect(configuration)
         print("PyOptionsDialog._doConnect() 2")
     except Exception as e:
         print("PyOptionsDialog._doConnect().Error: %s - %s" % (e, traceback.print_exc()))
예제 #4
0
 def __init__(self, ctx):
     self.ctx = ctx
     self.configuration = getConfiguration(self.ctx, g_identifier, True)
     self.Setting = OAuth2Setting(self.ctx)
     version = self._getSSLVersion()
     self.Session = self._getSession(version)
     self._Url = ''
     self._Provider = KeyMap()
     self._Users = None
     self._UserName = ''
     self._User = KeyMap()
     self._parent = None
     self._Warnings = []
     self._Error = None
     self.Error = ''
     self.stringResource = getStringResource(self.ctx, g_identifier,
                                             'OAuth2OOo')
     self._SessionMode = OFFLINE
예제 #5
0
 def __init__(self, ctx):
     self.ctx = ctx
     self.configuration = getConfiguration(self.ctx, g_identifier, True)
     self.Url = UrlSetting(self.configuration)
     self.revert()