QScintilla/Exporters/ExporterRTF.py

branch
Py2 comp.
changeset 3060
5883ce99ee12
parent 3057
10516539f238
parent 3039
8dd0165d805d
child 3145
a9de05d4a22f
diff -r 0a02c433f52d -r 5883ce99ee12 QScintilla/Exporters/ExporterRTF.py
--- a/QScintilla/Exporters/ExporterRTF.py	Fri Nov 01 15:48:48 2013 +0100
+++ b/QScintilla/Exporters/ExporterRTF.py	Sun Nov 03 15:58:22 2013 +0100
@@ -172,8 +172,8 @@
                 if lex:
                     istyle = 0
                     while istyle <= QsciScintilla.STYLE_MAX:
-                        if (istyle < QsciScintilla.STYLE_DEFAULT or \
-                            istyle > QsciScintilla.STYLE_LASTPREDEFINED):
+                        if (istyle < QsciScintilla.STYLE_DEFAULT or
+                                istyle > QsciScintilla.STYLE_LASTPREDEFINED):
                             if lex.description(istyle):
                                 font = lex.font(istyle)
                                 if wysiwyg:
@@ -201,7 +201,7 @@
                                             QFontInfo(font).pointSize() << 1)
                                 else:
                                     lastStyle += self.RTF_SETFONTSIZE + \
-                                                 "{0:d}".format(fontsize)
+                                        "{0:d}".format(fontsize)
                                 
                                 sColour = lex.color(istyle)
                                 sColourKey = None
@@ -214,7 +214,7 @@
                                     sColourKey = colorCount
                                     colorCount += 1
                                 lastStyle += self.RTF_SETCOLOR + \
-                                             "{0:d}".format(sColourKey)
+                                    "{0:d}".format(sColourKey)
                                 
                                 sColour = lex.paper(istyle)
                                 sColourKey = None
@@ -227,7 +227,7 @@
                                     sColourKey = colorCount
                                     colorCount += 1
                                 lastStyle += self.RTF_SETBACKGROUND + \
-                                             "{0:d}".format(sColourKey)
+                                    "{0:d}".format(sColourKey)
                                 
                                 if font.bold():
                                     lastStyle += self.RTF_BOLD_ON
@@ -250,11 +250,11 @@
                         istyle += 1
                 else:
                     styles[0] = self.RTF_SETFONTFACE + "0" + \
-                                self.RTF_SETFONTSIZE + \
-                                "{0:d}".format(fontsize) + \
-                                self.RTF_SETCOLOR + "0" + \
-                                self.RTF_SETBACKGROUND + "1" + \
-                                self.RTF_BOLD_OFF + self.RTF_ITALIC_OFF
+                        self.RTF_SETFONTSIZE + \
+                        "{0:d}".format(fontsize) + \
+                        self.RTF_SETCOLOR + "0" + \
+                        self.RTF_SETBACKGROUND + "1" + \
+                        self.RTF_BOLD_OFF + self.RTF_ITALIC_OFF
                 
                 f.write(self.RTF_FONTDEFCLOSE + self.RTF_COLORDEFOPEN)
                 for value in list(colors.values()):
@@ -264,15 +264,15 @@
                 f.write(self.RTF_INFOOPEN + self.RTF_COMMENT)
                 f.write(time.strftime(self.RTF_CREATED))
                 f.write(self.RTF_INFOCLOSE)
-                f.write(self.RTF_HEADERCLOSE + \
-                        self.RTF_BODYOPEN + self.RTF_SETFONTFACE + "0" + \
-                        self.RTF_SETFONTSIZE + "{0:d}".format(fontsize) + \
+                f.write(self.RTF_HEADERCLOSE +
+                        self.RTF_BODYOPEN + self.RTF_SETFONTFACE + "0" +
+                        self.RTF_SETFONTSIZE + "{0:d}".format(fontsize) +
                         self.RTF_SETCOLOR + "0 ")
                 lastStyle = self.RTF_SETFONTFACE + "0" + \
-                            self.RTF_SETFONTSIZE + "{0:d}".format(fontsize) + \
-                            self.RTF_SETCOLOR + "0" + \
-                            self.RTF_SETBACKGROUND + "1" + \
-                            self.RTF_BOLD_OFF + self.RTF_ITALIC_OFF
+                    self.RTF_SETFONTSIZE + "{0:d}".format(fontsize) + \
+                    self.RTF_SETCOLOR + "0" + \
+                    self.RTF_SETBACKGROUND + "1" + \
+                    self.RTF_BOLD_OFF + self.RTF_ITALIC_OFF
                 
                 lengthDoc = self.editor.length()
                 prevCR = False
@@ -353,7 +353,7 @@
                     self.trUtf8("Export source"),
                     self.trUtf8(
                         """<p>The source could not be exported to"""
-                        """ <b>{0}</b>.</p><p>Reason: {1}</p>""")\
-                        .format(filename, str(err)))
+                        """ <b>{0}</b>.</p><p>Reason: {1}</p>""")
+                    .format(filename, str(err)))
         finally:
             QApplication.restoreOverrideCursor()

eric ide

mercurial