diff --git a/lib/ChangeLog b/lib/ChangeLog index c7505e4f88..3051e7f29f 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2001-07-12 Lars Gullik Bjønnes + + * ui/default.ui: add icon for ert-insert + entry in menu + 2001-07-09 Juergen Vigna * images/banner.xpm: new development banner after a LyX-Meeting! diff --git a/lib/ui/default.ui b/lib/ui/default.ui index 1035cf9b71..e48ee9d377 100644 --- a/lib/ui/default.ui +++ b/lib/ui/default.ui @@ -201,6 +201,7 @@ Menuset Item "Note...|N" "note-insert" Submenu "Lists & TOC|O" "insert_toc" Separator + Item "TeX|T" "ert-insert" Item "Minipage|p" "minipage-insert" Item "Graphics...|G" "figure-insert" Item "Tabular Material...|b" "dialog-tabular-insert" @@ -365,7 +366,8 @@ Toolbar Icon "font-noun" Icon "font-free" Separator - Icon "tex-mode" +# Icon "tex-mode" + Icon "ert-insert" Icon "math-mode" Separator Icon "footnote-insert" diff --git a/src/BufferView2.C b/src/BufferView2.C index dc33aa5727..c1ccb90099 100644 --- a/src/BufferView2.C +++ b/src/BufferView2.C @@ -137,10 +137,10 @@ void BufferView::insertErrors(TeXErrors & terr) for (TeXErrors::Errors::const_iterator cit = terr.begin(); cit != terr.end(); ++cit) { - string const desctext((*cit).error_desc); - string const errortext((*cit).error_text); + string const desctext(cit->error_desc); + string const errortext(cit->error_text); string const msgtxt = desctext + '\n' + errortext; - int const errorrow = (*cit).error_in_line; + int const errorrow = cit->error_in_line; // Insert error string for row number int tmpid = -1; diff --git a/src/ChangeLog b/src/ChangeLog index 70bb3a8ecd..748e086e93 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,38 @@ +2001-07-12 Lars Gullik Bjønnes + + * trans_decl.h: remove allowed from KmodInfo + + * trans.[Ch] (AddDeakkey): change prototype to not have allowd. + remove allowed code + (Load): adjust + + * paragraph_pimpl.C (erase): use boost::prior + + * Painter.C (text): use data() instead of c_str() when length is + also provided. + * WorkArea.C (putClipboard): ditto + * font.h (width): ditto + + * BufferView2.C: use it-> instead of (*it). for iterators + * texrow.C: ditto + * paragraph_pimpl.C: ditto + * paragraph.C: ditto + * minibuffer.C: ditto + * language.C: ditto + * kbmap.C: ditto + * encoding.C: ditto + * counters.C: ditto + * converter.C: ditto + * chset.C: ditto + * Variables.C: ditto + * TextCache.C: ditto + * MenuBackend.C: ditto + * LyXAction.C: ditto + * LColor.C: ditto + * FloatList.C: ditto + * DepTable.C: ditto + * ColorHandler.C (LyXColorHandler): ditto + 2001-07-10 Jean-Marc Lasgouttes * BufferView_pimpl.C (Dispatch): handle LFUN_OPENSTUFF. diff --git a/src/ColorHandler.C b/src/ColorHandler.C index 2272dd12ae..fcd516610e 100644 --- a/src/ColorHandler.C +++ b/src/ColorHandler.C @@ -50,7 +50,7 @@ LyXColorHandler::~LyXColorHandler() // Iterate over the line cache and Free the GCs for (LineGCCache::iterator lit = lineGCcache.begin(); lit != lineGCcache.end(); ++lit) { - XFreeGC(display, (*lit).second); + XFreeGC(display, lit->second); } } diff --git a/src/DepTable.C b/src/DepTable.C index 0bc13ef436..906b1f236e 100644 --- a/src/DepTable.C +++ b/src/DepTable.C @@ -49,11 +49,11 @@ void DepTable::update() for (DepList::iterator itr = deplist.begin(); itr != deplist.end(); ++itr) { - unsigned long const one = (*itr).second.second; - unsigned long const two = lyx::sum((*itr).first); - (*itr).second = make_pair(one, two); + unsigned long const one = itr->second.second; + unsigned long const two = lyx::sum(itr->first); + itr->second = make_pair(one, two); if (lyxerr.debugging(Debug::DEPEND)) { - lyxerr << "Update dep: " << (*itr).first << " " + lyxerr << "Update dep: " << itr->first << " " << one << " " << two; if (one != two) lyxerr << " +"; @@ -68,7 +68,7 @@ bool DepTable::sumchange() const for (DepList::const_iterator cit = deplist.begin(); cit != deplist.end(); ++cit) { - if ((*cit).second.first != (*cit).second.second) return true; + if ((*cit).second.first != cit->second.second) return true; } return false; } @@ -80,8 +80,8 @@ bool DepTable::haschanged(string const & f) const string fil = MakeAbsPath(f); DepList::const_iterator cit = deplist.find(fil); if (cit != deplist.end()) { - if ((*cit).second.first != (*cit).second.second - && (*cit).second.second != 0) + if (cit->second.first != cit->second.second + && cit->second.second != 0) return true; } return false; @@ -93,8 +93,8 @@ bool DepTable::extchanged(string const & ext) const for (DepList::const_iterator cit = deplist.begin(); cit != deplist.end(); ++cit) { - if (suffixIs((*cit).first, ext)) { - if ((*cit).second.first != (*cit).second.second) + if (suffixIs(cit->first, ext)) { + if (cit->second.first != cit->second.second) return true; } } @@ -116,8 +116,8 @@ void DepTable::remove_files_with_extension(string const & suf) // we want const_iterator (Lgb) for (DepList::iterator cit = deplist.begin(); cit != deplist.end(); ++cit) { - if (!suffixIs((*cit).first, suf)) - tmp[(*cit).first] = (*cit).second; + if (!suffixIs(cit->first, suf)) + tmp[cit->first] = cit->second; } deplist.swap(tmp); } @@ -130,13 +130,13 @@ void DepTable::write(string const & f) const cit != deplist.end(); ++cit) { if (lyxerr.debugging(Debug::DEPEND)) { lyxerr << "Write dep: " - << (*cit).first << " " - << (*cit).second.first << " " - << (*cit).second.second << endl; + << cit->first << " " + << cit->second.first << " " + << cit->second.second << endl; } - ofs << (*cit).first << " " - << (*cit).second.first << " " - << (*cit).second.second << endl; + ofs << cit->first << " " + << cit->second.first << " " + << cit->second.second << endl; } } diff --git a/src/FloatList.C b/src/FloatList.C index 0e2992d2ec..0d697910f6 100644 --- a/src/FloatList.C +++ b/src/FloatList.C @@ -67,7 +67,7 @@ string const FloatList::defaultPlacement(string const & t) const { List::const_iterator cit = list.find(t); if (cit != list.end()) - return (*cit).second.placement(); + return cit->second.placement(); return string(); } @@ -84,7 +84,7 @@ Floating const & FloatList::getType(string const & t) const // I wish we could use exceptions List::const_iterator cit = list.find(t); if (cit != list.end()) - return (*cit).second; + return cit->second; #ifdef HAVE_EXCEPTIONS throw UnknownFloatType(t); #else diff --git a/src/LColor.C b/src/LColor.C index 8f884adb05..fce673cb75 100644 --- a/src/LColor.C +++ b/src/LColor.C @@ -116,7 +116,7 @@ string const LColor::getGUIName(LColor::color c) const { InfoTab::const_iterator ici = infotab.find(c); if (ici != infotab.end()) - return _((*ici).second.guiname); + return _(ici->second.guiname); return "none"; } @@ -126,7 +126,7 @@ string const LColor::getX11Name(LColor::color c) const { InfoTab::const_iterator ici = infotab.find(c); if (ici != infotab.end()) - return (*ici).second.x11name; + return ici->second.x11name; lyxerr << "LyX internal error: Missing color" " entry in LColor.C for " << int(c) << '\n'; @@ -139,7 +139,7 @@ string const LColor::getLaTeXName(LColor::color c) const { InfoTab::const_iterator ici = infotab.find(c); if (ici != infotab.end()) - return (*ici).second.latexname; + return ici->second.latexname; return "black"; } @@ -148,7 +148,7 @@ string const LColor::getLyXName(LColor::color c) const { InfoTab::const_iterator ici = infotab.find(c); if (ici != infotab.end()) - return (*ici).second.lyxname; + return ici->second.lyxname; return "black"; } @@ -157,7 +157,7 @@ void LColor::setColor(LColor::color col, string const & x11name) { InfoTab::iterator iti = infotab.find(col); if (iti != infotab.end()) { - (*iti).second.x11name = x11name; + iti->second.x11name = x11name; return; } lyxerr << "LyX internal error: color and such.\n"; @@ -186,8 +186,8 @@ LColor::color LColor::getFromGUIName(string const & guiname) const InfoTab::const_iterator ici = infotab.begin(); InfoTab::const_iterator end = infotab.end(); for (; ici != end; ++ici) { - if (!compare_no_case(_((*ici).second.guiname), guiname)) - return (*ici).first; + if (!compare_no_case(_(ici->second.guiname), guiname)) + return ici->first; } return LColor::inherit; } @@ -199,8 +199,8 @@ LColor::color LColor::getFromLyXName(string const & lyxname) const InfoTab::const_iterator ici = infotab.begin(); InfoTab::const_iterator end = infotab.end(); for (; ici != end; ++ici) { - if (!compare_no_case((*ici).second.lyxname, lyxname)) - return (*ici).first; + if (!compare_no_case(ici->second.lyxname, lyxname)) + return ici->first; } return LColor::inherit; } diff --git a/src/LyXAction.C b/src/LyXAction.C index 7535543035..ca25310573 100644 --- a/src/LyXAction.C +++ b/src/LyXAction.C @@ -456,9 +456,9 @@ int LyXAction::searchActionArg(kb_action action, string const & arg) const return LFUN_UNKNOWN_ACTION; } - arg_item::const_iterator aci = (*pit).second.find(arg); + arg_item::const_iterator aci = pit->second.find(arg); - if (aci == (*pit).second.end()) { + if (aci == pit->second.end()) { // the action does not have any pseudoactions with this arg lyxerr[Debug::ACTION] << "Action " << action @@ -470,9 +470,9 @@ int LyXAction::searchActionArg(kb_action action, string const & arg) const // pseudo action exist lyxerr[Debug::ACTION] << "Pseudoaction exist[" << action << '|' - << arg << "] = " << (*aci).second << endl; + << arg << "] = " << aci->second << endl; - return (*aci).second; + return aci->second; } @@ -496,7 +496,7 @@ int LyXAction::getPseudoAction(kb_action action, string const & arg) const // get the arg_item map arg_map::iterator ami = lyx_arg_map.find(action); // put the new pseudo function in it - (*ami).second[arg] = pseudo_counter; + ami->second[arg] = pseudo_counter; lyxerr[Debug::ACTION] << "Creating new pseudoaction " << pseudo_counter << " for [" << action @@ -516,10 +516,10 @@ kb_action LyXAction::retrieveActionArg(int pseudo, string & arg) const if (pit != lyx_pseudo_map.end()) { lyxerr[Debug::ACTION] << "Found the pseudoaction: [" - << (*pit).second.action << '|' - << (*pit).second.arg << '\n'; - arg = (*pit).second.arg; - return (*pit).second.action; + << pit->second.action << '|' + << pit->second.arg << '\n'; + arg = pit->second.arg; + return pit->second.action; } else { lyxerr << "Lyx Error: Unrecognized pseudo-action\n"; return LFUN_UNKNOWN_ACTION; @@ -542,10 +542,10 @@ int LyXAction::LookupFunc(string const & func) const if (!argstr.empty() && fit != lyx_func_map.end()) { // might be pseudo (or create one) - return getPseudoAction((*fit).second, argstr); + return getPseudoAction(fit->second, argstr); } - return fit != lyx_func_map.end() ? (*fit).second : LFUN_UNKNOWN_ACTION; + return fit != lyx_func_map.end() ? fit->second : LFUN_UNKNOWN_ACTION; } @@ -570,14 +570,14 @@ int LyXAction::getApproxFunc(string const & func) const lyx_func_map.lower_bound(func); if (fit != lyx_func_map.end()) { - action = (*fit).second; + action = fit->second; } } else { // Go get the next function func_map::const_iterator fit = lyx_func_map.upper_bound(func); if (fit != lyx_func_map.end()) { - action = (*fit).second; + action = fit->second; } } @@ -606,7 +606,7 @@ string const LyXAction::getActionName(int action) const info_map::const_iterator iit = lyx_info_map.find(ac); if (iit != lyx_info_map.end()) { - string ret((*iit).second.name); + string ret(iit->second.name); ret += arg; return ret; } else @@ -631,15 +631,15 @@ string const LyXAction::helpText(int pseudoaction) const if (lyxerr.debugging(Debug::ACTION)) { lyxerr << "Action: " << action << '\n'; lyxerr << " name: " - << (*ici).second.name << '\n'; + << ici->second.name << '\n'; lyxerr << " attrib: " - << (*ici).second.attrib << '\n'; + << ici->second.attrib << '\n'; lyxerr << " help: " - << (*ici).second.helpText << '\n'; + << ici->second.helpText << '\n'; } - help = (*ici).second.helpText; + help = ici->second.helpText; // if the is no help text use the name of the func instead. - if (help.empty()) help = (*ici).second.name; + if (help.empty()) help = ici->second.name; } if (help.empty()) { @@ -659,7 +659,7 @@ bool LyXAction::funcHasFlag(kb_action action, info_map::const_iterator ici = lyx_info_map.find(action); if (ici != lyx_info_map.end()) { - return (*ici).second.attrib & flag; + return ici->second.attrib & flag; } else { // it really should exist, but... lyxerr << "LyXAction::funcHasFlag: " diff --git a/src/MenuBackend.C b/src/MenuBackend.C index 6ae0d02ea4..166c0076bf 100644 --- a/src/MenuBackend.C +++ b/src/MenuBackend.C @@ -251,7 +251,7 @@ void Menu::expand(Menu & tomenu, Buffer * buf) const { for (const_iterator cit = begin(); cit != end() ; ++cit) { - switch ((*cit).kind()) { + switch (cit->kind()) { case MenuItem::Lastfiles: { int ii = 1; LastFiles::const_iterator lfit = lastfiles->begin(); @@ -305,7 +305,7 @@ void Menu::expand(Menu & tomenu, Buffer * buf) const Formats formats; kb_action action; - switch ((*cit).kind()) { + switch (cit->kind()) { case MenuItem::ImportFormats: formats = Importer::GetImportableFormats(); action = LFUN_IMPORT; @@ -331,7 +331,7 @@ void Menu::expand(Menu & tomenu, Buffer * buf) const if ((*fit)->dummy()) continue; string label = (*fit)->prettyname(); - if ((*cit).kind() == MenuItem::ImportFormats) + if (cit->kind() == MenuItem::ImportFormats) if ((*fit)->name() == "text") label = _("Ascii text as lines"); else if ((*fit)->name() == "textparagraph") diff --git a/src/Painter.C b/src/Painter.C index 8c731244c3..d32451ea4c 100644 --- a/src/Painter.C +++ b/src/Painter.C @@ -266,7 +266,7 @@ PainterBase & Painter::image(int x, int y, int w, int h, LyXImage const * image) PainterBase & Painter::text(int x, int y, string const & s, LyXFont const & f) { - return text(x, y, s.c_str(), s.length(), f); + return text(x, y, s.data(), s.length(), f); } diff --git a/src/TextCache.C b/src/TextCache.C index f7133d6030..d7bb5c54a2 100644 --- a/src/TextCache.C +++ b/src/TextCache.C @@ -75,7 +75,7 @@ LyXText * TextCache::findFit(Buffer * b, int p) Cache::iterator it = find_if(cache.begin(), cache.end(), text_fits(b, p)); if (it != cache.end()) { - LyXText * tmp = (*it).second.second; + LyXText * tmp = it->second.second; cache.erase(it); return tmp; } diff --git a/src/Variables.C b/src/Variables.C index 25e3c44539..22e41ed8b7 100644 --- a/src/Variables.C +++ b/src/Variables.C @@ -32,7 +32,7 @@ string const Variables::get(string const & var) const { Vars::const_iterator cit = vars_.find(var); if (cit != vars_.end()) - return (*cit).second; + return cit->second; else return string(); } diff --git a/src/WorkArea.C b/src/WorkArea.C index f1ffab7c70..2a262f7752 100644 --- a/src/WorkArea.C +++ b/src/WorkArea.C @@ -525,5 +525,5 @@ void WorkArea::putClipboard(string const & s) const static string hold; hold = s; - fl_stuff_clipboard(work_area, 0, hold.c_str(), hold.size(), 0); + fl_stuff_clipboard(work_area, 0, hold.data(), hold.size(), 0); } diff --git a/src/chset.C b/src/chset.C index a6ac394b4b..a2a7161915 100644 --- a/src/chset.C +++ b/src/chset.C @@ -70,7 +70,7 @@ pair const CharacterSet::encodeString(string const & str) const Cdef::const_iterator cit = map_.find(str); if (cit != map_.end()) { ret = true; - val = (*cit).second; + val = cit->second; } lyxerr[Debug::KBMAP] << " " << (ret ? "yes we" : "no we don't") diff --git a/src/converter.C b/src/converter.C index e07402318f..aa3fbe8d6b 100644 --- a/src/converter.C +++ b/src/converter.C @@ -699,7 +699,7 @@ bool Converters::Move(string const & from, string const & to, bool copy) it != files.end(); ++it) if (prefixIs(*it, base)) { string from2 = path + *it; - string to2 = to_base + (*it).substr(base.length()); + string to2 = to_base + it->substr(base.length()); to2 = ChangeExtension(to2, to_extension); lyxerr[Debug::FILES] << "moving " << from2 << " to " << to2 << endl; diff --git a/src/counters.C b/src/counters.C index 53d495a681..0fa97db461 100644 --- a/src/counters.C +++ b/src/counters.C @@ -65,7 +65,7 @@ Counters::~Counters() for (CounterList::iterator it = counterList.begin(); it != counterList.end(); ++it) - delete (*it).second; + delete it->second; } @@ -100,8 +100,8 @@ void Counters::newCounter(string const & newc, string const & oldc) } Counter * tmp = new Counter; - (*it).second->onstep.connect(SigC::slot(tmp, - &Counter::reset)); + it->second->onstep.connect(SigC::slot(tmp, + &Counter::reset)); counterList[newc] = tmp; } @@ -113,7 +113,7 @@ void Counters::set(string const & ctr, int val) lyxerr << "Counter does not exist." << endl; return; } - (*it).second->set(val); + it->second->set(val); } @@ -124,7 +124,7 @@ void Counters::addto(string const & ctr, int val) lyxerr << "Counter does not exist." << endl; return; } - (*it).second->addto(val); + it->second->addto(val); } @@ -135,7 +135,7 @@ int Counters::value(string const & ctr) const lyxerr << "Counter does not exist." << endl; return 0; } - return (*cit).second->value(); + return cit->second->value(); } @@ -146,5 +146,5 @@ void Counters::step(string const & ctr) lyxerr << "Counter does not exist." << endl; return; } - (*it).second->step(); + it->second->step(); } diff --git a/src/encoding.C b/src/encoding.C index fdc6ed4944..f28aad4d84 100644 --- a/src/encoding.C +++ b/src/encoding.C @@ -277,7 +277,7 @@ Encoding const * Encodings::getEncoding(string const & encoding) const { EncodingList::const_iterator it = encodinglist.find(encoding); if (it != encodinglist.end()) - return &(*it).second; + return &it->second; else return 0; } diff --git a/src/font.h b/src/font.h index ae164a7d10..7e286e48f1 100644 --- a/src/font.h +++ b/src/font.h @@ -56,7 +56,7 @@ struct lyxfont { static int width(string const & s, LyXFont const & f) { if (s.empty()) return 0; - return width(s.c_str(), s.length(), f); + return width(s.data(), s.length(), f); } /// //static diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index 4255c0d63c..fa5ab26b98 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,7 @@ +2001-07-12 Lars Gullik Bjønnes + + * ControlExternal.C: (*it). -> it-> + 2001-06-16 Angus Leeming * ButtonController.h: move some included header files out of the diff --git a/src/frontends/controllers/ControlExternal.C b/src/frontends/controllers/ControlExternal.C index 3207a2869a..e1c0b2b8bf 100644 --- a/src/frontends/controllers/ControlExternal.C +++ b/src/frontends/controllers/ControlExternal.C @@ -141,7 +141,7 @@ ExternalTemplate ControlExternal::getTemplate(int i) const for (int n = 1; n < i; ++n) ++i1; - return (*i1).second; + return i1->second; } diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 8fe51dca03..bbf2eea014 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,4 +1,10 @@ -<<<<<<< ChangeLog +2001-07-12 Lars Gullik Bjønnes + + * FormFiledialog.C: (*it). -> it-> + * Toolbar_pimpl.C: ditto + * RadioButtonGroup.C: ditto + * FormPreferences.C: ditto + 2001-07-03 Jean-Marc Lasgouttes * GUIRunTime.C (x11Display): @@ -6,7 +12,6 @@ (x11Colormap): (x11VisualDepth): new methods -======= 2001-07-03 Lars Gullik Bjønnes * FormDocument.C (class_apply): call CutAndPaste::'s staitc method @@ -17,7 +22,6 @@ * GUIRunTime.C (createMainView): implement ->>>>>>> 1.104 2001-06-22 John Levon * FormCharacter.C: diff --git a/src/frontends/xforms/FormDocument.C b/src/frontends/xforms/FormDocument.C index 828295fd02..f2dc47aa2c 100644 --- a/src/frontends/xforms/FormDocument.C +++ b/src/frontends/xforms/FormDocument.C @@ -139,7 +139,7 @@ void FormDocument::build() for (LyXTextClassList::const_iterator cit = textclasslist.begin(); cit != textclasslist.end(); ++cit) { - combo_doc_class->addto((*cit).description()); + combo_doc_class->addto(cit->description()); } fl_addto_choice(class_->choice_doc_spacing, @@ -191,7 +191,7 @@ void FormDocument::build() for (Languages::const_iterator cit = languages.begin(); cit != languages.end(); ++cit) { - combo_language->addto((*cit).second.lang()); + combo_language->addto(cit->second.lang()); } fl_addto_choice(language_->choice_quotes_language, diff --git a/src/frontends/xforms/FormFiledialog.C b/src/frontends/xforms/FormFiledialog.C index 260f6b7fb2..c43a2f049c 100644 --- a/src/frontends/xforms/FormFiledialog.C +++ b/src/frontends/xforms/FormFiledialog.C @@ -92,7 +92,7 @@ public: add(ID); return users[ID]; } - return (*cit).second; + return cit->second; } private: /// @@ -143,7 +143,7 @@ string const & GroupCache::find(gid_t ID) const add(ID); return groups[ID]; } - return (*cit).second; + return cit->second; } @@ -341,7 +341,7 @@ void FileDialog::Private::Reread() // Add them to directory box for (DirEntries::const_iterator cit = direntries.begin(); cit != direntries.end(); ++cit) { - string const temp = line + (*cit).pszDisplayed; + string const temp = line + cit->pszDisplayed; fl_add_browser_line(pFileDlgForm->List, temp.c_str()); } fl_set_browser_topline(pFileDlgForm->List, iDepth); @@ -452,7 +452,7 @@ void FileDialog::Private::SetButton(int iIndex, string const & pszName, *pTemp = pszPath; } else { fl_hide_object(pObject); - (*pTemp).erase(); + pTemp->erase(); } } diff --git a/src/frontends/xforms/FormPreferences.C b/src/frontends/xforms/FormPreferences.C index 6e121c1018..f8503dc84d 100644 --- a/src/frontends/xforms/FormPreferences.C +++ b/src/frontends/xforms/FormPreferences.C @@ -410,12 +410,12 @@ void FormPreferences::Colors::apply() for (vector::const_iterator cit = xformsColorDB.begin(); cit != xformsColorDB.end(); ++cit) { RGBColor col; - fl_getmcolor((*cit).colorID, &col.r, &col.g, &col.b); - if (col != (*cit).color()) { + fl_getmcolor(cit->colorID, &col.r, &col.g, &col.b); + if (col != cit->color()) { modifiedXformsPrefs = true; - if ((*cit).colorID == FL_BLACK) + if (cit->colorID == FL_BLACK) modifiedText = true; - if ((*cit).colorID == FL_COL1) + if (cit->colorID == FL_COL1) modifiedBackground = true; } } @@ -424,14 +424,13 @@ void FormPreferences::Colors::apply() for (vector::const_iterator cit = xformsColorDB.begin(); cit != xformsColorDB.end(); ++cit) { - fl_mapcolor((*cit).colorID, - (*cit).r, (*cit).g, (*cit).b); + fl_mapcolor(cit->colorID, cit->r, cit->g, cit->b); - if (modifiedText && (*cit).colorID == FL_BLACK) { + if (modifiedText && cit->colorID == FL_BLACK) { AdjustVal(FL_INACTIVE, FL_BLACK, 0.5); } - if (modifiedBackground && (*cit).colorID == FL_COL1) { + if (modifiedBackground && cit->colorID == FL_COL1) { AdjustVal(FL_MCOL, FL_COL1, 0.1); AdjustVal(FL_TOP_BCOL, FL_COL1, 0.1); AdjustVal(FL_LEFT_BCOL, FL_COL1, 0.1); @@ -440,9 +439,9 @@ void FormPreferences::Colors::apply() AdjustVal(FL_BOTTOM_BCOL, FL_COL1, -0.5); } - if ((*cit).colorID == GUI_COLOR_CURSOR) { + if (cit->colorID == GUI_COLOR_CURSOR) { fl_mapcolor(GUI_COLOR_CURSOR, - (*cit).r, (*cit).g, (*cit).b); + cit->r, cit->g, cit->b); fl_set_cursor_color(FL_DEFAULT_CURSOR, GUI_COLOR_CURSOR, FL_WHITE); } @@ -453,11 +452,11 @@ void FormPreferences::Colors::apply() // Now do the same for the LyX LColors... for (vector::const_iterator cit = lyxColorDB.begin(); cit != lyxColorDB.end(); ++cit) { - LColor::color lc = lcolor.getFromGUIName((*cit).getname()); + LColor::color lc = lcolor.getFromGUIName(cit->getname()); if (lc == LColor::inherit) continue; // Create a valid X11 name of the form "#rrggbb" - string const hexname = X11hexname((*cit).color()); + string const hexname = X11hexname(cit->color()); if (lcolor.getX11Name(lc) != hexname) { lyxerr[Debug::GUI] @@ -816,11 +815,11 @@ void FormPreferences::Colors::LoadBrowserLyX() fl_clear_browser(colbr); for (vector::const_iterator cit = xformsColorDB.begin(); cit != xformsColorDB.end(); ++cit) { - fl_addto_browser(colbr, (*cit).getname().c_str()); + fl_addto_browser(colbr, cit->getname().c_str()); } for (vector::const_iterator cit = lyxColorDB.begin(); cit != lyxColorDB.end(); ++cit) { - fl_addto_browser(colbr, (*cit).getname().c_str()); + fl_addto_browser(colbr, cit->getname().c_str()); } // just to be safe... @@ -1046,8 +1045,8 @@ void FormPreferences::Converters::UpdateBrowser() fl_clear_browser(dialog_->browser_all); for (::Converters::const_iterator cit = local_converters.begin(); cit != local_converters.end(); ++cit) { - string const name = (*cit).From->prettyname() + " -> " - + (*cit).To->prettyname(); + string const name = cit->From->prettyname() + " -> " + + cit->To->prettyname(); fl_addto_browser(dialog_->browser_all, name.c_str()); } Input(); @@ -1190,7 +1189,7 @@ void FormPreferences::Converters::UpdateChoices() const choice += " | "; else choice += " "; - choice += (*cit).prettyname(); + choice += cit->prettyname(); } choice += " "; @@ -1313,7 +1312,7 @@ void FormPreferences::Formats::UpdateBrowser() for (::Formats::const_iterator cit = local_formats.begin(); cit != local_formats.end(); ++cit) fl_addto_browser(dialog_->browser_all, - (*cit).prettyname().c_str()); + cit->prettyname().c_str()); Input(); fl_unfreeze_form(dialog_->form); @@ -1669,7 +1668,7 @@ void FormPreferences::Language::build() for (Languages::const_iterator cit = languages.begin(); cit != languages.end(); ++cit) { - combo_default_lang->addto((*cit).second.lang()); + combo_default_lang->addto(cit->second.lang()); } fl_end_form(); diff --git a/src/frontends/xforms/RadioButtonGroup.C b/src/frontends/xforms/RadioButtonGroup.C index 403b19c145..21fdb673b0 100644 --- a/src/frontends/xforms/RadioButtonGroup.C +++ b/src/frontends/xforms/RadioButtonGroup.C @@ -72,7 +72,7 @@ void RadioButtonGroup::setButton(int value) << endl; } else { - fl_set_button((*it).first, 1); + fl_set_button(it->first, 1); } } @@ -94,7 +94,7 @@ int RadioButtonGroup::getButton() // If such a button was found, return its value. if (it != map.end()) { - return (*it).second; + return it->second; } lyxerr << "BUG: No radio button found to be active." << endl; diff --git a/src/frontends/xforms/Toolbar_pimpl.C b/src/frontends/xforms/Toolbar_pimpl.C index 4657f45b8e..fee4d5e182 100644 --- a/src/frontends/xforms/Toolbar_pimpl.C +++ b/src/frontends/xforms/Toolbar_pimpl.C @@ -237,10 +237,10 @@ void Toolbar::Pimpl::updateLayoutList(bool force) LyXTextClass::const_iterator end = tc.end(); for (LyXTextClass::const_iterator cit = tc.begin(); cit != end; ++cit) { - if ((*cit).obsoleted_by().empty()) - combox->addline(_((*cit).name())); + if (cit->obsoleted_by().empty()) + combox->addline(_(cit->name())); else - combox->addline("@N" + _((*cit).name())); + combox->addline("@N" + _(cit->name())); } } // we need to do this. diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 9d83f19d05..dff8f7dede 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,8 @@ +2001-07-12 Lars Gullik Bjønnes + + * insetexternal.C: (*it). -> it-> + * insettext.C: ditto + 2001-07-11 Jean-Marc Lasgouttes * insetcollapsable.C (edit): always open collapsed insets (even if diff --git a/src/insets/insetexternal.C b/src/insets/insetexternal.C index 8eaa064280..408a9ba40e 100644 --- a/src/insets/insetexternal.C +++ b/src/insets/insetexternal.C @@ -133,11 +133,11 @@ int InsetExternal::write(string const & format, if (et.automaticProduction) { executeCommand(doSubstitution(buf, - (*cit).second.updateCommand), + cit->second.updateCommand), buf); } - os << doSubstitution(buf, (*cit).second.product); + os << doSubstitution(buf, cit->second.product); return 0; // CHECK (FIXME check what ? - jbl) } @@ -176,11 +176,11 @@ void InsetExternal::validate(LaTeXFeatures & features) const if (cit == et.formats.end()) return; - if (!(*cit).second.requirement.empty()) { - features.require((*cit).second.requirement); + if (!cit->second.requirement.empty()) { + features.require(cit->second.requirement); } - if (!(*cit).second.preamble.empty()) { - features.externalPreambles += (*cit).second.preamble + "\n"; + if (!cit->second.preamble.empty()) { + features.externalPreambles += cit->second.preamble + "\n"; } } @@ -267,7 +267,7 @@ void InsetExternal::updateExternal() const return; executeCommand(doSubstitution(view_->buffer(), - (*cit).second.updateCommand), + cit->second.updateCommand), view_->buffer()); } diff --git a/src/insets/insettext.C b/src/insets/insettext.C index 5b0e3aa863..dee8bec63f 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -1870,8 +1870,8 @@ void InsetText::paragraph(Paragraph * p) #if 0 // we now have to update/redraw all instances for (Cache::iterator cit = cache.begin(); cit != cache.end(); ++cit) { - delete (*cit).second; - (*cit).second = 0; + delete cit->second; + cit->second = 0; } #endif // redraw myself when asked for diff --git a/src/kbmap.C b/src/kbmap.C index 13ec0039ea..5c97ff3eeb 100644 --- a/src/kbmap.C +++ b/src/kbmap.C @@ -117,19 +117,19 @@ int kb_keymap::lookup(unsigned int key, for (Table::const_iterator cit = table.begin(); cit != table.end(); ++cit) { - unsigned int const msk1 = (*cit).mod & 0xffff; - unsigned int const msk0 = ((*cit).mod >> 16) & 0xffff; - if ((*cit).code == key && (mod & ~msk0) == msk1) { + unsigned int const msk1 = cit->mod & 0xffff; + unsigned int const msk0 = (cit->mod >> 16) & 0xffff; + if (cit->code == key && (mod & ~msk0) == msk1) { // math found: - if ((*cit).table.get()) { + if (cit->table.get()) { // this is a prefix key - set new map - seq->curmap = (*cit).table.get(); + seq->curmap = cit->table.get(); return 0; } else { // final key - reset map seq->curmap = seq->stdmap; seq->delseq(); - return (*cit).action; + return cit->action; } } } @@ -181,7 +181,7 @@ int kb_keymap::defkey(kb_sequence * seq, int action, int idx /*= 0*/) if (table.size() != 0) { // without this I get strange crashes Table::iterator end = table.end(); for (Table::iterator it = table.begin(); it != end; ++it) { - if (code == (*it).code && modmsk == (*it).mod) { + if (code == it->code && modmsk == it->mod) { // overwrite binding if (idx + 1 == seq->length) { string buf; @@ -191,12 +191,12 @@ int kb_keymap::defkey(kb_sequence * seq, int action, int idx /*= 0*/) << buf << "' is overriding old binding..." << endl; - if ((*it).table.get()) { - (*it).table.reset(0); + if (it->table.get()) { + it->table.reset(0); } - (*it).action = action; + it->action = action; return 0; - } else if (!(*it).table.get()) { + } else if (!it->table.get()) { string buf; seq->print(buf, true); lyxerr << "Error: New binding for '" << buf @@ -204,23 +204,23 @@ int kb_keymap::defkey(kb_sequence * seq, int action, int idx /*= 0*/) << endl; return -1; } else { - return (*it).table->defkey(seq, action, - idx + 1); + return it->table->defkey(seq, action, + idx + 1); } } } } Table::iterator newone = table.insert(table.end(), kb_key()); - (*newone).code = code; - (*newone).mod = modmsk; + newone->code = code; + newone->mod = modmsk; if (idx + 1 == seq->length) { - (*newone).action = action; - (*newone).table.reset(0); + newone->action = action; + newone->table.reset(0); return 0; } else { - (*newone).table.reset(new kb_keymap); - return (*newone).table->defkey(seq, action, idx + 1); + newone->table.reset(new kb_keymap); + return newone->table->defkey(seq, action, idx + 1); } } @@ -242,12 +242,12 @@ string const kb_keymap::findbinding(int act, string const & prefix) const Table::const_iterator end = table.end(); for (Table::const_iterator cit = table.begin(); cit != end; ++cit) { - if ((*cit).table.get()) { - res += (*cit).table->findbinding(act, - prefix - + keyname((*cit)) - + " "); - } else if ((*cit).action == act) { + if (cit->table.get()) { + res += cit->table->findbinding(act, + prefix + + keyname((*cit)) + + " "); + } else if (cit->action == act) { res += "["; res += prefix + keyname((*cit)); res += "] "; diff --git a/src/language.C b/src/language.C index 298890e067..77f31cf93f 100644 --- a/src/language.C +++ b/src/language.C @@ -95,7 +95,7 @@ Language const * Languages::getLanguage(string const & language) const { const_iterator it = languagelist.find(language); if (it != languagelist.end()) - return &(*it).second; + return &it->second; else return 0; } diff --git a/src/minibuffer.C b/src/minibuffer.C index 70015b2c2e..a347acec8e 100644 --- a/src/minibuffer.C +++ b/src/minibuffer.C @@ -103,7 +103,7 @@ int MiniBuffer::peek_event(FL_OBJECT * ob, int event, int key) stored_set(input); fl_set_input(ob, _("[End of history]")); } else { - fl_set_input(ob, (*hist_iter).c_str()); + fl_set_input(ob, hist_iter->c_str()); } return 1; case XK_Up: @@ -113,7 +113,7 @@ int MiniBuffer::peek_event(FL_OBJECT * ob, int event, int key) fl_set_input(ob, _("[Beginning of history]")); } else { --hist_iter; - fl_set_input(ob, (*hist_iter).c_str()); + fl_set_input(ob, hist_iter->c_str()); } return 1; case 9: diff --git a/src/paragraph.C b/src/paragraph.C index 5ce8667b97..9956418971 100644 --- a/src/paragraph.C +++ b/src/paragraph.C @@ -150,7 +150,7 @@ Paragraph::~Paragraph() for (InsetList::iterator it = insetlist.begin(); it != insetlist.end(); ++it) { - delete (*it).inset; + delete it->inset; } // ale970302 @@ -336,16 +336,16 @@ void Paragraph::validate(LaTeXFeatures & features) const for (Pimpl::FontList::const_iterator cit = pimpl_->fontlist.begin(); cit != pimpl_->fontlist.end(); ++cit) { - if ((*cit).font().noun() == LyXFont::ON) { + if (cit->font().noun() == LyXFont::ON) { lyxerr[Debug::LATEX] << "font.noun: " - << (*cit).font().noun() + << cit->font().noun() << endl; features.noun = true; lyxerr[Debug::LATEX] << "Noun enabled. Font: " - << (*cit).font().stateText(0) + << cit->font().stateText(0) << endl; } - switch ((*cit).font().color()) { + switch (cit->font().color()) { case LColor::none: case LColor::inherit: case LColor::ignore: @@ -353,11 +353,11 @@ void Paragraph::validate(LaTeXFeatures & features) const default: features.color = true; lyxerr[Debug::LATEX] << "Color enabled. Font: " - << (*cit).font().stateText(0) + << cit->font().stateText(0) << endl; } - Language const * language = (*cit).font().language(); + Language const * language = cit->font().language(); if (language->babel() != doc_language->babel()) { features.UsedLanguages.insert(language); lyxerr[Debug::LATEX] << "Found language " @@ -368,8 +368,8 @@ void Paragraph::validate(LaTeXFeatures & features) const // then the insets for (InsetList::const_iterator cit = insetlist.begin(); cit != insetlist.end(); ++cit) { - if ((*cit).inset) - (*cit).inset->validate(features); + if (cit->inset) + cit->inset->validate(features); } } @@ -413,8 +413,8 @@ void Paragraph::cutIntoMinibuffer(BufferParams const & bparams, lower_bound(insetlist.begin(), insetlist.end(), search_elem, Pimpl::matchIT()); - if (it != insetlist.end() && (*it).pos == pos) - (*it).inset = 0; + if (it != insetlist.end() && it->pos == pos) + it->inset = 0; } else { minibuffer_inset = 0; minibuffer_char = ' '; @@ -508,8 +508,8 @@ Inset * Paragraph::getInset(Paragraph::size_type pos) InsetList::iterator it = lower_bound(insetlist.begin(), insetlist.end(), search_inset, Pimpl::matchIT()); - if (it != insetlist.end() && (*it).pos == pos) - return (*it).inset; + if (it != insetlist.end() && it->pos == pos) + return it->inset; lyxerr << "ERROR (Paragraph::GetInset): " "Inset does not exist: " << pos << endl; @@ -533,8 +533,8 @@ Inset const * Paragraph::getInset(Paragraph::size_type pos) const InsetList::const_iterator cit = lower_bound(insetlist.begin(), insetlist.end(), search_inset, Pimpl::matchIT()); - if (cit != insetlist.end() && (*cit).pos == pos) - return (*cit).inset; + if (cit != insetlist.end() && cit->pos == pos) + return cit->inset; lyxerr << "ERROR (Paragraph::GetInset): " "Inset does not exist: " << pos << endl; @@ -559,7 +559,7 @@ LyXFont const Paragraph::getFontSettings(BufferParams const & bparams, pimpl_->fontlist.end(), search_font, Pimpl::matchFT()); if (cit != pimpl_->fontlist.end()) - return (*cit).font(); + return cit->font(); if (pos == size() && size()) return getFontSettings(bparams, pos - 1); @@ -657,7 +657,7 @@ Paragraph::highestFontInRange(Paragraph::size_type startpos, pimpl_->fontlist.end(), start_search, Pimpl::matchFT()); cit != end_it; ++cit) { - LyXFont::FONT_SIZE size = (*cit).font().size(); + LyXFont::FONT_SIZE size = cit->font().size(); if (size > maxsize && size <= LyXFont::SIZE_HUGER) maxsize = size; } @@ -1218,8 +1218,8 @@ int Paragraph::getPositionOfInset(Inset * inset) const // Find the entry. for (InsetList::const_iterator cit = insetlist.begin(); cit != insetlist.end(); ++cit) { - if ((*cit).inset == inset) { - return (*cit).pos; + if (cit->inset == inset) { + return cit->pos; } } if (inset == bibkey) @@ -1874,7 +1874,7 @@ bool Paragraph::isMultiLingual(BufferParams const & bparams) Language const * doc_language = bparams.language; for (Pimpl::FontList::const_iterator cit = pimpl_->fontlist.begin(); cit != pimpl_->fontlist.end(); ++cit) - if ((*cit).font().language() != doc_language) + if (cit->font().language() != doc_language) return true; return false; } @@ -1936,8 +1936,8 @@ void Paragraph::setInsetOwner(Inset * i) pimpl_->inset_owner = i; for (InsetList::const_iterator cit = insetlist.begin(); cit != insetlist.end(); ++cit) { - if ((*cit).inset) - (*cit).inset->setOwner(i); + if (cit->inset) + cit->inset->setOwner(i); } } @@ -1947,10 +1947,10 @@ void Paragraph::deleteInsetsLyXText(BufferView * bv) // then the insets for (InsetList::const_iterator cit = insetlist.begin(); cit != insetlist.end(); ++cit) { - if ((*cit).inset) { - if ((*cit).inset->isTextInset()) { + if (cit->inset) { + if (cit->inset->isTextInset()) { static_cast - ((*cit).inset)->deleteLyXText(bv, true); + (cit->inset)->deleteLyXText(bv, true); } } } @@ -1962,10 +1962,10 @@ void Paragraph::resizeInsetsLyXText(BufferView * bv) // then the insets for (InsetList::const_iterator cit = insetlist.begin(); cit != insetlist.end(); ++cit) { - if ((*cit).inset) { - if ((*cit).inset->isTextInset()) { + if (cit->inset) { + if (cit->inset->isTextInset()) { static_cast - ((*cit).inset)->resizeLyXText(bv, true); + (cit->inset)->resizeLyXText(bv, true); } } } diff --git a/src/paragraph.h b/src/paragraph.h index da4fb01894..9fc5b9b16f 100644 --- a/src/paragraph.h +++ b/src/paragraph.h @@ -371,9 +371,9 @@ public: return *this; } /// - Inset * operator*() { return (*it).inset; } + Inset * operator*() { return it->inset; } /// - size_type getPos() const {return (*it).pos; } + size_type getPos() const {return it->pos; } /// bool operator==(inset_iterator const & iter) const { return it == iter.it; diff --git a/src/paragraph_pimpl.C b/src/paragraph_pimpl.C index 0963a4f124..27de45d0ae 100644 --- a/src/paragraph_pimpl.C +++ b/src/paragraph_pimpl.C @@ -102,7 +102,7 @@ void Paragraph::Pimpl::insertChar(Paragraph::size_type pos, fontlist.end(), search_font, matchFT()); it != fontlist.end(); ++it) - (*it).pos((*it).pos() + 1); + it->pos(it->pos() + 1); // Update the inset table. InsetTable search_inset(pos, 0); @@ -110,7 +110,7 @@ void Paragraph::Pimpl::insertChar(Paragraph::size_type pos, owner_->insetlist.end(), search_inset, matchIT()); it != owner_->insetlist.end(); ++it) - ++(*it).pos; + ++it->pos; owner_->setFont(pos, font); } @@ -130,7 +130,7 @@ void Paragraph::Pimpl::insertInset(Paragraph::size_type pos, InsetList::iterator it = std::lower_bound(owner_->insetlist.begin(), owner_->insetlist.end(), search_inset, matchIT()); - if (it != owner_->insetlist.end() && (*it).pos == pos) { + if (it != owner_->insetlist.end() && it->pos == pos) { lyxerr << "ERROR (Paragraph::InsertInset): " "there is an inset in position: " << pos << std::endl; } else { @@ -153,8 +153,8 @@ void Paragraph::Pimpl::erase(Paragraph::size_type pos) std::lower_bound(owner_->insetlist.begin(), owner_->insetlist.end(), search_inset, matchIT()); - if (it != owner_->insetlist.end() && (*it).pos == pos) { - delete (*it).inset; + if (it != owner_->insetlist.end() && it->pos == pos) { + delete it->inset; owner_->insetlist.erase(it); } } @@ -168,10 +168,10 @@ void Paragraph::Pimpl::erase(Paragraph::size_type pos) std::lower_bound(fontlist.begin(), fontlist.end(), search_font, matchFT()); - if (it != fontlist.end() && (*it).pos() == pos && + if (it != fontlist.end() && it->pos() == pos && (pos == 0 || (it != fontlist.begin() - && (*(it - 1)).pos() == pos - 1))) { + && boost::prior(it)->pos() == pos - 1))) { // If it is a multi-character font // entry, we just make it smaller // (see update below), otherwise we @@ -189,7 +189,7 @@ void Paragraph::Pimpl::erase(Paragraph::size_type pos) // Update all other entries. FontList::iterator fend = fontlist.end(); for (; it != fend; ++it) - (*it).pos((*it).pos() - 1); + it->pos(it->pos() - 1); // Update the inset table. InsetTable search_inset(pos, 0); @@ -199,7 +199,7 @@ void Paragraph::Pimpl::erase(Paragraph::size_type pos) lend, search_inset, matchIT()); it != lend; ++it) - --(*it).pos; + --it->pos; } diff --git a/src/support/ChangeLog b/src/support/ChangeLog index a4701a298a..56cd9a58e5 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,3 +1,7 @@ +2001-07-12 Lars Gullik Bjønnes + + * translator.h: (*it). -> it-> + 2001-06-26 The LyX Project * filetools.C (DeleteAllFilesInDir): send debug output to diff --git a/src/support/filetools.C b/src/support/filetools.C index f082e2ad9c..c247043bc3 100644 --- a/src/support/filetools.C +++ b/src/support/filetools.C @@ -226,7 +226,7 @@ vector const DirList(string const & dir, string const & ext) vector dirlist; directory_iterator dit("dir"); while (dit != directory_iterator()) { - string fil = (*dit).filename; + string fil = dit->filename; if (prefixIs(fil, extension)) { dirlist.push_back(fil); } diff --git a/src/support/translator.h b/src/support/translator.h index 84cc3a31a2..e211aa468d 100644 --- a/src/support/translator.h +++ b/src/support/translator.h @@ -58,7 +58,7 @@ public: ); if (it != map.end()) { - return (*it).second; + return it->second; } else { return default_t2; } @@ -85,7 +85,7 @@ public: ); if (it != map.end()) - return (*it).first; + return it->first; else { return default_t1; } diff --git a/src/texrow.C b/src/texrow.C index 61f0a7b0ac..ba2a065f93 100644 --- a/src/texrow.C +++ b/src/texrow.C @@ -84,13 +84,13 @@ bool TexRow::getIdFromRow(int row, int & id, int & pos) const // same pos. for (; kit != end; ++kit) { if (&(*kit) != &(*cit) - && (*kit).id() == (*cit).id() - && (*kit).pos() >= (*cit).pos()) - (*kit).pos((*kit).pos() + 1); + && kit->id() == cit->id() + && kit->pos() >= cit->pos()) + kit->pos(kit->pos() + 1); } #endif - id = (*cit).id(); - pos = (*cit).pos(); + id = cit->id(); + pos = cit->pos(); return true; } id = -1; @@ -109,16 +109,16 @@ void TexRow::increasePos(int id, int pos) const RowList::iterator kit = rowlist.begin(); RowList::iterator end = rowlist.end(); for (; kit != end; ++kit) { - if (id == (*kit).id() - && pos < (*kit).pos()) { - (*kit).pos((*kit).pos() + 1); + if (id == kit->id() + && pos < kit->pos()) { + kit->pos(kit->pos() + 1); lyxerr[Debug::INFO] << "TeXRow::increasePos: ideally this " "should never happen..." << endl; } // When verified to work this clause should be deleted. - if (id == (*kit).id() - && pos == (*kit).pos()) { + if (id == kit->id() + && pos == kit->pos()) { lyxerr[Debug::INFO] << "TexRow::increasePos: this should happen " "maximum one time for each run of " diff --git a/src/trans.C b/src/trans.C index 403ac0630a..29621b4ca6 100644 --- a/src/trans.C +++ b/src/trans.C @@ -1,7 +1,7 @@ #include #ifdef __GNUG__ -#pragma implementation "trans.h" +#pragma implementation #endif #include "LyXView.h" @@ -139,8 +139,12 @@ struct keyword_item kmapTags[K_LAST - 1] = { tex_accent getkeymod(string const &); +#if 0 void Trans::AddDeadkey(tex_accent accent, string const & keys, string const & allowed) +#else +void Trans::AddDeadkey(tex_accent accent, string const & keys) +#endif { if (kmod_list_[accent]) { FreeException(kmod_list_[accent]->exception_list); @@ -156,7 +160,9 @@ void Trans::AddDeadkey(tex_accent accent, string const & keys, kmod_list_[accent]->allowed= lyx_accent_table[accent].native; } else { #endif +#if 0 kmod_list_[accent]->allowed = allowed; +#endif #if 0 } #endif @@ -194,7 +200,7 @@ int Trans::Load(LyXLex & lex) } else return -1; - string keys = lex.GetString(); + string const keys = lex.GetString(); if (lex.next(true)) { if (lyxerr.debugging(Debug::KBMAP)) @@ -208,6 +214,10 @@ int Trans::Load(LyXLex & lex) if (accent == TEX_NOACCENT) return -1; +#if 1 +#warning This code should be removed... + // But we need to fix up all the kmap files first + // so that this field is not present anymore. if (lex.next(true)) { if (lyxerr.debugging(Debug::KBMAP)) lyxerr << "allowed\t`" << lex.text() @@ -215,9 +225,11 @@ int Trans::Load(LyXLex & lex) } else return -1; - string allowed = lex.GetString(); - - AddDeadkey(accent, keys, allowed); + string const allowed = lex.GetString(); + AddDeadkey(accent, keys /*, allowed*/); +#else + AddDeadkey(accent, keys); +#endif break; } case KCOMB: { diff --git a/src/trans.h b/src/trans.h index a056e1233a..bb896ee9a7 100644 --- a/src/trans.h +++ b/src/trans.h @@ -69,9 +69,13 @@ private: typedef KmodInfo kmod_list_decl; /// typedef KmodException keyexc; - +#if 0 /// void AddDeadkey(tex_accent, string const &, string const &); +#else + /// + void AddDeadkey(tex_accent, string const &); +#endif /// void FreeKeymap(); /// diff --git a/src/trans_decl.h b/src/trans_decl.h index df36f7cb0d..d26f05cecf 100644 --- a/src/trans_decl.h +++ b/src/trans_decl.h @@ -11,6 +11,7 @@ struct Keyexc { char c; /// exception data string data; + /// Keyexc * next; /// Combination with another deadkey bool combined; @@ -27,8 +28,10 @@ struct KmodInfo { string data; /// tex_accent accent; +#if 0 /// string allowed; +#endif /// KmodException exception_list; ///