[LyX/master] Comments cleanup
commit b82a7279a8807fbf0cf14a3dd611e36f73b46d0b Author: Jean-Marc Lasgouttes Date: Tue Jun 20 00:06:57 2023 +0200 Comments cleanup --- src/Paragraph.cpp |8 +++- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index fed5a74..5487b80 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -1999,7 +1999,7 @@ Font const & Paragraph::getFirstFontSettings(BufferParams const & bparams) const // Gets the fully instantiated font at a given position in a paragraph -// This is basically the same function as Text::GetFont() in text2.cpp. +// This is basically the same function as TextMetrics::displayFont(). // The difference is that this one is used for generating the LaTeX file, // and thus cosmetic "improvements" are disallowed: This has to deliver // the true picture of the buffer. (Asger) @@ -2122,10 +2122,8 @@ void Paragraph::setFont(pos_type pos, Font const & font) { LASSERT(pos <= size(), return); - // First, reduce font against layout/label font - // Update: The setCharFont() routine in text2.cpp already - // reduces font, so we don't need to do that here. (Asger) - + // Text::setCharFont() already reduces font against layout/label + // font, so we don't need to do that here. (Asger) d->fontlist_.set(pos, font); } -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Add "override" to fix warning
commit f14384ff91d49255543ac458767e94a59bae6c43 Author: Scott Kostyshak Date: Mon Jun 19 14:46:05 2023 -0400 Add "override" to fix warning Otherwise we get the following warning: src/frontends/qt/InsertTableWidget.h:44:7: error: 'hideEvent' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override] void hideEvent(QHideEvent * event); ^ Amends ca5a75b2. --- src/frontends/qt/InsertTableWidget.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/frontends/qt/InsertTableWidget.h b/src/frontends/qt/InsertTableWidget.h index 4917392..e5d7648 100644 --- a/src/frontends/qt/InsertTableWidget.h +++ b/src/frontends/qt/InsertTableWidget.h @@ -41,7 +41,7 @@ protected Q_SLOTS: void mouseReleaseEvent(QMouseEvent *) override; void mousePressEvent(QMouseEvent *) override; void paintEvent(QPaintEvent *) override; - void hideEvent(QHideEvent * event); + void hideEvent(QHideEvent * event) override; private: //! update the geometry -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/2.3.x] Use \ifthenelse instead of relying on TeX primitives
commit 0ffcff55f302c05a9a0eb1f938be6b23fbcbd5c9 Author: Enrico Forestieri Date: Mon Jun 19 19:53:16 2023 +0200 Use \ifthenelse instead of relying on TeX primitives This fixes the issue reported here: https://www.mail-archive.com/lyx-users@lists.lyx.org/msg115156.html The problem is due to the use of the mathpazo package because it defines the macro \f@family as "ppl\n", i.e., it appends a newline character at the end. Now, the "\if" TeX primitive expands its arguments for comparing them and the newline causes a "missing \begin{document}" error. Instead of complicating the code to account for this, it is better using the ifthen package. --- lib/scripts/legacy_lyxpreview2ppm.py |7 +++ status.23x |2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/scripts/legacy_lyxpreview2ppm.py b/lib/scripts/legacy_lyxpreview2ppm.py index 08703fb..90dccc2 100644 --- a/lib/scripts/legacy_lyxpreview2ppm.py +++ b/lib/scripts/legacy_lyxpreview2ppm.py @@ -252,11 +252,10 @@ def legacy_latex_file(latex_file, fg_color, bg_color): \\definecolor{lyxbg}{rgb}{%s} \\pagecolor{lyxbg} \\usepackage[%s,tightpage]{preview} +\\usepackage{ifthen} \\makeatletter -\\def\\t@a{cmr} -\\if\\f@family\\t@a -\\IfFileExists{lmodern.sty}{\\usepackage{lmodern}}{\\usepackage{ae,aecompl}} -\\fi +\\ifthenelse{\\equal{\\f@family}{cmr}}{ +\\IfFileExists{lmodern.sty}{\\usepackage{lmodern}}{\\usepackage{ae,aecompl}}}{} \\g@addto@macro\\preview{\\begingroup\\color{lyxbg}\\special{ps::clippath fill}\\color{lyxfg}} \\g@addto@macro\\endpreview{\\endgroup} \\makeatother diff --git a/status.23x b/status.23x index cc11a21..efed021 100644 --- a/status.23x +++ b/status.23x @@ -52,6 +52,8 @@ What's new - Avoid crashing on a recursive macro definition (bug 12633). +- Fix issue with on-screen instant preview and the mathpazo package. + * INTERNALS -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Amend b135c965
commit c5c03f9be392b0447ceb4d5c3272d07790578380 Author: Enrico Forestieri Date: Mon Jun 19 18:30:23 2023 +0200 Amend b135c965 A macro with @ in its name must be used after \makeatletter --- lib/scripts/legacy_lyxpreview2ppm.py |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/scripts/legacy_lyxpreview2ppm.py b/lib/scripts/legacy_lyxpreview2ppm.py index fce5e91..77a621b 100644 --- a/lib/scripts/legacy_lyxpreview2ppm.py +++ b/lib/scripts/legacy_lyxpreview2ppm.py @@ -253,9 +253,9 @@ def legacy_latex_file(latex_file, fg_color, bg_color): \\pagecolor{lyxbg} \\usepackage[%s,tightpage]{preview} \\usepackage{ifthen} -\\ifthenelse{\equal{\f@family}{cmr}}{ -\\IfFileExists{lmodern.sty}{\\usepackage{lmodern}}{\\usepackage{ae,aecompl}}}{} \\makeatletter +\\ifthenelse{\\equal{\\f@family}{cmr}}{ +\\IfFileExists{lmodern.sty}{\\usepackage{lmodern}}{\\usepackage{ae,aecompl}}}{} \\g@addto@macro\\preview{\\begingroup\\color{lyxbg}\\special{ps::clippath fill}\\color{lyxfg}} \\g@addto@macro\\endpreview{\\endgroup} \\makeatother -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Use \ifthenelse instead of relying on TeX primitives
commit b135c965f6f33150f648a35607c12daeac1c360e Author: Enrico Forestieri Date: Mon Jun 19 18:17:31 2023 +0200 Use \ifthenelse instead of relying on TeX primitives This fixes the issue reported here: https://www.mail-archive.com/lyx-users@lists.lyx.org/msg115156.html --- lib/scripts/legacy_lyxpreview2ppm.py |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/scripts/legacy_lyxpreview2ppm.py b/lib/scripts/legacy_lyxpreview2ppm.py index 6ee5870..fce5e91 100644 --- a/lib/scripts/legacy_lyxpreview2ppm.py +++ b/lib/scripts/legacy_lyxpreview2ppm.py @@ -252,11 +252,10 @@ def legacy_latex_file(latex_file, fg_color, bg_color): \\definecolor{lyxbg}{rgb}{%s} \\pagecolor{lyxbg} \\usepackage[%s,tightpage]{preview} +\\usepackage{ifthen} +\\ifthenelse{\equal{\f@family}{cmr}}{ +\\IfFileExists{lmodern.sty}{\\usepackage{lmodern}}{\\usepackage{ae,aecompl}}}{} \\makeatletter -\\def\\t@a{cmr} -\\if\\f@family\\t@a -\\IfFileExists{lmodern.sty}{\\usepackage{lmodern}}{\\usepackage{ae,aecompl}} -\\fi \\g@addto@macro\\preview{\\begingroup\\color{lyxbg}\\special{ps::clippath fill}\\color{lyxfg}} \\g@addto@macro\\endpreview{\\endgroup} \\makeatother -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs
[LyX/master] Improved LYX_BUILD_TYPE detection for cmake - case insensitive AC_INIT processing
commit f88986eff5aedf6cce5832b0f5028124e72482a4 Author: Stephan Witt Date: Mon Jun 19 08:00:08 2023 +0200 Improved LYX_BUILD_TYPE detection for cmake - case insensitive AC_INIT processing --- development/cmake/modules/LyXMacros.cmake |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/development/cmake/modules/LyXMacros.cmake b/development/cmake/modules/LyXMacros.cmake index 501da11..e221af1 100644 --- a/development/cmake/modules/LyXMacros.cmake +++ b/development/cmake/modules/LyXMacros.cmake @@ -430,12 +430,13 @@ function(determineversionandbuildtype configfile package version dirs date build setstripped(PACKAGE_VERSION ${_PV}) setstripped(PACKAGE_BUGREPORT ${_PBU}) set(${package} ${PACKAGE_BASE} ${PACKAGE_VERSION} ${PACKAGE_BUGREPORT} PARENT_SCOPE) - if(PACKAGE_VERSION MATCHES "^\([0-9]+\)\\.\([0-9]+\)\(\\.\([0-9]+\)\(\\.\([0-9]+\)\)?\)?-?\([a-z]*[0-9]*\).*$") + if(PACKAGE_VERSION MATCHES "^\([0-9]+\)\\.\([0-9]+\)\(\\.\([0-9]+\)\(\\.\([0-9]+\)\)?\)?-?\([A-Za-z]*[0-9]*\).*$") set(LYX_MAJOR_VERSION ${CMAKE_MATCH_1}) set(LYX_MINOR_VERSION ${CMAKE_MATCH_2}) set(LYX_RELEASE_LEVEL ${CMAKE_MATCH_4}) set(LYX_RELEASE_PATCH ${CMAKE_MATCH_6}) -set(LYX_BUILD_TYPE ${CMAKE_MATCH_7}) +set(LYX_BUILD_TYPE_MATCH ${CMAKE_MATCH_7}) +string(TOLOWER "${LYX_BUILD_TYPE_MATCH}" LYX_BUILD_TYPE) set(LYX_DIR_VER "LYX_DIR_${CMAKE_MATCH_1}${CMAKE_MATCH_2}x") set(LYX_USERDIR_VER "LYX_USERDIR_${CMAKE_MATCH_1}${CMAKE_MATCH_2}x") if (NOT LYX_RELEASE_LEVEL) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs