Resolves: tdf#99626 only the first queryTermination call in wizards works

cause the first call looks up the "queryTermination" method on the object
and replaces the object with that function, then calls on. Subsequent
calls then try to lookup "queryTermination" on "queryTermination".

Just pass queryTermination directly in the ctor (like all the other
wrappers do)

Change-Id: Ie042081c3c34e33b2f040d1ab1a33eeac4df9c3b
This commit is contained in:
Caolán McNamara 2016-09-23 13:11:54 +01:00
parent 7adb5c683c
commit 01889962ca
4 changed files with 3 additions and 5 deletions

View File

@ -70,7 +70,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
self.initializePaths() self.initializePaths()
# initialize the agenda template # initialize the agenda template
self.terminateListener = TerminateListenerProcAdapter(self) self.terminateListener = TerminateListenerProcAdapter(self.queryTermination)
self.myAgendaDoc = AgendaDocument( self.myAgendaDoc = AgendaDocument(
self.xMSF, self.agenda, self.resources, self.xMSF, self.agenda, self.resources,
self.templateConsts, self.terminateListener) self.templateConsts, self.terminateListener)

View File

@ -65,7 +65,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
self.nMaxStep = 5 self.nMaxStep = 5
#instantiate The Document Frame for the Preview #instantiate The Document Frame for the Preview
self.terminateListener = TerminateListenerProcAdapter(self) self.terminateListener = TerminateListenerProcAdapter(self.queryTermination)
self.myFaxDoc = FaxDocument(xMSF, self.terminateListener) self.myFaxDoc = FaxDocument(xMSF, self.terminateListener)
#create the dialog: #create the dialog:

View File

@ -72,7 +72,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
self.nMaxStep = 6 self.nMaxStep = 6
#instantiate The Document Frame for the Preview #instantiate The Document Frame for the Preview
self.terminateListener = TerminateListenerProcAdapter(self) self.terminateListener = TerminateListenerProcAdapter(self.queryTermination)
self.myLetterDoc = LetterDocument(xMSF, self.terminateListener) self.myLetterDoc = LetterDocument(xMSF, self.terminateListener)
#create the dialog #create the dialog

View File

@ -65,8 +65,6 @@ class TerminateListenerProcAdapter( unohelper.Base, XTerminateListener ):
self.oProcToCall = oProcToCall self.oProcToCall = oProcToCall
def queryTermination(self, TerminateEvent): def queryTermination(self, TerminateEvent):
self.oProcToCall = getattr(self.oProcToCall,"queryTermination")
if callable( self.oProcToCall ): if callable( self.oProcToCall ):
self.oProcToCall() self.oProcToCall()