[LyX/master] Fix Coverity false positive for null-pointer dereference

2020-07-09 Thread Pavel Sanda
commit af5257b6c3b24c00b18c601b77033cf7e60ce211
Author: Thibaut Cuvelier 
Date:   Thu Jul 9 02:40:20 2020 +0200

Fix Coverity false positive for null-pointer dereference
---
 src/output_docbook.cpp |   17 +
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/output_docbook.cpp b/src/output_docbook.cpp
index f15c70a..a8ac4ea 100644
--- a/src/output_docbook.cpp
+++ b/src/output_docbook.cpp
@@ -946,16 +946,17 @@ void docbookParagraphs(Text const &text,
docstring id = docstring();
for (pos_type i = 0; i < par->size(); ++i) {
Inset const *inset = par->getInset(i);
-   if (inset && dynamic_cast(inset)) {
-   // Generate the attributes for 
the section if need be.
-   auto label = 
dynamic_cast(inset);
-   id += "xml:id=\"" + 
xml::cleanID(label->screenLabel()) + "\"";
+   if (inset) {
+   if (auto label = 
dynamic_cast(inset)) {
+   // Generate the 
attributes for the section if need be.
+   id += "xml:id=\"" + 
xml::cleanID(label->screenLabel()) + "\"";
 
-   // Don't output the ID as a 
DocBook .
-   
ourparams.docbook_anchors_to_ignore.emplace(label->screenLabel());
+   // Don't output the ID 
as a DocBook .
+   
ourparams.docbook_anchors_to_ignore.emplace(label->screenLabel());
 
-   // Cannot have multiple IDs per 
tag.
-   break;
+   // Cannot have multiple 
IDs per tag.
+   break;
+   }
}
}
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Change in ::docbook args

2020-07-09 Thread Richard Kimberly Heck
commit e6b2c7c4cecf81a8057e371cdbcd1efd8dce3a95
Author: Richard Kimberly Heck 
Date:   Thu Jul 9 03:27:27 2020 -0400

Change in ::docbook args
---
 src/insets/InsetCounter.cpp |2 +-
 src/insets/InsetCounter.h   |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/insets/InsetCounter.cpp b/src/insets/InsetCounter.cpp
index 015d458..4aa109d 100644
--- a/src/insets/InsetCounter.cpp
+++ b/src/insets/InsetCounter.cpp
@@ -184,7 +184,7 @@ void InsetCounter::trackCounters(string const & cmd) const
}
 }
 
-void InsetCounter::docbook(odocstream &, OutputParams const &) const
+void InsetCounter::docbook(XMLStream &, OutputParams const &) const
 {
// Here, we need to track counter values ourselves,
// since unlike in the LaTeX case, there is no external
diff --git a/src/insets/InsetCounter.h b/src/insets/InsetCounter.h
index 3020fdb..b50f71b 100644
--- a/src/insets/InsetCounter.h
+++ b/src/insets/InsetCounter.h
@@ -39,7 +39,7 @@ public:
int plaintext(odocstringstream & ods, OutputParams const & op,
  size_t max_length = INT_MAX) const;
///
-   void docbook(odocstream &, OutputParams const &) const;
+   void docbook(XMLStream &, OutputParams const &) const;
///
docstring xhtml(XMLStream &, OutputParams const &) const;
///
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Workaround Qtbug where QAbstractScrollArea::mouseMoveEvent(...) is called falsely when quickly double tapping on a touchpad of a notebook running Windows

2020-07-09 Thread Eugene Chornyi
commit 06969f9dd4b9409225e0c8b504395fa197b506d1
Author: Eugene Chornyi 
Date:   Thu Jul 9 09:36:12 2020 +0200

Workaround Qtbug where QAbstractScrollArea::mouseMoveEvent(...) is called 
falsely when quickly double tapping on a touchpad of a notebook running Windows
---
 src/frontends/qt/GuiWorkArea.cpp |   16 
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/src/frontends/qt/GuiWorkArea.cpp b/src/frontends/qt/GuiWorkArea.cpp
index fa40a5a..23d6efa 100644
--- a/src/frontends/qt/GuiWorkArea.cpp
+++ b/src/frontends/qt/GuiWorkArea.cpp
@@ -852,6 +852,9 @@ void GuiWorkArea::mouseReleaseEvent(QMouseEvent * e)
 
FuncRequest const cmd(LFUN_MOUSE_RELEASE, e->x(), e->y(),
q_button_state(e->button()), 
q_key_state(e->modifiers()));
+#if (QT_VERSION > QT_VERSION_CHECK(5,10,1))
+   d->synthetic_mouse_event_.cmd = cmd; // QtBug 
QAbstractScrollArea::mouseMoveEvent
+#endif
d->dispatch(cmd);
e->accept();
 }
@@ -859,6 +862,19 @@ void GuiWorkArea::mouseReleaseEvent(QMouseEvent * e)
 
 void GuiWorkArea::mouseMoveEvent(QMouseEvent * e)
 {
+#if (QT_VERSION > QT_VERSION_CHECK(5,10,1))
+   // cancel the event if the coordinates didn't change, this is due to 
QtBug
+   // QAbstractScrollArea::mouseMoveEvent, the event is triggered falsely 
when quickly
+   // double tapping a touchpad. To test: try to select a word by quickly 
double tapping
+   // on a touchpad while hovering the cursor over that word in the work 
area.
+   // This bug does not occur on Qt versions 5.10.1 and below. Only 
Windows seems to be affected.
+   // ML thread: 
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg211699.html
+   // Qt bugtracker: https://bugreports.qt.io/browse/QTBUG-85431
+   if (e->x() == d->synthetic_mouse_event_.cmd.x() && // QtBug 
QAbstractScrollArea::mouseMoveEvent
+   e->y() == d->synthetic_mouse_event_.cmd.y()) // QtBug 
QAbstractScrollArea::mouseMoveEvent
+   return; // QtBug QAbstractScrollArea::mouseMoveEvent
+#endif
+
// we kill the triple click if we move
doubleClickTimeout();
FuncRequest cmd(LFUN_MOUSE_MOTION, e->x(), e->y(),
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Update RELEASE-NOTES for DocBook

2020-07-09 Thread Pavel Sanda
commit 7ed43d751a0350c8a9c518d9cd084733e96335b3
Author: Thibaut Cuvelier 
Date:   Wed Jul 8 21:15:13 2020 +0200

Update RELEASE-NOTES for DocBook
---
 lib/RELEASE-NOTES |8 
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/lib/RELEASE-NOTES b/lib/RELEASE-NOTES
index 7584497..a0537df 100644
--- a/lib/RELEASE-NOTES
+++ b/lib/RELEASE-NOTES
@@ -30,6 +30,14 @@
 
 * Documents that use TeX fonts can only be compiled with XeTeX if the input
   encoding is set to "utf8-plain" or "ascii".
+  
+* DocBook support has been revamped and now targets DocBook 5 (i.e. 
+  only XML, SGML is gone). Some supporting files for the previous 
+  implementation have been removed: all examples (lib/examples), 
+  some layouts (existing documents should still work, but with a 
+  DocBook 5 output instead of DocBook 4 SGML). The dependency on 
+  sgmltools has been removed, this new support is always enabled.
+  Having sgmltools installed or not will not change anything in LyX.
 
 !!!The following pref variables were added in 2.4:
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] LaTeXFonts: Add ScaleCommand

2020-07-09 Thread Juergen Spitzmueller
commit 780d9a5f4cc553797ec95e49300cf06325ff1341
Author: Juergen Spitzmueller 
Date:   Thu Jul 9 11:41:21 2020 +0200

LaTeXFonts: Add ScaleCommand

This is needed to add support for scaling to fonts that are switched
via command
---
 lib/latexfonts |4 +++-
 src/LaTeXFonts.cpp |   16 +++-
 src/LaTeXFonts.h   |4 
 3 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/lib/latexfonts b/lib/latexfonts
index eaf9e4c..e3b134f 100644
--- a/lib/latexfonts
+++ b/lib/latexfonts
@@ -23,6 +23,7 @@
 #  ScOption   
 #  OsfScOption
 #  ScaleOption
+#  ScaleCommand   
 #   MoreOptions<0|1>
 #  Provides   
 #  Preamble
@@ -75,7 +76,8 @@
 # * Set OsfDefault to true for fonts which have Old Style Figures by
 #   default and provide an option for lining figures. Pass this option
 #   to OsfOption.
-# * ScaleOption supports the placeholder $$val for the scale value.
+# * ScaleOption and ScaleCommand support the placeholder $$val for the
+#   scale value.
 # * If MoreOptions is true, then the user can insert additional options to
 #   the font package via the Document Settings.
 # * The Preamble code is output immediately after the respective font
diff --git a/src/LaTeXFonts.cpp b/src/LaTeXFonts.cpp
index e58b55f..00e19fa 100644
--- a/src/LaTeXFonts.cpp
+++ b/src/LaTeXFonts.cpp
@@ -134,7 +134,7 @@ bool LaTeXFont::providesScale(bool ot1, bool complete, bool 
nomath)
return altFont(usedfont).providesScale(ot1, complete, nomath);
else if (!available(ot1, nomath))
return false;
-   return (!scaleoption_.empty());
+   return (!scaleoption_.empty() || !scalecmd_.empty());
 }
 
 
@@ -329,6 +329,15 @@ string const LaTeXFont::getLaTeXCode(bool dryrun, bool 
ot1, bool complete, bool
if (osf && providesOSF(ot1, complete, nomath) && !osffont_.empty())
os << altFont(osffont_).getLaTeXCode(dryrun, ot1, complete, sc, 
osf,
 nomath, extraopts, scale);
+   if (scale != 100 && !scalecmd_.empty()
+   && providesScale(ot1, complete, nomath)) {
+   if (contains(scalecmd_, '@'))
+   os << "\\makeatletter\n";
+   os << subst(to_ascii(scalecmd_), "$$val",
+   convert(float(scale) / 100)) << '\n';
+   if (contains(scalecmd_, '@'))
+   os << "\\makeatother\n";
+   }
 
if (!preamble_.empty())
os << to_utf8(preamble_);
@@ -369,6 +378,7 @@ bool LaTeXFont::readFont(Lexer & lex)
LF_PREAMBLE,
LF_PROVIDES,
LF_REQUIRES,
+   LF_SCALECMD,
LF_SCALEOPTION,
LF_SCOPTION,
LF_SWITCHDEFAULT
@@ -395,6 +405,7 @@ bool LaTeXFont::readFont(Lexer & lex)
{ "preamble", LF_PREAMBLE },
{ "provides", LF_PROVIDES },
{ "requires", LF_REQUIRES },
+   { "scalecommand", LF_SCALECMD },
{ "scaleoption",  LF_SCALEOPTION },
{ "scoption", LF_SCOPTION },
{ "switchdefault",LF_SWITCHDEFAULT }
@@ -483,6 +494,9 @@ bool LaTeXFont::readFont(Lexer & lex)
case LF_REQUIRES:
lex >> required_;
break;
+   case LF_SCALECMD:
+   lex >> scalecmd_;
+   break;
case LF_SCALEOPTION:
lex >> scaleoption_;
break;
diff --git a/src/LaTeXFonts.h b/src/LaTeXFonts.h
index a6d875d..116ef08 100644
--- a/src/LaTeXFonts.h
+++ b/src/LaTeXFonts.h
@@ -57,6 +57,8 @@ public:
docstring const & osfscoption() { return osfscoption_; }
/// A package option for font scaling
docstring const & scaleoption() { return scaleoption_; }
+   /// A macro for font scaling
+   docstring const & scalecmd() { return scalecmd_; }
/// Does this provide additional options?
bool providesMoreOptions(bool ot1, bool complete, bool nomath);
/// Alternative requirement to test for
@@ -141,6 +143,8 @@ private:
///
docstring scaleoption_;
///
+   docstring scalecmd_;
+   ///
std::vector provides_;
///
docstring required_;
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Provide option to prevent unnecessary font loading.

2020-07-09 Thread Juergen Spitzmueller
commit 3335344261baf578872441242affd5375d9e4019
Author: Juergen Spitzmueller 
Date:   Thu Jul 9 11:39:43 2020 +0200

Provide option to prevent unnecessary font loading.

If an OSF font is an alternative to a non-OSF one, only load the OSFFont
if osf is requested.
---
 lib/latexfonts |6 ++
 src/LaTeXFonts.cpp |   32 
 src/LaTeXFonts.h   |9 +++--
 3 files changed, 33 insertions(+), 14 deletions(-)

diff --git a/lib/latexfonts b/lib/latexfonts
index 784ed33..eaf9e4c 100644
--- a/lib/latexfonts
+++ b/lib/latexfonts
@@ -19,6 +19,7 @@
 #  OsfOption  
 #  OsfFont
 #  OsfDefault <0|1>
+#  OsfFontOnly<0|1>
 #  ScOption   
 #  OsfScOption
 #  ScaleOption
@@ -65,6 +66,9 @@
 #   tags.
 # * OsfFont is a font that is loaded additionally in and that provides
 #   Old Style Figures for a given font (e.g. eco).
+# * If OsfFontOnly is true, then the OsfFont will replace the non-OsF
+#   one (only OsfFont is loaded if osf is true). Otherwise it will
+#   complement the non-osf font.
 # * OsfScOption overrides any OsfOption and ScOption if both features
 #   are selected.
 # * ScOption and OsfScOption are currently only supported for rm fonts.
@@ -500,6 +504,7 @@ AltFont ppl
GuiName  "Palatino"
Family   rm
OsfFont  pplj
+   OsfFontOnly  1
SwitchDefault1
 EndFont
 
@@ -600,6 +605,7 @@ AltFont futs
Family   rm
SwitchDefault1
OsfFont  futj
+   OsfFontOnly  1
 EndFont
 
 AltFont futj
diff --git a/src/LaTeXFonts.cpp b/src/LaTeXFonts.cpp
index 12c0856..e58b55f 100644
--- a/src/LaTeXFonts.cpp
+++ b/src/LaTeXFonts.cpp
@@ -68,7 +68,7 @@ bool LaTeXFont::available(bool ot1, bool nomath)
 
 bool LaTeXFont::providesNoMath(bool ot1, bool complete)
 {
-   docstring const usedfont = getUsedFont(ot1, complete, false);
+   docstring const usedfont = getUsedFont(ot1, complete, false, false);
 
if (usedfont.empty())
return false;
@@ -81,7 +81,7 @@ bool LaTeXFont::providesNoMath(bool ot1, bool complete)
 
 bool LaTeXFont::providesOSF(bool ot1, bool complete, bool nomath)
 {
-   docstring const usedfont = getUsedFont(ot1, complete, nomath);
+   docstring const usedfont = getUsedFont(ot1, complete, nomath, false);
 
if (usedfont.empty())
return false;
@@ -98,7 +98,7 @@ bool LaTeXFont::providesOSF(bool ot1, bool complete, bool 
nomath)
 
 bool LaTeXFont::providesSC(bool ot1, bool complete, bool nomath)
 {
-   docstring const usedfont = getUsedFont(ot1, complete, nomath);
+   docstring const usedfont = getUsedFont(ot1, complete, nomath, false);
 
if (usedfont.empty())
return false;
@@ -113,7 +113,7 @@ bool LaTeXFont::providesSC(bool ot1, bool complete, bool 
nomath)
 
 bool LaTeXFont::hasMonolithicExpertSet(bool ot1, bool complete, bool nomath)
 {
-   docstring const usedfont = getUsedFont(ot1, complete, nomath);
+   docstring const usedfont = getUsedFont(ot1, complete, nomath, false);
 
if (usedfont.empty())
return false;
@@ -126,7 +126,7 @@ bool LaTeXFont::hasMonolithicExpertSet(bool ot1, bool 
complete, bool nomath)
 
 bool LaTeXFont::providesScale(bool ot1, bool complete, bool nomath)
 {
-   docstring const usedfont = getUsedFont(ot1, complete, nomath);
+   docstring const usedfont = getUsedFont(ot1, complete, nomath, false);
 
if (usedfont.empty())
return false;
@@ -140,7 +140,7 @@ bool LaTeXFont::providesScale(bool ot1, bool complete, bool 
nomath)
 
 bool LaTeXFont::providesMoreOptions(bool ot1, bool complete, bool nomath)
 {
-   docstring const usedfont = getUsedFont(ot1, complete, nomath);
+   docstring const usedfont = getUsedFont(ot1, complete, nomath, false);
 
if (usedfont.empty())
return false;
@@ -154,7 +154,7 @@ bool LaTeXFont::providesMoreOptions(bool ot1, bool 
complete, bool nomath)
 
 bool LaTeXFont::provides(std::string const & name, bool ot1, bool complete, 
bool nomath)
 {
-   docstring const usedfont = getUsedFont(ot1, complete, nomath);
+   docstring const usedfont = getUsedFont(ot1, complete, nomath, false);
 
if (usedfont.empty())
return false;
@@ -171,9 +171,11 @@ bool LaTeXFont::provides(std::string const & name, bool 
ot1, bool complete, bool
 }
 
 
-docstring const LaTeXFont::getUsedFont(bool ot1, bool complete, bool nomath)
+docstring const LaTeXFont::getUsedFont(bool ot1, bool complete, bool nomath, 
bool osf)
 {
-   if (nomath && !nomathfont_.empty() && available(ot1, true))
+   if (osf && osfFontOnly())
+   return osffont_;
+   else if (nomath && !nomathfont_.empty() && available(ot1, true))
return nomathfont_;
else if (ot1 && !ot1font_.empty())
return (ot1font_ 

[LyX/master] Add support for the libertinus family of fonts (#11899)

2020-07-09 Thread Juergen Spitzmueller
commit 8cb9a6d3f6463321cdaf49a3cedb854b09c51275
Author: Juergen Spitzmueller 
Date:   Thu Jul 9 11:46:07 2020 +0200

Add support for the libertinus family of fonts (#11899)

File format change.
---
 lib/chkconfig.ltx   |1 +
 lib/doc/LaTeXConfig.lyx |   77 ++-
 lib/latexfonts  |   45 +++
 lib/lyx2lyx/lyx_2_4.py  |   77 +-
 src/version.h   |4 +-
 5 files changed, 199 insertions(+), 5 deletions(-)

diff --git a/lib/chkconfig.ltx b/lib/chkconfig.ltx
index 1ab93b4..8fb6800 100644
--- a/lib/chkconfig.ltx
+++ b/lib/chkconfig.ltx
@@ -519,6 +519,7 @@
 \TestPackage{libertineMono-type1}
 \TestPackage{libertineMono}
 \TestPackage{libertineRoman}
+\TestPackage{libertinus}
 \TestPackage{lmodern}
 \TestPackage{luximono}
 \TestPackage{mathdesign}% for Roman fonts
diff --git a/lib/doc/LaTeXConfig.lyx b/lib/doc/LaTeXConfig.lyx
index bfaad60..9532d33 100644
--- a/lib/doc/LaTeXConfig.lyx
+++ b/lib/doc/LaTeXConfig.lyx
@@ -1,5 +1,5 @@
 #LyX 2.4 created this file. For more info see https://www.lyx.org/
-\lyxformat 595
+\lyxformat 597
 \begin_document
 \begin_header
 \save_transient_properties true
@@ -1181,6 +1181,81 @@ Libertine Mono
 \emph default
  typewriter font.
  This font is shipped with libertine font package as of February 2013.
+\change_inserted -712698321 1594287772
+
+\end_layout
+
+\begin_layout Subsection
+Libertin
+\change_deleted -712698321 1594287776
+e Mono
+\change_inserted -712698321 1594287776
+us
+\change_unchanged
+
+\end_layout
+
+\begin_layout Description
+Found: 
+\begin_inset Info
+type  "package"
+arg   "libertinus"
+\end_inset
+
+
+\end_layout
+
+\begin_layout Description
+CTAN: 
+\family typewriter
+fonts/libertin
+\change_inserted -712698321 1594287840
+us
+\change_deleted -712698321 1594287840
+e
+\change_unchanged
+/
+\end_layout
+
+\begin_layout Description
+Notes: The 
+\family sans
+libertin
+\change_deleted -712698321 1594287845
+eMono-type1
+\change_inserted -712698321 1594287845
+us
+\change_unchanged
+
+\family default
+ package provides support for the 
+\emph on
+Libertin
+\change_deleted -712698321 1594287851
+e Mono
+\emph default
+ typewriter font
+\change_inserted -712698321 1594287856
+
+\emph on
+us
+\emph default
+ family of fonts
+\change_deleted -712698321 1594287920
+.
+ This font is shipped with libertine font package as of February 2013
+\change_inserted -712698321 1594287938
+, a derivate of the 
+\emph on
+Libertine
+\emph default
+ and 
+\emph on
+Biolinum
+\emph default
+ family of fonts with dome extra features
+\change_unchanged
+.
 \end_layout
 
 \begin_layout Subsection
diff --git a/lib/latexfonts b/lib/latexfonts
index e3b134f..6553f4e 100644
--- a/lib/latexfonts
+++ b/lib/latexfonts
@@ -318,6 +318,25 @@ AltFont libertine-legacy
Package  libertine
 EndFont
 
+Font libertinus
+   GuiName  "Libertinus"
+   Family   rm
+   OsfOptionosf
+   Package  libertinus
+   PackageOptions   serif
+   CompleteFont libertinus-full
+   MoreOptions  1
+
+EndFont
+
+AltFont libertinus-full
+   GuiName  "Libertine"
+   Family   rm
+   OsfOptionosf
+   Package  libertinus
+   MoreOptions  1
+EndFont
+
 Font lmodern
GuiName  "Latin Modern Roman"
Family   rm
@@ -941,6 +960,24 @@ Font kurierlc
SwitchDefault   1
 EndFont
 
+Font LibertinusSans-LF
+   GuiName  "Libertinus Sans"
+   Family   sf
+   Requires libertinus
+   SwitchDefault1
+   OsfFont  LibertinusSans-OsF
+   OsfFontOnly  1
+   ScaleCommand \renewcommand*{\LibertinusSans@scale}{$$val}
+EndFont
+
+AltFont LibertinusSans-OsF
+   GuiName  "Libertinus Sans"
+   Family   sf
+   Requires libertinus
+   SwitchDefault1
+   ScaleCommand \renewcommand*{\LibertinusSans@scale}{$$val}
+EndFont
+
 Font lmss
GuiName  "Latin Modern Sans"
Family   sf
@@ -1139,6 +1176,14 @@ AltFont libertine-mono-type1
Package  libertineMono-type1
 EndFont
 
+Font LibertinusMono-TLF
+   GuiName  "Libertinus Mono"
+   Family   tt
+   Requires libertinus
+   SwitchDefault1
+   ScaleCommand \renewcommand*{\LibertinusMono@scale}{$$val}
+EndFont
+
 Font lmtt
GuiName  "Latin Modern Typewriter"
Family   tt
diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py
index d4e8b0a..ea6d0bc 100644
--- a/lib/lyx2lyx/lyx_2_4.py
+++ b/lib/lyx2lyx/lyx_2_4.py
@@ -194,6 +194,8 @@ def createFontMapping(fontlist):
   'FiraSansUltralight,ultralight'],
   "sans", "sf", "FiraSans", "scaled", "lf", 
"true")
 fm.expandFontMapping(['Fi

[LyX/master] tex2lyx: add support for libertinus

2020-07-09 Thread Juergen Spitzmueller
commit 01c1d1e156b02ea94ea11645d9bbd976446d374c
Author: Juergen Spitzmueller 
Date:   Thu Jul 9 12:26:25 2020 +0200

tex2lyx: add support for libertinus
---
 src/tex2lyx/Preamble.cpp |   93 -
 1 files changed, 90 insertions(+), 3 deletions(-)

diff --git a/src/tex2lyx/Preamble.cpp b/src/tex2lyx/Preamble.cpp
index 187a0da..005a103 100644
--- a/src/tex2lyx/Preamble.cpp
+++ b/src/tex2lyx/Preamble.cpp
@@ -149,11 +149,11 @@ const char * const known_roman_font_packages[] = { "ae", 
"beraserif", "bookman",
 
 const char * const known_sans_font_packages[] = { "avant", "berasans", 
"biolinum",
 "biolinum-type1", "cantarell", "Chivo", "cmbr", "cmss", "DejaVuSans", 
"DejaVuSansCondensed", "FiraSans", "helvet", "iwona",
-"iwonac", "iwonal", "iwonalc", "kurier", "kurierc", "kurierl", "kurierlc", 
"lmss", "noto-sans", "PTSans",
+"iwonac", "iwonal", "iwonalc", "kurier", "kurierc", "kurierl", "kurierlc", 
"LibertinusSans-LF", "lmss", "noto-sans", "PTSans",
 "tgadventor", "tgheros", "uop", 0 };
 
 const char * const known_typewriter_font_packages[] = { "beramono", "cmtl", 
"cmtt", "courier", "DejaVuSansMono",
-"FiraMono", "lmtt", "luximono", "libertineMono", "libertineMono-type1", 
"lmodern",
+"FiraMono", "lmtt", "luximono", "libertineMono", "libertineMono-type1", 
"LibertinusMono-TLF", "lmodern",
 "mathpazo", "mathptmx", "newcent", "noto-mono", "PTMono", "tgcursor", "txtt", 
0 };
 
 const char * const known_math_font_packages[] = { "eulervm", "newtxmath", 0};
@@ -853,6 +853,74 @@ void Preamble::handle_package(Parser &p, string const & 
name,
h_font_roman_osf = "true";
}
 
+   if (name == "libertinus" || name == "libertinus-type1") {
+   bool sf = true;
+   bool tt = true;
+   bool rm = true;
+   bool osf = false;
+   string scalesf;
+   string scalett;
+   for (auto const & opt : allopts) {
+   if (opt == "rm" || opt == "serif") {
+   tt = false;
+   sf = false;
+   continue;
+   }
+   if (opt == "sf" || opt == "sans") {
+   tt = false;
+   rm = false;
+   continue;
+   }
+   if (opt == "tt=false" || opt == "mono=false") {
+   tt = false;
+   continue;
+   }
+   if (opt == "osf") {
+   osf = true;
+   continue;
+   }
+   if (opt == "scaleSF") {
+   scalesf = opt;
+   continue;
+   }
+   if (opt == "scaleTT") {
+   scalett = opt;
+   continue;
+   }
+   if (opt == "lining") {
+   h_font_roman_osf = "false";
+   continue;
+   }
+   if (!xopts.empty())
+   xopts += ", ";
+   xopts += opt;
+   }
+   if (rm) {
+   h_font_roman[0] = "libertinus";
+   if (osf)
+   h_font_roman_osf = "true";
+   else
+   h_font_roman_osf = "false";
+   }
+   if (sf) {
+   h_font_sans[0] = "LibertinusSans-LF";
+   if (osf)
+   h_font_sans_osf = "true";
+   else
+   h_font_sans_osf = "false";
+   if (!scalesf.empty())
+   scale_as_percentage(scalesf, 
h_font_sf_scale[0]);
+   }
+   if (tt) {
+   h_font_typewriter[0] = "LibertinusMono-TLF";
+   if (!scalett.empty())
+   scale_as_percentage(scalett, 
h_font_tt_scale[0]);
+   }
+   if (!xopts.empty())
+   h_font_roman_opts = xopts;
+   options.clear();
+   }
+
if (name == "MinionPro") {
h_font_roman[0] = "minionpro";
h_font_roman_osf = "true";
@@ -2512,12 +2580,19 @@ void Preamble::parse(Parser & p, string const & 
forceclass,
p.skip_spaces();
in_lyx_preamble = true;
}
-   if (name == "\\sfdefault")
+   if (name == "\\sfdefault") {
if (is_known(body, known_sans_font

[LyX/master] Cleanup: remove trailing underscores

2020-07-09 Thread Jean-Marc Lasgouttes
commit aaec8459bf9b9f96964da7fccdfc830dda4aecdc
Author: Jean-Marc Lasgouttes 
Date:   Thu Jul 9 12:39:36 2020 +0200

Cleanup: remove trailing underscores

These ToobarItem members are public, not private.
---
 src/frontends/qt/GuiToolbar.cpp |   54 +++---
 src/frontends/qt/Toolbars.cpp   |   10 +++---
 src/frontends/qt/Toolbars.h |8 +++---
 3 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/src/frontends/qt/GuiToolbar.cpp b/src/frontends/qt/GuiToolbar.cpp
index fbd24b4..4b3ebf4 100644
--- a/src/frontends/qt/GuiToolbar.cpp
+++ b/src/frontends/qt/GuiToolbar.cpp
@@ -121,17 +121,17 @@ void GuiToolbar::setVisibility(int visibility)
 
 Action * GuiToolbar::addItem(ToolbarItem const & item)
 {
-   QString text = toqstr(item.label_);
+   QString text = toqstr(item.label);
// Get the keys bound to this action, but keep only the
// first one later
-   KeyMap::Bindings bindings = 
theTopLevelKeymap().findBindings(*item.func_);
+   KeyMap::Bindings bindings = 
theTopLevelKeymap().findBindings(*item.func);
if (!bindings.empty())
text += " [" + 
toqstr(bindings.begin()->print(KeySequence::ForGui)) + "]";
 
-   Action * act = new Action(item.func_, getIcon(*item.func_, false), text,
+   Action * act = new Action(item.func, getIcon(*item.func, false), text,
  text, this);
-   if (item.type_ == ToolbarItem::BIDICOMMAND)
-   act->setRtlIcon(getIcon(*item.func_, false, true));
+   if (item.type == ToolbarItem::BIDICOMMAND)
+   act->setRtlIcon(getIcon(*item.func, false, true));
 
actions_.append(act);
return act;
@@ -149,17 +149,17 @@ public:
PaletteButton(GuiToolbar * bar, ToolbarItem const & item)
: QToolButton(bar), bar_(bar), tbitem_(item), 
initialized_(false)
{
-   QString const label = qt_(to_ascii(tbitem_.label_));
+   QString const label = qt_(to_ascii(tbitem_.label));
setToolTip(label);
setStatusTip(label);
setText(label);
connect(bar_, SIGNAL(iconSizeChanged(QSize)),
this, SLOT(setIconSize(QSize)));
setCheckable(true);
-   ToolbarInfo const * tbinfo = 
guiApp->toolbars().info(tbitem_.name_);
+   ToolbarInfo const * tbinfo = 
guiApp->toolbars().info(tbitem_.name);
if (tbinfo)
// use the icon of first action for the toolbar button
-   setIcon(getIcon(*tbinfo->items.begin()->func_, true));
+   setIcon(getIcon(*tbinfo->items.begin()->func, true));
}
 
void mousePressEvent(QMouseEvent * e)
@@ -171,20 +171,20 @@ public:
 
initialized_ = true;
 
-   ToolbarInfo const * tbinfo = 
guiApp->toolbars().info(tbitem_.name_);
+   ToolbarInfo const * tbinfo = 
guiApp->toolbars().info(tbitem_.name);
if (!tbinfo) {
-   LYXERR0("Unknown toolbar " << tbitem_.name_);
+   LYXERR0("Unknown toolbar " << tbitem_.name);
return;
}
IconPalette * panel = new IconPalette(this);
-   QString const label = qt_(to_ascii(tbitem_.label_));
+   QString const label = qt_(to_ascii(tbitem_.label));
panel->setWindowTitle(label);
connect(this, SIGNAL(clicked(bool)), panel, 
SLOT(setVisible(bool)));
connect(panel, SIGNAL(visible(bool)), this, 
SLOT(setChecked(bool)));
ToolbarInfo::item_iterator it = tbinfo->items.begin();
ToolbarInfo::item_iterator const end = tbinfo->items.end();
for (; it != end; ++it)
-   if (!getStatus(*it->func_).unknown())
+   if (!getStatus(*it->func).unknown())
panel->addButton(bar_->addItem(*it));
 
QToolButton::mousePressEvent(e);
@@ -198,11 +198,11 @@ MenuButtonBase::MenuButtonBase(GuiToolbar * bar, 
ToolbarItem const & item)
: QToolButton(bar), bar_(bar), tbitem_(item)
 {
setPopupMode(QToolButton::InstantPopup);
-   QString const label = qt_(to_ascii(tbitem_.label_));
+   QString const label = qt_(to_ascii(tbitem_.label));
setToolTip(label);
setStatusTip(label);
setText(label);
-   QString const name = toqstr(tbitem_.name_);
+   QString const name = toqstr(tbitem_.name);
QStringList imagedirs;
imagedirs << "images/math/" << "images/";
for (int i = 0; i < imagedirs.size(); ++i) {
@@ -239,21 +239,21 @@ StaticMenuButton::StaticMenuButton(
 
 void StaticMenuButton::initialize()
 {
-   QString const label = qt_(to_ascii(tbitem_.label_));
+   QString const label = qt_(to_ascii(tbitem_.label)

[LyX/master] Fix header inclusions

2020-07-09 Thread Juergen Spitzmueller
commit 11a57ce6c68e712cab9818c92a0442e96f6d58d7
Author: Juergen Spitzmueller 
Date:   Thu Jul 9 17:19:01 2020 +0200

Fix header inclusions
---
 src/insets/InsetCitation.cpp  |2 +-
 src/insets/InsetFloat.cpp |2 +-
 src/insets/InsetFoot.cpp  |2 +-
 src/insets/InsetGraphics.cpp  |2 +-
 src/insets/InsetHyperlink.cpp |3 +--
 src/insets/InsetLine.cpp  |2 +-
 src/insets/InsetMarginal.cpp  |2 +-
 src/insets/InsetNewline.cpp   |2 +-
 src/insets/InsetNote.cpp  |2 +-
 src/insets/InsetScript.cpp|2 +-
 src/insets/InsetSeparator.cpp |2 +-
 11 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/src/insets/InsetCitation.cpp b/src/insets/InsetCitation.cpp
index 337c4bb..5d35f9d 100644
--- a/src/insets/InsetCitation.cpp
+++ b/src/insets/InsetCitation.cpp
@@ -24,7 +24,7 @@
 #include "FuncStatus.h"
 #include "LaTeXFeatures.h"
 #include "output_xhtml.h"
-#include 
+#include "output_docbook.h"
 #include "ParIterator.h"
 #include "texstream.h"
 #include "TocBackend.h"
diff --git a/src/insets/InsetFloat.cpp b/src/insets/InsetFloat.cpp
index 6644d71..c9f90fa 100644
--- a/src/insets/InsetFloat.cpp
+++ b/src/insets/InsetFloat.cpp
@@ -13,7 +13,6 @@
 #include 
 
 #include 
-#include 
 #include 
 
 #include "InsetBox.h"
@@ -34,6 +33,7 @@
 #include "FuncStatus.h"
 #include "LaTeXFeatures.h"
 #include "Lexer.h"
+#include "output_docbook.h"
 #include "output_xhtml.h"
 #include "ParIterator.h"
 #include "TexRow.h"
diff --git a/src/insets/InsetFoot.cpp b/src/insets/InsetFoot.cpp
index ad3fc3a..3a2f5b3 100644
--- a/src/insets/InsetFoot.cpp
+++ b/src/insets/InsetFoot.cpp
@@ -10,7 +10,6 @@
  */
 
 #include 
-#include 
 
 #include "InsetFoot.h"
 #include "InsetBox.h"
@@ -22,6 +21,7 @@
 #include "LaTeXFeatures.h"
 #include "Layout.h"
 #include "OutputParams.h"
+#include "output_docbook.h"
 #include "ParIterator.h"
 #include "TextClass.h"
 #include "TocBackend.h"
diff --git a/src/insets/InsetGraphics.cpp b/src/insets/InsetGraphics.cpp
index 2b19d50..b4ddd77 100644
--- a/src/insets/InsetGraphics.cpp
+++ b/src/insets/InsetGraphics.cpp
@@ -67,6 +67,7 @@ TODO
 #include "MetricsInfo.h"
 #include "Mover.h"
 #include "OutputParams.h"
+#include "output_docbook.h"
 #include "output_xhtml.h"
 #include "xml.h"
 #include "texstream.h"
@@ -95,7 +96,6 @@ TODO
 
 #include 
 #include 
-#include 
 
 using namespace std;
 using namespace lyx::support;
diff --git a/src/insets/InsetHyperlink.cpp b/src/insets/InsetHyperlink.cpp
index 1444fc1..0f039e3 100644
--- a/src/insets/InsetHyperlink.cpp
+++ b/src/insets/InsetHyperlink.cpp
@@ -10,8 +10,6 @@
  */
 
 #include 
-#include 
-
 #include "InsetHyperlink.h"
 
 #include "Buffer.h"
@@ -22,6 +20,7 @@
 #include "FuncStatus.h"
 #include "LaTeXFeatures.h"
 #include "OutputParams.h"
+#include "output_docbook.h"
 #include "output_xhtml.h"
 #include "xml.h"
 #include "texstream.h"
diff --git a/src/insets/InsetLine.cpp b/src/insets/InsetLine.cpp
index 2479be1..e6964aa 100644
--- a/src/insets/InsetLine.cpp
+++ b/src/insets/InsetLine.cpp
@@ -24,6 +24,7 @@
 #include "Length.h"
 #include "MetricsInfo.h"
 #include "OutputParams.h"
+#include "output_docbook.h"
 #include "output_xhtml.h"
 #include "texstream.h"
 #include "Text.h"
@@ -37,7 +38,6 @@
 #include "support/lstrings.h"
 
 #include 
-#include 
 
 using namespace std;
 
diff --git a/src/insets/InsetMarginal.cpp b/src/insets/InsetMarginal.cpp
index 54922fc..119c636 100644
--- a/src/insets/InsetMarginal.cpp
+++ b/src/insets/InsetMarginal.cpp
@@ -10,13 +10,13 @@
  */
 
 #include 
-#include 
 
 #include "InsetMarginal.h"
 
 #include "Buffer.h"
 #include "BufferParams.h"
 #include "OutputParams.h"
+#include "output_docbook.h"
 #include "TocBackend.h"
 
 #include "support/docstream.h"
diff --git a/src/insets/InsetNewline.cpp b/src/insets/InsetNewline.cpp
index 86f60f6..05c6ee4 100644
--- a/src/insets/InsetNewline.cpp
+++ b/src/insets/InsetNewline.cpp
@@ -10,7 +10,6 @@
  */
 
 #include 
-#include 
 
 #include "InsetNewline.h"
 
@@ -21,6 +20,7 @@
 #include "Lexer.h"
 #include "MetricsInfo.h"
 #include "OutputParams.h"
+#include "output_docbook.h"
 #include "output_xhtml.h"
 #include "texstream.h"
 
diff --git a/src/insets/InsetNote.cpp b/src/insets/InsetNote.cpp
index 85469f6..fa84c61 100644
--- a/src/insets/InsetNote.cpp
+++ b/src/insets/InsetNote.cpp
@@ -28,6 +28,7 @@
 #include "Lexer.h"
 #include "LyXRC.h"
 #include "OutputParams.h"
+#include "output_docbook.h"
 #include "ParIterator.h"
 #include "TextClass.h"
 #include "TocBackend.h"
@@ -42,7 +43,6 @@
 
 #include 
 #include 
-#include 
 
 using namespace std;
 
diff --git a/src/insets/InsetScript.cpp b/src/insets/InsetScript.cpp
index 3dc9e12..eccf3c3 100644
--- a/src/insets/InsetScript.cpp
+++ b/src/insets/InsetScript.cpp
@@ -26,6 +26,7 @@
 #include "LyXAction.h"
 #include "MetricsInfo.h"
 #include "OutputParams.h"
+#include "output_docbook.h"
 #include "output_xhtml.h"
 #include "TextClass.h"
 #include "TextMetrics.h"
@@ -40,7 +41,6 @@
 #include "fronten

Re: [LyX/master] Add support for the libertinus family of fonts (#11899)

2020-07-09 Thread Kornel Benko
Am Thu,  9 Jul 2020 11:22:38 +0200 (CEST)
schrieb Juergen Spitzmueller :

> commit 8cb9a6d3f6463321cdaf49a3cedb854b09c51275
> Author: Juergen Spitzmueller 
> Date:   Thu Jul 9 11:46:07 2020 +0200
> 
> Add support for the libertinus family of fonts (#11899)

This must be a typo (Libertinus vs. Libertine)

AltFont libertinus-full
GuiName  "Libertine"
Family   rm
OsfOptionosf
Package  libertinus
MoreOptions  1
EndFont

Kornel



pgpzgLUDmm6vJ.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


Re: [LyX/master] Add support for the libertinus family of fonts (#11899)

2020-07-09 Thread Jürgen Spitzmüller
Am Donnerstag, den 09.07.2020, 17:36 +0200 schrieb Kornel Benko:
> This must be a typo (Libertinus vs. Libertine)

Yes. Though the AltName GuiName is not relevant anyway.

Jürgen


signature.asc
Description: This is a digitally signed message part
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Typo

2020-07-09 Thread Juergen Spitzmueller
commit 77eaa8a0cec87d1b035a63e2f08dc26c2c2e89e3
Author: Juergen Spitzmueller 
Date:   Thu Jul 9 17:39:57 2020 +0200

Typo
---
 lib/latexfonts |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/latexfonts b/lib/latexfonts
index 6553f4e..68a7cc2 100644
--- a/lib/latexfonts
+++ b/lib/latexfonts
@@ -330,7 +330,7 @@ Font libertinus
 EndFont
 
 AltFont libertinus-full
-   GuiName  "Libertine"
+   GuiName  "Libertinus"
Family   rm
OsfOptionosf
Package  libertinus
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Do not attempt to mark par break in single-line insets

2020-07-09 Thread Juergen Spitzmueller
commit 2c0b650aa63fbec4bf2b8093ad3b8391d333e8c9
Author: Juergen Spitzmueller 
Date:   Thu Jul 9 18:47:53 2020 +0200

Do not attempt to mark par break in single-line insets
---
 src/Text.cpp |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/Text.cpp b/src/Text.cpp
index 2be5b86..4b897bb 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -619,7 +619,8 @@ void Text::readParagraph(Paragraph & par, Lexer & lex,
}
}
// Final change goes to paragraph break:
-   par.setChange(par.size(), change);
+   if (inset().allowMultiPar())
+   par.setChange(par.size(), change);
 
// Initialize begin_of_body_ on load; redoParagraph maintains
par.setBeginOfBody();
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Add support for Libertinus Math

2020-07-09 Thread Juergen Spitzmueller
commit 667a9ad0ce5cda2cf5f0a08a26f01661e30aa75f
Author: Juergen Spitzmueller 
Date:   Thu Jul 9 18:59:54 2020 +0200

Add support for Libertinus Math
---
 lib/chkconfig.ltx   |1 +
 lib/doc/LaTeXConfig.lyx |   66 +++
 lib/latexfonts  |7 +
 lib/lyx2lyx/lyx_2_4.py  |1 +
 4 files changed, 75 insertions(+), 0 deletions(-)

diff --git a/lib/chkconfig.ltx b/lib/chkconfig.ltx
index 8fb6800..d2cb624 100644
--- a/lib/chkconfig.ltx
+++ b/lib/chkconfig.ltx
@@ -520,6 +520,7 @@
 \TestPackage{libertineMono}
 \TestPackage{libertineRoman}
 \TestPackage{libertinus}
+\TestPackage{libertinust1math}
 \TestPackage{lmodern}
 \TestPackage{luximono}
 \TestPackage{mathdesign}% for Roman fonts
diff --git a/lib/doc/LaTeXConfig.lyx b/lib/doc/LaTeXConfig.lyx
index 9532d33..41ddb04 100644
--- a/lib/doc/LaTeXConfig.lyx
+++ b/lib/doc/LaTeXConfig.lyx
@@ -1256,6 +1256,72 @@ Biolinum
  family of fonts with dome extra features
 \change_unchanged
 .
+\change_inserted -712698321 1594313728
+
+\end_layout
+
+\begin_layout Subsection
+Libertinus
+\change_inserted -712698321 1594313793
+T1Math
+\change_unchanged
+
+\end_layout
+
+\begin_layout Description
+Found: 
+\begin_inset Info
+type  "package"
+arg   "libertinust1math"
+\end_inset
+
+
+\end_layout
+
+\begin_layout Description
+CTAN: 
+\family typewriter
+fonts/libertinus
+\change_inserted -712698321 1594313783
+t1math
+\change_unchanged
+/
+\end_layout
+
+\begin_layout Description
+Notes: The 
+\family sans
+libertinus
+\change_inserted -712698321 1594313750
+t1math
+\change_unchanged
+
+\family default
+ package provides support for the 
+\emph on
+Libertinus
+\change_inserted -712698321 1594313754
+ Math
+\change_unchanged
+
+\emph default
+ 
+\change_deleted -712698321 1594313759
+family of 
+\change_unchanged
+font
+\change_deleted -712698321 1594313767
+s, a derivate of the 
+\emph on
+Libertine
+\emph default
+ and 
+\emph on
+Biolinum
+\emph default
+ family of fonts with dome extra features
+\change_unchanged
+.
 \end_layout
 
 \begin_layout Subsection
diff --git a/lib/latexfonts b/lib/latexfonts
index 68a7cc2..3120233 100644
--- a/lib/latexfonts
+++ b/lib/latexfonts
@@ -1289,6 +1289,13 @@ Font libertine-ntxm
Provides amssymb,amsfonts
 EndFont
 
+Font libertinusmath
+   GuiName  "Libertinus Math"
+   Family   math
+   Package  libertinust1math
+   Provides amssymb,amsfonts
+EndFont
+
 Font minion-ntxm
GuiName  "Minion Pro (New TX)"
Family   math
diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py
index ea6d0bc..c4d63ca 100644
--- a/lib/lyx2lyx/lyx_2_4.py
+++ b/lib/lyx2lyx/lyx_2_4.py
@@ -196,6 +196,7 @@ def createFontMapping(fontlist):
 fm.expandFontMapping(['FiraMono'], "typewriter", "tt", "FiraMono", 
"scaled", "lf", "true")
 elif font == 'libertinus':
 fm.expandFontMapping(['libertinus,serif'], "roman", None, 
"libertinus", None, "osf")
+fm.expandFontMapping(['libertinusmath'], "math", None, 
"libertinust1math", None, None)
 return fm
 
 def convert_fonts(document, fm, osfoption = "osf"):
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Revert "Simplify code a bit. Should be equivalent, unless backs is empty!"

2020-07-09 Thread Richard Kimberly Heck
commit 33eb33d0e7cd91e5e722aba306850177c9ec4998
Author: Richard Kimberly Heck 
Date:   Thu Jul 9 22:25:09 2020 -0400

Revert "Simplify code a bit. Should be equivalent, unless backs is empty!"

This reverts commit 3c094c739ba38f43edf9698ac37dd9eee62080b1.
---
 src/BufferParams.cpp |   10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp
index 4a70ed8..4ed8b4e 100644
--- a/src/BufferParams.cpp
+++ b/src/BufferParams.cpp
@@ -2653,10 +2653,12 @@ FormatList const & BufferParams::exportableFormats(bool 
only_viewable) const
  excludes.insert("xetex");
}
 
-   FormatList result;
-   for (auto const & b : backs) {
-   FormatList r =
-   theConverters().getReachable(b, only_viewable, false, 
excludes);
+   FormatList result =
+   theConverters().getReachable(backs[0], only_viewable, true, 
excludes);
+   vector::const_iterator it = backs.begin() + 1;
+   for (; it != backs.end(); ++it) {
+   FormatList r = theConverters().getReachable(*it, only_viewable,
+   
false, excludes);
result.insert(result.end(), r.begin(), r.end());
}
sort(result.begin(), result.end(), Format::formatSorter);
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs