Fix bug #1088800 by adding ".pptm" to the list of acceptable file extensions.

bzr-revno: 2161
Fixes: https://launchpad.net/bugs/1088800
This commit is contained in:
Raoul Snyman 2013-08-20 22:26:39 +02:00
commit 5bd7479dca
4 changed files with 12 additions and 7 deletions

View File

@ -44,6 +44,7 @@ import time
if os.name == u'nt': if os.name == u'nt':
from win32com.client import Dispatch from win32com.client import Dispatch
import pywintypes import pywintypes
# Declare an empty exception to match the exception imported from UNO # Declare an empty exception to match the exception imported from UNO
class ErrorCodeIOException(Exception): class ErrorCodeIOException(Exception):
pass pass
@ -63,6 +64,7 @@ from presentationcontroller import PresentationController, PresentationDocument
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
class ImpressController(PresentationController): class ImpressController(PresentationController):
""" """
Class to control interactions with Impress presentations. Class to control interactions with Impress presentations.
@ -79,7 +81,7 @@ class ImpressController(PresentationController):
PresentationController.__init__(self, plugin, u'Impress', PresentationController.__init__(self, plugin, u'Impress',
ImpressDocument) ImpressDocument)
self.supports = [u'odp'] self.supports = [u'odp']
self.alsosupports = [u'ppt', u'pps', u'pptx', u'ppsx'] self.alsosupports = [u'ppt', u'pps', u'pptx', u'ppsx', u'pptm']
self.process = None self.process = None
self.desktop = None self.desktop = None
self.manager = None self.manager = None

View File

@ -45,6 +45,7 @@ log = logging.getLogger(__name__)
ERROR = QtGui.QImage(u':/general/general_delete.png') ERROR = QtGui.QImage(u':/general/general_delete.png')
class PresentationMediaItem(MediaManagerItem): class PresentationMediaItem(MediaManagerItem):
""" """
This is the Presentation media manager item for Presentation Items. This is the Presentation media manager item for Presentation Items.
@ -88,10 +89,10 @@ class PresentationMediaItem(MediaManagerItem):
if self.controllers[controller].enabled(): if self.controllers[controller].enabled():
types = self.controllers[controller].supports + \ types = self.controllers[controller].supports + \
self.controllers[controller].alsosupports self.controllers[controller].alsosupports
for type in types: for type_ in types:
if fileType.find(type) == -1: if fileType.find(type_) == -1:
fileType += u'*.%s ' % type fileType += u'*.%s ' % type_
self.plugin.serviceManager.supportedSuffixes(type) self.plugin.serviceManager.supportedSuffixes(type_)
self.onNewFileMasks = unicode(translate('PresentationPlugin.MediaItem', self.onNewFileMasks = unicode(translate('PresentationPlugin.MediaItem',
'Presentations (%s)')) % fileType 'Presentations (%s)')) % fileType

View File

@ -43,6 +43,7 @@ log = logging.getLogger(__name__)
# PPT API documentation: # PPT API documentation:
# http://msdn.microsoft.com/en-us/library/aa269321(office.10).aspx # http://msdn.microsoft.com/en-us/library/aa269321(office.10).aspx
class PowerpointController(PresentationController): class PowerpointController(PresentationController):
""" """
Class to control interactions with PowerPoint Presentations Class to control interactions with PowerPoint Presentations
@ -58,7 +59,7 @@ class PowerpointController(PresentationController):
log.debug(u'Initialising') log.debug(u'Initialising')
PresentationController.__init__(self, plugin, u'Powerpoint', PresentationController.__init__(self, plugin, u'Powerpoint',
PowerpointDocument) PowerpointDocument)
self.supports = [u'ppt', u'pps', u'pptx', u'ppsx'] self.supports = [u'ppt', u'pps', u'pptx', u'ppsx', u'pptm']
self.process = None self.process = None
def check_available(self): def check_available(self):

View File

@ -38,6 +38,7 @@ from presentationcontroller import PresentationController, PresentationDocument
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
class PptviewController(PresentationController): class PptviewController(PresentationController):
""" """
Class to control interactions with PowerPOint Viewer Presentations Class to control interactions with PowerPOint Viewer Presentations
@ -54,7 +55,7 @@ class PptviewController(PresentationController):
self.process = None self.process = None
PresentationController.__init__(self, plugin, u'Powerpoint Viewer', PresentationController.__init__(self, plugin, u'Powerpoint Viewer',
PptviewDocument) PptviewDocument)
self.supports = [u'ppt', u'pps', u'pptx', u'ppsx'] self.supports = [u'ppt', u'pps', u'pptx', u'ppsx', u'pptm']
def check_available(self): def check_available(self):
""" """