+2001-07-12 Lars Gullik Bjønnes <larsbj@birdstep.com>
+
+ * ui/default.ui: add icon for ert-insert + entry in menu
+
2001-07-09 Juergen Vigna <jug@sad.it>
* images/banner.xpm: new development banner after a LyX-Meeting!
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"
Icon "font-noun"
Icon "font-free"
Separator
- Icon "tex-mode"
+# Icon "tex-mode"
+ Icon "ert-insert"
Icon "math-mode"
Separator
Icon "footnote-insert"
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;
+2001-07-12 Lars Gullik Bjønnes <larsbj@birdstep.com>
+
+ * 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 <Jean-Marc.Lasgouttes@inria.fr>
* BufferView_pimpl.C (Dispatch): handle LFUN_OPENSTUFF.
// 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);
}
}
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 << " +";
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;
}
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;
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;
}
}
// 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);
}
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;
}
}
{
List::const_iterator cit = list.find(t);
if (cit != list.end())
- return (*cit).second.placement();
+ return cit->second.placement();
return string();
}
// 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
{
InfoTab::const_iterator ici = infotab.find(c);
if (ici != infotab.end())
- return _((*ici).second.guiname);
+ return _(ici->second.guiname);
return "none";
}
{
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';
{
InfoTab::const_iterator ici = infotab.find(c);
if (ici != infotab.end())
- return (*ici).second.latexname;
+ return ici->second.latexname;
return "black";
}
{
InfoTab::const_iterator ici = infotab.find(c);
if (ici != infotab.end())
- return (*ici).second.lyxname;
+ return ici->second.lyxname;
return "black";
}
{
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";
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;
}
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;
}
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
// pseudo action exist
lyxerr[Debug::ACTION] << "Pseudoaction exist["
<< action << '|'
- << arg << "] = " << (*aci).second << endl;
+ << arg << "] = " << aci->second << endl;
- return (*aci).second;
+ return aci->second;
}
// 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
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;
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;
}
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;
}
}
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
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()) {
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: "
{
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();
Formats formats;
kb_action action;
- switch ((*cit).kind()) {
+ switch (cit->kind()) {
case MenuItem::ImportFormats:
formats = Importer::GetImportableFormats();
action = LFUN_IMPORT;
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")
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);
}
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;
}
{
Vars::const_iterator cit = vars_.find(var);
if (cit != vars_.end())
- return (*cit).second;
+ return cit->second;
else
return string();
}
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);
}
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")
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;
for (CounterList::iterator it = counterList.begin();
it != counterList.end();
++it)
- delete (*it).second;
+ delete it->second;
}
}
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;
}
lyxerr << "Counter does not exist." << endl;
return;
}
- (*it).second->set(val);
+ it->second->set(val);
}
lyxerr << "Counter does not exist." << endl;
return;
}
- (*it).second->addto(val);
+ it->second->addto(val);
}
lyxerr << "Counter does not exist." << endl;
return 0;
}
- return (*cit).second->value();
+ return cit->second->value();
}
lyxerr << "Counter does not exist." << endl;
return;
}
- (*it).second->step();
+ it->second->step();
}
{
EncodingList::const_iterator it = encodinglist.find(encoding);
if (it != encodinglist.end())
- return &(*it).second;
+ return &it->second;
else
return 0;
}
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
+2001-07-12 Lars Gullik Bjønnes <larsbj@birdstep.com>
+
+ * ControlExternal.C: (*it). -> it->
+
2001-06-16 Angus Leeming <a.leeming@ic.ac.uk>
* ButtonController.h: move some included header files out of the
for (int n = 1; n < i; ++n)
++i1;
- return (*i1).second;
+ return i1->second;
}
-<<<<<<< ChangeLog
+2001-07-12 Lars Gullik Bjønnes <larsbj@birdstep.com>
+
+ * FormFiledialog.C: (*it). -> it->
+ * Toolbar_pimpl.C: ditto
+ * RadioButtonGroup.C: ditto
+ * FormPreferences.C: ditto
+
2001-07-03 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* GUIRunTime.C (x11Display):
(x11Colormap):
(x11VisualDepth): new methods
-=======
2001-07-03 Lars Gullik Bjønnes <larsbj@birdstep.com>
* FormDocument.C (class_apply): call CutAndPaste::'s staitc method
* GUIRunTime.C (createMainView): implement
->>>>>>> 1.104
2001-06-22 John Levon <moz@compsoc.man.ac.uk>
* FormCharacter.C:
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,
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,
add(ID);
return users[ID];
}
- return (*cit).second;
+ return cit->second;
}
private:
///
add(ID);
return groups[ID];
}
- return (*cit).second;
+ return cit->second;
}
// 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);
*pTemp = pszPath;
} else {
fl_hide_object(pObject);
- (*pTemp).erase();
+ pTemp->erase();
}
}
for (vector<XformsColor>::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;
}
}
for (vector<XformsColor>::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);
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);
}
// Now do the same for the LyX LColors...
for (vector<NamedColor>::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]
fl_clear_browser(colbr);
for (vector<XformsColor>::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<NamedColor>::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...
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();
choice += " | ";
else
choice += " ";
- choice += (*cit).prettyname();
+ choice += cit->prettyname();
}
choice += " ";
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);
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();
<< endl;
}
else {
- fl_set_button((*it).first, 1);
+ fl_set_button(it->first, 1);
}
}
// 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;
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.
+2001-07-12 Lars Gullik Bjønnes <larsbj@birdstep.com>
+
+ * insetexternal.C: (*it). -> it->
+ * insettext.C: ditto
+
2001-07-11 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* insetcollapsable.C (edit): always open collapsed insets (even if
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)
}
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";
}
}
return;
executeCommand(doSubstitution(view_->buffer(),
- (*cit).second.updateCommand),
+ cit->second.updateCommand),
view_->buffer());
}
#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
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;
}
}
}
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;
<< 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
<< 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);
}
}
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 += "] ";
{
const_iterator it = languagelist.find(language);
if (it != languagelist.end())
- return &(*it).second;
+ return &it->second;
else
return 0;
}
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:
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:
for (InsetList::iterator it = insetlist.begin();
it != insetlist.end(); ++it) {
- delete (*it).inset;
+ delete it->inset;
}
// ale970302
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:
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 "
// 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);
}
}
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 = ' ';
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;
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;
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);
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;
}
// 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)
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;
}
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);
}
}
// 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<UpdatableInset *>
- ((*cit).inset)->deleteLyXText(bv, true);
+ (cit->inset)->deleteLyXText(bv, true);
}
}
}
// 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<UpdatableInset *>
- ((*cit).inset)->resizeLyXText(bv, true);
+ (cit->inset)->resizeLyXText(bv, true);
}
}
}
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;
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);
owner_->insetlist.end(),
search_inset, matchIT());
it != owner_->insetlist.end(); ++it)
- ++(*it).pos;
+ ++it->pos;
owner_->setFont(pos, font);
}
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 {
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);
}
}
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
// 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);
lend,
search_inset, matchIT());
it != lend; ++it)
- --(*it).pos;
+ --it->pos;
}
+2001-07-12 Lars Gullik Bjønnes <larsbj@birdstep.com>
+
+ * translator.h: (*it). -> it->
+
2001-06-26 The LyX Project <lyx@violet.home.sad.it>
* filetools.C (DeleteAllFilesInDir): send debug output to
vector<string> 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);
}
);
if (it != map.end()) {
- return (*it).second;
+ return it->second;
} else {
return default_t2;
}
);
if (it != map.end())
- return (*it).first;
+ return it->first;
else {
return default_t1;
}
// 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;
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 "
#include <config.h>
#ifdef __GNUG__
-#pragma implementation "trans.h"
+#pragma implementation
#endif
#include "LyXView.h"
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);
kmod_list_[accent]->allowed= lyx_accent_table[accent].native;
} else {
#endif
+#if 0
kmod_list_[accent]->allowed = allowed;
+#endif
#if 0
}
#endif
} else
return -1;
- string keys = lex.GetString();
+ string const keys = lex.GetString();
if (lex.next(true)) {
if (lyxerr.debugging(Debug::KBMAP))
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()
} 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: {
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();
///
char c;
/// exception data
string data;
+ ///
Keyexc * next;
/// Combination with another deadkey
bool combined;
string data;
///
tex_accent accent;
+#if 0
///
string allowed;
+#endif
///
KmodException exception_list;
///