def showDlg(self): logger.debug(util.funcName(obj=self)) dlg = dutil.createDialog(self.unoObjs, _dlgdef) if not dlg: return ctrl_getter = dutil.ControlGetter(dlg) self.evtHandler = DlgEventHandler(self) self.dlgCtrls = DlgControls(self.unoObjs, ctrl_getter, self.evtHandler, self.script) self.evtHandler.setCtrls(self.dlgCtrls) self.dlgCtrls.loadValues(self.userVars) varname = 'CharComparison' if not self.userVars.isEmpty(varname): self.app.setCharCompFromInput(self.userVars.get(varname)) self.charsetAlreadySet = True else: self.charsetAlreadySet = False evt = EventObject() for ctrl in (self.dlgCtrls.comboScript, self.dlgCtrls.comboFont, self.dlgCtrls.txtFontSize): evt.Source = ctrl self.evtHandler.textChanged(evt) # Simulate a textChanged event ## Display the dialog self.dlgClose = dlg.endExecute dlg.execute() if self.compareOnClose: self.app.doChecks() dlg.dispose()
def testStandard( self ): self.failUnless( IllegalArgumentException != None, "none-test" ) self.failUnlessRaises( IllegalArgumentException, self.tobj.raiseException, 1,"foo",self.tobj) self.failUnless( TWO == uno.Enum( "test.testtools.bridgetest.TestEnum","TWO"), "enum" ) self.failUnless( UNSIGNED_LONG == uno.Enum( "com.sun.star.uno.TypeClass", "UNSIGNED_LONG" ) ) self.failUnless( typeOfIllegalArgumentException == uno.Type( "com.sun.star.lang.IllegalArgumentException", EXCEPTION) ) # should not throw an exception e = EventObject() e.Source = self.ctx e = EventObject( self.ctx ) e = EventObject( e )
def dispose(self): ev = EventObject(self) for listener in self._listeners: try: listener.disposing(ev) except: pass
def __init__(self, ctx): self._ctx = ctx self._listeners = [] self._supportedconnection = ('Insecure', 'Ssl', 'Tls') self._supportedauthentication = ('None', 'Login') self._server = None self._context = None self._notify = EventObject(self)
def addRemainingListeners(self): """We have already added action listeners in __init__(), but we wait to add listeners for other types of controls because they could have side effects during loadValues(). """ self.txtRowNum.addTextListener(self.evtHandler) self.txtCorrection.addTextListener(self.evtHandler) self.scrollbarRow.addAdjustmentListener(self.evtHandler) for ctrl in (self.chkSuggestions, self.chkIsCorrect, self.listSimilarWords, self.listSuggestions): ctrl.addItemListener(self.evtHandler) # Simulate an itemStateChanged event. evt = EventObject() evt.Source = self.chkSuggestions self.evtHandler.itemStateChanged(evt)
def __init__(self, ctx): self.ctx = ctx self.listeners = [] self.supportedtypes = ('Insecure', 'Ssl') self.server = None self.connectioncontext = None self.notify = EventObject(self) if dbg: print("PyMailPOP3Service init", file=dbgout)
def __init__(self, ctx): self.ctx = ctx self.listeners = [] self.supportedtypes = ('Insecure', 'Ssl') self.server = None self.connectioncontext = None self.notify = EventObject(self) if dbg: print >> sys.stderr, "PyMailSMPTService init"
def __init__(self, ctx): self.ctx = ctx self.listeners = [] self.supportedtypes = ('Insecure', 'Ssl') self.server = None self.connectioncontext = None self.notify = EventObject(self) if dbg: out.write("PyMailSMTPService init\n")
def __init__(self, ctx): self.ctx = ctx self.listeners = [] self.connectiontype = None self.authenticationtype = None self.supportedconnection = ('Insecure', 'Ssl', 'Tls') self.supportedauthentication = ('None', 'Login') self.server = None self.connectioncontext = None self.notify = EventObject(self) if dbg: print("PyMailPOP3Service init", file=dbgout)
def __init__(self, ctx): if isDebugMode(): msg = getMessage(ctx, g_message, 311) logMessage(ctx, INFO, msg, 'ImapService', '__init__()') self._ctx = ctx self._listeners = [] self._supportedconnection = ('Insecure', 'Ssl', 'Tls') self._supportedauthentication = ('None', 'Login', 'OAuth2') self._server = None self._context = None self._notify = EventObject(self) if isDebugMode(): msg = getMessage(ctx, g_message, 312) logMessage(ctx, INFO, msg, 'ImapService', '__init__()')
def testStandard(self): self.failUnless(IllegalArgumentException != None, "none-test") self.failUnlessRaises(IllegalArgumentException, self.tobj.raiseException, 1, "foo", self.tobj) self.failUnless( TWO == uno.Enum("test.testtools.bridgetest.TestEnum", "TWO"), "enum") self.failUnless(UNSIGNED_LONG == uno.Enum("com.sun.star.uno.TypeClass", "UNSIGNED_LONG")) self.failUnless(typeOfIllegalArgumentException == uno.Type( "com.sun.star.lang.IllegalArgumentException", EXCEPTION)) # should not throw an exception e = EventObject() e.Source = self.ctx e = EventObject(self.ctx) e = EventObject(e)