From b5533a24f4399bc667a3d96558bbf7106af86e5a Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Wed, 13 Oct 2021 03:01:11 +0200 Subject: [PATCH] Typos and comment improvements. --- src/Buffer.cpp | 10 ++++++---- src/insets/RenderPreview.cpp | 2 +- src/output_docbook.cpp | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index a713f8dd55..e78a443a88 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -2106,8 +2106,7 @@ Buffer::ExportStatus Buffer::makeDocBookFile(FileName const & fname, updateBuffer(); updateMacroInstances(OutputUpdate); - ExportStatus const retval = - writeDocBookSource(ofs, runparams, output); + ExportStatus const retval = writeDocBookSource(ofs, runparams, output); if (retval == ExportKilled) return ExportKilled; @@ -4371,6 +4370,9 @@ Buffer::ExportStatus Buffer::doExport(string const & target, bool put_in_tempdir void Buffer::setMathFlavor(OutputParams & op) const { + // Passes the way to generate formulae to the XHTML output code. + // In particular, this function has no impact on the DocBook code, as it + // uses another mechanism to handle math flavours. switch (params().html_math_output) { case BufferParams::MathML: op.math_flavor = OutputParams::MathAsMathML; @@ -4414,7 +4416,7 @@ Buffer::ExportStatus Buffer::doExport(string const & target, bool put_in_tempdir Converters converters = theConverters(); bool need_nice_file = false; if (find(backs.begin(), backs.end(), format) == backs.end()) { - // Get shortest path to format + // Get the shortest path to format converters.buildGraph(); Graph::EdgePath path; for (string const & sit : backs) { @@ -4580,7 +4582,7 @@ Buffer::ExportStatus Buffer::doExport(string const & target, bool put_in_tempdir result_file = changeExtension(d->exportFileName().absFileName(), ext); else result_file = dest_filename; - // We need to copy referenced files (e. g. included graphics + // We need to copy referenced files (e.g. included graphics // if format == "dvi") to the result dir. vector const extfiles = runparams.exportdata->externalFiles(format); diff --git a/src/insets/RenderPreview.cpp b/src/insets/RenderPreview.cpp index 5dff4108d1..b0eb1f7838 100644 --- a/src/insets/RenderPreview.cpp +++ b/src/insets/RenderPreview.cpp @@ -123,7 +123,7 @@ graphics::PreviewImage const * RenderPreview::getPreviewImage(Buffer const & buffer) const { graphics::PreviewLoader const * loader = buffer.loader(); - LASSERT(loader, return 0); + LASSERT(loader, return nullptr); return loader->preview(snippet_); } diff --git a/src/output_docbook.cpp b/src/output_docbook.cpp index e234d9d652..f35b82e8f2 100644 --- a/src/output_docbook.cpp +++ b/src/output_docbook.cpp @@ -802,7 +802,7 @@ DocBookInfoTag getParagraphsWithInfo(ParagraphList const ¶graphs, set abstractWithLayout; set abstractNoLayout; - // Find the first non empty paragraph by mutating bpit. + // Find the first nonempty paragraph by mutating bpit. while (bpit < epit) { Paragraph const &par = paragraphs[bpit]; if (par.empty() || hasOnlyNotes(par)) -- 2.39.5