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

Fixes: https://launchpad.net/bugs/1088800
This commit is contained in:
Raoul Snyman 2013-08-20 20:30:15 +02:00
parent 24a94c0478
commit d7fcf9e4f6
4 changed files with 12 additions and 7 deletions

View File

@ -44,6 +44,7 @@ import time
if os.name == u'nt':
from win32com.client import Dispatch
import pywintypes
# Declare an empty exception to match the exception imported from UNO
class ErrorCodeIOException(Exception):
pass
@ -63,6 +64,7 @@ from presentationcontroller import PresentationController, PresentationDocument
log = logging.getLogger(__name__)
class ImpressController(PresentationController):
"""
Class to control interactions with Impress presentations.
@ -79,7 +81,7 @@ class ImpressController(PresentationController):
PresentationController.__init__(self, plugin, u'Impress',
ImpressDocument)
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.desktop = None
self.manager = None

View File

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

View File

@ -43,6 +43,7 @@ log = logging.getLogger(__name__)
# PPT API documentation:
# http://msdn.microsoft.com/en-us/library/aa269321(office.10).aspx
class PowerpointController(PresentationController):
"""
Class to control interactions with PowerPoint Presentations
@ -58,7 +59,7 @@ class PowerpointController(PresentationController):
log.debug(u'Initialising')
PresentationController.__init__(self, plugin, u'Powerpoint',
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
def check_available(self):

View File

@ -38,6 +38,7 @@ from presentationcontroller import PresentationController, PresentationDocument
log = logging.getLogger(__name__)
class PptviewController(PresentationController):
"""
Class to control interactions with PowerPOint Viewer Presentations
@ -54,7 +55,7 @@ class PptviewController(PresentationController):
self.process = None
PresentationController.__init__(self, plugin, u'Powerpoint Viewer',
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):
"""