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 Called at system exit to clean up any running presentations
""" """
log.debug(u'Kill OpenOffice') log.debug(u'Kill OpenOffice')
for i in range(len(self.docs)): while self.docs:
self.docs[0].close_presentation() # Yes, always the zeroth one self.docs[0].close_presentation()
# as close removes item from array
if os.name != u'nt': if os.name != u'nt':
desktop = self.get_uno_desktop() desktop = self.get_uno_desktop()
else: else:

View File

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