diff --git a/ChangeLog b/ChangeLog index e1bf1099d4..35507e1ccd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,29 @@ +1999-11-25 Jean-Marc Lasgouttes + + * NEWS: updated for the future 1.1.3 release. + + * src/mathed/symbol_def.h: swap the definitions of \varepsilon and + \epsilon. Now \epsilon shows as red text, and \varepsilon shows as + it should. This is of course a controversial change (since many + people will find that their lyx workscreen is suddenly full of + red), but done for the sake of correctness. + + * src/mathed/formulamacro.h, src/mathed/math_macro.[Ch], + src/mathed/math_root.[Ch] (Clone): return a MathedInset* + + * src/insets/inseterror.h, src/insets/inseturl.h, + src/insets/insetinfo.h, src/insets/figinset.h, + src/mathed/formulamacro.h, src/mathed/math_macro.h + (EditMessage): add a missing const and add _() to make sure that + translation happens + + * src/ImportNoweb.C, src/LyXAction.h, src/insets/figinset.C, + src/insets/insetbib.C, src/support/filetools.C: add `using' + directives for cxx. + + * src/lyxfunc.C (Dispatch): make sure nothing bad happens when + doing 'Insert index of last word' at the beginning of a paragraph. + 1999-11-24 Lars Gullik Bjønnes * several files: white-space changes. @@ -161,7 +187,7 @@ 1999-11-17 Jean-Marc Lasgouttes - * src/buffer.C (writeFile): Do not output a comment givinf user + * src/buffer.C (writeFile): Do not output a comment giving user and date at the beginning of a .lyx file. This is useless and annoys cvs anyway; update version number to 1.1. @@ -328,7 +354,7 @@ not a pointer to one, some changes because of this. * src/LaTeXFeatures.C (getTClassPreamble): also use the - information in layout when addint he layouts preamble to the + information in layout when adding the layouts preamble to the textclass preamble. * src/LaTeXFeatures.h: use a vector to store the layout diff --git a/NEWS b/NEWS index 1ccc6dbd61..d5c71614e8 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,34 @@ +What's new in LyX version 1.1.3? +-------------------------------- + +More LyX internals have been cleaned-up in this version, but the usual +small number of user-visible changes have appeared: + +- LyX is not able anymore to read some old files [Lars, I need more + info please] + +- The first line of a .lyx file does not contain anymore the file + creator name and the date of creation; this was causing various + problems. + +- The screen representations of \varepsilon and \epsilon have been + swapped. Now \epsilon shows as red text, and \varepsilon shows as it + should. This is of course a controversial change (since many people + will find that their lyx workscreen is suddenly full of red), but done + for the sake of correctness. + +- The characters \angle and \vee are now correctly displayed in math + formulas; the glyph for \Upsilon has been changed. + +- Characters '~' and '^' are now output using standard LaTeX macros, + which improves the result with T1 fonts. + +- new function "command-sequence" to bind several sequences to a key. + +- The textclass g-brief has been updated. + +And of course many bugs have been fixed. + What's new in LyX version 1.1.2? -------------------------------- @@ -13,7 +44,7 @@ Moreover, a couple of semi-serious bugs have been fixed: - the annoying '-' vs. '_' bug. -Also the cheaders files was missing from the 1.1.1 distribution, that +Also the cheaders files were missing from the 1.1.1 distribution, that has also been fixed. What's new in LyX version 1.1.1? diff --git a/src/ImportNoweb.C b/src/ImportNoweb.C index 4748e5aaf4..9657530c86 100644 --- a/src/ImportNoweb.C +++ b/src/ImportNoweb.C @@ -18,6 +18,7 @@ #endif #include +using std::ifstream; #include "ImportNoweb.h" #include "lyxrc.h" diff --git a/src/LyXAction.h b/src/LyXAction.h index a5e65c895d..9e3bc6f346 100644 --- a/src/LyXAction.h +++ b/src/LyXAction.h @@ -7,6 +7,9 @@ #endif #include +using std::map; +using std::less; + #include "commandtags.h" #include "LString.h" diff --git a/src/insets/figinset.C b/src/insets/figinset.C index 9c4332024b..e8ce31c316 100644 --- a/src/insets/figinset.C +++ b/src/insets/figinset.C @@ -40,6 +40,7 @@ extern long int background_pixels; #include #include #include +using std::ofstream; #include "form1.h" #include "figinset.h" diff --git a/src/insets/figinset.h b/src/insets/figinset.h index 63af2ecbbb..a69f401f8e 100644 --- a/src/insets/figinset.h +++ b/src/insets/figinset.h @@ -47,7 +47,7 @@ public: void Validate(LaTeXFeatures & features) const; /// what appears in the minibuffer when opening - char const * EditMessage() { return "Opened figure"; } + char const * EditMessage() const { return _("Opened figure"); } /// void Edit(int, int); /// diff --git a/src/insets/insetbib.C b/src/insets/insetbib.C index b56a09fc45..f86e7b37d4 100644 --- a/src/insets/insetbib.C +++ b/src/insets/insetbib.C @@ -2,6 +2,8 @@ #include #include +using std::ifstream; + #include #ifdef __GNUG__ diff --git a/src/insets/inseterror.h b/src/insets/inseterror.h index bac06ad71e..112a4ab36b 100644 --- a/src/insets/inseterror.h +++ b/src/insets/inseterror.h @@ -56,7 +56,7 @@ public: /// bool AutoDelete() const; /// what appears in the minibuffer when opening - char const * EditMessage() {return _("Opened error");} + char const * EditMessage() const {return _("Opened error");} /// void Edit(int, int); /// diff --git a/src/insets/insetinfo.h b/src/insets/insetinfo.h index 371375c375..5095808f23 100644 --- a/src/insets/insetinfo.h +++ b/src/insets/insetinfo.h @@ -57,7 +57,7 @@ public: /// int DocBook(string & file); /// what appears in the minibuffer when opening - char const * EditMessage() {return "Opened note";} + char const * EditMessage() const {return _("Opened note");} /// void Edit(int, int); /// diff --git a/src/insets/inseturl.h b/src/insets/inseturl.h index aaf410b59c..bce2121fdd 100644 --- a/src/insets/inseturl.h +++ b/src/insets/inseturl.h @@ -58,7 +58,7 @@ public: return 1; } /// - char const * EditMessage() {return "Opened Url";} + char const * EditMessage() const {return _("Opened Url");} /// bool display() const { return false; } /// diff --git a/src/lyxfunc.C b/src/lyxfunc.C index d674a6dd87..06980bb084 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -2277,6 +2277,10 @@ string LyXFunc::Dispatch(int ac, case LFUN_INDEX_INSERT: case LFUN_INDEX_INSERT_LAST: { + // Can't do that at the beginning of a paragraph. + if (owner->buffer()->text->cursor.pos - 1 <0) + break; + InsetIndex * new_inset = new InsetIndex(); if (!argument.empty()) { string lsarg(argument); @@ -2285,18 +2289,11 @@ string LyXFunc::Dispatch(int ac, } else { //reh 98/09/21 //get the current word for an argument - - - // grab a word - LyXParagraph::size_type lastpos = owner->buffer()->text->cursor.pos - 1; - // If this can't happen, let's make sure that it really don't - Assert(owner->buffer()->text->cursor.pos - 1 >= 0); - // get the current word - // note that this must be done before - // inserting the inset, or the inset will break - // the word + // Get the current word. note that this must be done + // before inserting the inset, or the inset will + // break the word string curstring(owner->buffer() ->text->cursor.par->GetWord(lastpos)); diff --git a/src/mathed/formulamacro.h b/src/mathed/formulamacro.h index 3763752dae..ed32c0c39a 100644 --- a/src/mathed/formulamacro.h +++ b/src/mathed/formulamacro.h @@ -59,7 +59,7 @@ public: Inset * Clone() const; /// what appears in the minibuffer when opening - char const * EditMessage() {return "Math macro editor mode";} + char const * EditMessage() const {return _("Math macro editor mode");} /// void Edit(int x, int y); /// diff --git a/src/mathed/math_macro.C b/src/mathed/math_macro.C index 50fef2bfc9..0a269752cb 100644 --- a/src/mathed/math_macro.C +++ b/src/mathed/math_macro.C @@ -101,7 +101,7 @@ MathMacro::~MathMacro() } -MathMacro * MathMacro::Clone() +MathedInset * MathMacro::Clone() { #if 0 MathMacro *m = new MathMacro(this); diff --git a/src/mathed/math_macro.h b/src/mathed/math_macro.h index ae2c0007eb..b603198859 100644 --- a/src/mathed/math_macro.h +++ b/src/mathed/math_macro.h @@ -47,7 +47,7 @@ class MathMacro: public MathParInset /// void Metrics(); /// - MathMacro * Clone(); + MathedInset * Clone(); /// void Write(FILE *); /// @@ -111,7 +111,7 @@ class MathMacroArgument: public MathParInset /// ~MathMacroArgument() { lyxerr << "help, destroyme!" << endl; } /// - MathMacroArgument * Clone() { return this; } + MathedInset * Clone() { return this; } /// void Metrics(); /// diff --git a/src/mathed/math_root.C b/src/mathed/math_root.C index 111d8dd81f..c40f005e2f 100644 --- a/src/mathed/math_root.C +++ b/src/mathed/math_root.C @@ -35,7 +35,7 @@ MathRootInset::~MathRootInset() } -MathRootInset * MathRootInset::Clone() +MathedInset * MathRootInset::Clone() { MathRootInset * p = new MathRootInset(GetStyle()); MathedIter it(array), itr(uroot->GetData()); diff --git a/src/mathed/math_root.h b/src/mathed/math_root.h index 12b0dbd1f3..692c558e73 100644 --- a/src/mathed/math_root.h +++ b/src/mathed/math_root.h @@ -36,7 +36,7 @@ class MathRootInset: public MathSqrtInset { /// ~MathRootInset(); /// - MathRootInset * Clone(); + MathedInset * Clone(); /// void Draw(int x, int baseline); /// diff --git a/src/mathed/symbol_def.h b/src/mathed/symbol_def.h index 2434726dc8..b2d4ea9ff1 100644 --- a/src/mathed/symbol_def.h +++ b/src/mathed/symbol_def.h @@ -20,7 +20,7 @@ #define LM_beta 0x62 #define LM_gamma 0x67 #define LM_delta 0x64 -#define LM_epsilon 0x65 +#define LM_varepsilon 0x65 #define LM_eta 0x68 #define LM_theta 0x71 #define LM_vartheta 0x4a @@ -115,7 +115,7 @@ // Symbols that don't exist in X11 symbol font enum Math_Symbols_enum { LM_NoFont = 256, - LM_varepsilon, + LM_epsilon, LM_hookleftarrow, LM_hookrightarrow, LM_updownarrow, LM_leftharpoonup, LM_rightharpoonup, LM_rightleftharpoons, LM_Updownarrow, LM_leftharpoondown, LM_rightharpoondown, LM_mapsto, LM_Longleftarrow, diff --git a/src/support/filetools.C b/src/support/filetools.C index 20d7823ea8..e8baacf306 100644 --- a/src/support/filetools.C +++ b/src/support/filetools.C @@ -17,7 +17,9 @@ #include #include -#include +#include +using std::make_pair; +using std::pair; #ifdef __GNUG__ #pragma implementation "filetools.h" @@ -49,8 +51,6 @@ # endif #endif -using std::make_pair; - extern string system_lyxdir; extern string build_lyxdir; extern string user_lyxdir;