* src/BufferParams.{cpp, h}

* src/graphics/PreviewLoader.cpp:
	- make member writeEncodingPreamble void.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18543 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2007-05-28 12:25:53 +00:00
parent cf8d0ca56b
commit bd997f2cb9
3 changed files with 5 additions and 9 deletions

View File

@ -907,7 +907,7 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
} }
// handle inputenc etc. // handle inputenc etc.
os << writeEncodingPreamble(features, texrow); writeEncodingPreamble(os, features, texrow);
if (!listings_params.empty()) { if (!listings_params.empty()) {
os << "\\usepackage{listings}\n"; os << "\\usepackage{listings}\n";
@ -1369,11 +1369,9 @@ string const BufferParams::babelCall(string const & lang_opts) const
} }
docstring const BufferParams::writeEncodingPreamble(LaTeXFeatures & features, void BufferParams::writeEncodingPreamble(odocstream & os,
TexRow & texrow) const LaTeXFeatures & features, TexRow & texrow) const
{ {
odocstringstream os;
if (inputenc == "auto") { if (inputenc == "auto") {
string const doc_encoding = string const doc_encoding =
language->encoding()->latexName(); language->encoding()->latexName();
@ -1429,8 +1427,6 @@ docstring const BufferParams::writeEncodingPreamble(LaTeXFeatures & features,
os << "\\usepackage{armtex}\n"; os << "\\usepackage{armtex}\n";
texrow.newline(); texrow.newline();
} }
return os.str();
} }

View File

@ -254,7 +254,7 @@ public:
/// set up if and how babel is called /// set up if and how babel is called
std::string const babelCall(std::string const & lang_opts) const; std::string const babelCall(std::string const & lang_opts) const;
/// handle inputenc etc. /// handle inputenc etc.
docstring const writeEncodingPreamble(LaTeXFeatures & features, void writeEncodingPreamble(odocstream & os, LaTeXFeatures & features,
TexRow & texrow) const; TexRow & texrow) const;
/// set up the document fonts /// set up the document fonts
std::string const loadFonts(std::string const & rm, std::string const loadFonts(std::string const & rm,

View File

@ -594,7 +594,7 @@ void PreviewLoader::Impl::startLoading()
of << "\\batchmode\n"; of << "\\batchmode\n";
dumpPreamble(of); dumpPreamble(of);
// handle inputenc etc. // handle inputenc etc.
of << buffer_.params().writeEncodingPreamble(features, texrow); buffer_.params().writeEncodingPreamble(of, features, texrow);
of << "\n\\begin{document}\n"; of << "\n\\begin{document}\n";
dumpData(of, inprogress.snippets); dumpData(of, inprogress.snippets);
of << "\n\\end{document}\n"; of << "\n\\end{document}\n";