forked from openlp/openlp
fixes bug #986699: Print Service not separating verses
This commit is contained in:
parent
c73a57afd3
commit
d86a94b3c0
@ -60,7 +60,7 @@ http://doc.trolltech.com/4.7/richtext-html-subset.html#css-properties
|
|||||||
}
|
}
|
||||||
|
|
||||||
.itemText {
|
.itemText {
|
||||||
margin-top: 5px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.itemFooter {
|
.itemFooter {
|
||||||
@ -218,7 +218,6 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog):
|
|||||||
if not verse_def or verse_def != slide[u'verseTag']:
|
if not verse_def or verse_def != slide[u'verseTag']:
|
||||||
text_div = self._addElement(u'div', parent=div,
|
text_div = self._addElement(u'div', parent=div,
|
||||||
classId=u'itemText')
|
classId=u'itemText')
|
||||||
self._addElement(u'br', parent=text_div)
|
|
||||||
else:
|
else:
|
||||||
self._addElement(u'br', parent=text_div)
|
self._addElement(u'br', parent=text_div)
|
||||||
self._addElement(u'span', slide[u'html'], text_div)
|
self._addElement(u'span', slide[u'html'], text_div)
|
||||||
@ -331,7 +330,24 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog):
|
|||||||
Copies the display text to the clipboard as plain text
|
Copies the display text to the clipboard as plain text
|
||||||
"""
|
"""
|
||||||
self.update_song_usage()
|
self.update_song_usage()
|
||||||
self.mainWindow.clipboard.setText(self.document.toPlainText())
|
cursor = QtGui.QTextCursor(self.document)
|
||||||
|
cursor.select(3)
|
||||||
|
clipboard_text = cursor.selectedText ()
|
||||||
|
# We now have the unprocessed unicode service text in the cursor
|
||||||
|
# So we replace u2029 with \n and u2029 with \n\n and a few others
|
||||||
|
clipboard_text = clipboard_text.replace(u'\u2028', u'\n')
|
||||||
|
clipboard_text = clipboard_text.replace(u'\u2029', u'\n\n')
|
||||||
|
clipboard_text = clipboard_text.replace(u'\u2018', u'\'')
|
||||||
|
clipboard_text = clipboard_text.replace(u'\u2019', u'\'')
|
||||||
|
clipboard_text = clipboard_text.replace(u'\u201c', u'"')
|
||||||
|
clipboard_text = clipboard_text.replace(u'\u201d', u'"')
|
||||||
|
clipboard_text = clipboard_text.replace(u'\u2026', u'...')
|
||||||
|
clipboard_text = clipboard_text.replace(u'\u2013', u'-')
|
||||||
|
clipboard_text = clipboard_text.replace(u'\u2014', u'-')
|
||||||
|
# remove the icon from the text
|
||||||
|
clipboard_text = clipboard_text.replace(u'\ufffc\xa0', u'')
|
||||||
|
# and put it all on the clipboard
|
||||||
|
self.mainWindow.clipboard.setText(clipboard_text)
|
||||||
|
|
||||||
def copyHtmlText(self):
|
def copyHtmlText(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user