Change loop method and remove unused variables

bzr-revno: 763
This commit is contained in:
Jon Tibble 2010-03-24 14:28:21 +00:00
commit 5700407656
3 changed files with 6 additions and 9 deletions

View File

@ -147,9 +147,8 @@ class ImpressController(PresentationController):
Called at system exit to clean up any running presentations
"""
log.debug(u'Kill OpenOffice')
for i in range(len(self.docs)):
self.docs[0].close_presentation() # Yes, always the zeroth one
# as close removes item from array
while self.docs:
self.docs[0].close_presentation()
if os.name != u'nt':
desktop = self.get_uno_desktop()
else:

View File

@ -82,9 +82,8 @@ class PowerpointController(PresentationController):
Called at system exit to clean up any running presentations
"""
log.debug(u'Kill powerpoint')
for i in range(len(self.docs)):
self.docs[0].close_presentation() # Yes, always the zeroth one
# as close removes item from array
while self.docs:
self.docs[0].close_presentation()
if self.process is None:
return
if self.process.Presentations.Count > 0:

View File

@ -89,9 +89,8 @@ class PptviewController(PresentationController):
Called at system exit to clean up any running presentations
"""
log.debug(u'Kill pptviewer')
for i in range(len(self.docs)):
self.docs[0].close_presentation() # Yes, always the zeroth one
# as close removes item from array
while self.docs:
self.docs[0].close_presentation()
def add_doc(self, name):
log.debug(u'Add Doc PPTView')