]> git.lyx.org Git - features.git/commitdiff
remove cruft
authorLars Gullik Bjønnes <larsbj@gullik.org>
Wed, 14 Feb 2001 19:22:41 +0000 (19:22 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Wed, 14 Feb 2001 19:22:41 +0000 (19:22 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1515 a592a061-630c-0410-9148-cb99ea01b6c8

33 files changed:
src/BufferView.C
src/BufferView.h
src/BufferView_pimpl.C
src/ChangeLog
src/LyXAction.C
src/WorkArea.C
src/WorkArea.h
src/buffer.C
src/buffer.h
src/commandtags.h
src/frontends/xforms/ButtonController.C
src/frontends/xforms/ChangeLog
src/insets/ChangeLog
src/insets/insetinfo.C
src/insets/insettext.C
src/intl.C
src/intl.h
src/lyx_cb.C
src/lyxfont.C
src/lyxfont.h
src/lyxfunc.C
src/lyxrc.C
src/lyxrc.h
src/mathed/ChangeLog
src/mathed/formula.C
src/mathed/math_hash.C
src/mathed/math_panel.C
src/mathed/math_parser.C
src/screen.C
src/support/ChangeLog
src/support/atoi.C
src/support/filetools.C
src/support/fmt.C

index 1d388eb5bcfbc58d94f777283cf5fb299518275c..99474cf9d804111bcc72c274028dfac75e5bd51f 100644 (file)
@@ -135,64 +135,6 @@ int BufferView::resizeCurrentBuffer()
 }
 
 
-#if 0
-void BufferView::enterView()
-{
-       pimpl_->enterView();
-}
-
-
-void BufferView::leaveView()
-{
-       pimpl_->leaveView();
-}
-
-
-// Callback for scrollbar slider
-void BufferView::scrollCB(double value)
-{
-       pimpl_->scrollCB(value);
-}
-
-
-void BufferView::workAreaMotionNotify(int x, int y, unsigned int state)
-{
-       pimpl_->workAreaMotionNotify(x, y, state);
-}
-
-
-///  Single-click on work area
-void BufferView::workAreaButtonPress(int xpos, int ypos, unsigned int button)
-{
-       pimpl_->workAreaButtonPress(xpos, ypos, button);
-}
-
-
-void BufferView::doubleClick(int x, int y, unsigned int button) 
-{
-       pimpl_->doubleClick(x, y, button);
-}
-
-
-void BufferView::tripleClick(int x, int y, unsigned int button)
-{
-       pimpl_->tripleClick(x, y, button);
-}
-
-
-void BufferView::workAreaButtonRelease(int x, int y, unsigned int button)
-{
-       pimpl_->workAreaButtonRelease(x, y, button);
-}
-
-
-void BufferView::workAreaExpose()
-{
-       pimpl_->workAreaExpose();
-}
-#endif
-
-
 void BufferView::cursorPrevious(LyXText * text)
 {
        pimpl_->cursorPrevious(text);
index e1d8ffec43dcb33a13452a40f242e868123fc432..3f20c3a0892a756a07776c8a730b0ff2846a1cdf 100644 (file)
@@ -238,24 +238,6 @@ public:
 
        ///
        void pushIntoUpdateList(Inset * i);
-#if 0
-       ///
-       void workAreaExpose();
-       ///
-       void workAreaButtonPress(int x, int y, unsigned int button);
-       ///
-       void workAreaButtonRelease(int x, int y, unsigned int button);
-       ///
-       void workAreaMotionNotify(int x, int y, unsigned int state);
-       ///
-       void doubleClick(int x, int y, unsigned int button);
-       ///
-       void tripleClick(int x, int y, unsigned int button);
-       ///
-       void enterView();
-       ///
-       void leaveView();
-#endif
        ///
        bool ChangeInsets(Inset::Code code, string const & from, 
                          string const & to);
index d06dfb2eed5ef1f77a37e3867268f859baa1fea8..fd5cdea0d8de25b31335fc273bf97e6ff5e3c465 100644 (file)
@@ -76,11 +76,7 @@ BufferView::Pimpl::Pimpl(BufferView * b, LyXView * o,
        : bv_(b), owner_(o), cursor_timeout(400)
 {
        buffer_ = 0;
-#if 0
-       workarea_ = new WorkArea(bv_, xpos, ypos, width, height);
-#else
        workarea_ = new WorkArea(xpos, ypos, width, height);
-#endif
        // Setup the signals
        workarea_->scrollCB.connect(slot(this, &BufferView::Pimpl::scrollCB));
        workarea_->workAreaExpose
index 9852ddcc60e8516ae869935d9a09447b90170b38..fc2254bb1a48b1f806e38a54cd25dee84db28068 100644 (file)
@@ -1,3 +1,18 @@
+2001-02-14  Lars Gullik Bjønnes  <larsbj@lyx.org>
+
+       * screen.C: 
+       * lyxrc.[Ch]:
+       * lyxfunc.C: 
+       * lyxfont.[Ch]: 
+       * lyx_cb.C: 
+       * intl.[Ch]: 
+       * commandtags.h: 
+       * buffer.C: 
+       * WorkArea.[Ch]: 
+       * LyXAction.C: 
+       * BufferView_pimpl.C:
+       * BufferView.[Ch]: remove cruft
+
 2001-02-14  Juergen Vigna  <jug@sad.it>
 
        * lyxfunc.C: removed #if 0 unused code
index f6313f3b5ebeeb0d2502a1269d0f792bc4a32904..ee540e3fa87b27f04f2f57ffcc06e7a31d87300a 100644 (file)
@@ -128,9 +128,6 @@ void LyXAction::init()
                { LFUN_ENDBUFSEL, "buffer-end-select",
                  N_("Select to end of document"), ReadOnly },
                { LFUN_EXPORT, "buffer-export", N_("Export to"), ReadOnly },
-#if 0
-               { LFUN_FAX, "buffer-fax", N_("Fax"), ReadOnly },
-#endif
 #ifndef NEW_INSETS
                { LFUN_INSERTFOOTNOTE, "buffer-float-insert", "", Noop },
 #endif
index e9343adf08cc00519622c1b5bfa32ac55c4c290a..50222dc787061eab617ef949b93369dda209949a 100644 (file)
@@ -18,9 +18,6 @@
 #include "WorkArea.h"
 #include "debug.h"
 #include "support/lstrings.h"
-#if 0
-#include "BufferView.h"
-#endif
 #include "LyXView.h"
 #include "lyxfunc.h"
 
@@ -61,16 +58,8 @@ extern "C" {
 
 
 
-WorkArea::WorkArea(
-#if 0
-       BufferView * o,
-#endif
-       int xpos, int ypos, int width, int height)
-       :
-#if 0
-       owner_(o),
-#endif
-       workareapixmap(0), painter_(*this)
+WorkArea::WorkArea(int xpos, int ypos, int width, int height)
+       : workareapixmap(0), painter_(*this)
 {
        fl_freeze_all_forms();
 
@@ -271,11 +260,7 @@ void WorkArea::scroll_cb(FL_OBJECT * ob, long)
        // If we really want the accellerating scroll we can do that
        // from here. IMHO that is a waste of effort since we already
        // have other ways to move fast around in the document. (Lgb)
-#if 0
-       area->owner_->scrollCB(fl_get_scrollbar_value(ob));
-#else
        area->scrollCB(fl_get_scrollbar_value(ob));
-#endif
        waitForX();
 }
 
index 31af5a2bd11936d8d19e9de14b1e81cd22b1bbda..7c00df597da8480065aa6e0f56b4d9b5d69df6c2 100644 (file)
@@ -30,19 +30,12 @@ using SigC::Signal2;
 using SigC::Signal3;
 #endif
 
-#if 0
-class BufferView;
-#endif
 
 ///
 class WorkArea {
 public:
        ///
-       WorkArea(
-#if 0
-               BufferView *,
-#endif
-               int xpos, int ypos, int width, int height);
+       WorkArea(int xpos, int ypos, int width, int height);
        ///
        ~WorkArea();
        ///
@@ -110,10 +103,6 @@ public:
        string const getClipboard() const;
        ///
        void putClipboard(string const &) const;
-#if 0
-       ///
-       BufferView * owner() const { return owner_; }
-#endif
        // Signals
        ///
        Signal0<void> workAreaExpose;
@@ -148,10 +137,6 @@ private:
        FL_OBJECT * work_area;
        ///
        FL_OBJECT * scrollbar;
-#if 0
-       ///
-       BufferView * owner_;
-#endif
        /// The pixmap overlay on the workarea
        Pixmap workareapixmap;
        ///
index 34574dd67467cf79e522b9d94c24e3995411ebfd..830a48b8efd4f54a773cbdaf06b461951259c43e 100644 (file)
@@ -115,11 +115,7 @@ extern BufferList bufferlist;
 extern LyXAction lyxaction;
 
 
-#if 0
-static const float LYX_FORMAT = 2.17;
-#else
 static const int LYX_FORMAT = 218;
-#endif
 
 extern int tex_code_break_column;
 
@@ -284,13 +280,8 @@ bool Buffer::readLyXformat2(LyXLex & lex, LyXParagraph * par)
 
        LyXParagraph * return_par = 0;
        LyXFont font(LyXFont::ALL_INHERIT, params.language);
-#if 0
-       if (format < 2.16 && params.language->lang() == "hebrew")
-               font.setLanguage(default_language);
-#else
        if (file_format < 216 && params.language->lang() == "hebrew")
                font.setLanguage(default_language);
-#endif
        // If we are inserting, we cheat and get a token in advance
        bool has_token = false;
        string pretoken;
@@ -405,13 +396,8 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, LyXParagraph *& par,
 #endif
                par->depth = depth;
                font = LyXFont(LyXFont::ALL_INHERIT, params.language);
-#if 0
-               if (format < 2.16 && params.language->lang() == "hebrew")
-                       font.setLanguage(default_language);
-#else
                if (file_format < 216 && params.language->lang() == "hebrew")
                        font.setLanguage(default_language);
-#endif
 #ifndef NEW_INSETS
        } else if (token == "\\end_float") {
                if (!return_par) 
@@ -426,13 +412,8 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, LyXParagraph *& par,
                lex.EatLine();
                par->layout = LYX_DUMMY_LAYOUT;
                font = LyXFont(LyXFont::ALL_INHERIT, params.language);
-#if 0
-               if (format < 2.16 && params.language->lang() == "hebrew")
-                       font.setLanguage(default_language);
-#else
                if (file_format < 216 && params.language->lang() == "hebrew")
                        font.setLanguage(default_language);
-#endif
        } else if (token == "\\begin_float") {
                int tmpret = lex.FindToken(string_footnotekinds);
                if (tmpret == -1) ++tmpret;
@@ -861,13 +842,7 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, LyXParagraph *& par,
                int tmpret = lex.FindToken(string_align);
                if (tmpret == -1) ++tmpret;
                if (tmpret != LYX_LAYOUT_DEFAULT) { // tmpret != 99 ???
-#if 0
-                       int tmpret2 = 1;
-                       for (; tmpret > 0; --tmpret)
-                               tmpret2 = tmpret2 * 2;
-#else
                        int const tmpret2 = int(pow(2.0, tmpret));
-#endif
                        //lyxerr << "Tmpret2 = " << tmpret2 << endl;
                        par->align = LyXAlignment(tmpret2);
                }
@@ -1103,40 +1078,6 @@ bool Buffer::readFile(LyXLex & lex, LyXParagraph * par)
                string const token(lex.GetString());
                if (token == "\\lyxformat") { // the first token _must_ be...
                        lex.EatLine();
-#if 0
-                       format = lex.GetFloat();
-                       if (format > 1.0) {
-                               if (LYX_FORMAT - format > 0.05) {
-                                       lyxerr << fmt(_("Warning: need lyxformat %.2f but found %.2f"),
-                                                     LYX_FORMAT, format) << endl;
-                               }
-                               if (format - LYX_FORMAT > 0.05) {
-                                       lyxerr << fmt(_("ERROR: need lyxformat %.2f but found %.2f"),
-                                                     LYX_FORMAT, format) << endl;
-                               }
-                               bool the_end = readLyXformat2(lex, par);
-                               // Formats >= 2.13 support "\the_end" marker
-                               if (format < 2.13)
-                                       the_end = true;
-
-                               setPaperStuff();
-
-                               if (!the_end)
-                                       WriteAlert(_("Warning!"),
-                                                  _("Reading of document is not complete"),
-                                                  _("Maybe the document is truncated"));
-                               // We simulate a safe reading anyways to allow
-                               // users to take the chance... (Asger)
-                               return true;
-                       } // format < 1.0
-                       else {
-                               WriteAlert(_("ERROR!"),
-                                          _("Old LyX file format found. "
-                                            "Use LyX 0.10.x to read this!"));
-                               return false;
-                       }
-
-#else
                        string tmp_format = lex.GetString();
                        //lyxerr << "LyX Format: `" << tmp_format << "'" << endl;
                        // if present remove ".," from string.
@@ -1173,7 +1114,6 @@ bool Buffer::readFile(LyXLex & lex, LyXParagraph * par)
                                           _("Reading of document is not complete"),
                                           _("Maybe the document is truncated"));
                        return true;
-#endif
                } else { // "\\lyxformat" not found
                        WriteAlert(_("ERROR!"), _("Not a LyX file!"));
                }
@@ -1313,20 +1253,9 @@ bool Buffer::writeFile(string const & fname, bool flag) const
 
        // write out a comment in the top of the file
        ofs << '#' << LYX_DOCVERSION 
-           << " created this file. For more info see http://www.lyx.org/\n";
-#if 0
-       ofs.setf(ios::showpoint|ios::fixed);
-       ofs.precision(2);
-#ifndef HAVE_LOCALE
-       char dummy_format[512];
-       sprintf(dummy_format, "%.2f", LYX_FORMAT);
-       ofs << "\\lyxformat " <<  dummy_format << "\n";
-#else
-       ofs << "\\lyxformat " << setw(4) <<  LYX_FORMAT << "\n";
-#endif
-#else
-       ofs << "\\lyxformat " << LYX_FORMAT << "\n";
-#endif
+           << " created this file. For more info see http://www.lyx.org/\n"
+           << "\\lyxformat " << LYX_FORMAT << "\n";
+
        // now write out the buffer paramters.
        params.writeFile(ofs);
 
index 15aecd6062c3a2875aae1c256cc820dcb18140a4..4a2cab89e40a3cfb7dc9dff47f52acc2523ef2a6 100644 (file)
@@ -408,11 +408,7 @@ private:
        string filename;
 
        /// Format number of buffer
-#if 0
-       float format;
-#else
        int file_format;
-#endif
        /** A list of views using this buffer.
            Why not keep a list of the BufferViews that use this buffer?
 
index 7f827c750b3aa6f4a08015e14b206cd924e31158..e5c81a2a2bec808a0f5312efaab41fdac9754f87 100644 (file)
@@ -188,9 +188,6 @@ enum kb_action {
        LFUN_DELETE_SKIP,
        LFUN_MENUNEWTMPLT,              // Asger 1997-02-02
        LFUN_MENURELOAD,                // Asger 1997-02-02
-#if 0
-       LFUN_FAX,                       // Asger 1997-02-10
-#endif
        LFUN_RECONFIGURE, // 170        // Asger 1997-02-14
        LFUN_CITATION_INSERT,           // AAS 97-02-23
        LFUN_INSERT_BIBTEX,             // AAS 97-02-23
index b844ac0ac3db734803aa9fb1c726e8cba9d6789a..d7eac9012e127d13b4720d65a92045226476db8e 100644 (file)
@@ -1,5 +1,7 @@
 #include <config.h>
 
+#include <algorithm>
+
 #include FORMS_H_LOCATION
 
 #ifdef __GNUG__
index c0737f211879267301770e7f10cbb3634a5582ce..6555f1ec194489fb1534f991b93516337ad340c1 100644 (file)
@@ -1,3 +1,7 @@
+2001-02-14  Lars Gullik Bjønnes  <larsbj@lyx.org>
+
+       * ButtonController.C: include algorithm
+
 2001-02-14  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * ButtonController.[Ch] (addTriggerChange, eraseTriggerChange):
index d6606299ffeac72c265661520572b6e2ec54551a..76fe2378fb3c71e79d87cae2587fba1b1da947c8 100644 (file)
@@ -1,3 +1,8 @@
+2001-02-14  Lars Gullik Bjønnes  <larsbj@lyx.org>
+
+       * insettext.C:
+       * insetinfo.C: remove cruft
+
 2001-02-14  Juergen Vigna  <jug@sad.it>
 
        * insettext.C (SetUpdateStatus): added a BufferView * parameter.
index da55067adfffd9a09d4d64fd4ecd3ee50a003eca..dfc580636b2e938266ae7904f79c91bedf317dbe 100644 (file)
@@ -82,12 +82,7 @@ void InsetInfo::draw(BufferView * bv, LyXFont const &,
                     int baseline, float & x, bool) const
 {
        Painter & pain = bv->painter();
-#if 0
-       LyXFont font(f);
-       
-       // Info-insets are never LaTeX, so just correct the font
-       font.setLatex(LyXFont::OFF).setColor(LColor::note);
-#endif
+
        // Draw as "Note" in a yellow box
        x += 1;
        pain.fillRectangle(int(x), baseline - ascent(bv, labelfont),
index cf34f2e231f342b6fb33d818db16d6d767aae5df..c4e340fd37ec304c65981a721175bd2a2b1e9f28 100644 (file)
@@ -819,20 +819,12 @@ InsetText::LocalDispatch(BufferView * bv,
            for (string::size_type i = 0; i < arg.length(); ++i) {
                if (greek_kb_flag) {
                    if (!math_insert_greek(bv, arg[i])) {
-#if 0
-                       bv->owner()->getIntl()->getTrans()->TranslateAndInsert(arg[i], TEXT(bv));
-#else
                        bv->owner()->getIntl()->getTrans().TranslateAndInsert(arg[i], TEXT(bv));
-#endif
                    } else if (!the_locking_inset) {
                        (void)moveRight(bv, false);
                    }
                } else {
-#if 0
-                   bv->owner()->getIntl()->getTrans()->TranslateAndInsert(arg[i], TEXT(bv));
-#else
                    bv->owner()->getIntl()->getTrans().TranslateAndInsert(arg[i], TEXT(bv));
-#endif
                }
            }
        }
index 0a4ee015e56e5cedbd94e4dcc78f8e623aab4fbd..89141686266f3e6aaa314be151770350103cd0f8 100644 (file)
 #include "debug.h"
 #include "lyxrc.h"
 
-#if 0
-#include "trans_mgr.h"
-#endif
-
 #include "support/lstrings.h"
 #include "language.h"
 #include "frontends/Dialogs.h" // redrawGUI
@@ -48,9 +44,6 @@ extern "C" void C_Intl_DispatchCallback(FL_OBJECT * ob, long code);
 Intl::Intl()
        : prim_lang(lyxrc.primary_kbmap), 
        sec_lang(lyxrc.secondary_kbmap)
-#if 0
-       , trans(new TransManager)
-#endif
 {
        keymapon = lyxrc.use_kbmap;
        chsetcode = 0;
@@ -64,9 +57,6 @@ Intl::Intl()
 Intl::~Intl()
 {
        r_.disconnect();
-#if 0
-       delete trans;
-#endif
 }
 
 
@@ -81,11 +71,7 @@ int Intl::SetPrimary(string const & lang)
 {
        if (lyxerr.debugging(Debug::KBMAP))
                lyxerr << "Primary: `" << lang << "'" << endl;
-#if 0
-       return trans->SetPrimary(lang);
-#else
        return trans.SetPrimary(lang);
-#endif
 }
 
 
@@ -93,11 +79,7 @@ int Intl::SetSecondary(string const & lang)
 {
        if (lyxerr.debugging(Debug::KBMAP))
                lyxerr << "Secondary: `" << lang << "'" << endl;
-#if 0
-       return trans->SetSecondary(lang);
-#else
        return trans.SetSecondary(lang);
-#endif
 }
 
 
@@ -143,11 +125,7 @@ void Intl::KeyMapOn(bool on)
        } else {
                fl_set_button(fd_form_keymap->KeyOffBtn, 1);
                fl_hide_object(fd_form_keymap->KeymapErr);
-#if 0
-               trans->DisableKeymap();
-#else
                trans.DisableKeymap();
-#endif
        }
 }
 
@@ -180,21 +158,13 @@ void Intl::KeyMapPrim()
 
        curkeymap = i;
 
-#if 0
-       if (p.empty() || trans->SetPrimary(p)) {
-#else
        if (p.empty() || trans.SetPrimary(p)) {
-#endif
                // error selecting keymap
                fl_show_object(fd_form_keymap->KeymapErr);
                update();
        } else {
                // no error
-#if 0
-               trans->EnablePrimary();
-#else
                trans.EnablePrimary();
-#endif
                keymapon = true;
                primarykeymap = true;
                fl_hide_object(fd_form_keymap->KeymapErr);
@@ -218,19 +188,6 @@ void Intl::KeyMapSec()
                p = Language2->getline();
        curkeymap = i;
 
-#if 0
-       if (p.empty() || trans->SetSecondary(p)) {
-               // error selecting keymap
-               fl_show_object(fd_form_keymap->KeymapErr);
-               update();
-       } else {
-               // no error
-               trans->EnableSecondary();
-               keymapon = true;
-               primarykeymap = false;
-               fl_hide_object(fd_form_keymap->KeymapErr);
-       }
-#else
        if (p.empty() || trans.SetSecondary(p)) {
                // error selecting keymap
                fl_show_object(fd_form_keymap->KeymapErr);
@@ -242,7 +199,6 @@ void Intl::KeyMapSec()
                primarykeymap = false;
                fl_hide_object(fd_form_keymap->KeymapErr);
        }
-#endif
 }
 
 
@@ -352,32 +308,19 @@ void Intl::InitKeyMapper(bool on)
        if (!Language->select_text(prim_lang)) {
                Language->select(n + 1);
                fl_set_input(fd_form_keymap->OtherKeymap, prim_lang.c_str());
-       }
-       else
-#if 0
-               trans->SetPrimary(prim_lang);
-#else
+       } else
                trans.SetPrimary(prim_lang);
-#endif
+
        if (!Language2->select_text(sec_lang)) {
                Language2->select(n + 1);
                fl_set_input(fd_form_keymap->OtherKeymap2, sec_lang.c_str());
-       }
-       else
-#if 0
-               trans->SetSecondary(sec_lang);
-#else
+       } else
                trans.SetSecondary(sec_lang);
-#endif
 
        KeyMapOn(keymapon);
        if (keymapon)
                Keymap(23); // turn primary on
-#if 0
-       trans->setCharset(lyxrc.font_norm);
-#else
        trans.setCharset(lyxrc.font_norm);
-#endif
 }
 
 
@@ -413,11 +356,7 @@ void Intl::Keymap(long code)
                break;
        case 27:        // set new font norm
                char const * p = fl_get_input(fd_form_keymap->Charset);
-#if 0
-               if (trans->setCharset(p))
-#else
                if (trans.setCharset(p))
-#endif
                        fl_show_object(fd_form_keymap->ChsetErr);
                else
                        fl_hide_object(fd_form_keymap->ChsetErr);
index 90317e85d32ccb265b9492648b1d144044da0890..2e173f5cb89e01fdcfc3948ac5ddc250542363f8 100644 (file)
 #include <sigc++/signal_system.h>
 #include "LString.h"
 #include "form1.h"
-
-#if 1
 #include "trans_mgr.h"
-#endif
 
 class LyXText;
 class Combox;
 
-#if 0
-class TransManager;
-#endif
-
 #ifdef SIGC_CXX_NAMESPACES
 using SigC::Object;
 using SigC::Connection;
@@ -68,13 +61,8 @@ public:
        /// initialize key mapper
        void InitKeyMapper(bool on);
 
-#if 0
-       /// Get the Translation Manager
-       TransManager * getTrans();
-#else
        // Get the Translation Manager
        TransManager & getTrans();
-#endif
        ///
        bool keymapon;
        ///
@@ -109,30 +97,17 @@ private:
        string & prim_lang;
        ///
        string & sec_lang;
-#if 0
-       ///
-       TransManager * trans;
-#else
        ///
        TransManager trans;
-#endif
        /// Redraw connection.
        Connection r_;
 };
 
 
-#if 0
-inline
-TransManager * Intl::getTrans()
-{
-       return trans;
-}
-#else
 inline
 TransManager & Intl::getTrans()
 {
        return trans;
 }
-#endif
 
 #endif
index c2be03ac0ad2b23a63f645348bf4ed31b2d9d2c8..610726769492fc95dfb931c9a6fe4de60f56ad3d 100644 (file)
@@ -61,10 +61,6 @@ extern BufferView * current_view; // called too many times in this file...
 
 extern void DeleteSimpleCutBuffer(); /* for the cleanup when exiting */
 
-#if 0
-extern bool send_fax(string const & fname, string const & sendcmd);
-#endif
-
 extern void MenuSendto();
 
 // this should be static, but I need it in buffer.C
@@ -300,32 +296,6 @@ int MenuRunChktex(Buffer * buffer)
 }
 
 
-#if 0
-void MenuFax(Buffer * buffer)
-{
-       // Generate postscript file
-       if (!Exporter::Export(buffer, "ps", true))
-               return;
-
-       // Send fax
-       string const ps = OnlyFilename(ChangeExtension(buffer->fileName(), 
-                                                      ".ps"));
-
-       string path = OnlyPath (buffer->fileName());
-       if (lyxrc.use_tempdir || (IsDirWriteable(path) < 1)) {
-               path = buffer->tmppath;
-       }
-       Path p(path);
-       if (!lyxrc.fax_program.empty()) {
-                string help2 = subst(lyxrc.fax_program, "$$FName", ps);
-                help2 += " &";
-                Systemcalls one(Systemcalls::System, help2);
-       } else
-               send_fax(ps, lyxrc.fax_command);
-}
-#endif
-
-
 void QuitLyX()
 {
        lyxerr.debug() << "Running QuitLyX." << endl;
index 5c81bcfacce8dceb8cfd015d1b2763cbdef24021..068f76252f0c386778c19902598c0f0f2c898bd6 100644 (file)
@@ -504,20 +504,6 @@ LyXFont & LyXFont::setLyXColor(string const & col)
 }
 
 
-#if 0
-/// Sets size after GUI name
-LyXFont & LyXFont::setGUISize(string const & siz)
-{
-       // CHECK this might be wrong.
-       /// ??????
-       // this is how it was how it was done in the lyx repository...
-       // but this does not make sense.
-       setColor(lcolor.getFromGUIName(siz));
-       return *this;
-}
-#endif
-
-
 // Returns size in latex format
 string const LyXFont::latexSize() const
 {
index ad1a4a17f0eba7aa59e5fc2c1a8bf9b3f2404408..3d82892271d5c4a8611146e9e29063f53439c0fe 100644 (file)
@@ -263,11 +263,6 @@ public:
        /// Sets color after LyX text format
        LyXFont & setLyXColor(string const &);
 
-#if 0
-       /// Sets size after GUI name
-       LyXFont & setGUISize(string const &);
-#endif
-       
        /// Returns size of font in LaTeX text notation
        string const latexSize() const;
  
index 6a68e4f5f33aea01c338b8369e2b04b0b4c909b9..8a3e757772b4d97e2dfb78401ea28609e17b7204 100644 (file)
@@ -100,9 +100,6 @@ extern bool selection_possible;
 
 extern kb_keymap * toplevel_keymap;
 
-#if 0
-extern void MenuFax(Buffer *);
-#endif
 extern void show_symbols_form(LyXFunc *);
 
 extern LyXAction lyxaction;
@@ -359,17 +356,10 @@ LyXFunc::func_status LyXFunc::getStatus(int ac) const
                disable = !Exporter::IsExportable(buf, "dvi")
                        || lyxrc.print_command == "none";
                break;
-#if 0
-       case LFUN_FAX:
-               disable = !Exporter::IsExportable(buf, "ps")
-                       || lyxrc.fax_command == "none";
-               break;
-#else
        case LFUN_EXPORT:
                disable = argument == "fax" &&
                        !Exporter::IsExportable(buf, argument);
                break;
-#endif
        case LFUN_UNDO:
                disable = buf->undostack.empty();
                break;
@@ -835,12 +825,6 @@ string const LyXFunc::Dispatch(int ac,
                owner->getDialogs()->showPrint();
                break;
 
-#if 0
-       case LFUN_FAX:
-               MenuFax(owner->buffer());
-               break;
-#endif
-               
        case LFUN_EXPORT:
                Exporter::Export(owner->buffer(), argument, false);
                break;
index 368ded416fb73e1e299dc3b1b007e68507f52213..32edd2449a62b3c152de2bb6acfdf7282e54f635 100644 (file)
@@ -68,10 +68,6 @@ keyword_item lyxrcTags[] = {
        { "\\document_path", LyXRC::RC_DOCUMENTPATH },
        { "\\escape_chars", LyXRC::RC_ESC_CHARS },
        { "\\exit_confirmation", LyXRC::RC_EXIT_CONFIRMATION },
-#if 0
-       { "\\fax_command", LyXRC::RC_FAX_COMMAND },
-       { "\\fax_program", LyXRC::RC_FAXPROGRAM },
-#endif
        { "\\font_encoding", LyXRC::RC_FONT_ENCODING },
        { "\\format", LyXRC::RC_FORMAT },
        { "\\input", LyXRC::RC_INPUT },
@@ -91,9 +87,6 @@ keyword_item lyxrcTags[] = {
        { "\\num_lastfiles", LyXRC::RC_NUMLASTFILES },
        { "\\override_x_deadkeys", LyXRC::RC_OVERRIDE_X_DEADKEYS },
        { "\\personal_dictionary", LyXRC::RC_PERS_DICT },
-#if 0
-       { "\\phone_book", LyXRC::RC_PHONEBOOK },
-#endif
        { "\\print_adapt_output", LyXRC::RC_PRINT_ADAPTOUTPUT },
        { "\\print_collcopies_flag", LyXRC::RC_PRINTCOLLCOPIESFLAG },
        { "\\print_command", LyXRC::RC_PRINT_COMMAND },
@@ -738,25 +731,6 @@ int LyXRC::read(string const & filename)
                                cursor_follows_scrollbar = lexrc.GetBool();
                        break;
 
-#if 0
-               case RC_FAX_COMMAND:
-                       if (lexrc.next())
-                               fax_command = lexrc.GetString();
-                       break;
-               case RC_FAXPROGRAM:
-                       if (lexrc.next())
-                               fax_program = lexrc.GetString();
-                       break;
-               case RC_PHONEBOOK:
-                       if (lexrc.next()) {
-                               string s = lexrc.GetString();
-                               if (AbsolutePath(s))
-                                       phone_book = s;
-                               else
-                                       phone_book = user_lyxdir + s;
-                       }
-                       break;
-#endif
                case RC_ASCIIROFF_COMMAND:
                        if (lexrc.next())
                                ascii_roff_command = lexrc.GetString();
@@ -1365,24 +1339,6 @@ void LyXRC::output(ostream & os) const
                        os << "\\backupdir_path \"" << backupdir_path << "\"\n";
                }
 
-#if 0
-               os << "\n#\n"
-                  << "# FAX SECTION #######################################\n"
-                  << "#\n\n";
-               
-       case RC_FAX_COMMAND:
-               if (fax_command != system_lyxrc.fax_command) {
-                       os << "\\fax_command \"" << fax_command << "\"\n";
-               }
-       case RC_PHONEBOOK:
-               if (phone_book != system_lyxrc.phone_book) {
-                       os << "\\phone_book \"" << phone_book << "\"\n";
-               }
-       case RC_FAXPROGRAM:
-               if (fax_program != system_lyxrc.fax_program) {
-                       os << "\\fax_program \"" << fax_program << "\"\n";
-               }
-#endif
                os << "\n#\n"
                   << "# ASCII EXPORT SECTION ##############################\n"
                   << "#\n\n";
@@ -1767,16 +1723,6 @@ string const LyXRC::getDescription(LyXRCTags tag)
                str = N_("Use this to set the correct mapping file for your keyboard. You'll need this if you for instance want to type German documents on an American keyboard.");
                break;
 
-#if 0
-       case RC_FAX_COMMAND:
-               break;
-               
-       case RC_PHONEBOOK:
-               break;
-               
-       case RC_FAXPROGRAM:
-               break;
-#endif 
        case RC_ASCIIROFF_COMMAND:
                str = N_("Use to define an external program to render tables in the ASCII output. E.g. \"groff -t -Tlatin1 $$FName\"  where $$FName is the input file. If \"none\" is specified, an internal routine is used.");
                break;
index 6de67fc60a26173a603452c96488837f225670c9..08d573a3ae5c46c723a25f63b8da9eb2660d37e1 100644 (file)
@@ -74,11 +74,6 @@ enum LyXRCTags {
        RC_KBMAP,
        RC_KBMAP_PRIMARY,
        RC_KBMAP_SECONDARY,
-#if 0
-       RC_FAX_COMMAND,
-       RC_PHONEBOOK,
-       RC_FAXPROGRAM,
-#endif
        RC_ASCIIROFF_COMMAND,
        RC_ASCII_LINELEN,
        RC_NUMLASTFILES,
@@ -260,14 +255,6 @@ enum LyXRCTags {
        string font_norm_menu;
        ///
        unsigned int autosave;
-#if 0
-       ///
-       string fax_command;
-       ///
-       string phone_book;
-       ///
-       string fax_program;
-#endif
        ///
        string ascii_roff_command;
        ///
index 2314eadfba72ff2a545d076e15cd125009b80f76..c65560ced9dc41f555ff0df787c0eae46649e67c 100644 (file)
@@ -1,5 +1,9 @@
 2001-02-14  Lars Gullik Bjønnes  <larsbj@lyx.org>
 
+       * math_parser.C: 
+       * math_panel.C: 
+       * formula.C: remove cruft
+
        * array.C (begin): new method
        (end): ditto
 
index 0997160e224de249744a4ce6e8a2b0d7308ede9f..5f2275f228f4484594cc456982529fb460123b1c 100644 (file)
@@ -54,14 +54,6 @@ using std::endl;
 using std::vector;
 using std::max;
 
-#if 0
-using std::strncmp;
-using std::strcmp;
-using std::abs;
-using std::isdigit;
-using std::isalpha;
-#endif
-
 extern string mathed_label;
 
 extern char const * latex_special_chars;
index ae083544dd13bdb4595143722ccdc54be5f6bb79..b214407ba49268617708f20692772c39013ebeac 100644 (file)
@@ -8,19 +8,11 @@
 #include "math_defs.h"
 #include "math_parser.h"
 
-#if 0
-#define TOTAL_KEYWORDS 269
-#define MIN_WORD_LENGTH 2
-#define MAX_WORD_LENGTH 18
-#define MIN_HASH_VALUE 8
-#define MAX_HASH_VALUE 490
-#else
 int const TOTAL_KEYWORDS = 269;
 int const MIN_WORD_LENGTH = 2;
 int const MAX_WORD_LENGTH = 18;
 int const MIN_HASH_VALUE = 8;
 int const MAX_HASH_VALUE = 490;
-#endif
 
 /* maximum key range = 483, duplicates = 40 */
 
index e81521bdbbb91e6ad3e1300e915156493c88ed33..9238c900ddfbe60f13bd5db6a992009319f06432 100644 (file)
@@ -37,9 +37,6 @@
 #include "matrix.xpm"
 #include "equation.xpm"
 
-#if 0
-using std::free;
-#endif
 
 static LyXFunc * lyxfunc = 0;
 
index 3883ecfeb34cf8f3327650dfeef19d2907452689..ec10cc7ad0ee298f887a9a1c83ca69815fa0aff1 100644 (file)
 using std::istream;
 using std::endl;
 
-#if 0
-using std::isalpha;
-using std::isdigit;
-using std::isspace;
-#endif
 
 extern MathMatrixInset * create_multiline(short int type, int cols);
 
index eb8b55d536b78f9904a30a13f7d6f280376e0cd0..b0b5390e63661ea235cba889d04dc41ef76ea8de 100644 (file)
@@ -116,13 +116,8 @@ void LyXScreen::DrawFromTo(LyXText * text, BufferView * bv,
                LyXText::text_status st = bv->text->status;
                do {
                        bv->text->status = st;
-#if 0
-                       text->GetVisibleRow(owner.owner(), y + y_offset,
-                                           x_offset, row, y + text->first);
-#else
                        text->GetVisibleRow(bv, y + y_offset,
                                            x_offset, row, y + text->first);
-#endif
                } while (bv->text->status == LyXText::CHANGED_IN_DRAW);
                bv->text->status = st;
                y += row->height();
@@ -151,13 +146,8 @@ void LyXScreen::DrawOneRow(LyXText * text, BufferView * bv, Row * row,
                LyXText::text_status st = bv->text->status;
                do {
                        bv->text->status = st;
-#if 0
-                       text->GetVisibleRow(owner.owner(), y, x_offset, row,
-                                           y + text->first);
-#else
                        text->GetVisibleRow(bv, y, x_offset, row,
                                            y + text->first);
-#endif
                } while (bv->text->status == LyXText::CHANGED_IN_DRAW);
                bv->text->status = st;
        }
@@ -224,17 +214,10 @@ void LyXScreen::ShowCursor(LyXText const * text, BufferView const * bv)
 {
        if (!cursor_visible) {
                Cursor_Shape shape = BAR_SHAPE;
-#if 0
-               if (text->real_current_font.language() !=
-                   owner.owner()->buffer()->params.language
-                   || text->real_current_font.isVisibleRightToLeft()
-                   != owner.owner()->buffer()->params.language->RightToLeft())
-#else
                if (text->real_current_font.language() !=
                    bv->buffer()->params.language
                    || text->real_current_font.isVisibleRightToLeft()
                    != bv->buffer()->params.language->RightToLeft())
-#endif
                        shape = (text->real_current_font.isVisibleRightToLeft())
                                ? REVERSED_L_SHAPE : L_SHAPE;
                ShowManualCursor(text, text->cursor.x(), text->cursor.y(),
index c23da96427b7762650a512c6e4be22b4645a2ac4..0e2118d9410b6e25481f971f28ad6f3a80af7139 100644 (file)
@@ -1,3 +1,9 @@
+2001-02-14  Lars Gullik Bjønnes  <larsbj@lyx.org>
+
+       * fmt.C: 
+       * filetools.C: 
+       * atoi.C: remove cruft
+
 2001-02-06  albert chin  <china@thewrittenword.com>
 
        * snprintf.h: 
index 835b999af0f6cc56316cc453e751f2f68a16be9c..17f9847ccefc7884eabff7b42bbbd04dd7c84437 100644 (file)
@@ -4,9 +4,6 @@
 
 #include "lyxlib.h"
 
-#if 0
-using std::atoi;
-#endif
 
 int lyx::atoi(string const & nstr)
 {
index d4f66a620697cc869c2182a2ec33f0756ef7d0a7..f843494cddcc75deede22d4f2d656a8840207772 100644 (file)
@@ -60,13 +60,6 @@ using std::endl;
 using std::ifstream;
 using std::vector;
 
-#if 0
-using std::getenv;
-using std::isalpha;
-using std::isalnum;
-using std::popen;
-#endif
-
 extern string system_lyxdir;
 extern string build_lyxdir;
 extern string user_lyxdir;
index dcd2b88e43603c7fd829a1af5c54b32736feab47..d982681168a9efd6c48643ee90cfd3a0d1875008 100644 (file)
@@ -8,10 +8,6 @@
 
 #include "LString.h"
 
-#if 0
-using std::vsnprintf;
-#endif
-
 /* This output manipulator gives the option to use Old style format
    specifications in ostreams. Note that this is done at the expense
    of typesafety, so if possible this manipulator should be avoided.