mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
consolidate some code into one function
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6075 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ae87b94515
commit
84b3737805
@ -1,3 +1,7 @@
|
||||
2003-02-08 John Levon <levon@movementarian.org>
|
||||
|
||||
* LaTeX.C: consolidate code into showRunMessage() helper
|
||||
|
||||
2003-02-08 John Levon <levon@movementarian.org>
|
||||
|
||||
* lyxfind.C:
|
||||
|
42
src/LaTeX.C
42
src/LaTeX.C
@ -70,6 +70,21 @@ using boost::cmatch;
|
||||
|
||||
extern BufferList bufferlist;
|
||||
|
||||
namespace {
|
||||
|
||||
void showRunMessage(LyXFunc * lf, unsigned int count)
|
||||
{
|
||||
ostringstream str;
|
||||
#if USE_BOOST_FORMAT
|
||||
str << boost::format(_("Waiting for LaTeX run number %1$d")) % count;
|
||||
#else
|
||||
str << _("Waiting for LaTeX run number ") << count;
|
||||
#endif
|
||||
lf->dispatch(FuncRequest(LFUN_MESSAGE, STRCONV(str.str())));
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
/*
|
||||
* CLASS TEXERRORS
|
||||
*/
|
||||
@ -141,7 +156,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun)
|
||||
bool rerun = false; // rerun requested
|
||||
|
||||
// The class LaTeX does not know the temp path.
|
||||
bufferlist.updateIncludedTeXfiles(lyx::getcwd()); //GetCWD());
|
||||
bufferlist.updateIncludedTeXfiles(lyx::getcwd());
|
||||
|
||||
// Never write the depfile if an error was encountered.
|
||||
|
||||
@ -202,13 +217,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun)
|
||||
++count;
|
||||
lyxerr[Debug::LATEX] << "Run #" << count << endl;
|
||||
if (lfun) {
|
||||
ostringstream str;
|
||||
#if USE_BOOST_FORMAT
|
||||
str << boost::format(_("LaTeX run number %1$d")) % count;
|
||||
#else
|
||||
str << _("LaTeX run number ") << count;
|
||||
#endif
|
||||
lfun->dispatch(FuncRequest(LFUN_MESSAGE, STRCONV(str.str())));
|
||||
showRunMessage(lfun, count);
|
||||
}
|
||||
|
||||
this->operator()();
|
||||
@ -291,14 +300,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun)
|
||||
lyxerr[Debug::LATEX]
|
||||
<< "Run #" << count << endl;
|
||||
if (lfun) {
|
||||
ostringstream str;
|
||||
#if USE_BOOST_FORMAT
|
||||
str << boost::format(_("LaTeX run number %1$d")) % count;
|
||||
#else
|
||||
str << _("LaTeX run number ") << count;
|
||||
#endif
|
||||
// check lyxstring string stream and gcc 3.1 before fixing
|
||||
lfun->dispatch(FuncRequest(LFUN_MESSAGE, STRCONV(str.str())));
|
||||
showRunMessage(lfun, count);
|
||||
}
|
||||
|
||||
this->operator()();
|
||||
@ -352,13 +354,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun)
|
||||
++count;
|
||||
lyxerr[Debug::LATEX] << "Run #" << count << endl;
|
||||
if (lfun) {
|
||||
ostringstream str;
|
||||
#if USE_BOOST_FORMAT
|
||||
str << boost::format(_("LaTeX run number %1$d")) % count;
|
||||
#else
|
||||
str << _("LaTeX run number ") << count;
|
||||
#endif
|
||||
lfun->dispatch(FuncRequest(LFUN_MESSAGE, STRCONV(str.str())));
|
||||
showRunMessage(lfun, count);
|
||||
}
|
||||
|
||||
this->operator()();
|
||||
|
Loading…
Reference in New Issue
Block a user