~openlp-core/openlp/release-2.0

« back to all changes in this revision

Viewing changes to openlp/plugins/presentations/lib/pptviewlib/ppttest.py

  • Committer: Raoul Snyman
  • Author(s): Philip Ridout
  • Date: 2013-10-26 19:27:41 UTC
  • mfrom: (2169.3.6 1012110_2.0)
  • Revision ID: raoul@snyman.info-20131026192741-wojcqdpaj1qmo5t4
Fix bug #1012110 by encoding the file name with the file system encoding

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
# Temple Place, Suite 330, Boston, MA 02111-1307 USA                          #
28
28
###############################################################################
29
29
 
 
30
import os
30
31
import sys
 
32
 
31
33
from PyQt4 import QtGui, QtCore
32
34
from ctypes import *
33
35
from ctypes.wintypes import RECT
172
174
        oldid = self.pptid;
173
175
        rect = RECT(int(self.xEdit.text()), int(self.yEdit.text()),
174
176
            int(self.widthEdit.text()), int(self.heightEdit.text()))
175
 
        filename = str(self.pptEdit.text().replace(u'/', u'\\'))
176
 
        folder = str(self.folderEdit.text().replace(u'/', u'\\'))
177
 
        print filename, folder
 
177
        filename = os.path.normpath(unicode(self.pptEdit.text())).encode('utf-16-le') + '\0'
 
178
        folder = os.path.normpath(unicode(self.folderEdit.text())).encode('utf-16-le') + '\0'
178
179
        self.pptid = self.pptdll.OpenPPT(filename, None, rect, folder)
179
180
        print u'id: ' + unicode(self.pptid)
180
181
        if oldid >= 0: