enable buffer-export without loading the GUI.

* lyx_main.C:
  - parse_export(): set lyx::use_gui to false.

* MathFactory.C:
  - initMath(): initSymbols() only if lyx::use_gui is true.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15327 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2006-10-13 21:27:55 +00:00
parent a897cda71c
commit dcfd6e5a99
2 changed files with 6 additions and 2 deletions

View File

@ -1036,7 +1036,7 @@ int parse_export(string const & type, string const &)
exit(1);
}
batch = "buffer-export " + type;
lyx::use_gui = true;
lyx::use_gui = false;
return 1;
}

View File

@ -74,6 +74,9 @@ using std::istringstream;
bool has_math_fonts;
namespace lyx {
extern bool use_gui;
}
namespace {
@ -227,7 +230,8 @@ void initMath()
if (!initialized) {
initialized = true;
initParser();
initSymbols();
if (lyx::use_gui)
initSymbols();
}
}