mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 22:06:15 +00:00
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:
parent
0024f42724
commit
6396f9a204
@ -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>
|
2001-07-09 Juergen Vigna <jug@sad.it>
|
||||||
|
|
||||||
* images/banner.xpm: new development banner after a LyX-Meeting!
|
* images/banner.xpm: new development banner after a LyX-Meeting!
|
||||||
|
@ -201,6 +201,7 @@ Menuset
|
|||||||
Item "Note...|N" "note-insert"
|
Item "Note...|N" "note-insert"
|
||||||
Submenu "Lists & TOC|O" "insert_toc"
|
Submenu "Lists & TOC|O" "insert_toc"
|
||||||
Separator
|
Separator
|
||||||
|
Item "TeX|T" "ert-insert"
|
||||||
Item "Minipage|p" "minipage-insert"
|
Item "Minipage|p" "minipage-insert"
|
||||||
Item "Graphics...|G" "figure-insert"
|
Item "Graphics...|G" "figure-insert"
|
||||||
Item "Tabular Material...|b" "dialog-tabular-insert"
|
Item "Tabular Material...|b" "dialog-tabular-insert"
|
||||||
@ -365,7 +366,8 @@ Toolbar
|
|||||||
Icon "font-noun"
|
Icon "font-noun"
|
||||||
Icon "font-free"
|
Icon "font-free"
|
||||||
Separator
|
Separator
|
||||||
Icon "tex-mode"
|
# Icon "tex-mode"
|
||||||
|
Icon "ert-insert"
|
||||||
Icon "math-mode"
|
Icon "math-mode"
|
||||||
Separator
|
Separator
|
||||||
Icon "footnote-insert"
|
Icon "footnote-insert"
|
||||||
|
@ -137,10 +137,10 @@ void BufferView::insertErrors(TeXErrors & terr)
|
|||||||
for (TeXErrors::Errors::const_iterator cit = terr.begin();
|
for (TeXErrors::Errors::const_iterator cit = terr.begin();
|
||||||
cit != terr.end();
|
cit != terr.end();
|
||||||
++cit) {
|
++cit) {
|
||||||
string const desctext((*cit).error_desc);
|
string const desctext(cit->error_desc);
|
||||||
string const errortext((*cit).error_text);
|
string const errortext(cit->error_text);
|
||||||
string const msgtxt = desctext + '\n' + errortext;
|
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
|
// Insert error string for row number
|
||||||
int tmpid = -1;
|
int tmpid = -1;
|
||||||
|
@ -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>
|
2001-07-10 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||||
|
|
||||||
* BufferView_pimpl.C (Dispatch): handle LFUN_OPENSTUFF.
|
* BufferView_pimpl.C (Dispatch): handle LFUN_OPENSTUFF.
|
||||||
|
@ -50,7 +50,7 @@ LyXColorHandler::~LyXColorHandler()
|
|||||||
// Iterate over the line cache and Free the GCs
|
// Iterate over the line cache and Free the GCs
|
||||||
for (LineGCCache::iterator lit = lineGCcache.begin();
|
for (LineGCCache::iterator lit = lineGCcache.begin();
|
||||||
lit != lineGCcache.end(); ++lit) {
|
lit != lineGCcache.end(); ++lit) {
|
||||||
XFreeGC(display, (*lit).second);
|
XFreeGC(display, lit->second);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,11 +49,11 @@ void DepTable::update()
|
|||||||
for (DepList::iterator itr = deplist.begin();
|
for (DepList::iterator itr = deplist.begin();
|
||||||
itr != deplist.end();
|
itr != deplist.end();
|
||||||
++itr) {
|
++itr) {
|
||||||
unsigned long const one = (*itr).second.second;
|
unsigned long const one = itr->second.second;
|
||||||
unsigned long const two = lyx::sum((*itr).first);
|
unsigned long const two = lyx::sum(itr->first);
|
||||||
(*itr).second = make_pair(one, two);
|
itr->second = make_pair(one, two);
|
||||||
if (lyxerr.debugging(Debug::DEPEND)) {
|
if (lyxerr.debugging(Debug::DEPEND)) {
|
||||||
lyxerr << "Update dep: " << (*itr).first << " "
|
lyxerr << "Update dep: " << itr->first << " "
|
||||||
<< one << " " << two;
|
<< one << " " << two;
|
||||||
if (one != two)
|
if (one != two)
|
||||||
lyxerr << " +";
|
lyxerr << " +";
|
||||||
@ -68,7 +68,7 @@ bool DepTable::sumchange() const
|
|||||||
for (DepList::const_iterator cit = deplist.begin();
|
for (DepList::const_iterator cit = deplist.begin();
|
||||||
cit != deplist.end();
|
cit != deplist.end();
|
||||||
++cit) {
|
++cit) {
|
||||||
if ((*cit).second.first != (*cit).second.second) return true;
|
if ((*cit).second.first != cit->second.second) return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -80,8 +80,8 @@ bool DepTable::haschanged(string const & f) const
|
|||||||
string fil = MakeAbsPath(f);
|
string fil = MakeAbsPath(f);
|
||||||
DepList::const_iterator cit = deplist.find(fil);
|
DepList::const_iterator cit = deplist.find(fil);
|
||||||
if (cit != deplist.end()) {
|
if (cit != deplist.end()) {
|
||||||
if ((*cit).second.first != (*cit).second.second
|
if (cit->second.first != cit->second.second
|
||||||
&& (*cit).second.second != 0)
|
&& cit->second.second != 0)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -93,8 +93,8 @@ bool DepTable::extchanged(string const & ext) const
|
|||||||
for (DepList::const_iterator cit = deplist.begin();
|
for (DepList::const_iterator cit = deplist.begin();
|
||||||
cit != deplist.end();
|
cit != deplist.end();
|
||||||
++cit) {
|
++cit) {
|
||||||
if (suffixIs((*cit).first, ext)) {
|
if (suffixIs(cit->first, ext)) {
|
||||||
if ((*cit).second.first != (*cit).second.second)
|
if (cit->second.first != cit->second.second)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -116,8 +116,8 @@ void DepTable::remove_files_with_extension(string const & suf)
|
|||||||
// we want const_iterator (Lgb)
|
// we want const_iterator (Lgb)
|
||||||
for (DepList::iterator cit = deplist.begin();
|
for (DepList::iterator cit = deplist.begin();
|
||||||
cit != deplist.end(); ++cit) {
|
cit != deplist.end(); ++cit) {
|
||||||
if (!suffixIs((*cit).first, suf))
|
if (!suffixIs(cit->first, suf))
|
||||||
tmp[(*cit).first] = (*cit).second;
|
tmp[cit->first] = cit->second;
|
||||||
}
|
}
|
||||||
deplist.swap(tmp);
|
deplist.swap(tmp);
|
||||||
}
|
}
|
||||||
@ -130,13 +130,13 @@ void DepTable::write(string const & f) const
|
|||||||
cit != deplist.end(); ++cit) {
|
cit != deplist.end(); ++cit) {
|
||||||
if (lyxerr.debugging(Debug::DEPEND)) {
|
if (lyxerr.debugging(Debug::DEPEND)) {
|
||||||
lyxerr << "Write dep: "
|
lyxerr << "Write dep: "
|
||||||
<< (*cit).first << " "
|
<< cit->first << " "
|
||||||
<< (*cit).second.first << " "
|
<< cit->second.first << " "
|
||||||
<< (*cit).second.second << endl;
|
<< cit->second.second << endl;
|
||||||
}
|
}
|
||||||
ofs << (*cit).first << " "
|
ofs << cit->first << " "
|
||||||
<< (*cit).second.first << " "
|
<< cit->second.first << " "
|
||||||
<< (*cit).second.second << endl;
|
<< cit->second.second << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ string const FloatList::defaultPlacement(string const & t) const
|
|||||||
{
|
{
|
||||||
List::const_iterator cit = list.find(t);
|
List::const_iterator cit = list.find(t);
|
||||||
if (cit != list.end())
|
if (cit != list.end())
|
||||||
return (*cit).second.placement();
|
return cit->second.placement();
|
||||||
return string();
|
return string();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ Floating const & FloatList::getType(string const & t) const
|
|||||||
// I wish we could use exceptions
|
// I wish we could use exceptions
|
||||||
List::const_iterator cit = list.find(t);
|
List::const_iterator cit = list.find(t);
|
||||||
if (cit != list.end())
|
if (cit != list.end())
|
||||||
return (*cit).second;
|
return cit->second;
|
||||||
#ifdef HAVE_EXCEPTIONS
|
#ifdef HAVE_EXCEPTIONS
|
||||||
throw UnknownFloatType(t);
|
throw UnknownFloatType(t);
|
||||||
#else
|
#else
|
||||||
|
18
src/LColor.C
18
src/LColor.C
@ -116,7 +116,7 @@ string const LColor::getGUIName(LColor::color c) const
|
|||||||
{
|
{
|
||||||
InfoTab::const_iterator ici = infotab.find(c);
|
InfoTab::const_iterator ici = infotab.find(c);
|
||||||
if (ici != infotab.end())
|
if (ici != infotab.end())
|
||||||
return _((*ici).second.guiname);
|
return _(ici->second.guiname);
|
||||||
|
|
||||||
return "none";
|
return "none";
|
||||||
}
|
}
|
||||||
@ -126,7 +126,7 @@ string const LColor::getX11Name(LColor::color c) const
|
|||||||
{
|
{
|
||||||
InfoTab::const_iterator ici = infotab.find(c);
|
InfoTab::const_iterator ici = infotab.find(c);
|
||||||
if (ici != infotab.end())
|
if (ici != infotab.end())
|
||||||
return (*ici).second.x11name;
|
return ici->second.x11name;
|
||||||
|
|
||||||
lyxerr << "LyX internal error: Missing color"
|
lyxerr << "LyX internal error: Missing color"
|
||||||
" entry in LColor.C for " << int(c) << '\n';
|
" 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);
|
InfoTab::const_iterator ici = infotab.find(c);
|
||||||
if (ici != infotab.end())
|
if (ici != infotab.end())
|
||||||
return (*ici).second.latexname;
|
return ici->second.latexname;
|
||||||
return "black";
|
return "black";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ string const LColor::getLyXName(LColor::color c) const
|
|||||||
{
|
{
|
||||||
InfoTab::const_iterator ici = infotab.find(c);
|
InfoTab::const_iterator ici = infotab.find(c);
|
||||||
if (ici != infotab.end())
|
if (ici != infotab.end())
|
||||||
return (*ici).second.lyxname;
|
return ici->second.lyxname;
|
||||||
return "black";
|
return "black";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,7 +157,7 @@ void LColor::setColor(LColor::color col, string const & x11name)
|
|||||||
{
|
{
|
||||||
InfoTab::iterator iti = infotab.find(col);
|
InfoTab::iterator iti = infotab.find(col);
|
||||||
if (iti != infotab.end()) {
|
if (iti != infotab.end()) {
|
||||||
(*iti).second.x11name = x11name;
|
iti->second.x11name = x11name;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
lyxerr << "LyX internal error: color and such.\n";
|
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 ici = infotab.begin();
|
||||||
InfoTab::const_iterator end = infotab.end();
|
InfoTab::const_iterator end = infotab.end();
|
||||||
for (; ici != end; ++ici) {
|
for (; ici != end; ++ici) {
|
||||||
if (!compare_no_case(_((*ici).second.guiname), guiname))
|
if (!compare_no_case(_(ici->second.guiname), guiname))
|
||||||
return (*ici).first;
|
return ici->first;
|
||||||
}
|
}
|
||||||
return LColor::inherit;
|
return LColor::inherit;
|
||||||
}
|
}
|
||||||
@ -199,8 +199,8 @@ LColor::color LColor::getFromLyXName(string const & lyxname) const
|
|||||||
InfoTab::const_iterator ici = infotab.begin();
|
InfoTab::const_iterator ici = infotab.begin();
|
||||||
InfoTab::const_iterator end = infotab.end();
|
InfoTab::const_iterator end = infotab.end();
|
||||||
for (; ici != end; ++ici) {
|
for (; ici != end; ++ici) {
|
||||||
if (!compare_no_case((*ici).second.lyxname, lyxname))
|
if (!compare_no_case(ici->second.lyxname, lyxname))
|
||||||
return (*ici).first;
|
return ici->first;
|
||||||
}
|
}
|
||||||
return LColor::inherit;
|
return LColor::inherit;
|
||||||
}
|
}
|
||||||
|
@ -456,9 +456,9 @@ int LyXAction::searchActionArg(kb_action action, string const & arg) const
|
|||||||
return LFUN_UNKNOWN_ACTION;
|
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
|
// the action does not have any pseudoactions with this arg
|
||||||
lyxerr[Debug::ACTION]
|
lyxerr[Debug::ACTION]
|
||||||
<< "Action " << action
|
<< "Action " << action
|
||||||
@ -470,9 +470,9 @@ int LyXAction::searchActionArg(kb_action action, string const & arg) const
|
|||||||
// pseudo action exist
|
// pseudo action exist
|
||||||
lyxerr[Debug::ACTION] << "Pseudoaction exist["
|
lyxerr[Debug::ACTION] << "Pseudoaction exist["
|
||||||
<< action << '|'
|
<< 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
|
// get the arg_item map
|
||||||
arg_map::iterator ami = lyx_arg_map.find(action);
|
arg_map::iterator ami = lyx_arg_map.find(action);
|
||||||
// put the new pseudo function in it
|
// put the new pseudo function in it
|
||||||
(*ami).second[arg] = pseudo_counter;
|
ami->second[arg] = pseudo_counter;
|
||||||
|
|
||||||
lyxerr[Debug::ACTION] << "Creating new pseudoaction "
|
lyxerr[Debug::ACTION] << "Creating new pseudoaction "
|
||||||
<< pseudo_counter << " for [" << action
|
<< pseudo_counter << " for [" << action
|
||||||
@ -516,10 +516,10 @@ kb_action LyXAction::retrieveActionArg(int pseudo, string & arg) const
|
|||||||
|
|
||||||
if (pit != lyx_pseudo_map.end()) {
|
if (pit != lyx_pseudo_map.end()) {
|
||||||
lyxerr[Debug::ACTION] << "Found the pseudoaction: ["
|
lyxerr[Debug::ACTION] << "Found the pseudoaction: ["
|
||||||
<< (*pit).second.action << '|'
|
<< pit->second.action << '|'
|
||||||
<< (*pit).second.arg << '\n';
|
<< pit->second.arg << '\n';
|
||||||
arg = (*pit).second.arg;
|
arg = pit->second.arg;
|
||||||
return (*pit).second.action;
|
return pit->second.action;
|
||||||
} else {
|
} else {
|
||||||
lyxerr << "Lyx Error: Unrecognized pseudo-action\n";
|
lyxerr << "Lyx Error: Unrecognized pseudo-action\n";
|
||||||
return LFUN_UNKNOWN_ACTION;
|
return LFUN_UNKNOWN_ACTION;
|
||||||
@ -542,10 +542,10 @@ int LyXAction::LookupFunc(string const & func) const
|
|||||||
|
|
||||||
if (!argstr.empty() && fit != lyx_func_map.end()) {
|
if (!argstr.empty() && fit != lyx_func_map.end()) {
|
||||||
// might be pseudo (or create one)
|
// 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);
|
lyx_func_map.lower_bound(func);
|
||||||
|
|
||||||
if (fit != lyx_func_map.end()) {
|
if (fit != lyx_func_map.end()) {
|
||||||
action = (*fit).second;
|
action = fit->second;
|
||||||
}
|
}
|
||||||
} else { // Go get the next function
|
} else { // Go get the next function
|
||||||
func_map::const_iterator fit =
|
func_map::const_iterator fit =
|
||||||
lyx_func_map.upper_bound(func);
|
lyx_func_map.upper_bound(func);
|
||||||
|
|
||||||
if (fit != lyx_func_map.end()) {
|
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);
|
info_map::const_iterator iit = lyx_info_map.find(ac);
|
||||||
|
|
||||||
if (iit != lyx_info_map.end()) {
|
if (iit != lyx_info_map.end()) {
|
||||||
string ret((*iit).second.name);
|
string ret(iit->second.name);
|
||||||
ret += arg;
|
ret += arg;
|
||||||
return ret;
|
return ret;
|
||||||
} else
|
} else
|
||||||
@ -631,15 +631,15 @@ string const LyXAction::helpText(int pseudoaction) const
|
|||||||
if (lyxerr.debugging(Debug::ACTION)) {
|
if (lyxerr.debugging(Debug::ACTION)) {
|
||||||
lyxerr << "Action: " << action << '\n';
|
lyxerr << "Action: " << action << '\n';
|
||||||
lyxerr << " name: "
|
lyxerr << " name: "
|
||||||
<< (*ici).second.name << '\n';
|
<< ici->second.name << '\n';
|
||||||
lyxerr << " attrib: "
|
lyxerr << " attrib: "
|
||||||
<< (*ici).second.attrib << '\n';
|
<< ici->second.attrib << '\n';
|
||||||
lyxerr << " help: "
|
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 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()) {
|
if (help.empty()) {
|
||||||
@ -659,7 +659,7 @@ bool LyXAction::funcHasFlag(kb_action action,
|
|||||||
info_map::const_iterator ici = lyx_info_map.find(action);
|
info_map::const_iterator ici = lyx_info_map.find(action);
|
||||||
|
|
||||||
if (ici != lyx_info_map.end()) {
|
if (ici != lyx_info_map.end()) {
|
||||||
return (*ici).second.attrib & flag;
|
return ici->second.attrib & flag;
|
||||||
} else {
|
} else {
|
||||||
// it really should exist, but...
|
// it really should exist, but...
|
||||||
lyxerr << "LyXAction::funcHasFlag: "
|
lyxerr << "LyXAction::funcHasFlag: "
|
||||||
|
@ -251,7 +251,7 @@ void Menu::expand(Menu & tomenu, Buffer * buf) const
|
|||||||
{
|
{
|
||||||
for (const_iterator cit = begin();
|
for (const_iterator cit = begin();
|
||||||
cit != end() ; ++cit) {
|
cit != end() ; ++cit) {
|
||||||
switch ((*cit).kind()) {
|
switch (cit->kind()) {
|
||||||
case MenuItem::Lastfiles: {
|
case MenuItem::Lastfiles: {
|
||||||
int ii = 1;
|
int ii = 1;
|
||||||
LastFiles::const_iterator lfit = lastfiles->begin();
|
LastFiles::const_iterator lfit = lastfiles->begin();
|
||||||
@ -305,7 +305,7 @@ void Menu::expand(Menu & tomenu, Buffer * buf) const
|
|||||||
Formats formats;
|
Formats formats;
|
||||||
|
|
||||||
kb_action action;
|
kb_action action;
|
||||||
switch ((*cit).kind()) {
|
switch (cit->kind()) {
|
||||||
case MenuItem::ImportFormats:
|
case MenuItem::ImportFormats:
|
||||||
formats = Importer::GetImportableFormats();
|
formats = Importer::GetImportableFormats();
|
||||||
action = LFUN_IMPORT;
|
action = LFUN_IMPORT;
|
||||||
@ -331,7 +331,7 @@ void Menu::expand(Menu & tomenu, Buffer * buf) const
|
|||||||
if ((*fit)->dummy())
|
if ((*fit)->dummy())
|
||||||
continue;
|
continue;
|
||||||
string label = (*fit)->prettyname();
|
string label = (*fit)->prettyname();
|
||||||
if ((*cit).kind() == MenuItem::ImportFormats)
|
if (cit->kind() == MenuItem::ImportFormats)
|
||||||
if ((*fit)->name() == "text")
|
if ((*fit)->name() == "text")
|
||||||
label = _("Ascii text as lines");
|
label = _("Ascii text as lines");
|
||||||
else if ((*fit)->name() == "textparagraph")
|
else if ((*fit)->name() == "textparagraph")
|
||||||
|
@ -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)
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ LyXText * TextCache::findFit(Buffer * b, int p)
|
|||||||
Cache::iterator it = find_if(cache.begin(), cache.end(),
|
Cache::iterator it = find_if(cache.begin(), cache.end(),
|
||||||
text_fits(b, p));
|
text_fits(b, p));
|
||||||
if (it != cache.end()) {
|
if (it != cache.end()) {
|
||||||
LyXText * tmp = (*it).second.second;
|
LyXText * tmp = it->second.second;
|
||||||
cache.erase(it);
|
cache.erase(it);
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ string const Variables::get(string const & var) const
|
|||||||
{
|
{
|
||||||
Vars::const_iterator cit = vars_.find(var);
|
Vars::const_iterator cit = vars_.find(var);
|
||||||
if (cit != vars_.end())
|
if (cit != vars_.end())
|
||||||
return (*cit).second;
|
return cit->second;
|
||||||
else
|
else
|
||||||
return string();
|
return string();
|
||||||
}
|
}
|
||||||
|
@ -525,5 +525,5 @@ void WorkArea::putClipboard(string const & s) const
|
|||||||
static string hold;
|
static string hold;
|
||||||
hold = s;
|
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);
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ pair<bool, int> const CharacterSet::encodeString(string const & str) const
|
|||||||
Cdef::const_iterator cit = map_.find(str);
|
Cdef::const_iterator cit = map_.find(str);
|
||||||
if (cit != map_.end()) {
|
if (cit != map_.end()) {
|
||||||
ret = true;
|
ret = true;
|
||||||
val = (*cit).second;
|
val = cit->second;
|
||||||
}
|
}
|
||||||
lyxerr[Debug::KBMAP] << " "
|
lyxerr[Debug::KBMAP] << " "
|
||||||
<< (ret ? "yes we" : "no we don't")
|
<< (ret ? "yes we" : "no we don't")
|
||||||
|
@ -699,7 +699,7 @@ bool Converters::Move(string const & from, string const & to, bool copy)
|
|||||||
it != files.end(); ++it)
|
it != files.end(); ++it)
|
||||||
if (prefixIs(*it, base)) {
|
if (prefixIs(*it, base)) {
|
||||||
string from2 = path + *it;
|
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);
|
to2 = ChangeExtension(to2, to_extension);
|
||||||
lyxerr[Debug::FILES] << "moving " << from2
|
lyxerr[Debug::FILES] << "moving " << from2
|
||||||
<< " to " << to2 << endl;
|
<< " to " << to2 << endl;
|
||||||
|
@ -65,7 +65,7 @@ Counters::~Counters()
|
|||||||
for (CounterList::iterator it = counterList.begin();
|
for (CounterList::iterator it = counterList.begin();
|
||||||
it != counterList.end();
|
it != counterList.end();
|
||||||
++it)
|
++it)
|
||||||
delete (*it).second;
|
delete it->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -100,8 +100,8 @@ void Counters::newCounter(string const & newc, string const & oldc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Counter * tmp = new Counter;
|
Counter * tmp = new Counter;
|
||||||
(*it).second->onstep.connect(SigC::slot(tmp,
|
it->second->onstep.connect(SigC::slot(tmp,
|
||||||
&Counter::reset));
|
&Counter::reset));
|
||||||
counterList[newc] = tmp;
|
counterList[newc] = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ void Counters::set(string const & ctr, int val)
|
|||||||
lyxerr << "Counter does not exist." << endl;
|
lyxerr << "Counter does not exist." << endl;
|
||||||
return;
|
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;
|
lyxerr << "Counter does not exist." << endl;
|
||||||
return;
|
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;
|
lyxerr << "Counter does not exist." << endl;
|
||||||
return 0;
|
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;
|
lyxerr << "Counter does not exist." << endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
(*it).second->step();
|
it->second->step();
|
||||||
}
|
}
|
||||||
|
@ -277,7 +277,7 @@ Encoding const * Encodings::getEncoding(string const & encoding) const
|
|||||||
{
|
{
|
||||||
EncodingList::const_iterator it = encodinglist.find(encoding);
|
EncodingList::const_iterator it = encodinglist.find(encoding);
|
||||||
if (it != encodinglist.end())
|
if (it != encodinglist.end())
|
||||||
return &(*it).second;
|
return &it->second;
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ struct lyxfont {
|
|||||||
static
|
static
|
||||||
int width(string const & s, LyXFont const & f) {
|
int width(string const & s, LyXFont const & f) {
|
||||||
if (s.empty()) return 0;
|
if (s.empty()) return 0;
|
||||||
return width(s.c_str(), s.length(), f);
|
return width(s.data(), s.length(), f);
|
||||||
}
|
}
|
||||||
///
|
///
|
||||||
//static
|
//static
|
||||||
|
@ -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>
|
2001-06-16 Angus Leeming <a.leeming@ic.ac.uk>
|
||||||
|
|
||||||
* ButtonController.h: move some included header files out of the
|
* ButtonController.h: move some included header files out of the
|
||||||
|
@ -141,7 +141,7 @@ ExternalTemplate ControlExternal::getTemplate(int i) const
|
|||||||
for (int n = 1; n < i; ++n)
|
for (int n = 1; n < i; ++n)
|
||||||
++i1;
|
++i1;
|
||||||
|
|
||||||
return (*i1).second;
|
return i1->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -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>
|
2001-07-03 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||||
|
|
||||||
* GUIRunTime.C (x11Display):
|
* GUIRunTime.C (x11Display):
|
||||||
@ -6,7 +12,6 @@
|
|||||||
(x11Colormap):
|
(x11Colormap):
|
||||||
(x11VisualDepth): new methods
|
(x11VisualDepth): new methods
|
||||||
|
|
||||||
=======
|
|
||||||
2001-07-03 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
2001-07-03 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||||
|
|
||||||
* FormDocument.C (class_apply): call CutAndPaste::'s staitc method
|
* FormDocument.C (class_apply): call CutAndPaste::'s staitc method
|
||||||
@ -17,7 +22,6 @@
|
|||||||
|
|
||||||
* GUIRunTime.C (createMainView): implement
|
* GUIRunTime.C (createMainView): implement
|
||||||
|
|
||||||
>>>>>>> 1.104
|
|
||||||
2001-06-22 John Levon <moz@compsoc.man.ac.uk>
|
2001-06-22 John Levon <moz@compsoc.man.ac.uk>
|
||||||
|
|
||||||
* FormCharacter.C:
|
* FormCharacter.C:
|
||||||
|
@ -139,7 +139,7 @@ void FormDocument::build()
|
|||||||
for (LyXTextClassList::const_iterator cit = textclasslist.begin();
|
for (LyXTextClassList::const_iterator cit = textclasslist.begin();
|
||||||
cit != textclasslist.end(); ++cit)
|
cit != textclasslist.end(); ++cit)
|
||||||
{
|
{
|
||||||
combo_doc_class->addto((*cit).description());
|
combo_doc_class->addto(cit->description());
|
||||||
}
|
}
|
||||||
|
|
||||||
fl_addto_choice(class_->choice_doc_spacing,
|
fl_addto_choice(class_->choice_doc_spacing,
|
||||||
@ -191,7 +191,7 @@ void FormDocument::build()
|
|||||||
|
|
||||||
for (Languages::const_iterator cit = languages.begin();
|
for (Languages::const_iterator cit = languages.begin();
|
||||||
cit != languages.end(); ++cit) {
|
cit != languages.end(); ++cit) {
|
||||||
combo_language->addto((*cit).second.lang());
|
combo_language->addto(cit->second.lang());
|
||||||
}
|
}
|
||||||
|
|
||||||
fl_addto_choice(language_->choice_quotes_language,
|
fl_addto_choice(language_->choice_quotes_language,
|
||||||
|
@ -92,7 +92,7 @@ public:
|
|||||||
add(ID);
|
add(ID);
|
||||||
return users[ID];
|
return users[ID];
|
||||||
}
|
}
|
||||||
return (*cit).second;
|
return cit->second;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
///
|
///
|
||||||
@ -143,7 +143,7 @@ string const & GroupCache::find(gid_t ID) const
|
|||||||
add(ID);
|
add(ID);
|
||||||
return groups[ID];
|
return groups[ID];
|
||||||
}
|
}
|
||||||
return (*cit).second;
|
return cit->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -341,7 +341,7 @@ void FileDialog::Private::Reread()
|
|||||||
// Add them to directory box
|
// Add them to directory box
|
||||||
for (DirEntries::const_iterator cit = direntries.begin();
|
for (DirEntries::const_iterator cit = direntries.begin();
|
||||||
cit != direntries.end(); ++cit) {
|
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_add_browser_line(pFileDlgForm->List, temp.c_str());
|
||||||
}
|
}
|
||||||
fl_set_browser_topline(pFileDlgForm->List, iDepth);
|
fl_set_browser_topline(pFileDlgForm->List, iDepth);
|
||||||
@ -452,7 +452,7 @@ void FileDialog::Private::SetButton(int iIndex, string const & pszName,
|
|||||||
*pTemp = pszPath;
|
*pTemp = pszPath;
|
||||||
} else {
|
} else {
|
||||||
fl_hide_object(pObject);
|
fl_hide_object(pObject);
|
||||||
(*pTemp).erase();
|
pTemp->erase();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -410,12 +410,12 @@ void FormPreferences::Colors::apply()
|
|||||||
for (vector<XformsColor>::const_iterator cit = xformsColorDB.begin();
|
for (vector<XformsColor>::const_iterator cit = xformsColorDB.begin();
|
||||||
cit != xformsColorDB.end(); ++cit) {
|
cit != xformsColorDB.end(); ++cit) {
|
||||||
RGBColor col;
|
RGBColor col;
|
||||||
fl_getmcolor((*cit).colorID, &col.r, &col.g, &col.b);
|
fl_getmcolor(cit->colorID, &col.r, &col.g, &col.b);
|
||||||
if (col != (*cit).color()) {
|
if (col != cit->color()) {
|
||||||
modifiedXformsPrefs = true;
|
modifiedXformsPrefs = true;
|
||||||
if ((*cit).colorID == FL_BLACK)
|
if (cit->colorID == FL_BLACK)
|
||||||
modifiedText = true;
|
modifiedText = true;
|
||||||
if ((*cit).colorID == FL_COL1)
|
if (cit->colorID == FL_COL1)
|
||||||
modifiedBackground = true;
|
modifiedBackground = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -424,14 +424,13 @@ void FormPreferences::Colors::apply()
|
|||||||
for (vector<XformsColor>::const_iterator cit =
|
for (vector<XformsColor>::const_iterator cit =
|
||||||
xformsColorDB.begin();
|
xformsColorDB.begin();
|
||||||
cit != xformsColorDB.end(); ++cit) {
|
cit != xformsColorDB.end(); ++cit) {
|
||||||
fl_mapcolor((*cit).colorID,
|
fl_mapcolor(cit->colorID, cit->r, cit->g, cit->b);
|
||||||
(*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);
|
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_MCOL, FL_COL1, 0.1);
|
||||||
AdjustVal(FL_TOP_BCOL, FL_COL1, 0.1);
|
AdjustVal(FL_TOP_BCOL, FL_COL1, 0.1);
|
||||||
AdjustVal(FL_LEFT_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);
|
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,
|
fl_mapcolor(GUI_COLOR_CURSOR,
|
||||||
(*cit).r, (*cit).g, (*cit).b);
|
cit->r, cit->g, cit->b);
|
||||||
fl_set_cursor_color(FL_DEFAULT_CURSOR,
|
fl_set_cursor_color(FL_DEFAULT_CURSOR,
|
||||||
GUI_COLOR_CURSOR, FL_WHITE);
|
GUI_COLOR_CURSOR, FL_WHITE);
|
||||||
}
|
}
|
||||||
@ -453,11 +452,11 @@ void FormPreferences::Colors::apply()
|
|||||||
// Now do the same for the LyX LColors...
|
// Now do the same for the LyX LColors...
|
||||||
for (vector<NamedColor>::const_iterator cit = lyxColorDB.begin();
|
for (vector<NamedColor>::const_iterator cit = lyxColorDB.begin();
|
||||||
cit != lyxColorDB.end(); ++cit) {
|
cit != lyxColorDB.end(); ++cit) {
|
||||||
LColor::color lc = lcolor.getFromGUIName((*cit).getname());
|
LColor::color lc = lcolor.getFromGUIName(cit->getname());
|
||||||
if (lc == LColor::inherit) continue;
|
if (lc == LColor::inherit) continue;
|
||||||
|
|
||||||
// Create a valid X11 name of the form "#rrggbb"
|
// 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) {
|
if (lcolor.getX11Name(lc) != hexname) {
|
||||||
lyxerr[Debug::GUI]
|
lyxerr[Debug::GUI]
|
||||||
@ -816,11 +815,11 @@ void FormPreferences::Colors::LoadBrowserLyX()
|
|||||||
fl_clear_browser(colbr);
|
fl_clear_browser(colbr);
|
||||||
for (vector<XformsColor>::const_iterator cit = xformsColorDB.begin();
|
for (vector<XformsColor>::const_iterator cit = xformsColorDB.begin();
|
||||||
cit != xformsColorDB.end(); ++cit) {
|
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();
|
for (vector<NamedColor>::const_iterator cit = lyxColorDB.begin();
|
||||||
cit != lyxColorDB.end(); ++cit) {
|
cit != lyxColorDB.end(); ++cit) {
|
||||||
fl_addto_browser(colbr, (*cit).getname().c_str());
|
fl_addto_browser(colbr, cit->getname().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
// just to be safe...
|
// just to be safe...
|
||||||
@ -1046,8 +1045,8 @@ void FormPreferences::Converters::UpdateBrowser()
|
|||||||
fl_clear_browser(dialog_->browser_all);
|
fl_clear_browser(dialog_->browser_all);
|
||||||
for (::Converters::const_iterator cit = local_converters.begin();
|
for (::Converters::const_iterator cit = local_converters.begin();
|
||||||
cit != local_converters.end(); ++cit) {
|
cit != local_converters.end(); ++cit) {
|
||||||
string const name = (*cit).From->prettyname() + " -> "
|
string const name = cit->From->prettyname() + " -> "
|
||||||
+ (*cit).To->prettyname();
|
+ cit->To->prettyname();
|
||||||
fl_addto_browser(dialog_->browser_all, name.c_str());
|
fl_addto_browser(dialog_->browser_all, name.c_str());
|
||||||
}
|
}
|
||||||
Input();
|
Input();
|
||||||
@ -1190,7 +1189,7 @@ void FormPreferences::Converters::UpdateChoices() const
|
|||||||
choice += " | ";
|
choice += " | ";
|
||||||
else
|
else
|
||||||
choice += " ";
|
choice += " ";
|
||||||
choice += (*cit).prettyname();
|
choice += cit->prettyname();
|
||||||
}
|
}
|
||||||
choice += " ";
|
choice += " ";
|
||||||
|
|
||||||
@ -1313,7 +1312,7 @@ void FormPreferences::Formats::UpdateBrowser()
|
|||||||
for (::Formats::const_iterator cit = local_formats.begin();
|
for (::Formats::const_iterator cit = local_formats.begin();
|
||||||
cit != local_formats.end(); ++cit)
|
cit != local_formats.end(); ++cit)
|
||||||
fl_addto_browser(dialog_->browser_all,
|
fl_addto_browser(dialog_->browser_all,
|
||||||
(*cit).prettyname().c_str());
|
cit->prettyname().c_str());
|
||||||
|
|
||||||
Input();
|
Input();
|
||||||
fl_unfreeze_form(dialog_->form);
|
fl_unfreeze_form(dialog_->form);
|
||||||
@ -1669,7 +1668,7 @@ void FormPreferences::Language::build()
|
|||||||
|
|
||||||
for (Languages::const_iterator cit = languages.begin();
|
for (Languages::const_iterator cit = languages.begin();
|
||||||
cit != languages.end(); ++cit) {
|
cit != languages.end(); ++cit) {
|
||||||
combo_default_lang->addto((*cit).second.lang());
|
combo_default_lang->addto(cit->second.lang());
|
||||||
}
|
}
|
||||||
|
|
||||||
fl_end_form();
|
fl_end_form();
|
||||||
|
@ -72,7 +72,7 @@ void RadioButtonGroup::setButton(int value)
|
|||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
else {
|
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 such a button was found, return its value.
|
||||||
if (it != map.end()) {
|
if (it != map.end()) {
|
||||||
return (*it).second;
|
return it->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
lyxerr << "BUG: No radio button found to be active." << endl;
|
lyxerr << "BUG: No radio button found to be active." << endl;
|
||||||
|
@ -237,10 +237,10 @@ void Toolbar::Pimpl::updateLayoutList(bool force)
|
|||||||
LyXTextClass::const_iterator end = tc.end();
|
LyXTextClass::const_iterator end = tc.end();
|
||||||
for (LyXTextClass::const_iterator cit = tc.begin();
|
for (LyXTextClass::const_iterator cit = tc.begin();
|
||||||
cit != end; ++cit) {
|
cit != end; ++cit) {
|
||||||
if ((*cit).obsoleted_by().empty())
|
if (cit->obsoleted_by().empty())
|
||||||
combox->addline(_((*cit).name()));
|
combox->addline(_(cit->name()));
|
||||||
else
|
else
|
||||||
combox->addline("@N" + _((*cit).name()));
|
combox->addline("@N" + _(cit->name()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// we need to do this.
|
// we need to do this.
|
||||||
|
@ -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>
|
2001-07-11 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||||
|
|
||||||
* insetcollapsable.C (edit): always open collapsed insets (even if
|
* insetcollapsable.C (edit): always open collapsed insets (even if
|
||||||
|
@ -133,11 +133,11 @@ int InsetExternal::write(string const & format,
|
|||||||
|
|
||||||
if (et.automaticProduction) {
|
if (et.automaticProduction) {
|
||||||
executeCommand(doSubstitution(buf,
|
executeCommand(doSubstitution(buf,
|
||||||
(*cit).second.updateCommand),
|
cit->second.updateCommand),
|
||||||
buf);
|
buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
os << doSubstitution(buf, (*cit).second.product);
|
os << doSubstitution(buf, cit->second.product);
|
||||||
return 0; // CHECK (FIXME check what ? - jbl)
|
return 0; // CHECK (FIXME check what ? - jbl)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,11 +176,11 @@ void InsetExternal::validate(LaTeXFeatures & features) const
|
|||||||
if (cit == et.formats.end())
|
if (cit == et.formats.end())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!(*cit).second.requirement.empty()) {
|
if (!cit->second.requirement.empty()) {
|
||||||
features.require((*cit).second.requirement);
|
features.require(cit->second.requirement);
|
||||||
}
|
}
|
||||||
if (!(*cit).second.preamble.empty()) {
|
if (!cit->second.preamble.empty()) {
|
||||||
features.externalPreambles += (*cit).second.preamble + "\n";
|
features.externalPreambles += cit->second.preamble + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -267,7 +267,7 @@ void InsetExternal::updateExternal() const
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
executeCommand(doSubstitution(view_->buffer(),
|
executeCommand(doSubstitution(view_->buffer(),
|
||||||
(*cit).second.updateCommand),
|
cit->second.updateCommand),
|
||||||
view_->buffer());
|
view_->buffer());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1870,8 +1870,8 @@ void InsetText::paragraph(Paragraph * p)
|
|||||||
#if 0
|
#if 0
|
||||||
// we now have to update/redraw all instances
|
// we now have to update/redraw all instances
|
||||||
for (Cache::iterator cit = cache.begin(); cit != cache.end(); ++cit) {
|
for (Cache::iterator cit = cache.begin(); cit != cache.end(); ++cit) {
|
||||||
delete (*cit).second;
|
delete cit->second;
|
||||||
(*cit).second = 0;
|
cit->second = 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
// redraw myself when asked for
|
// redraw myself when asked for
|
||||||
|
50
src/kbmap.C
50
src/kbmap.C
@ -117,19 +117,19 @@ int kb_keymap::lookup(unsigned int key,
|
|||||||
|
|
||||||
for (Table::const_iterator cit = table.begin();
|
for (Table::const_iterator cit = table.begin();
|
||||||
cit != table.end(); ++cit) {
|
cit != table.end(); ++cit) {
|
||||||
unsigned int const msk1 = (*cit).mod & 0xffff;
|
unsigned int const msk1 = cit->mod & 0xffff;
|
||||||
unsigned int const msk0 = ((*cit).mod >> 16) & 0xffff;
|
unsigned int const msk0 = (cit->mod >> 16) & 0xffff;
|
||||||
if ((*cit).code == key && (mod & ~msk0) == msk1) {
|
if (cit->code == key && (mod & ~msk0) == msk1) {
|
||||||
// math found:
|
// math found:
|
||||||
if ((*cit).table.get()) {
|
if (cit->table.get()) {
|
||||||
// this is a prefix key - set new map
|
// this is a prefix key - set new map
|
||||||
seq->curmap = (*cit).table.get();
|
seq->curmap = cit->table.get();
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
// final key - reset map
|
// final key - reset map
|
||||||
seq->curmap = seq->stdmap;
|
seq->curmap = seq->stdmap;
|
||||||
seq->delseq();
|
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
|
if (table.size() != 0) { // without this I get strange crashes
|
||||||
Table::iterator end = table.end();
|
Table::iterator end = table.end();
|
||||||
for (Table::iterator it = table.begin(); it != end; ++it) {
|
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
|
// overwrite binding
|
||||||
if (idx + 1 == seq->length) {
|
if (idx + 1 == seq->length) {
|
||||||
string buf;
|
string buf;
|
||||||
@ -191,12 +191,12 @@ int kb_keymap::defkey(kb_sequence * seq, int action, int idx /*= 0*/)
|
|||||||
<< buf
|
<< buf
|
||||||
<< "' is overriding old binding..."
|
<< "' is overriding old binding..."
|
||||||
<< endl;
|
<< endl;
|
||||||
if ((*it).table.get()) {
|
if (it->table.get()) {
|
||||||
(*it).table.reset(0);
|
it->table.reset(0);
|
||||||
}
|
}
|
||||||
(*it).action = action;
|
it->action = action;
|
||||||
return 0;
|
return 0;
|
||||||
} else if (!(*it).table.get()) {
|
} else if (!it->table.get()) {
|
||||||
string buf;
|
string buf;
|
||||||
seq->print(buf, true);
|
seq->print(buf, true);
|
||||||
lyxerr << "Error: New binding for '" << buf
|
lyxerr << "Error: New binding for '" << buf
|
||||||
@ -204,23 +204,23 @@ int kb_keymap::defkey(kb_sequence * seq, int action, int idx /*= 0*/)
|
|||||||
<< endl;
|
<< endl;
|
||||||
return -1;
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
return (*it).table->defkey(seq, action,
|
return it->table->defkey(seq, action,
|
||||||
idx + 1);
|
idx + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Table::iterator newone = table.insert(table.end(), kb_key());
|
Table::iterator newone = table.insert(table.end(), kb_key());
|
||||||
(*newone).code = code;
|
newone->code = code;
|
||||||
(*newone).mod = modmsk;
|
newone->mod = modmsk;
|
||||||
if (idx + 1 == seq->length) {
|
if (idx + 1 == seq->length) {
|
||||||
(*newone).action = action;
|
newone->action = action;
|
||||||
(*newone).table.reset(0);
|
newone->table.reset(0);
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
(*newone).table.reset(new kb_keymap);
|
newone->table.reset(new kb_keymap);
|
||||||
return (*newone).table->defkey(seq, action, idx + 1);
|
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();
|
Table::const_iterator end = table.end();
|
||||||
for (Table::const_iterator cit = table.begin();
|
for (Table::const_iterator cit = table.begin();
|
||||||
cit != end; ++cit) {
|
cit != end; ++cit) {
|
||||||
if ((*cit).table.get()) {
|
if (cit->table.get()) {
|
||||||
res += (*cit).table->findbinding(act,
|
res += cit->table->findbinding(act,
|
||||||
prefix
|
prefix
|
||||||
+ keyname((*cit))
|
+ keyname((*cit))
|
||||||
+ " ");
|
+ " ");
|
||||||
} else if ((*cit).action == act) {
|
} else if (cit->action == act) {
|
||||||
res += "[";
|
res += "[";
|
||||||
res += prefix + keyname((*cit));
|
res += prefix + keyname((*cit));
|
||||||
res += "] ";
|
res += "] ";
|
||||||
|
@ -95,7 +95,7 @@ Language const * Languages::getLanguage(string const & language) const
|
|||||||
{
|
{
|
||||||
const_iterator it = languagelist.find(language);
|
const_iterator it = languagelist.find(language);
|
||||||
if (it != languagelist.end())
|
if (it != languagelist.end())
|
||||||
return &(*it).second;
|
return &it->second;
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ int MiniBuffer::peek_event(FL_OBJECT * ob, int event, int key)
|
|||||||
stored_set(input);
|
stored_set(input);
|
||||||
fl_set_input(ob, _("[End of history]"));
|
fl_set_input(ob, _("[End of history]"));
|
||||||
} else {
|
} else {
|
||||||
fl_set_input(ob, (*hist_iter).c_str());
|
fl_set_input(ob, hist_iter->c_str());
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
case XK_Up:
|
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]"));
|
fl_set_input(ob, _("[Beginning of history]"));
|
||||||
} else {
|
} else {
|
||||||
--hist_iter;
|
--hist_iter;
|
||||||
fl_set_input(ob, (*hist_iter).c_str());
|
fl_set_input(ob, hist_iter->c_str());
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
case 9:
|
case 9:
|
||||||
|
@ -150,7 +150,7 @@ Paragraph::~Paragraph()
|
|||||||
|
|
||||||
for (InsetList::iterator it = insetlist.begin();
|
for (InsetList::iterator it = insetlist.begin();
|
||||||
it != insetlist.end(); ++it) {
|
it != insetlist.end(); ++it) {
|
||||||
delete (*it).inset;
|
delete it->inset;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ale970302
|
// ale970302
|
||||||
@ -336,16 +336,16 @@ void Paragraph::validate(LaTeXFeatures & features) const
|
|||||||
|
|
||||||
for (Pimpl::FontList::const_iterator cit = pimpl_->fontlist.begin();
|
for (Pimpl::FontList::const_iterator cit = pimpl_->fontlist.begin();
|
||||||
cit != pimpl_->fontlist.end(); ++cit) {
|
cit != pimpl_->fontlist.end(); ++cit) {
|
||||||
if ((*cit).font().noun() == LyXFont::ON) {
|
if (cit->font().noun() == LyXFont::ON) {
|
||||||
lyxerr[Debug::LATEX] << "font.noun: "
|
lyxerr[Debug::LATEX] << "font.noun: "
|
||||||
<< (*cit).font().noun()
|
<< cit->font().noun()
|
||||||
<< endl;
|
<< endl;
|
||||||
features.noun = true;
|
features.noun = true;
|
||||||
lyxerr[Debug::LATEX] << "Noun enabled. Font: "
|
lyxerr[Debug::LATEX] << "Noun enabled. Font: "
|
||||||
<< (*cit).font().stateText(0)
|
<< cit->font().stateText(0)
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
switch ((*cit).font().color()) {
|
switch (cit->font().color()) {
|
||||||
case LColor::none:
|
case LColor::none:
|
||||||
case LColor::inherit:
|
case LColor::inherit:
|
||||||
case LColor::ignore:
|
case LColor::ignore:
|
||||||
@ -353,11 +353,11 @@ void Paragraph::validate(LaTeXFeatures & features) const
|
|||||||
default:
|
default:
|
||||||
features.color = true;
|
features.color = true;
|
||||||
lyxerr[Debug::LATEX] << "Color enabled. Font: "
|
lyxerr[Debug::LATEX] << "Color enabled. Font: "
|
||||||
<< (*cit).font().stateText(0)
|
<< cit->font().stateText(0)
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Language const * language = (*cit).font().language();
|
Language const * language = cit->font().language();
|
||||||
if (language->babel() != doc_language->babel()) {
|
if (language->babel() != doc_language->babel()) {
|
||||||
features.UsedLanguages.insert(language);
|
features.UsedLanguages.insert(language);
|
||||||
lyxerr[Debug::LATEX] << "Found language "
|
lyxerr[Debug::LATEX] << "Found language "
|
||||||
@ -368,8 +368,8 @@ void Paragraph::validate(LaTeXFeatures & features) const
|
|||||||
// then the insets
|
// then the insets
|
||||||
for (InsetList::const_iterator cit = insetlist.begin();
|
for (InsetList::const_iterator cit = insetlist.begin();
|
||||||
cit != insetlist.end(); ++cit) {
|
cit != insetlist.end(); ++cit) {
|
||||||
if ((*cit).inset)
|
if (cit->inset)
|
||||||
(*cit).inset->validate(features);
|
cit->inset->validate(features);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -413,8 +413,8 @@ void Paragraph::cutIntoMinibuffer(BufferParams const & bparams,
|
|||||||
lower_bound(insetlist.begin(),
|
lower_bound(insetlist.begin(),
|
||||||
insetlist.end(),
|
insetlist.end(),
|
||||||
search_elem, Pimpl::matchIT());
|
search_elem, Pimpl::matchIT());
|
||||||
if (it != insetlist.end() && (*it).pos == pos)
|
if (it != insetlist.end() && it->pos == pos)
|
||||||
(*it).inset = 0;
|
it->inset = 0;
|
||||||
} else {
|
} else {
|
||||||
minibuffer_inset = 0;
|
minibuffer_inset = 0;
|
||||||
minibuffer_char = ' ';
|
minibuffer_char = ' ';
|
||||||
@ -508,8 +508,8 @@ Inset * Paragraph::getInset(Paragraph::size_type pos)
|
|||||||
InsetList::iterator it = lower_bound(insetlist.begin(),
|
InsetList::iterator it = lower_bound(insetlist.begin(),
|
||||||
insetlist.end(),
|
insetlist.end(),
|
||||||
search_inset, Pimpl::matchIT());
|
search_inset, Pimpl::matchIT());
|
||||||
if (it != insetlist.end() && (*it).pos == pos)
|
if (it != insetlist.end() && it->pos == pos)
|
||||||
return (*it).inset;
|
return it->inset;
|
||||||
|
|
||||||
lyxerr << "ERROR (Paragraph::GetInset): "
|
lyxerr << "ERROR (Paragraph::GetInset): "
|
||||||
"Inset does not exist: " << pos << endl;
|
"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::const_iterator cit = lower_bound(insetlist.begin(),
|
||||||
insetlist.end(),
|
insetlist.end(),
|
||||||
search_inset, Pimpl::matchIT());
|
search_inset, Pimpl::matchIT());
|
||||||
if (cit != insetlist.end() && (*cit).pos == pos)
|
if (cit != insetlist.end() && cit->pos == pos)
|
||||||
return (*cit).inset;
|
return cit->inset;
|
||||||
|
|
||||||
lyxerr << "ERROR (Paragraph::GetInset): "
|
lyxerr << "ERROR (Paragraph::GetInset): "
|
||||||
"Inset does not exist: " << pos << endl;
|
"Inset does not exist: " << pos << endl;
|
||||||
@ -559,7 +559,7 @@ LyXFont const Paragraph::getFontSettings(BufferParams const & bparams,
|
|||||||
pimpl_->fontlist.end(),
|
pimpl_->fontlist.end(),
|
||||||
search_font, Pimpl::matchFT());
|
search_font, Pimpl::matchFT());
|
||||||
if (cit != pimpl_->fontlist.end())
|
if (cit != pimpl_->fontlist.end())
|
||||||
return (*cit).font();
|
return cit->font();
|
||||||
|
|
||||||
if (pos == size() && size())
|
if (pos == size() && size())
|
||||||
return getFontSettings(bparams, pos - 1);
|
return getFontSettings(bparams, pos - 1);
|
||||||
@ -657,7 +657,7 @@ Paragraph::highestFontInRange(Paragraph::size_type startpos,
|
|||||||
pimpl_->fontlist.end(),
|
pimpl_->fontlist.end(),
|
||||||
start_search, Pimpl::matchFT());
|
start_search, Pimpl::matchFT());
|
||||||
cit != end_it; ++cit) {
|
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)
|
if (size > maxsize && size <= LyXFont::SIZE_HUGER)
|
||||||
maxsize = size;
|
maxsize = size;
|
||||||
}
|
}
|
||||||
@ -1218,8 +1218,8 @@ int Paragraph::getPositionOfInset(Inset * inset) const
|
|||||||
// Find the entry.
|
// Find the entry.
|
||||||
for (InsetList::const_iterator cit = insetlist.begin();
|
for (InsetList::const_iterator cit = insetlist.begin();
|
||||||
cit != insetlist.end(); ++cit) {
|
cit != insetlist.end(); ++cit) {
|
||||||
if ((*cit).inset == inset) {
|
if (cit->inset == inset) {
|
||||||
return (*cit).pos;
|
return cit->pos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (inset == bibkey)
|
if (inset == bibkey)
|
||||||
@ -1874,7 +1874,7 @@ bool Paragraph::isMultiLingual(BufferParams const & bparams)
|
|||||||
Language const * doc_language = bparams.language;
|
Language const * doc_language = bparams.language;
|
||||||
for (Pimpl::FontList::const_iterator cit = pimpl_->fontlist.begin();
|
for (Pimpl::FontList::const_iterator cit = pimpl_->fontlist.begin();
|
||||||
cit != pimpl_->fontlist.end(); ++cit)
|
cit != pimpl_->fontlist.end(); ++cit)
|
||||||
if ((*cit).font().language() != doc_language)
|
if (cit->font().language() != doc_language)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1936,8 +1936,8 @@ void Paragraph::setInsetOwner(Inset * i)
|
|||||||
pimpl_->inset_owner = i;
|
pimpl_->inset_owner = i;
|
||||||
for (InsetList::const_iterator cit = insetlist.begin();
|
for (InsetList::const_iterator cit = insetlist.begin();
|
||||||
cit != insetlist.end(); ++cit) {
|
cit != insetlist.end(); ++cit) {
|
||||||
if ((*cit).inset)
|
if (cit->inset)
|
||||||
(*cit).inset->setOwner(i);
|
cit->inset->setOwner(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1947,10 +1947,10 @@ void Paragraph::deleteInsetsLyXText(BufferView * bv)
|
|||||||
// then the insets
|
// then the insets
|
||||||
for (InsetList::const_iterator cit = insetlist.begin();
|
for (InsetList::const_iterator cit = insetlist.begin();
|
||||||
cit != insetlist.end(); ++cit) {
|
cit != insetlist.end(); ++cit) {
|
||||||
if ((*cit).inset) {
|
if (cit->inset) {
|
||||||
if ((*cit).inset->isTextInset()) {
|
if (cit->inset->isTextInset()) {
|
||||||
static_cast<UpdatableInset *>
|
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
|
// then the insets
|
||||||
for (InsetList::const_iterator cit = insetlist.begin();
|
for (InsetList::const_iterator cit = insetlist.begin();
|
||||||
cit != insetlist.end(); ++cit) {
|
cit != insetlist.end(); ++cit) {
|
||||||
if ((*cit).inset) {
|
if (cit->inset) {
|
||||||
if ((*cit).inset->isTextInset()) {
|
if (cit->inset->isTextInset()) {
|
||||||
static_cast<UpdatableInset *>
|
static_cast<UpdatableInset *>
|
||||||
((*cit).inset)->resizeLyXText(bv, true);
|
(cit->inset)->resizeLyXText(bv, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -371,9 +371,9 @@ public:
|
|||||||
return *this;
|
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 {
|
bool operator==(inset_iterator const & iter) const {
|
||||||
return it == iter.it;
|
return it == iter.it;
|
||||||
|
@ -102,7 +102,7 @@ void Paragraph::Pimpl::insertChar(Paragraph::size_type pos,
|
|||||||
fontlist.end(),
|
fontlist.end(),
|
||||||
search_font, matchFT());
|
search_font, matchFT());
|
||||||
it != fontlist.end(); ++it)
|
it != fontlist.end(); ++it)
|
||||||
(*it).pos((*it).pos() + 1);
|
it->pos(it->pos() + 1);
|
||||||
|
|
||||||
// Update the inset table.
|
// Update the inset table.
|
||||||
InsetTable search_inset(pos, 0);
|
InsetTable search_inset(pos, 0);
|
||||||
@ -110,7 +110,7 @@ void Paragraph::Pimpl::insertChar(Paragraph::size_type pos,
|
|||||||
owner_->insetlist.end(),
|
owner_->insetlist.end(),
|
||||||
search_inset, matchIT());
|
search_inset, matchIT());
|
||||||
it != owner_->insetlist.end(); ++it)
|
it != owner_->insetlist.end(); ++it)
|
||||||
++(*it).pos;
|
++it->pos;
|
||||||
|
|
||||||
owner_->setFont(pos, font);
|
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(),
|
InsetList::iterator it = std::lower_bound(owner_->insetlist.begin(),
|
||||||
owner_->insetlist.end(),
|
owner_->insetlist.end(),
|
||||||
search_inset, matchIT());
|
search_inset, matchIT());
|
||||||
if (it != owner_->insetlist.end() && (*it).pos == pos) {
|
if (it != owner_->insetlist.end() && it->pos == pos) {
|
||||||
lyxerr << "ERROR (Paragraph::InsertInset): "
|
lyxerr << "ERROR (Paragraph::InsertInset): "
|
||||||
"there is an inset in position: " << pos << std::endl;
|
"there is an inset in position: " << pos << std::endl;
|
||||||
} else {
|
} else {
|
||||||
@ -153,8 +153,8 @@ void Paragraph::Pimpl::erase(Paragraph::size_type pos)
|
|||||||
std::lower_bound(owner_->insetlist.begin(),
|
std::lower_bound(owner_->insetlist.begin(),
|
||||||
owner_->insetlist.end(),
|
owner_->insetlist.end(),
|
||||||
search_inset, matchIT());
|
search_inset, matchIT());
|
||||||
if (it != owner_->insetlist.end() && (*it).pos == pos) {
|
if (it != owner_->insetlist.end() && it->pos == pos) {
|
||||||
delete (*it).inset;
|
delete it->inset;
|
||||||
owner_->insetlist.erase(it);
|
owner_->insetlist.erase(it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -168,10 +168,10 @@ void Paragraph::Pimpl::erase(Paragraph::size_type pos)
|
|||||||
std::lower_bound(fontlist.begin(),
|
std::lower_bound(fontlist.begin(),
|
||||||
fontlist.end(),
|
fontlist.end(),
|
||||||
search_font, matchFT());
|
search_font, matchFT());
|
||||||
if (it != fontlist.end() && (*it).pos() == pos &&
|
if (it != fontlist.end() && it->pos() == pos &&
|
||||||
(pos == 0 ||
|
(pos == 0 ||
|
||||||
(it != fontlist.begin()
|
(it != fontlist.begin()
|
||||||
&& (*(it - 1)).pos() == pos - 1))) {
|
&& boost::prior(it)->pos() == pos - 1))) {
|
||||||
// If it is a multi-character font
|
// If it is a multi-character font
|
||||||
// entry, we just make it smaller
|
// entry, we just make it smaller
|
||||||
// (see update below), otherwise we
|
// (see update below), otherwise we
|
||||||
@ -189,7 +189,7 @@ void Paragraph::Pimpl::erase(Paragraph::size_type pos)
|
|||||||
// Update all other entries.
|
// Update all other entries.
|
||||||
FontList::iterator fend = fontlist.end();
|
FontList::iterator fend = fontlist.end();
|
||||||
for (; it != fend; ++it)
|
for (; it != fend; ++it)
|
||||||
(*it).pos((*it).pos() - 1);
|
it->pos(it->pos() - 1);
|
||||||
|
|
||||||
// Update the inset table.
|
// Update the inset table.
|
||||||
InsetTable search_inset(pos, 0);
|
InsetTable search_inset(pos, 0);
|
||||||
@ -199,7 +199,7 @@ void Paragraph::Pimpl::erase(Paragraph::size_type pos)
|
|||||||
lend,
|
lend,
|
||||||
search_inset, matchIT());
|
search_inset, matchIT());
|
||||||
it != lend; ++it)
|
it != lend; ++it)
|
||||||
--(*it).pos;
|
--it->pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -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>
|
2001-06-26 The LyX Project <lyx@violet.home.sad.it>
|
||||||
|
|
||||||
* filetools.C (DeleteAllFilesInDir): send debug output to
|
* filetools.C (DeleteAllFilesInDir): send debug output to
|
||||||
|
@ -226,7 +226,7 @@ vector<string> const DirList(string const & dir, string const & ext)
|
|||||||
vector<string> dirlist;
|
vector<string> dirlist;
|
||||||
directory_iterator dit("dir");
|
directory_iterator dit("dir");
|
||||||
while (dit != directory_iterator()) {
|
while (dit != directory_iterator()) {
|
||||||
string fil = (*dit).filename;
|
string fil = dit->filename;
|
||||||
if (prefixIs(fil, extension)) {
|
if (prefixIs(fil, extension)) {
|
||||||
dirlist.push_back(fil);
|
dirlist.push_back(fil);
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (it != map.end()) {
|
if (it != map.end()) {
|
||||||
return (*it).second;
|
return it->second;
|
||||||
} else {
|
} else {
|
||||||
return default_t2;
|
return default_t2;
|
||||||
}
|
}
|
||||||
@ -85,7 +85,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (it != map.end())
|
if (it != map.end())
|
||||||
return (*it).first;
|
return it->first;
|
||||||
else {
|
else {
|
||||||
return default_t1;
|
return default_t1;
|
||||||
}
|
}
|
||||||
|
20
src/texrow.C
20
src/texrow.C
@ -84,13 +84,13 @@ bool TexRow::getIdFromRow(int row, int & id, int & pos) const
|
|||||||
// same pos.
|
// same pos.
|
||||||
for (; kit != end; ++kit) {
|
for (; kit != end; ++kit) {
|
||||||
if (&(*kit) != &(*cit)
|
if (&(*kit) != &(*cit)
|
||||||
&& (*kit).id() == (*cit).id()
|
&& kit->id() == cit->id()
|
||||||
&& (*kit).pos() >= (*cit).pos())
|
&& kit->pos() >= cit->pos())
|
||||||
(*kit).pos((*kit).pos() + 1);
|
kit->pos(kit->pos() + 1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
id = (*cit).id();
|
id = cit->id();
|
||||||
pos = (*cit).pos();
|
pos = cit->pos();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
id = -1;
|
id = -1;
|
||||||
@ -109,16 +109,16 @@ void TexRow::increasePos(int id, int pos) const
|
|||||||
RowList::iterator kit = rowlist.begin();
|
RowList::iterator kit = rowlist.begin();
|
||||||
RowList::iterator end = rowlist.end();
|
RowList::iterator end = rowlist.end();
|
||||||
for (; kit != end; ++kit) {
|
for (; kit != end; ++kit) {
|
||||||
if (id == (*kit).id()
|
if (id == kit->id()
|
||||||
&& pos < (*kit).pos()) {
|
&& pos < kit->pos()) {
|
||||||
(*kit).pos((*kit).pos() + 1);
|
kit->pos(kit->pos() + 1);
|
||||||
lyxerr[Debug::INFO]
|
lyxerr[Debug::INFO]
|
||||||
<< "TeXRow::increasePos: ideally this "
|
<< "TeXRow::increasePos: ideally this "
|
||||||
"should never happen..." << endl;
|
"should never happen..." << endl;
|
||||||
}
|
}
|
||||||
// When verified to work this clause should be deleted.
|
// When verified to work this clause should be deleted.
|
||||||
if (id == (*kit).id()
|
if (id == kit->id()
|
||||||
&& pos == (*kit).pos()) {
|
&& pos == kit->pos()) {
|
||||||
lyxerr[Debug::INFO]
|
lyxerr[Debug::INFO]
|
||||||
<< "TexRow::increasePos: this should happen "
|
<< "TexRow::increasePos: this should happen "
|
||||||
"maximum one time for each run of "
|
"maximum one time for each run of "
|
||||||
|
22
src/trans.C
22
src/trans.C
@ -1,7 +1,7 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma implementation "trans.h"
|
#pragma implementation
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "LyXView.h"
|
#include "LyXView.h"
|
||||||
@ -139,8 +139,12 @@ struct keyword_item kmapTags[K_LAST - 1] = {
|
|||||||
tex_accent getkeymod(string const &);
|
tex_accent getkeymod(string const &);
|
||||||
|
|
||||||
|
|
||||||
|
#if 0
|
||||||
void Trans::AddDeadkey(tex_accent accent, string const & keys,
|
void Trans::AddDeadkey(tex_accent accent, string const & keys,
|
||||||
string const & allowed)
|
string const & allowed)
|
||||||
|
#else
|
||||||
|
void Trans::AddDeadkey(tex_accent accent, string const & keys)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (kmod_list_[accent]) {
|
if (kmod_list_[accent]) {
|
||||||
FreeException(kmod_list_[accent]->exception_list);
|
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;
|
kmod_list_[accent]->allowed= lyx_accent_table[accent].native;
|
||||||
} else {
|
} else {
|
||||||
#endif
|
#endif
|
||||||
|
#if 0
|
||||||
kmod_list_[accent]->allowed = allowed;
|
kmod_list_[accent]->allowed = allowed;
|
||||||
|
#endif
|
||||||
#if 0
|
#if 0
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -194,7 +200,7 @@ int Trans::Load(LyXLex & lex)
|
|||||||
} else
|
} else
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
string keys = lex.GetString();
|
string const keys = lex.GetString();
|
||||||
|
|
||||||
if (lex.next(true)) {
|
if (lex.next(true)) {
|
||||||
if (lyxerr.debugging(Debug::KBMAP))
|
if (lyxerr.debugging(Debug::KBMAP))
|
||||||
@ -208,6 +214,10 @@ int Trans::Load(LyXLex & lex)
|
|||||||
if (accent == TEX_NOACCENT)
|
if (accent == TEX_NOACCENT)
|
||||||
return -1;
|
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 (lex.next(true)) {
|
||||||
if (lyxerr.debugging(Debug::KBMAP))
|
if (lyxerr.debugging(Debug::KBMAP))
|
||||||
lyxerr << "allowed\t`" << lex.text()
|
lyxerr << "allowed\t`" << lex.text()
|
||||||
@ -215,9 +225,11 @@ int Trans::Load(LyXLex & lex)
|
|||||||
} else
|
} else
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
string allowed = lex.GetString();
|
string const allowed = lex.GetString();
|
||||||
|
AddDeadkey(accent, keys /*, allowed*/);
|
||||||
AddDeadkey(accent, keys, allowed);
|
#else
|
||||||
|
AddDeadkey(accent, keys);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case KCOMB: {
|
case KCOMB: {
|
||||||
|
@ -69,9 +69,13 @@ private:
|
|||||||
typedef KmodInfo kmod_list_decl;
|
typedef KmodInfo kmod_list_decl;
|
||||||
///
|
///
|
||||||
typedef KmodException keyexc;
|
typedef KmodException keyexc;
|
||||||
|
#if 0
|
||||||
///
|
///
|
||||||
void AddDeadkey(tex_accent, string const &, string const &);
|
void AddDeadkey(tex_accent, string const &, string const &);
|
||||||
|
#else
|
||||||
|
///
|
||||||
|
void AddDeadkey(tex_accent, string const &);
|
||||||
|
#endif
|
||||||
///
|
///
|
||||||
void FreeKeymap();
|
void FreeKeymap();
|
||||||
///
|
///
|
||||||
|
@ -11,6 +11,7 @@ struct Keyexc {
|
|||||||
char c;
|
char c;
|
||||||
/// exception data
|
/// exception data
|
||||||
string data;
|
string data;
|
||||||
|
///
|
||||||
Keyexc * next;
|
Keyexc * next;
|
||||||
/// Combination with another deadkey
|
/// Combination with another deadkey
|
||||||
bool combined;
|
bool combined;
|
||||||
@ -27,8 +28,10 @@ struct KmodInfo {
|
|||||||
string data;
|
string data;
|
||||||
///
|
///
|
||||||
tex_accent accent;
|
tex_accent accent;
|
||||||
|
#if 0
|
||||||
///
|
///
|
||||||
string allowed;
|
string allowed;
|
||||||
|
#endif
|
||||||
///
|
///
|
||||||
KmodException exception_list;
|
KmodException exception_list;
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user