src/eric7/QScintilla/Exporters/ExporterODT.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9413
80c06d472826
--- a/src/eric7/QScintilla/Exporters/ExporterODT.py	Wed Jul 13 11:16:20 2022 +0200
+++ b/src/eric7/QScintilla/Exporters/ExporterODT.py	Wed Jul 13 14:55:47 2022 +0200
@@ -22,15 +22,16 @@
     """
     Class implementing an exporter for ODT.
     """
+
     def __init__(self, editor, parent=None):
         """
         Constructor
-        
+
         @param editor reference to the editor object (QScintilla.Editor.Editor)
         @param parent parent object of the exporter (QObject)
         """
         ExporterBase.__init__(self, editor, parent)
-    
+
     def exportSource(self):
         """
         Public method performing the export.
@@ -38,14 +39,14 @@
         filename = self._getFileName(self.tr("ODT Files (*.odt)"))
         if not filename:
             return
-        
+
         tabSize = self.editor.getEditorConfig("TabWidth")
         if tabSize == 0:
             tabSize = 4
         wysiwyg = Preferences.getEditorExporter("ODT/WYSIWYG")
         onlyStylesUsed = Preferences.getEditorExporter("ODT/OnlyStylesUsed")
         tabs = Preferences.getEditorExporter("ODT/UseTabs")
-        
+
         with EricOverrideCursor():
             # generate HTML of the source
             generator = HTMLGenerator(self.editor)
@@ -55,19 +56,20 @@
                 wysiwyg=wysiwyg,
                 folding=False,
                 onlyStylesUsed=onlyStylesUsed,
-                titleFullPath=False
+                titleFullPath=False,
             )
-            
+
             # convert HTML to ODT
             doc = QTextDocument()
             doc.setHtml(html)
             writer = QTextDocumentWriter(filename)
             ok = writer.write(doc)
-        
+
         if not ok:
             EricMessageBox.critical(
                 self.editor,
                 self.tr("Export source"),
                 self.tr(
-                    """<p>The source could not be exported to"""
-                    """ <b>{0}</b>.</p>""").format(filename))
+                    """<p>The source could not be exported to""" """ <b>{0}</b>.</p>"""
+                ).format(filename),
+            )

eric ide

mercurial