forked from openlp/openlp
Bring up to date
This commit is contained in:
parent
1c66c7cd2c
commit
f717dc10d4
@ -59,16 +59,16 @@ class OooImport(SongImport):
|
|||||||
self.document = None
|
self.document = None
|
||||||
self.process_started = False
|
self.process_started = False
|
||||||
self.filenames = kwargs[u'filenames']
|
self.filenames = kwargs[u'filenames']
|
||||||
self.import_wizard.importProgressBar.setMaximum(0)
|
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'openlp_stop_song_import'), self.stop_import)
|
QtCore.SIGNAL(u'song_stop_import'), self.stop_import)
|
||||||
|
|
||||||
def do_import(self):
|
def do_import(self):
|
||||||
self.abort = False
|
self.abort = False
|
||||||
|
self.import_wizard.importProgressBar.setMaximum(0)
|
||||||
self.start_ooo()
|
self.start_ooo()
|
||||||
for filename in self.filenames:
|
for filename in self.filenames:
|
||||||
if self.abort:
|
if self.abort:
|
||||||
self.import_wizard.incrementProgressBar(u'Import cancelled')
|
self.import_wizard.incrementProgressBar(u'Import cancelled', 0)
|
||||||
return
|
return
|
||||||
filename = unicode(filename)
|
filename = unicode(filename)
|
||||||
if os.path.isfile(filename):
|
if os.path.isfile(filename):
|
||||||
@ -149,7 +149,8 @@ class OooImport(SongImport):
|
|||||||
self.document.supportsService("com.sun.star.text.TextDocument"):
|
self.document.supportsService("com.sun.star.text.TextDocument"):
|
||||||
self.close_ooo_file()
|
self.close_ooo_file()
|
||||||
else:
|
else:
|
||||||
self.import_wizard.incrementProgressBar(u'Processing file ' + filepath)
|
self.import_wizard.incrementProgressBar(
|
||||||
|
u'Processing file ' + filepath, 0)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
return
|
return
|
||||||
@ -177,7 +178,7 @@ class OooImport(SongImport):
|
|||||||
text = u''
|
text = u''
|
||||||
for slide_no in range(slides.getCount()):
|
for slide_no in range(slides.getCount()):
|
||||||
if self.abort:
|
if self.abort:
|
||||||
self.import_wizard.incrementProgressBar(u'Import cancelled')
|
self.import_wizard.incrementProgressBar(u'Import cancelled', 0)
|
||||||
return
|
return
|
||||||
slide = slides.getByIndex(slide_no)
|
slide = slides.getByIndex(slide_no)
|
||||||
slidetext = u''
|
slidetext = u''
|
||||||
|
@ -80,7 +80,7 @@ class SofImport(OooImport):
|
|||||||
self.start_ooo()
|
self.start_ooo()
|
||||||
for filename in self.filenames:
|
for filename in self.filenames:
|
||||||
if self.abort:
|
if self.abort:
|
||||||
self.import_wizard.incrementProgressBar(u'Import cancelled')
|
self.import_wizard.incrementProgressBar(u'Import cancelled', 0)
|
||||||
return
|
return
|
||||||
filename = unicode(filename)
|
filename = unicode(filename)
|
||||||
if os.path.isfile(filename):
|
if os.path.isfile(filename):
|
||||||
@ -99,7 +99,7 @@ class SofImport(OooImport):
|
|||||||
paragraphs = self.document.getText().createEnumeration()
|
paragraphs = self.document.getText().createEnumeration()
|
||||||
while paragraphs.hasMoreElements():
|
while paragraphs.hasMoreElements():
|
||||||
if self.abort:
|
if self.abort:
|
||||||
self.import_wizard.incrementProgressBar(u'Import cancelled')
|
self.import_wizard.incrementProgressBar(u'Import cancelled', 0)
|
||||||
return
|
return
|
||||||
paragraph = paragraphs.nextElement()
|
paragraph = paragraphs.nextElement()
|
||||||
if paragraph.supportsService("com.sun.star.text.Paragraph"):
|
if paragraph.supportsService("com.sun.star.text.Paragraph"):
|
||||||
@ -255,7 +255,7 @@ class SofImport(OooImport):
|
|||||||
if title.endswith(u','):
|
if title.endswith(u','):
|
||||||
title = title[:-1]
|
title = title[:-1]
|
||||||
self.song.title = title
|
self.song.title = title
|
||||||
self.import_wizard.incrementProgressBar(u'Processing song ' + title)
|
self.import_wizard.incrementProgressBar(u'Processing song ' + title, 0)
|
||||||
|
|
||||||
def add_author(self, text):
|
def add_author(self, text):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user