small changes read changelog

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2221 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2001-07-12 11:11:10 +00:00
parent 0024f42724
commit 6396f9a204
43 changed files with 276 additions and 200 deletions

View File

@ -1,3 +1,7 @@
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!

View File

@ -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"

View File

@ -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;

View File

@ -1,3 +1,38 @@
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.

View File

@ -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);
}
}

View File

@ -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;
}
}

View File

@ -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

View File

@ -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;
}

View File

@ -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: "

View File

@ -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")

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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();
}

View File

@ -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);
}

View File

@ -70,7 +70,7 @@ pair<bool, int> 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")

View File

@ -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;

View File

@ -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();
}

View File

@ -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;
}

View File

@ -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

View File

@ -1,3 +1,7 @@
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

View File

@ -141,7 +141,7 @@ ExternalTemplate ControlExternal::getTemplate(int i) const
for (int n = 1; n < i; ++n)
++i1;
return (*i1).second;
return i1->second;
}

View File

@ -1,4 +1,10 @@
<<<<<<< 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):
@ -6,7 +12,6 @@
(x11Colormap):
(x11VisualDepth): new methods
=======
2001-07-03 Lars Gullik Bjønnes <larsbj@birdstep.com>
* FormDocument.C (class_apply): call CutAndPaste::'s staitc method
@ -17,7 +22,6 @@
* GUIRunTime.C (createMainView): implement
>>>>>>> 1.104
2001-06-22 John Levon <moz@compsoc.man.ac.uk>
* FormCharacter.C:

View File

@ -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,

View File

@ -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();
}
}

View File

@ -410,12 +410,12 @@ void FormPreferences::Colors::apply()
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;
}
}
@ -424,14 +424,13 @@ void FormPreferences::Colors::apply()
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);
@ -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<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]
@ -816,11 +815,11 @@ void FormPreferences::Colors::LoadBrowserLyX()
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...
@ -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();

View File

@ -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;

View File

@ -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.

View File

@ -1,3 +1,8 @@
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

View File

@ -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());
}

View File

@ -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

View File

@ -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 += "] ";

View File

@ -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;
}

View File

@ -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:

View File

@ -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<UpdatableInset *>
((*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<UpdatableInset *>
((*cit).inset)->resizeLyXText(bv, true);
(cit->inset)->resizeLyXText(bv, true);
}
}
}

View File

@ -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;

View File

@ -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;
}

View File

@ -1,3 +1,7 @@
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

View File

@ -226,7 +226,7 @@ vector<string> const DirList(string const & dir, string const & ext)
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);
}

View File

@ -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;
}

View File

@ -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 "

View File

@ -1,7 +1,7 @@
#include <config.h>
#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: {

View File

@ -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();
///

View File

@ -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;
///