]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFonts.cpp
Use unsigned values for enum
[lyx.git] / src / LaTeXFonts.cpp
index c2e934539df3559df88df148c4492f7a0d6cf97c..b52a8c06d5e9c94bf96808fc4aa1f0f21f39a974 100644 (file)
@@ -243,15 +243,16 @@ string const LaTeXFont::getAvailablePackage(bool dryrun)
 
 
 string const LaTeXFont::getPackageOptions(bool ot1, bool complete, bool sc, bool osf,
-                                         int scale, string const extraopts, bool nomath)
+                                         int scale, string const extraopts, bool nomath)
 {
        ostringstream os;
        bool const needosfopt = (osf != osfdefault_);
        bool const has_osf = providesOSF(ot1, complete, nomath);
        bool const has_sc = providesSC(ot1, complete, nomath);
+       bool const moreopts = providesMoreOptions(ot1, complete, nomath);
 
-       if (!packageoption_.empty())
-               os << to_ascii(packageoption_);
+       if (!packageoptions_.empty())
+               os << to_ascii(packageoptions_);
 
        if (sc && needosfopt && has_osf && has_sc) {
                if (!os.str().empty())
@@ -279,7 +280,7 @@ string const LaTeXFont::getPackageOptions(bool ot1, bool complete, bool sc, bool
                            convert<std::string>(float(scale) / 100));
        }
 
-       if (moreopts_ && !extraopts.empty()) {
+       if (moreopts && !extraopts.empty()) {
                if (!os.str().empty())
                        os << ',';
                os << extraopts;
@@ -289,7 +290,7 @@ string const LaTeXFont::getPackageOptions(bool ot1, bool complete, bool sc, bool
 
 
 string const LaTeXFont::getLaTeXCode(bool dryrun, bool ot1, bool complete, bool sc,
-                                    bool osf, bool nomath, string const extraopts,
+                                    bool osf, bool nomath, string const extraopts,
                                     int const & scale)
 {
        ostringstream os;
@@ -361,7 +362,7 @@ bool LaTeXFont::readFont(Lexer & lex)
                LF_OT1_FONT,
                LF_MOREOPTS,
                LF_PACKAGE,
-               LF_PACKAGEOPTION,
+               LF_PACKAGEOPTIONS,
                LF_PREAMBLE,
                LF_PROVIDES,
                LF_REQUIRES,
@@ -386,7 +387,7 @@ bool LaTeXFont::readFont(Lexer & lex)
                { "osfscoption",          LF_OSFSCOPTION },
                { "ot1font",              LF_OT1_FONT },
                { "package",              LF_PACKAGE },
-               { "packageoption",        LF_PACKAGEOPTION },
+               { "packageoptions",       LF_PACKAGEOPTIONS },
                { "preamble",             LF_PREAMBLE },
                { "provides",             LF_PROVIDES },
                { "requires",             LF_REQUIRES },
@@ -460,8 +461,8 @@ bool LaTeXFont::readFont(Lexer & lex)
                case LF_PACKAGE:
                        lex >> package_;
                        break;
-               case LF_PACKAGEOPTION:
-                       lex >> packageoption_;
+               case LF_PACKAGEOPTIONS:
+                       lex >> packageoptions_;
                        break;
                case LF_PREAMBLE:
                        preamble_ = lex.getLongString(from_ascii("EndPreamble"));