From 4d2e93a02eeb591aba7982f9871f13bca93fd40e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Wed, 14 Feb 2001 19:22:41 +0000 Subject: [PATCH] remove cruft git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1515 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView.C | 58 ------------------- src/BufferView.h | 18 ------ src/BufferView_pimpl.C | 4 -- src/ChangeLog | 15 +++++ src/LyXAction.C | 3 - src/WorkArea.C | 19 +----- src/WorkArea.h | 17 +----- src/buffer.C | 77 +------------------------ src/buffer.h | 4 -- src/commandtags.h | 3 - src/frontends/xforms/ButtonController.C | 2 + src/frontends/xforms/ChangeLog | 4 ++ src/insets/ChangeLog | 5 ++ src/insets/insetinfo.C | 7 +-- src/insets/insettext.C | 8 --- src/intl.C | 67 +-------------------- src/intl.h | 25 -------- src/lyx_cb.C | 30 ---------- src/lyxfont.C | 14 ----- src/lyxfont.h | 5 -- src/lyxfunc.C | 16 ----- src/lyxrc.C | 54 ----------------- src/lyxrc.h | 13 ----- src/mathed/ChangeLog | 4 ++ src/mathed/formula.C | 8 --- src/mathed/math_hash.C | 8 --- src/mathed/math_panel.C | 3 - src/mathed/math_parser.C | 5 -- src/screen.C | 17 ------ src/support/ChangeLog | 6 ++ src/support/atoi.C | 3 - src/support/filetools.C | 7 --- src/support/fmt.C | 4 -- 33 files changed, 46 insertions(+), 487 deletions(-) diff --git a/src/BufferView.C b/src/BufferView.C index 1d388eb5bc..99474cf9d8 100644 --- a/src/BufferView.C +++ b/src/BufferView.C @@ -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); diff --git a/src/BufferView.h b/src/BufferView.h index e1d8ffec43..3f20c3a089 100644 --- a/src/BufferView.h +++ b/src/BufferView.h @@ -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); diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index d06dfb2eed..fd5cdea0d8 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -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 diff --git a/src/ChangeLog b/src/ChangeLog index 9852ddcc60..fc2254bb1a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,18 @@ +2001-02-14 Lars Gullik Bjønnes + + * 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 * lyxfunc.C: removed #if 0 unused code diff --git a/src/LyXAction.C b/src/LyXAction.C index f6313f3b5e..ee540e3fa8 100644 --- a/src/LyXAction.C +++ b/src/LyXAction.C @@ -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 diff --git a/src/WorkArea.C b/src/WorkArea.C index e9343adf08..50222dc787 100644 --- a/src/WorkArea.C +++ b/src/WorkArea.C @@ -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(); } diff --git a/src/WorkArea.h b/src/WorkArea.h index 31af5a2bd1..7c00df597d 100644 --- a/src/WorkArea.h +++ b/src/WorkArea.h @@ -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 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; /// diff --git a/src/buffer.C b/src/buffer.C index 34574dd674..830a48b8ef 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -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); diff --git a/src/buffer.h b/src/buffer.h index 15aecd6062..4a2cab89e4 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -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? diff --git a/src/commandtags.h b/src/commandtags.h index 7f827c750b..e5c81a2a2b 100644 --- a/src/commandtags.h +++ b/src/commandtags.h @@ -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 diff --git a/src/frontends/xforms/ButtonController.C b/src/frontends/xforms/ButtonController.C index b844ac0ac3..d7eac9012e 100644 --- a/src/frontends/xforms/ButtonController.C +++ b/src/frontends/xforms/ButtonController.C @@ -1,5 +1,7 @@ #include +#include + #include FORMS_H_LOCATION #ifdef __GNUG__ diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index c0737f2118..6555f1ec19 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,7 @@ +2001-02-14 Lars Gullik Bjønnes + + * ButtonController.C: include algorithm + 2001-02-14 Angus Leeming * ButtonController.[Ch] (addTriggerChange, eraseTriggerChange): diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index d6606299ff..76fe2378fb 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,8 @@ +2001-02-14 Lars Gullik Bjønnes + + * insettext.C: + * insetinfo.C: remove cruft + 2001-02-14 Juergen Vigna * insettext.C (SetUpdateStatus): added a BufferView * parameter. diff --git a/src/insets/insetinfo.C b/src/insets/insetinfo.C index da55067adf..dfc580636b 100644 --- a/src/insets/insetinfo.C +++ b/src/insets/insetinfo.C @@ -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), diff --git a/src/insets/insettext.C b/src/insets/insettext.C index cf34f2e231..c4e340fd37 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -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 } } } diff --git a/src/intl.C b/src/intl.C index 0a4ee015e5..8914168626 100644 --- a/src/intl.C +++ b/src/intl.C @@ -27,10 +27,6 @@ #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); diff --git a/src/intl.h b/src/intl.h index 90317e85d3..2e173f5cb8 100644 --- a/src/intl.h +++ b/src/intl.h @@ -15,18 +15,11 @@ #include #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 diff --git a/src/lyx_cb.C b/src/lyx_cb.C index c2be03ac0a..6107267694 100644 --- a/src/lyx_cb.C +++ b/src/lyx_cb.C @@ -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; diff --git a/src/lyxfont.C b/src/lyxfont.C index 5c81bcfacc..068f76252f 100644 --- a/src/lyxfont.C +++ b/src/lyxfont.C @@ -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 { diff --git a/src/lyxfont.h b/src/lyxfont.h index ad1a4a17f0..3d82892271 100644 --- a/src/lyxfont.h +++ b/src/lyxfont.h @@ -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; diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 6a68e4f5f3..8a3e757772 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -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; diff --git a/src/lyxrc.C b/src/lyxrc.C index 368ded416f..32edd2449a 100644 --- a/src/lyxrc.C +++ b/src/lyxrc.C @@ -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; diff --git a/src/lyxrc.h b/src/lyxrc.h index 6de67fc60a..08d573a3ae 100644 --- a/src/lyxrc.h +++ b/src/lyxrc.h @@ -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; /// diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index 2314eadfba..c65560ced9 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,5 +1,9 @@ 2001-02-14 Lars Gullik Bjønnes + * math_parser.C: + * math_panel.C: + * formula.C: remove cruft + * array.C (begin): new method (end): ditto diff --git a/src/mathed/formula.C b/src/mathed/formula.C index 0997160e22..5f2275f228 100644 --- a/src/mathed/formula.C +++ b/src/mathed/formula.C @@ -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; diff --git a/src/mathed/math_hash.C b/src/mathed/math_hash.C index ae083544dd..b214407ba4 100644 --- a/src/mathed/math_hash.C +++ b/src/mathed/math_hash.C @@ -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 */ diff --git a/src/mathed/math_panel.C b/src/mathed/math_panel.C index e81521bdbb..9238c900dd 100644 --- a/src/mathed/math_panel.C +++ b/src/mathed/math_panel.C @@ -37,9 +37,6 @@ #include "matrix.xpm" #include "equation.xpm" -#if 0 -using std::free; -#endif static LyXFunc * lyxfunc = 0; diff --git a/src/mathed/math_parser.C b/src/mathed/math_parser.C index 3883ecfeb3..ec10cc7ad0 100644 --- a/src/mathed/math_parser.C +++ b/src/mathed/math_parser.C @@ -48,11 +48,6 @@ 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); diff --git a/src/screen.C b/src/screen.C index eb8b55d536..b0b5390e63 100644 --- a/src/screen.C +++ b/src/screen.C @@ -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(), diff --git a/src/support/ChangeLog b/src/support/ChangeLog index c23da96427..0e2118d941 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,3 +1,9 @@ +2001-02-14 Lars Gullik Bjønnes + + * fmt.C: + * filetools.C: + * atoi.C: remove cruft + 2001-02-06 albert chin * snprintf.h: diff --git a/src/support/atoi.C b/src/support/atoi.C index 835b999af0..17f9847cce 100644 --- a/src/support/atoi.C +++ b/src/support/atoi.C @@ -4,9 +4,6 @@ #include "lyxlib.h" -#if 0 -using std::atoi; -#endif int lyx::atoi(string const & nstr) { diff --git a/src/support/filetools.C b/src/support/filetools.C index d4f66a6206..f843494cdd 100644 --- a/src/support/filetools.C +++ b/src/support/filetools.C @@ -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; diff --git a/src/support/fmt.C b/src/support/fmt.C index dcd2b88e43..d982681168 100644 --- a/src/support/fmt.C +++ b/src/support/fmt.C @@ -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. -- 2.39.2