Three patches from Angus (make LyXGUI::lyxViews private), Dekel (fix

fragile macros in math formulas) and Dekel (add a GUI for setting language).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@678 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2000-04-17 14:00:18 +00:00
parent 7f1be334f1
commit c10a9001c8
19 changed files with 1405 additions and 1288 deletions

View File

@ -1,3 +1,29 @@
2000-04-17 Dekel Tsur <dekel@math.tau.ac.il>
* forms/layout_forms.fd
* src/layout_forms.h
* src/layout_forms.C (create_form_form_character)
* src/lyx_cb.C (UserFreeFont)
* src/lyx_gui.C (create_forms): Added GUI support for multi-lingual
documents (in the layout->character popup).
2000-04-17 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* src/spellchecker.C (create_ispell_pipe): fix a bug where
\spell_command was in fact not honored (from Kevin Atkinson).
* src/lyx_gui.C (~LyXGUI): make sure lyxViews is deleted when
quitting (Angus)
* src/lyx_gui.h: make lyxViews private (Angus)
2000-04-15 Dekel Tsur <dekel@math.tau.ac.il>
* src/mathed/math_write.C
(MathMatrixInset::Write) Put \protect before \begin{array} and
\end{array} if fragile
(MathParInset::Write): Put \protect before \\ if fragile
2000-04-14 Lars Gullik Bjřnnes <larsbj@lyx.org>
* src/WorkArea.C (work_area_handler): call BufferView::enterView

View File

@ -1,3 +1,7 @@
2000-04-17 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* fi.po: update from Pauli Virtanen
2000-03-10 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* es.po: bugfix from Jose M. Alcaide

2472
po/fi.po

File diff suppressed because it is too large Load Diff

View File

@ -196,16 +196,16 @@ FD_form_character *create_form_form_character(void)
FL_OBJECT *obj;
FD_form_character *fdui = (FD_form_character *) fl_calloc(1, sizeof(FD_form_character));
fdui->form_character = fl_bgn_form(FL_NO_BOX, 300, 375);
obj = fl_add_box(FL_UP_BOX, 0, 0, 300, 375, "");
fdui->form_character = fl_bgn_form(FL_NO_BOX, 300, 415);
obj = fl_add_box(FL_UP_BOX, 0, 0, 300, 415, "");
fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast);
obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 280, 280, 45, "");
obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 320, 280, 45, "");
fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
fl_set_object_resize(obj, FL_RESIZE_X);
obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 220, 280, 45, "");
obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 260, 280, 45, "");
fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
fl_set_object_resize(obj, FL_RESIZE_X);
obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 10, 280, 195, "");
obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 10, 280, 235, "");
fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
fl_set_object_resize(obj, FL_RESIZE_X);
fdui->choice_family = obj = fl_add_choice(FL_NORMAL_CHOICE, 94, 15, 191, 30, idex(_("Family:|#F")));fl_set_button_shortcut(obj, scex(_("Family:|#F")), 1);
@ -223,21 +223,21 @@ FD_form_character *create_form_form_character(void)
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
fl_set_object_resize(obj, FL_RESIZE_X);
fdui->choice_size = obj = fl_add_choice(FL_NORMAL_CHOICE, 95, 230, 191, 30, idex(_("Size:|#Z")));fl_set_button_shortcut(obj, scex(_("Size:|#Z")), 1);
fdui->choice_size = obj = fl_add_choice(FL_NORMAL_CHOICE, 95, 270, 191, 30, idex(_("Size:|#Z")));fl_set_button_shortcut(obj, scex(_("Size:|#Z")), 1);
fl_set_object_boxtype(obj, FL_FRAME_BOX);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
fl_set_object_resize(obj, FL_RESIZE_X);
fdui->choice_bar = obj = fl_add_choice(FL_NORMAL_CHOICE, 95, 290, 190, 30, idex(_("Misc:|#M")));fl_set_button_shortcut(obj, scex(_("Misc:|#M")), 1);
fdui->choice_bar = obj = fl_add_choice(FL_NORMAL_CHOICE, 95, 330, 190, 30, idex(_("Misc:|#M")));fl_set_button_shortcut(obj, scex(_("Misc:|#M")), 1);
fl_set_object_boxtype(obj, FL_FRAME_BOX);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
fl_set_object_resize(obj, FL_RESIZE_X);
fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 60, 330, 80, 30, idex(_("Apply|#A")));fl_set_button_shortcut(obj, scex(_("Apply|#A")), 1);
fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 60, 370, 80, 30, idex(_("Apply|#A")));fl_set_button_shortcut(obj, scex(_("Apply|#A")), 1);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
fl_set_object_callback(obj, CharacterApplyCB, 0);
fdui->button_close = obj = fl_add_button(FL_RETURN_BUTTON, 175, 330, 80, 30, _("Close"));
fdui->button_close = obj = fl_add_button(FL_RETURN_BUTTON, 175, 370, 80, 30, _("Close"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
fl_set_object_callback(obj, CharacterCloseCB, 0);
@ -246,15 +246,20 @@ FD_form_character *create_form_form_character(void)
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
fl_set_object_resize(obj, FL_RESIZE_X);
fdui->check_toggle_all = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 30, 175, 260, 25, idex(_("Toggle on all these|#T")));fl_set_button_shortcut(obj, scex(_("Toggle on all these|#T")), 1);
fdui->choice_language = obj = fl_add_box(FL_FRAME_BOX,95,175,191,30,_("Language:"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_lalign(obj, FL_ALIGN_LEFT);
fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
fl_set_object_resize(obj, FL_RESIZE_NONE);
fdui->check_toggle_all = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 30, 215, 260, 25, idex(_("Toggle on all these|#T")));fl_set_button_shortcut(obj, scex(_("Toggle on all these|#T")), 1);
fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
fl_set_object_resize(obj, FL_RESIZE_X);
obj = fl_add_text(FL_NORMAL_TEXT, 20, 210, 210, 20, _("These are never toggled"));
obj = fl_add_text(FL_NORMAL_TEXT, 20, 250, 210, 20, _("These are never toggled"));
fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
fl_set_object_resize(obj, FL_RESIZE_X);
obj = fl_add_text(FL_NORMAL_TEXT, 20, 270, 215, 20, _("These are always toggled"));
obj = fl_add_text(FL_NORMAL_TEXT, 20, 310, 215, 20, _("These are always toggled"));
fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);

View File

@ -117,6 +117,7 @@ typedef struct {
FL_OBJECT *button_apply;
FL_OBJECT *button_close;
FL_OBJECT *choice_color;
FL_OBJECT *choice_language;
FL_OBJECT *check_toggle_all;
} FD_form_character;

View File

@ -56,6 +56,7 @@ using std::istream_iterator;
using std::pair;
extern Combox * combo_language;
extern Combox * combo_language2;
extern BufferList bufferlist;
extern void show_symbols_form();
extern FD_form_title * fd_form_title;
@ -2059,6 +2060,14 @@ LyXFont UserFreeFont()
case 11: font.setColor(LColor::inherit); break;
}
string language = combo_language2->getline();
Languages::iterator lit = languages.find(language);
if (lit != languages.end())
font.setLanguage(&(*lit).second);
else
font.setLanguage(ignore_language);
return font;
}
@ -2227,6 +2236,7 @@ extern "C" void CharacterApplyCB(FL_OBJECT *, long)
// all other uses of ToggleAndShow() (JMarc)
toggleall = fl_get_button(fd_form_character->check_toggle_all);
ToggleAndShow(current_view, UserFreeFont());
current_view->setState();
toggleall = true;
}

View File

@ -67,6 +67,7 @@ FD_form_ref * fd_form_ref;
FD_LaTeXOptions * fd_latex_options; // from latexoptions.h
FD_LaTeXLog * fd_latex_log; // from latexoptions.h
Combox * combo_language;
Combox * combo_language2;
extern LyXServer * lyxserver;
extern bool finished; // flag, that we are quitting the program
@ -154,7 +155,7 @@ extern "C" int LyX_XErrHandler(Display * display, XErrorEvent * xeev)
LyXGUI::LyXGUI(LyX * owner, int * argc, char * argv[], bool GUI)
: _owner(owner)
: _owner(owner), lyxViews(0)
{
gui = GUI;
if (!gui)
@ -198,6 +199,8 @@ LyXGUI::~LyXGUI()
// here. asierra-970604
delete lyxserver;
lyxserver = 0;
delete lyxViews;
lyxViews = 0;
CloseLyXLookup();
}
@ -393,6 +396,12 @@ void LyXGUI::create_forms()
fl_set_form_minsize(fd_form_character->form_character,
fd_form_character->form_character->w,
fd_form_character->form_character->h);
fl_addto_form(fd_form_character->form_character);
combo_language2 = new Combox(FL_COMBOX_DROPLIST);
FL_OBJECT * ob = fd_form_character->choice_language;
combo_language2->add(ob->x, ob->y, ob->w, ob->h, 250);
combo_language2->shortcut("#L", 1);
fl_end_form();
// the document form
fd_form_document = create_form_form_document();
@ -409,17 +418,20 @@ void LyXGUI::create_forms()
fl_set_counter_precision(fd_form_document->slider_tocdepth, 0);
fl_addto_form(fd_form_document->form_document);
combo_language = new Combox(FL_COMBOX_DROPLIST);
FL_OBJECT * ob = fd_form_document->choice_language;
ob = fd_form_document->choice_language;
combo_language->add(ob->x, ob->y, ob->w, ob->h, 250);
combo_language->shortcut("#G", 1);
fl_end_form();
// "default" is not part of the languages array any more.
combo_language->addto("default");
combo_language2->addto("No change");
for(Languages::const_iterator cit = languages.begin();
cit != languages.end(); ++cit) {
combo_language->addto((*cit).second.lang.c_str());
combo_language2->addto((*cit).second.lang.c_str());
}
combo_language2->select_text("No change");
// not really necessary, but we can do it anyway.
fl_addto_choice(fd_form_document->choice_fontsize, "default|10|11|12");

View File

@ -51,9 +51,6 @@ public:
main initialization.
*/
void init();
///
LyXView *lyxViews; // or something so that several views
// on the same time can be allowed.
/// Register the buffer with the first fount LyXView in lyxViews
void regBuf(Buffer*);
@ -79,6 +76,9 @@ private:
//@{
/// The LyX that owns this GUI.
LyX *_owner;
///
LyXView *lyxViews; // or something so that several views
// on the same time can be allowed.
/// Do we have a gui?
bool gui;
//@}

View File

@ -289,14 +289,13 @@ void LyXFont::update(LyXFont const & newfont,
setNoun(setMisc(newfont.noun(), noun()));
setLatex(setMisc(newfont.latex(), latex()));
if (newfont.language() != ignore_language)
if (language() == newfont.language())
if (language() == document_language)
setLanguage(default_language);
else
setLanguage(document_language);
if (newfont.language() == language() && toggleall)
if (language() == document_language)
setLanguage(default_language);
else
setLanguage(newfont.language());
setLanguage(document_language);
else if (newfont.language() != ignore_language)
setLanguage(newfont.language());
if (newfont.color() == color() && toggleall)
setColor(LColor::inherit); // toggle 'back'

View File

@ -318,7 +318,7 @@ int InsetFormula::Latex(ostream & os, signed char fragile, bool) const
//#warning Alejandro, the number of lines is not returned in this case
// This problem will disapear at 0.13.
if (fragile < 0)
par->Write(os);
par->Write(os, fragile);
else
mathed_write(par, os, &ret, fragile, label.c_str());
return ret;

View File

@ -69,16 +69,15 @@ Inset * InsetFormulaMacro::Clone() const
void InsetFormulaMacro::Write(ostream & os) const
{
os << "FormulaMacro ";
Latex(os, 0, false);
tmacro->WriteDef(os, 0);
}
int InsetFormulaMacro::Latex(ostream & os, signed char /*fragile*/,
bool /*free_spacing*/) const
{
int ret = 1;
tmacro->WriteDef(os);
return ret;
tmacro->WriteDef(os, 1);
return 1;
}

View File

@ -231,7 +231,7 @@ class MathedInset {
virtual void draw(Painter &, int x, int baseline) = 0;
/// Write LaTeX and Lyx code
virtual void Write(std::ostream &) = 0;
virtual void Write(std::ostream &, signed char fragile) = 0;
/// Reproduces itself
virtual MathedInset * Clone() = 0;
@ -329,7 +329,7 @@ class MathParInset: public MathedInset {
virtual void draw(Painter &, int x, int baseline);
/// Write LaTeX code
virtual void Write(std::ostream &);
virtual void Write(std::ostream &, signed char fragile);
///
virtual void Metrics();
@ -488,7 +488,7 @@ class MathMatrixInset: public MathParInset {
///
void draw(Painter &, int, int);
///
void Write(std::ostream &);
void Write(std::ostream &, signed char fragile);
///
void Metrics();
///
@ -535,7 +535,7 @@ class MathMatrixInset: public MathParInset {
LyxArrayBase * mathed_parse(unsigned flags, LyxArrayBase * data,
MathParInset ** mt);
///
void mathed_write(MathParInset *, std::ostream &, int *, char fragile,
void mathed_write(MathParInset *, std::ostream &, int *, signed char fragile,
char const * label = 0);
///

View File

@ -46,7 +46,7 @@ public:
///
void draw(Painter &, int, int);
///
void Write(std::ostream &);
void Write(std::ostream &, signed char fragile);
///
void Metrics();
///
@ -75,7 +75,7 @@ public:
///
void draw(Painter &, int, int);
///
void Write(std::ostream &);
void Write(std::ostream &, signed char fragile);
///
void Metrics();
///
@ -105,7 +105,7 @@ public:
///
void draw(Painter &, int, int);
///
void Write(std::ostream &);
void Write(std::ostream &, signed char fragile);
///
void Metrics();
protected:
@ -124,7 +124,7 @@ public:
///
void draw(Painter &, int, int);
///
void Write(std::ostream &);
void Write(std::ostream &, signed char fragile);
///
inline void Metrics();
///
@ -147,7 +147,7 @@ public:
///
void draw(Painter &, int, int);
///
void Write(std::ostream &);
void Write(std::ostream &, signed char fragile);
///
void Metrics();
///
@ -174,7 +174,7 @@ public:
///
void draw(Painter &, int x, int baseline);
///
void Write(std::ostream &);
void Write(std::ostream &, signed char fragile);
///
void Metrics();
///
@ -197,7 +197,7 @@ public:
///
void draw(Painter &, int x, int baseline);
///
void Write(std::ostream &);
void Write(std::ostream &, signed char fragile);
///
void Metrics();
@ -243,7 +243,7 @@ public:
///
void draw(Painter &, int, int);
///
void Write(std::ostream &);
void Write(std::ostream &, signed char fragile);
///
void Metrics();
protected:
@ -264,7 +264,7 @@ public:
///
void draw(Painter &, int, int);
///
void Write(std::ostream &);
void Write(std::ostream &, signed char fragile);
///
void Metrics();
///
@ -297,7 +297,7 @@ bool MathFuncInset::GetLimits() const
inline
void MathFuncInset::Write(std::ostream & os)
void MathFuncInset::Write(std::ostream & os, signed char /* fragile */)
{
os << "\\" << name << ' ';
}

View File

@ -158,13 +158,13 @@ void MathMacro::SetFocus(int x, int y)
}
void MathMacro::Write(ostream & os)
void MathMacro::Write(ostream & os, signed char fragile)
{
if (tmplate->flags & MMF_Exp) {
lyxerr[Debug::MATHED] << "Expand " << tmplate->flags
<< ' ' << MMF_Exp << endl;
tmplate->update(this);
tmplate->Write(os);
tmplate->Write(os, fragile);
} else {
if (tmplate->flags & MMF_Env) {
os << "\\begin{"
@ -184,7 +184,7 @@ void MathMacro::Write(ostream & os)
for (int i = 0; i < nargs; ++i) {
array = args[i].array;
MathParInset::Write(os);
MathParInset::Write(os, fragile);
if (i < nargs - 1)
os << "}{";
}
@ -261,10 +261,10 @@ void MathMacroArgument::Metrics()
}
void MathMacroArgument::Write(ostream & os)
void MathMacroArgument::Write(ostream & os, signed char fragile)
{
if (expnd_mode) {
MathParInset::Write(os);
MathParInset::Write(os, fragile);
} else {
os << '#' << number << ' ';
}
@ -375,7 +375,7 @@ void MathMacroTemplate::update(MathMacro * macro)
}
void MathMacroTemplate::WriteDef(ostream & os)
void MathMacroTemplate::WriteDef(ostream & os, signed char fragile)
{
os << "\n\\newcommand{\\" << name << "}";
@ -387,7 +387,7 @@ void MathMacroTemplate::WriteDef(ostream & os)
for (int i = 0; i < nargs; ++i) {
args[i].setExpand(false);
}
Write(os);
Write(os, fragile);
os << "}\n";
}

View File

@ -51,7 +51,7 @@ public:
///
MathedInset * Clone();
///
void Write(std::ostream &);
void Write(std::ostream &, signed char fragile);
///
bool setArgumentIdx(int);
///
@ -118,7 +118,7 @@ public:
///
void draw(Painter &, int x, int baseline);
///
void Write(std::ostream &);
void Write(std::ostream &, signed char fragile);
///
void setNumber(int n) { number = n; }
/// Is expanded or not
@ -146,7 +146,7 @@ public:
///
void Metrics();
///
void WriteDef(std::ostream &);
void WriteDef(std::ostream &, signed char fragile);
/// useful for special insets
void setTCode(MathedTextCodes t) { tcode = t; }
///

View File

@ -137,11 +137,11 @@ void MathRootInset::SetFocus(int x, int)
}
void MathRootInset::Write(ostream & os)
void MathRootInset::Write(ostream & os, signed char fragile)
{
os << '\\' << name << '[';
uroot->Write(os);
uroot->Write(os, fragile);
os << "]{";
MathParInset::Write(os);
MathParInset::Write(os, fragile);
os << '}';
}

View File

@ -40,7 +40,7 @@ class MathRootInset: public MathSqrtInset {
///
void draw(Painter &, int x, int baseline);
///
void Write(std::ostream &);
void Write(std::ostream &, signed char fragile);
///
void Metrics();
///

View File

@ -45,7 +45,7 @@ char const * math_font_name[] = {
void
MathSpaceInset::Write(ostream & os)
MathSpaceInset::Write(ostream & os, signed char /* fragile */)
{
if (space >= 0 && space < 6) {
os << '\\' << latex_mathspace[space] << ' ';
@ -54,21 +54,21 @@ MathSpaceInset::Write(ostream & os)
void
MathDotsInset::Write(ostream & os)
MathDotsInset::Write(ostream & os, signed char /* fragile */)
{
os << '\\' << name << ' ';
}
void MathSqrtInset::Write(ostream & os)
void MathSqrtInset::Write(ostream & os, signed char fragile)
{
os << '\\' << name << '{';
MathParInset::Write(os);
MathParInset::Write(os, fragile);
os << '}';
}
void MathDelimInset::Write(ostream & os)
void MathDelimInset::Write(ostream & os, signed char fragile)
{
latexkeys * l = (left != '|') ? lm_get_key_by_id(left, LM_TK_SYM): 0;
latexkeys * r = (right != '|') ? lm_get_key_by_id(right, LM_TK_SYM): 0;
@ -82,7 +82,7 @@ void MathDelimInset::Write(ostream & os)
os << char(left) << ' ';
}
}
MathParInset::Write(os);
MathParInset::Write(os, fragile);
os << "\\right";
if (r) {
os << '\\' << r->name << ' ';
@ -96,16 +96,16 @@ void MathDelimInset::Write(ostream & os)
}
void MathDecorationInset::Write(ostream & os)
void MathDecorationInset::Write(ostream & os, signed char fragile)
{
latexkeys * l = lm_get_key_by_id(deco, LM_TK_WIDE);
os << '\\' << l->name << '{';
MathParInset::Write(os);
MathParInset::Write(os, fragile);
os << '}';
}
void MathAccentInset::Write(ostream & os)
void MathAccentInset::Write(ostream & os, signed char fragile)
{
latexkeys * l = lm_get_key_by_id(code, LM_TK_ACCENT);
os << '\\' << l->name;
@ -115,7 +115,7 @@ void MathAccentInset::Write(ostream & os)
os << ' ';
if (inset) {
inset->Write(os);
inset->Write(os, fragile);
} else {
if (fn>= LM_TC_RM && fn<= LM_TC_TEXTRM) {
os << '\\'
@ -139,7 +139,7 @@ void MathAccentInset::Write(ostream & os)
}
void MathBigopInset::Write(ostream & os)
void MathBigopInset::Write(ostream & os, signed char /* fragile */)
{
bool limp = GetLimits();
@ -157,17 +157,17 @@ void MathBigopInset::Write(ostream & os)
}
void MathFracInset::Write(ostream & os)
void MathFracInset::Write(ostream & os, signed char fragile)
{
os << '\\' << name << '{';
MathParInset::Write(os);
MathParInset::Write(os, fragile);
os << "}{";
den->Write(os);
den->Write(os, fragile);
os << '}';
}
void MathParInset::Write(ostream & os)
void MathParInset::Write(ostream & os, signed char fragile)
{
if (!array) return;
int brace = 0;
@ -228,7 +228,7 @@ void MathParInset::Write(ostream & os)
os << "^{";
if (cx == LM_TC_DOWN)
os << "_{";
p->Write(os);
p->Write(os, fragile);
if (cx == LM_TC_UP || cx == LM_TC_DOWN)
os << '}';
data.Next();
@ -253,6 +253,8 @@ void MathParInset::Write(ostream & os)
}
crow = crow->getNext();
}
if (fragile)
os << "\\protect";
os << "\\\\\n";
++number_of_newlines;
data.Next();
@ -286,9 +288,11 @@ void MathParInset::Write(ostream & os)
}
void MathMatrixInset::Write(ostream & os)
void MathMatrixInset::Write(ostream & os, signed char fragile)
{
if (GetType() == LM_OT_MATRIX){
if (fragile)
os << "\\protect";
os << "\\begin{"
<< name
<< '}';
@ -302,9 +306,12 @@ void MathMatrixInset::Write(ostream & os)
<< "}\n";
++number_of_newlines;
}
MathParInset::Write(os);
MathParInset::Write(os, fragile);
if (GetType() == LM_OT_MATRIX){
os << "\n\\end{"
os << "\n";
if (fragile)
os << "\\protect";
os << "\\end{"
<< name
<< '}';
++number_of_newlines;
@ -313,7 +320,7 @@ void MathMatrixInset::Write(ostream & os)
void mathed_write(MathParInset * p, ostream & os, int * newlines,
char fragile, char const * label)
signed char fragile, char const * label)
{
number_of_newlines = 0;
short mathed_env = p->GetType();
@ -358,7 +365,7 @@ void mathed_write(MathParInset * p, ostream & os, int * newlines,
++number_of_newlines;
}
p->Write(os);
p->Write(os, fragile);
if (mathed_env == LM_EN_INTEXT){
if (fragile) os << "\\protect";

View File

@ -337,7 +337,7 @@ void create_ispell_pipe(BufferParams const & params, string const & lang)
argv[argc++] = 0;
execvp("ispell", const_cast<char * const *>(argv));
execvp(argv[0], const_cast<char * const *>(argv));
// free the memory used by string::copy in the
// setup of argv