X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FPDFOptions.cpp;h=436e8f2e195e5de5e123cba0a288ff3f62ec0427;hb=1e190a2af27ca99831f51567c16e6b39bf4317c3;hp=1cf32acda40a9aada630a2dfe3d16249bd96a81f;hpb=69232e36320eea1cc44b3f29ca2902704f3d24de;p=lyx.git diff --git a/src/PDFOptions.cpp b/src/PDFOptions.cpp index 1cf32acda4..436e8f2e19 100644 --- a/src/PDFOptions.cpp +++ b/src/PDFOptions.cpp @@ -89,10 +89,9 @@ void PDFOptions::writeFile(ostream & os) const } -int PDFOptions::writeLaTeX(OutputParams & runparams, odocstream & os, +void PDFOptions::writeLaTeX(OutputParams & runparams, otexstream & os, bool hyperref_already_provided) const { - int lines = 0; // FIXME Unicode string opt; string hyperset; @@ -174,14 +173,11 @@ int PDFOptions::writeLaTeX(OutputParams & runparams, odocstream & os, opt = "\\hypersetup{" + opt + hyperset + "}\n"; } - lines = int(count(opt.begin(), opt.end(), '\n')); - // hyperref expects utf8! if (need_unicode && enc && enc->iconvName() != "UTF-8" &&!runparams.isFullUnicode()) { os << "\\inputencoding{utf8}\n" << setEncoding("UTF-8"); - ++lines; } // FIXME: handle the case that hyperref is loaded by the document class and // hyperset is empty, see bug #7048 @@ -192,9 +188,7 @@ int PDFOptions::writeLaTeX(OutputParams & runparams, odocstream & os, &&!runparams.isFullUnicode()) { os << setEncoding(enc->iconvName()) << "\\inputencoding{" << from_ascii(enc->latexName()) << "}\n"; - ++lines; } - return lines; }