]> git.lyx.org Git - features.git/commitdiff
some source cleanup from John
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 1 Mar 2001 15:57:10 +0000 (15:57 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 1 Mar 2001 15:57:10 +0000 (15:57 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1654 a592a061-630c-0410-9148-cb99ea01b6c8

13 files changed:
lib/ChangeLog
lib/templates/g-brief-de.lyx
src/ChangeLog
src/buffer.C
src/intl.C
src/language.C
src/lyx_gui.C
src/lyx_gui_misc.C
src/lyx_main.C
src/paragraph.C
src/stl_string_fwd.h
src/tabular.C
src/tabular.h

index 5c22bc936eb7f644996706afc08d6dc1a6ac7347..d805662ac794ee517f3dab27db3d435ce36323a3 100644 (file)
@@ -1,3 +1,7 @@
+2001-03-01  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * templates/g-brief-de.lyx: fix typo.
+
 2001-02-16  John Levon  <moz@compsoc.man.ac.uk>
 
        * reLyX/Makefile.am: fix uninstall
index d286a8d28447b023d9130063ff2a4481731fa815..083cb1abf64c8de9df9d3edcf25ee581b5b3517c 100644 (file)
@@ -103,7 +103,7 @@ today
 Sehr geehrter Herr Beispiel,
 \layout Gruss
 
-Mit freunlichen Grüßen,
+Mit freundlichen Grüßen,
 \layout Brieftext
 
 seit der siebten Mieterhöhung im laufenden Jahr konnte ich keinen Zahlungseingan
index a2eb0050999385f9859aa014d2daedf1ec57e152..eb20f0c3171f88ffc8c732730fa8ada9cca38b27 100644 (file)
@@ -1,5 +1,24 @@
+2001-02-23  John Levon  <moz@compsoc.man.ac.uk>
+
+       * lyx_main.C: add ISO_Left_Tab as bind synonym for Tab
+
+       * stl_string_fwd.h: add comment
+
+       * lyx_gui_misc.C: killed ALWAYS_CLOSE_MATH_PANELS
+
+       * tabular.h:
+       * tabular.C: remove unused DocBook methods
+
+       * intl.C:
+       * language.C:
+       * paragraph.C:
+       * buffer.C:
+       killed DO_USE_DEFAULT_LANGUAGE
+
 2001-03-01  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
+       * lyx_gui.C: do not include language.h.
+
        * bufferview_funcs.C (ToggleAndShow): do not provide optional
        arguments in function implementation.
 
index 053bd43b41d2cc803560514c8af1bf43a8b07745..3fb4f234a3b3afef6bfa637da5a1c28da1696e74 100644 (file)
@@ -1678,9 +1678,6 @@ void Buffer::makeLaTeXFile(string const & fname,
                        features.UsedLanguages.insert(default_language);
 
                if (lyxrc.language_use_babel ||
-#ifdef DO_USE_DEFAULT_LANGUAGE
-                   params.language->lang() != "default" ||
-#endif
                    params.language->lang() != lyxrc.default_language ||
                    !features.UsedLanguages.empty()) {
                        use_babel = true;
@@ -2001,11 +1998,8 @@ void Buffer::makeLaTeXFile(string const & fname,
                texrow.newline();
        } // only_body
        lyxerr.debug() << "preamble finished, now the body." << endl;
-#ifdef DO_USE_DEFAULT_LANGUAGE
-       if (!lyxrc.language_auto_begin && params.language->lang() != "default") {
-#else
+
        if (!lyxrc.language_auto_begin) {
-#endif
                ofs << subst(lyxrc.language_command_begin, "$$lang",
                             params.language->babel())
                    << endl;
@@ -2018,11 +2012,7 @@ void Buffer::makeLaTeXFile(string const & fname,
        ofs << endl;
        texrow.newline();
 
-#ifdef DO_USE_DEFAULT_LANGUAGE
-       if (!lyxrc.language_auto_end && params.language->lang() != "default") {
-#else
-               if (!lyxrc.language_auto_end) {
-#endif
+       if (!lyxrc.language_auto_end) {
                ofs << subst(lyxrc.language_command_end, "$$lang",
                             params.language->babel())
                    << endl;
index 89141686266f3e6aaa314be151770350103cd0f8..b50580712e6c132116f6c1e033323a53732afad8 100644 (file)
@@ -289,12 +289,7 @@ void Intl::InitKeyMapper(bool on)
        fl_end_form();
 
        int n = 0;
-       // Default is not in the language map
-#ifdef DO_USE_DEFAULT_LANGUAGE
-       Language->addto("default");
-       Language2->addto("default");
-       ++n;
-#endif
+
        for (Languages::const_iterator cit = languages.begin();
             cit != languages.end(); ++cit) {
                Language->addto((*cit).second.lang());
index 6d58ee29cc821980c80b6ae97cabc11b55f9fea3..bc45d9e3119e0991948b45a44c699844d07f8d64 100644 (file)
@@ -76,11 +76,6 @@ void Languages::read(string const & filename)
                                              encoding, code, latex_options);
        }
 
-#ifdef DO_USE_DEFAULT_LANGUAGE
-       languagelist["default"] = Language("default", "default",
-                                          N_("Document wide language"),
-                                          false, &iso8859_1, "");
-#endif
        default_language = getLanguage(lyxrc.default_language);
        if (!default_language) {
                lyxerr << "Default language \"" << lyxrc.default_language
index 806372c37fe18f6389a4e1472f090c4d31c85a2f..cb58a866ea2daa2cd83e1d6f140b2ae7dda7273b 100644 (file)
@@ -38,7 +38,6 @@
 #include "lyxlookup.h"
 #endif
 #include "bufferlist.h"
-#include "language.h"
 #include "ColorHandler.h"
 #include "frontends/Dialogs.h"
 #include "frontends/GUIRunTime.h"
index 539a3b1d56bd21765942d7331777ba4bbfc43fae..091a11ee5499a6a5f72173c11da3732aecd63b8c 100644 (file)
@@ -151,7 +151,6 @@ void updateAllVisibleBufferRelatedDialogs(bool)
 {
        if (current_view->buffer() &&  current_view->buffer()->isReadonly()) {
                // a little crude perhaps but it works. ARRae
-#ifndef ALWAYS_CLOSE_MATH_PANELS
                // The math popups should be closed only if we switch
                // to a readonly buffer
                if (fd_panel) {
@@ -179,40 +178,7 @@ void updateAllVisibleBufferRelatedDialogs(bool)
                                fl_hide_form(fd_matrix->matrix);
                        }
                }
-#endif
-       }
-
-       // We have either changed buffers or changed the readonly status
-       // so the safest thing to do is hide all inset popups that
-       // are editting insets from the previous buffer or aren't
-       // allowed in readonly docs.
-#ifdef ALWAYS_CLOSE_MATH_PANELS
-       if (fd_panel) {
-               if (fd_panel->panel->visible) {
-                       fl_hide_form(fd_panel->panel);
-               }
-       }
-       if (fd_delim) {
-               if (fd_delim->delim->visible) {
-                       fl_hide_form(fd_delim->delim);
-               }
-       }
-       if (fd_deco) {
-               if (fd_deco->deco->visible) {
-                       fl_hide_form(fd_deco->deco);
-               }
-       }
-       if (fd_space) {
-               if (fd_space->space->visible) {
-                       fl_hide_form(fd_space->space);
-               }
        }
-       if (fd_matrix) {
-               if (fd_matrix->matrix->visible) {
-                       fl_hide_form(fd_matrix->matrix);
-               }
-       }
-#endif
        HideFiguresPopups();
 }
 
index b39866318f7e94ddd54957b89eec8894cb79966f..0a02da911d4a32d980d03851bcc620565cfc12e1 100644 (file)
@@ -467,6 +467,7 @@ void LyX::defaultKeyBindings(kb_keymap  * kbmap)
        kbmap->bind("Down", LFUN_DOWN);
        
        kbmap->bind("Tab", LFUN_TAB);
+       kbmap->bind("ISO_Left_Tab", LFUN_TAB); // jbl 2001-23-02
        
        kbmap->bind("Home", LFUN_HOME);
        kbmap->bind("End", LFUN_END);
@@ -505,6 +506,7 @@ void LyX::defaultKeyBindings(kb_keymap  * kbmap)
        
         kbmap->bind("C-Tab", LFUN_TABINSERT);  // ale970515
        kbmap->bind("S-Tab", LFUN_SHIFT_TAB);  // jug20000522
+       kbmap->bind("S-ISO_Left_Tab", LFUN_SHIFT_TAB); // jbl 2001-23-02
 }
 
 
index ad157534de40f6fb81c50fa17bd21079bf52ecdd..a17825476c65a166f6a23ddba048acc2e5826316 100644 (file)
@@ -3923,17 +3923,9 @@ LyXParagraph::getParLanguage(BufferParams const & bparams) const
                return FirstPhysicalPar()->getParLanguage(bparams);
        else
 #endif
-       if (size() > 0) {
-#ifdef DO_USE_DEFAULT_LANGUAGE
-               Language const * lang = GetFirstFontSettings().language();
-
-               if (lang->lang() == "default")
-                       return bparams.language;
-               return lang;
-#else
+       if (size() > 0)
                return GetFirstFontSettings().language();
-#endif
-       } else if (previous)
+       else if (previous)
                return previous->getParLanguage(bparams);
        else
                return bparams.language;
index f27ab3ab301003919510bc1bcb03dbf143982b4e..7b27436cc3475a6463b9e7f7956c6d32c45f849a 100644 (file)
 #ifndef LYX_STL_STRING_FWD_H
 #define LYX_STL_STRING_FWD_H
 
+/*
+ * This file exists to appease STLPort when using included lyxstring.
+ * It won't be around forever ...
+ */ 
 
 #ifndef USE_INCLUDED_STRING
 //   include the real stl_string_fwd.h
index dd2b168ee997b566d19ca9153a50984a6c1fd13e..5744600ad5db0dcd3d488f9b3f89b1d1087e0481 100644 (file)
@@ -1566,167 +1566,6 @@ void LyXTabular::OldFormatRead(LyXLex & lex, string const & fl)
 }
 
 
-string const LyXTabular::GetDocBookAlign(int cell, bool isColumn) const
-{
-    int const i = isColumn ? cell : column_of_cell(cell);
-       
-    if (!isColumn && IsMultiColumn(cell)) {
-       if (!cellinfo_of_cell(cell)->align_special.empty()) {
-           return cellinfo_of_cell(cell)->align_special;
-       } else {
-           switch (GetAlignment(cell)) {
-           case LYX_ALIGN_LEFT:
-               return "left";
-           case LYX_ALIGN_RIGHT:
-               return "right";
-           default:
-               return "center";
-           }
-       }
-    } else {
-       if (!column_info[i].align_special.empty()) {
-           return column_info[i].align_special;
-       }
-#ifdef IGNORE_THIS_FOR_NOW
-       else if (!column_info[i].p_width.empty()) {
-           file += "p{";
-           file += column_info[i].p_width;
-           file += '}';
-       }
-#endif
-       else {
-           switch (column_info[i].alignment) {
-           case LYX_ALIGN_LEFT:
-               return "left";
-           case LYX_ALIGN_RIGHT:
-               return "right";
-           default:
-               return "center";
-           }
-       }
-    }
-}
-
-
-// cell <0 will tex the preamble
-// returns the number of printed newlines
-int LyXTabular::DocBookEndOfCell(ostream & os, int cell, int & depth) const
-{
-    int ret = 0;
-    if (IsLastCell(cell)) {
-           os << newlineAndDepth(--depth)
-              << "</ENTRY>"
-              << newlineAndDepth(--depth)
-              << "</ROW>"
-              << newlineAndDepth(--depth)
-              << "</TBODY>"
-              << newlineAndDepth(--depth);
-        if (is_long_tabular)
-               os << "</TGROUP>";
-        else
-               os << "</TGROUP>"
-                  << newlineAndDepth(--depth);
-        ret += 4;
-    } else {
-        if (cell < 0) {
-            // preamble
-            if (is_long_tabular)
-                   os << "<TGROUP ";
-            else
-                   os << "<TGROUP ";
-            os << "COLS='"
-              << columns_
-              << "' COLSEP='1' ROWSEP='1'>"
-              << newlineAndDepth(++depth);
-            ++ret;
-            for (int i = 0; i < columns_; ++i) {
-                   os << "<COLSPEC ALIGN='"
-                      << GetDocBookAlign(i, true)
-                      << "' COLNAME='col"
-                      << i + 1
-                      << "' COLNUM='"
-                      << i + 1
-                      << "' COLSEP='";
-               if (i == (columns_-1)) {
-                      os << '1';
-               } else {
-                   if (column_info[i].right_line ||
-                       column_info[i+1].left_line)
-                          os << '1';
-                   else
-                          os << '0';
-               }
-               os << "'>"
-                 << newlineAndDepth(depth);
-                ++ret;
-#ifdef NOT_HANDLED_YET_AS_I_DONT_KNOW_HOW
-                if (column_info[i].left_line)
-                       os << '|';
-#endif
-            }
-            os << "<TBODY>"
-              << newlineAndDepth(++depth)
-              << "<ROW>"
-              << newlineAndDepth(++depth)
-              << "<ENTRY ALIGN='"
-              << GetDocBookAlign(0)
-              << "'";
-           if (IsMultiColumn(0)) {
-                  os << " NAMEST='col1' NAMEEND='col"
-                     << cells_in_multicolumn(0)
-                     << "'";
-           }
-          os << ">"
-             << newlineAndDepth(++depth);
-            ret += 3;
-        } else {
-            if (IsLastCellInRow(cell)) {
-                   os << newlineAndDepth(--depth)
-                      << "</ENTRY>"
-                      << newlineAndDepth(--depth)
-                      << "</ROW>"
-                      << newlineAndDepth(depth)
-                      << "<ROW>"
-                      << newlineAndDepth(++depth)
-                      << "<ENTRY ALIGN='"
-                      << GetDocBookAlign(cell + 1)
-                      << "' VALIGN='middle'";
-               if (IsMultiColumn(cell + 1)) {
-                      os << " NAMEST='col"
-                         << column_of_cell(cell + 1) + 1
-                         << "' NAMEEND='col"
-                         << column_of_cell(cell + 1) +
-                              cells_in_multicolumn(cell + 1)
-                         << "'";
-               }
-               os << ">"
-                 << newlineAndDepth(++depth);
-                ret += 4;
-            } else {
-                   os << newlineAndDepth(--depth)
-                      << "</ENTRY>"
-                      << newlineAndDepth(depth)
-                      << "<ENTRY ALIGN='"
-                      << GetDocBookAlign(cell + 1)
-                      << "' VALIGN='middle'";
-               if (IsMultiColumn(cell + 1)) {
-                      os << " NAMEST='col"
-                         << column_of_cell(cell + 1) + 1
-                         << "' NAMEEND='col"
-                         << column_of_cell(cell + 1) +
-                              cells_in_multicolumn(cell + 1)
-                         << "'";
-               }
-               os << ">"
-                 << newlineAndDepth(++depth);
-                ret += 3;
-            }
-        }
-    }
-    return ret;
-}
-
-
 bool LyXTabular::IsMultiColumn(int cell, bool real) const
 {
     return ((!real || (column_of_cell(cell) != right_column_of_cell(cell))) &&
index 78db842465f2e0fed954bab51ca97ab5dcd5890b..b95a38d280da5834ac5624209ae968f7702327f3 100644 (file)
@@ -292,15 +292,6 @@ public:
                       int column, std::vector<unsigned int> const &) const;
     ///
     int Ascii(Buffer const *, std::ostream &) const;
-    ///
-    int DocBookEndOfCell(std::ostream &, int cell, int & depth) const;
-#if 0
-    ///
-    int RoffEndOfCell(std::ostream &, int cell);
-#endif
-    ///
-    string const  GetDocBookAlign(int cell, bool isColumn = false) const;
-
     ///
     bool IsMultiColumn(int cell, bool real = false) const;
     ///