simple ws changes only

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8594 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2004-04-03 08:37:12 +00:00
parent e4025acc32
commit 68b7ef25fb
96 changed files with 267 additions and 283 deletions

View File

@ -46,8 +46,8 @@ struct Bidi {
/// ///
void computeTables(Paragraph const & par, void computeTables(Paragraph const & par,
Buffer const &, Row const & row); Buffer const &, Row const & row);
private: private:
/// ///
bool same_direction_; bool same_direction_;
/// ///
std::vector<lyx::pos_type> log2vis_list_; std::vector<lyx::pos_type> log2vis_list_;

View File

@ -405,7 +405,7 @@ void BufferView::putSelectionAt(DocIterator const & cur,
LyXText & text = *cur[0].text(); LyXText & text = *cur[0].text();
setCursor(par, cur.pos()); setCursor(par, cur.pos());
// hack for the chicken and egg problem // hack for the chicken and egg problem
top_y(text.getPar(par.outerPar()).y); top_y(text.getPar(par.outerPar()).y);

View File

@ -115,7 +115,7 @@ public:
/// return the parent language of the given inset /// return the parent language of the given inset
Language const * getParentLanguage(InsetOld * inset) const; Language const * getParentLanguage(InsetOld * inset) const;
/// simple replacing. Use the font of the first selected character /// simple replacing. Use the font of the first selected character
void replaceSelectionWithString(std::string const & str); void replaceSelectionWithString(std::string const & str);
/// move cursor to the named label /// move cursor to the named label
@ -163,7 +163,7 @@ public:
FuncStatus getStatus(FuncRequest const & cmd); FuncStatus getStatus(FuncRequest const & cmd);
/// execute the given function /// execute the given function
bool dispatch(FuncRequest const & argument); bool dispatch(FuncRequest const & argument);
/// clear the X selection /// clear the X selection
void unsetXSel(); void unsetXSel();

View File

@ -878,7 +878,7 @@ bool BufferView::Pimpl::workAreaDispatch(FuncRequest const & cmd0)
lyxerr << "created temp cursor:\n" << cur << endl; lyxerr << "created temp cursor:\n" << cur << endl;
// Try to dispatch to an non-editable inset near this position // Try to dispatch to an non-editable inset near this position
// via the temp cursor. If the inset wishes to change the real // via the temp cursor. If the inset wishes to change the real
// cursor it has to do so explicitly by using // cursor it has to do so explicitly by using
// cur.bv().cursor() = cur; (or similar)' // cur.bv().cursor() = cur; (or similar)'
DispatchResult res; DispatchResult res;
@ -890,7 +890,7 @@ bool BufferView::Pimpl::workAreaDispatch(FuncRequest const & cmd0)
if (!res.dispatched()) if (!res.dispatched())
res = cur.dispatch(cmd); res = cur.dispatch(cmd);
// If the request was dispatched the temp cursor should have been // If the request was dispatched the temp cursor should have been
// in a way to be used as new 'real' cursor. // in a way to be used as new 'real' cursor.
if (res.dispatched()) if (res.dispatched())
bv_->cursor() = cur; bv_->cursor() = cur;
@ -924,7 +924,7 @@ FuncStatus BufferView::Pimpl::getStatus(FuncRequest const & cmd)
Buffer * buf = bv_->buffer(); Buffer * buf = bv_->buffer();
FuncStatus flag; FuncStatus flag;
switch (cmd.action) { switch (cmd.action) {
case LFUN_UNDO: case LFUN_UNDO:

View File

@ -84,7 +84,7 @@ int SwitchLayoutsBetweenClasses(textclass_type c1, textclass_type c2,
InsetText in; InsetText in;
std::swap(in.paragraphs(), pars); std::swap(in.paragraphs(), pars);
ParIterator end = par_iterator_end(in); ParIterator end = par_iterator_end(in);
for (ParIterator it = par_iterator_begin(in); it != end; ++it) { for (ParIterator it = par_iterator_begin(in); it != end; ++it) {
string const name = it->layout()->name(); string const name = it->layout()->name();
@ -330,7 +330,7 @@ pasteSelection(Buffer const & buffer, ParagraphList & pars,
} }
} }
std::swap(in.paragraphs(), insertion); std::swap(in.paragraphs(), insertion);
// Split the paragraph for inserting the buf if necessary. // Split the paragraph for inserting the buf if necessary.
bool did_split = false; bool did_split = false;
if (pars[pit].size() || pit + 1 == par_type(pars.size())) { if (pars[pit].size() || pit + 1 == par_type(pars.size())) {
@ -343,7 +343,7 @@ pasteSelection(Buffer const & buffer, ParagraphList & pars,
mergeParagraph(buffer.params(), pars, pit); mergeParagraph(buffer.params(), pars, pit);
par_type last_paste = pit + insertion.size() - 1; par_type last_paste = pit + insertion.size() - 1;
// Store the new cursor position. // Store the new cursor position.
pit = last_paste; pit = last_paste;
pos = pars[last_paste].size(); pos = pars[last_paste].size();

View File

@ -6,7 +6,7 @@
* \author Alfredo Braunstein * \author Alfredo Braunstein
* *
* Full author contact details are available in file CREDITS. * Full author contact details are available in file CREDITS.
* *
*/ */

View File

@ -32,7 +32,7 @@ class FontIterator : std::iterator<std::forward_iterator_tag, LyXFont>
public: public:
/// ///
FontIterator(LyXText const & text, lyx::par_type pit, lyx::pos_type pos); FontIterator(LyXText const & text, lyx::par_type pit, lyx::pos_type pos);
/// ///
LyXFont operator*() const; LyXFont operator*() const;
/// ///
FontIterator & operator++(); FontIterator & operator++();

View File

@ -52,7 +52,7 @@ public:
/// ///
bool empty() const { return list.empty(); } bool empty() const { return list.empty(); }
/// ///
iterator insetIterator(lyx::pos_type pos); iterator insetIterator(lyx::pos_type pos);
/// ///
const_iterator insetIterator(lyx::pos_type pos) const; const_iterator insetIterator(lyx::pos_type pos) const;
/// ///

View File

@ -223,7 +223,7 @@ bool LColor::setColor(LColor::color col, string const & x11name)
<< " may not be redefined" << endl; << " may not be redefined" << endl;
return false; return false;
} }
it->second.x11name = x11name; it->second.x11name = x11name;
return true; return true;
} }
@ -233,8 +233,8 @@ bool LColor::setColor(string const & lyxname, string const &x11name)
{ {
string const lcname = ascii_lowercase(lyxname); string const lcname = ascii_lowercase(lyxname);
if (pimpl_->transform.find(lcname) == pimpl_->transform.end()) { if (pimpl_->transform.find(lcname) == pimpl_->transform.end()) {
lyxerr[Debug::GUI] lyxerr[Debug::GUI]
<< "LColor::setColor: Unknown color \"" << "LColor::setColor: Unknown color \""
<< lyxname << '"' << endl; << lyxname << '"' << endl;
addColor(static_cast<color>(pimpl_->infotab.size()), lcname); addColor(static_cast<color>(pimpl_->infotab.size()), lcname);
} }
@ -267,7 +267,7 @@ LColor::color LColor::getFromLyXName(string const & lyxname) const
{ {
string const lcname = ascii_lowercase(lyxname); string const lcname = ascii_lowercase(lyxname);
if (pimpl_->transform.find(lcname) == pimpl_->transform.end()) { if (pimpl_->transform.find(lcname) == pimpl_->transform.end()) {
lyxerr << "LColor::getFromLyXName: Unknown color \"" lyxerr << "LColor::getFromLyXName: Unknown color \""
<< lyxname << '"' << endl; << lyxname << '"' << endl;
return none; return none;
} }

View File

@ -306,7 +306,7 @@ string const LaTeXFeatures::getPackages() const
} }
packages << "]{natbib}\n"; packages << "]{natbib}\n";
} }
// bibtopic -- the dot provides the aux file naming which // bibtopic -- the dot provides the aux file naming which
// LyX can detect. // LyX can detect.
if (isRequired("bibtopic")) { if (isRequired("bibtopic")) {
@ -420,7 +420,7 @@ string const LaTeXFeatures::getTClassPreamble() const
if (isRequired(cs->name)) if (isRequired(cs->name))
tcpreamble << cs->preamble; tcpreamble << cs->preamble;
} }
return tcpreamble.str(); return tcpreamble.str();
} }

View File

@ -16,13 +16,13 @@
class Paragraph; class Paragraph;
class ParagraphList : public std::vector<Paragraph> class ParagraphList : public std::vector<Paragraph>
{ {
public: public:
/// ///
typedef std::vector<Paragraph> base_type; typedef std::vector<Paragraph> base_type;
/// ///
ParagraphList(); ParagraphList();
/// ///
template <class Iter> template <class Iter>
ParagraphList(Iter beg, Iter end) ParagraphList(Iter beg, Iter end)

View File

@ -304,4 +304,3 @@ bool operator==(ParagraphParameeters const & ps1,
&& ps1.leftindent == ps2.leftindent; && ps1.leftindent == ps2.leftindent;
} }
*/ */

View File

@ -647,7 +647,7 @@ bool Buffer::readFile(LyXLex & lex, string const & filename, par_type pit)
" that it is probably corrupted."), " that it is probably corrupted."),
filename)); filename));
} }
#endif #endif
pimpl_->file_fully_loaded = true; pimpl_->file_fully_loaded = true;
return true; return true;
} }

View File

@ -937,7 +937,7 @@ bool BufferParams::writeLaTeX(ostream & os, LaTeXFeatures & features,
<< features.getBabelOptions(); << features.getBabelOptions();
texrow.newline(); texrow.newline();
} }
// Now insert the LyX specific LaTeX commands... // Now insert the LyX specific LaTeX commands...
// The optional packages; // The optional packages;
@ -1006,7 +1006,7 @@ bool BufferParams::writeLaTeX(ostream & os, LaTeXFeatures & features,
lyxpreamble += bullets_def + "}\n\n"; lyxpreamble += bullets_def + "}\n\n";
// We try to load babel late, in case it interferes // We try to load babel late, in case it interferes
// with other packages. // with other packages.
// Jurabib has to be called after babel, though. // Jurabib has to be called after babel, though.
if (use_babel && !features.isRequired("jurabib")) { if (use_babel && !features.isRequired("jurabib")) {
lyxpreamble += babelCall(language_options.str()) + '\n'; lyxpreamble += babelCall(language_options.str()) + '\n';

View File

@ -125,7 +125,7 @@ DispatchResult LCursor::dispatch(FuncRequest const & cmd0)
BOOST_ASSERT(idx() <= lastidx()); BOOST_ASSERT(idx() <= lastidx());
BOOST_ASSERT(par() <= lastpar()); BOOST_ASSERT(par() <= lastpar());
// The common case is 'LFUN handled, need update', so make the // The common case is 'LFUN handled, need update', so make the
// LFUN handler's life easier by assuming this as default value. // LFUN handler's life easier by assuming this as default value.
// The handler can reset the update and val flags if necessary. // The handler can reset the update and val flags if necessary.
disp_.update(true); disp_.update(true);
@ -1112,7 +1112,7 @@ bool LCursor::bruteFind(int x, int y, int xlow, int xhigh, int ylow, int yhigh)
{ {
BOOST_ASSERT(!empty()); BOOST_ASSERT(!empty());
par_type beg, end; par_type beg, end;
CursorSlice bottom = operator[](0); CursorSlice bottom = operator[](0);
LyXText * text = bottom.text(); LyXText * text = bottom.text();
BOOST_ASSERT(text); BOOST_ASSERT(text);
getParsInRange(text->paragraphs(), ylow, yhigh, beg, end); getParsInRange(text->paragraphs(), ylow, yhigh, beg, end);
@ -1324,7 +1324,7 @@ Encoding const * LCursor::getEncoding() const
CursorSlice const & sl = operator[](s); CursorSlice const & sl = operator[](s);
LyXText & text = *sl.text(); LyXText & text = *sl.text();
LyXFont font = text.getPar(sl.par()).getFont( LyXFont font = text.getPar(sl.par()).getFont(
bv().buffer()->params(), sl.pos(), outerFont(sl.par(), text.paragraphs())); bv().buffer()->params(), sl.pos(), outerFont(sl.par(), text.paragraphs()));
return font.language()->encoding(); return font.language()->encoding();
} }

View File

@ -152,9 +152,9 @@ public:
/// cache the absolute coordinate from the top inset /// cache the absolute coordinate from the top inset
void updatePos(); void updatePos();
/// sets anchor to cursor position /// sets anchor to cursor position
void resetAnchor(); void resetAnchor();
/// access to owning BufferView /// access to owning BufferView
BufferView & bv() const; BufferView & bv() const;
/// get some interesting description of top position /// get some interesting description of top position
void info(std::ostream & os) const; void info(std::ostream & os) const;
/// are we in math mode (2), text mode (1) or unsure (0)? /// are we in math mode (2), text mode (1) or unsure (0)?
@ -182,8 +182,8 @@ public:
//private: //private:
/// the anchor position /// the anchor position
DocIterator anchor_; DocIterator anchor_;
/// ///
DispatchResult disp_; DispatchResult disp_;
private: private:

View File

@ -56,7 +56,7 @@ InsetBase * DocIterator::nextInset()
BOOST_ASSERT(!empty()); BOOST_ASSERT(!empty());
if (pos() == lastpos()) if (pos() == lastpos())
return 0; return 0;
if (inMathed()) if (inMathed())
return nextAtom().nucleus(); return nextAtom().nucleus();
return paragraph().isInset(pos()) ? paragraph().getInset(pos()) : 0; return paragraph().isInset(pos()) ? paragraph().getInset(pos()) : 0;
} }
@ -67,7 +67,7 @@ InsetBase * DocIterator::prevInset()
BOOST_ASSERT(!empty()); BOOST_ASSERT(!empty());
if (pos() == 0) if (pos() == 0)
return 0; return 0;
if (inMathed()) if (inMathed())
return prevAtom().nucleus(); return prevAtom().nucleus();
return paragraph().isInset(pos() - 1) ? paragraph().getInset(pos() - 1) : 0; return paragraph().isInset(pos() - 1) ? paragraph().getInset(pos() - 1) : 0;
} }
@ -78,7 +78,7 @@ InsetBase const * DocIterator::prevInset() const
BOOST_ASSERT(!empty()); BOOST_ASSERT(!empty());
if (pos() == 0) if (pos() == 0)
return 0; return 0;
if (inMathed()) if (inMathed())
return prevAtom().nucleus(); return prevAtom().nucleus();
return paragraph().isInset(pos() - 1) ? paragraph().getInset(pos() - 1) : 0; return paragraph().isInset(pos() - 1) ? paragraph().getInset(pos() - 1) : 0;
} }
@ -339,13 +339,13 @@ void DocIterator::forwardChar()
{ {
forwardPos(); forwardPos();
while (size() != 0 && pos() == lastpos()) while (size() != 0 && pos() == lastpos())
forwardPos(); forwardPos();
} }
void DocIterator::forwardInset() void DocIterator::forwardInset()
{ {
forwardPos(); forwardPos();
while (size() != 0 && (pos() == lastpos() || nextInset() == 0)) while (size() != 0 && (pos() == lastpos() || nextInset() == 0))
forwardPos(); forwardPos();
} }
@ -355,7 +355,7 @@ void DocIterator::backwardChar()
{ {
backwardPos(); backwardPos();
while (size() != 0 && pos() == lastpos()) while (size() != 0 && pos() == lastpos())
backwardPos(); backwardPos();
} }
@ -390,7 +390,7 @@ void DocIterator::backwardPos()
// move into an inset to the left if possible // move into an inset to the left if possible
InsetBase * n = 0; InsetBase * n = 0;
if (inMathed()) { if (inMathed()) {
n = (top.cell().begin() + top.pos())->nucleus(); n = (top.cell().begin() + top.pos())->nucleus();
} else { } else {
@ -449,4 +449,3 @@ std::ostream & operator<<(std::ostream & os, StableDocIterator const & dit)
os << " " << dit.data_[i] << "\n"; os << " " << dit.data_[i] << "\n";
return os; return os;
} }

View File

@ -66,7 +66,7 @@ public:
CursorSlice & top() { return back(); } CursorSlice & top() { return back(); }
/// access to tip /// access to tip
CursorSlice const & top() const { return back(); } CursorSlice const & top() const { return back(); }
/// access to outermost slice /// access to outermost slice
CursorSlice & bottom() { return front(); } CursorSlice & bottom() { return front(); }
/// access to outermost slicetip /// access to outermost slicetip
CursorSlice const & bottom() const { return front(); } CursorSlice const & bottom() const { return front(); }

View File

@ -341,7 +341,7 @@ InsetBase * readInset(LyXLex & lex, Buffer const & buf)
auto_ptr<InsetBase> inset; auto_ptr<InsetBase> inset;
LyXTextClass tclass = buf.params().getLyXTextClass(); LyXTextClass tclass = buf.params().getLyXTextClass();
lex.next(); lex.next();
string tmptok = lex.getString(); string tmptok = lex.getString();

View File

@ -37,9 +37,9 @@ bool ControlCitation::initialiseParams(string const & data)
kernel().buffer().fillWithBibKeys(blist); kernel().buffer().fillWithBibKeys(blist);
bool use_styles = (usingNatbib() || usingJurabib()); bool use_styles = (usingNatbib() || usingJurabib());
typedef std::map<string, string>::value_type InfoMapValue; typedef std::map<string, string>::value_type InfoMapValue;
for (vector<pair<string,string> >::size_type i = 0; for (vector<pair<string,string> >::size_type i = 0;
i < blist.size(); ++i) { i < blist.size(); ++i) {
bibkeysInfo_.insert(InfoMapValue(blist[i].first, bibkeysInfo_.insert(InfoMapValue(blist[i].first,
@ -51,7 +51,7 @@ bool ControlCitation::initialiseParams(string const & data)
else { else {
if ((use_styles && citeStyles_.size() == 1) || if ((use_styles && citeStyles_.size() == 1) ||
(!use_styles && citeStyles_.size() != 1)) (!use_styles && citeStyles_.size() != 1))
citeStyles_ = biblio::getCiteStyles(usingNatbib(), citeStyles_ = biblio::getCiteStyles(usingNatbib(),
usingJurabib()); usingJurabib());
} }

View File

@ -68,10 +68,10 @@ namespace {
void dispatch_bufferparams(Kernel const & kernel, BufferParams const & bp, void dispatch_bufferparams(Kernel const & kernel, BufferParams const & bp,
kb_action lfun) kb_action lfun)
{ {
ostringstream ss; ostringstream ss;
bp.writeFile(ss); bp.writeFile(ss);
ss << "\\end_header\n"; ss << "\\end_header\n";
kernel.dispatch(FuncRequest(lfun, ss.str())); kernel.dispatch(FuncRequest(lfun, ss.str()));
} }
} // namespace anon } // namespace anon
@ -83,17 +83,17 @@ void ControlDocument::dispatchParams()
setLanguage(); setLanguage();
// Set the document class. // Set the document class.
lyx::textclass_type const old_class = lyx::textclass_type const old_class =
kernel().buffer().params().textclass; kernel().buffer().params().textclass;
lyx::textclass_type const new_class = bp_->textclass; lyx::textclass_type const new_class = bp_->textclass;
if (new_class != old_class) { if (new_class != old_class) {
string const name = textclasslist[new_class].name(); string const name = textclasslist[new_class].name();
kernel().dispatch(FuncRequest(LFUN_TEXTCLASS_APPLY, name)); kernel().dispatch(FuncRequest(LFUN_TEXTCLASS_APPLY, name));
} }
// Apply the BufferParams. // Apply the BufferParams.
dispatch_bufferparams(kernel(), params(), LFUN_BUFFERPARAMS_APPLY); dispatch_bufferparams(kernel(), params(), LFUN_BUFFERPARAMS_APPLY);
// Generate the colours requested by each new branch. // Generate the colours requested by each new branch.
BranchList & branchlist = params().branchlist(); BranchList & branchlist = params().branchlist();
@ -123,10 +123,10 @@ void ControlDocument::setLanguage() const
{ {
Language const * const newL = bp_->language; Language const * const newL = bp_->language;
if (kernel().buffer().params().language == newL) if (kernel().buffer().params().language == newL)
return; return;
string const lang_name = newL->lang(); string const lang_name = newL->lang();
kernel().dispatch(FuncRequest(LFUN_LANGUAGE_BUFFER, lang_name)); kernel().dispatch(FuncRequest(LFUN_LANGUAGE_BUFFER, lang_name));
} }
@ -143,5 +143,5 @@ bool ControlDocument::loadTextclass(lyx::textclass_type tc) const
void ControlDocument::saveAsDefault() const void ControlDocument::saveAsDefault() const
{ {
dispatch_bufferparams(kernel(), params(), LFUN_SAVE_AS_DEFAULT); dispatch_bufferparams(kernel(), params(), LFUN_SAVE_AS_DEFAULT);
} }

View File

@ -62,9 +62,9 @@ bool ControlPrefs::initialiseParams(std::string const &)
void ControlPrefs::dispatchParams() void ControlPrefs::dispatchParams()
{ {
ostringstream ss; ostringstream ss;
rc_.write(ss); rc_.write(ss);
kernel().dispatch(FuncRequest(LFUN_LYXRC_APPLY, ss.str())); kernel().dispatch(FuncRequest(LFUN_LYXRC_APPLY, ss.str()));
// FIXME: these need lfuns // FIXME: these need lfuns
bufferlist.setCurrentAuthor(rc_.user_name, rc_.user_email); bufferlist.setCurrentAuthor(rc_.user_name, rc_.user_email);

View File

@ -128,7 +128,7 @@ void ControlPrint::dispatchParams()
string const target = (pp.target == PrinterParams::PRINTER) ? string const target = (pp.target == PrinterParams::PRINTER) ?
"printer" : "file"; "printer" : "file";
string const target_name = (pp.target == PrinterParams::PRINTER) ? string const target_name = (pp.target == PrinterParams::PRINTER) ?
(pp.printer_name.empty() ? "default" : pp.printer_name) : (pp.printer_name.empty() ? "default" : pp.printer_name) :
pp.file_name; pp.file_name;

View File

@ -161,10 +161,10 @@ void ControlSpellchecker::check()
ptrdiff_t start = 0, total = 0; ptrdiff_t start = 0, total = 0;
DocIterator it = DocIterator(kernel().buffer().inset()); DocIterator it = DocIterator(kernel().buffer().inset());
for (start = 0; it != cur; it.forwardPos()) for (start = 0; it != cur; it.forwardPos())
++start; ++start;
for (total = start; it; it.forwardPos()) for (total = start; it; it.forwardPos())
++total; ++total;
for (; cur && isLetter(cur); cur.forwardPos()) for (; cur && isLetter(cur); cur.forwardPos())
++start; ++start;

View File

@ -81,7 +81,7 @@ public:
/** A request that the GUI be redrawn, /** A request that the GUI be redrawn,
* e.g. because the colors have been remapped. * e.g. because the colors have been remapped.
*/ */
void redrawGUI() const; void redrawGUI() const;
/** \name Kernel Nasties /** \name Kernel Nasties
* Unpleasantly public internals of the LyX kernel. * Unpleasantly public internals of the LyX kernel.

View File

@ -84,7 +84,7 @@ private:
bool Dialogs::isValidName(string const & name) const bool Dialogs::isValidName(string const & name) const
{ {
return std::find_if(dialognames, end_dialognames, return std::find_if(dialognames, end_dialognames,
cmpCStr(name.c_str())) != end_dialognames; cmpCStr(name.c_str())) != end_dialognames;
} }

View File

@ -41,9 +41,9 @@ void GPreamble::build()
void GPreamble::apply() void GPreamble::apply()
{ {
// controller().params() = preamble()->get_buffer()->get_text(preamble()->get_buffer()->get_start_iter(), // controller().params() = preamble()->get_buffer()->get_text(preamble()->get_buffer()->get_start_iter(),
// preamble()->get_buffer()->get_end_iter(), // preamble()->get_buffer()->get_end_iter(),
// false); // false);
} }

View File

@ -111,7 +111,7 @@ T* GView::getWidget(const string & name) const
template <class Controller> template <class Controller>
class GControlledView : public GView { class GControlledView : public GView {
public: public:
GControlledView(string const & name); GControlledView(string const & name);
protected: protected:
Controller & controller(); Controller & controller();
}; };

View File

@ -111,7 +111,7 @@ T* GnomeBase::getWidget(const string & name) const
template <class Controller> template <class Controller>
class GnomeCB : public GnomeBase { class GnomeCB : public GnomeBase {
public: public:
GnomeCB(string const & name); GnomeCB(string const & name);
protected: protected:
Controller & controller(); Controller & controller();
}; };

View File

@ -25,4 +25,3 @@ void addDefaultTags(Glib::RefPtr<Gtk::TextBuffer> & buf) {
buf->get_tag_table()->add(boldTag); buf->get_tag_table()->add(boldTag);
} }

View File

@ -70,7 +70,7 @@ void GXpmBtnTbl::construct()
GXpmBtn * btn; GXpmBtn * btn;
int row, col; int row, col;
for (row = 0; row < rows_; ++row) for (row = 0; row < rows_; ++row)
for (col = 0; col < cols_; ++col) { for (col = 0; col < cols_; ++col) {
btn = &btns_[index(row, col)]; btn = &btns_[index(row, col)];
btn->setRow(row); btn->setRow(row);
@ -85,7 +85,7 @@ void GXpmBtnTbl::construct()
void GXpmBtnTbl::setBtnXpm(XpmData xpms[]) void GXpmBtnTbl::setBtnXpm(XpmData xpms[])
{ {
int row, col; int row, col;
for (row = 0; row < rows_; ++row) for (row = 0; row < rows_; ++row)
for (col = 0; col < cols_; ++col) for (col = 0; col < cols_; ++col)
btns_[index(row, col)].setXpm(xpms[index(row, col)]); btns_[index(row, col)].setXpm(xpms[index(row, col)]);
} }

View File

@ -107,17 +107,17 @@ void QBibtex::update_contents()
dialog_->bibtocCB->setChecked(false); dialog_->bibtocCB->setChecked(false);
dialog_->bibtocCB->setEnabled(!bibtopic); dialog_->bibtocCB->setEnabled(!bibtopic);
string btprint(controller().params().getSecOptions()); string btprint(controller().params().getSecOptions());
int btp = 0; int btp = 0;
if (btprint == "btPrintNotCited") if (btprint == "btPrintNotCited")
btp = 1; btp = 1;
else if (btprint == "btPrintAll") else if (btprint == "btPrintAll")
btp = 2; btp = 2;
dialog_->btPrintCO->setCurrentItem(btp); dialog_->btPrintCO->setCurrentItem(btp);
dialog_->btPrintCO->setEnabled(bibtopic); dialog_->btPrintCO->setEnabled(bibtopic);
dialog_->styleCB->clear(); dialog_->styleCB->clear();
int item_nr(-1); int item_nr(-1);
@ -168,13 +168,13 @@ void QBibtex::apply()
// command! // command!
controller().params().setOptions(bibstyle); controller().params().setOptions(bibstyle);
} }
// bibtopic allows three kinds of sections: // bibtopic allows three kinds of sections:
// 1. sections that include all cited references of the database(s) // 1. sections that include all cited references of the database(s)
// 2. sections that include all uncited references of the database(s) // 2. sections that include all uncited references of the database(s)
// 3. sections that include all references of the database(s), cited or not // 3. sections that include all references of the database(s), cited or not
int btp = dialog_->btPrintCO->currentItem(); int btp = dialog_->btPrintCO->currentItem();
switch (btp) { switch (btp) {
case 0: case 0:
controller().params().setSecOptions("btPrintCited"); controller().params().setSecOptions("btPrintCited");
@ -186,7 +186,7 @@ void QBibtex::apply()
controller().params().setSecOptions("btPrintAll"); controller().params().setSecOptions("btPrintAll");
break; break;
} }
if (!controller().usingBibtopic()) if (!controller().usingBibtopic())
controller().params().setSecOptions(""); controller().params().setSecOptions("");
} }

View File

@ -62,10 +62,10 @@ void QCitation::apply()
string const before = fromqstr(dialog_->textBeforeED->text()); string const before = fromqstr(dialog_->textBeforeED->text());
controller().params().setSecOptions(before); controller().params().setSecOptions(before);
string const after = fromqstr(dialog_->textAfterED->text()); string const after = fromqstr(dialog_->textAfterED->text());
controller().params().setOptions(after); controller().params().setOptions(after);
style_ = choice; style_ = choice;
open_find_ = false; open_find_ = false;
} }
@ -100,7 +100,7 @@ void QCitation::build_dialog()
bcview().addReadOnly(dialog_->fulllistCB); bcview().addReadOnly(dialog_->fulllistCB);
bcview().addReadOnly(dialog_->textBeforeED); bcview().addReadOnly(dialog_->textBeforeED);
bcview().addReadOnly(dialog_->textAfterED); bcview().addReadOnly(dialog_->textAfterED);
open_find_ = true; open_find_ = true;
} }
@ -125,7 +125,7 @@ void QCitation::fillStyles()
vector<string> const & sty = controller().getCiteStrings(key); vector<string> const & sty = controller().getCiteStrings(key);
bool const use_styles = (controller().usingNatbib() || bool const use_styles = (controller().usingNatbib() ||
controller().usingJurabib()); controller().usingJurabib());
dialog_->citationStyleCO->setEnabled(!sty.empty() && use_styles); dialog_->citationStyleCO->setEnabled(!sty.empty() && use_styles);
dialog_->citationStyleLA->setEnabled(!sty.empty() && use_styles); dialog_->citationStyleLA->setEnabled(!sty.empty() && use_styles);
@ -146,7 +146,7 @@ void QCitation::updateStyle()
dialog_->fulllistCB->setEnabled(natbib); dialog_->fulllistCB->setEnabled(natbib);
dialog_->forceuppercaseCB->setEnabled(natbib); dialog_->forceuppercaseCB->setEnabled(natbib);
dialog_->textBeforeED->setEnabled(natbib || dialog_->textBeforeED->setEnabled(natbib ||
controller().usingJurabib()); controller().usingJurabib());
string const & command = controller().params().getCmdName(); string const & command = controller().params().getCmdName();
@ -158,8 +158,8 @@ void QCitation::updateStyle()
vector<biblio::CiteStyle>::const_iterator cit = vector<biblio::CiteStyle>::const_iterator cit =
find(styles.begin(), styles.end(), cs.style); find(styles.begin(), styles.end(), cs.style);
// restore the latest natbib style // restore the latest natbib style
if (style_ >= 0 && style_ < dialog_->citationStyleCO->count()) if (style_ >= 0 && style_ < dialog_->citationStyleCO->count())
dialog_->citationStyleCO->setCurrentItem(style_); dialog_->citationStyleCO->setCurrentItem(style_);
else else
@ -197,7 +197,7 @@ void QCitation::update_contents()
fillStyles(); fillStyles();
updateStyle(); updateStyle();
// open the find dialog if nothing has been selected (yet) // open the find dialog if nothing has been selected (yet)
// the bool prevents that this is also done after "apply" // the bool prevents that this is also done after "apply"
if (open_find_) if (open_find_)

View File

@ -78,7 +78,7 @@ void QCitationDialog::openFind()
{ {
if (form_->readOnly()) if (form_->readOnly())
return; return;
if (selectedLB->count() == 0 && add_->availableLB->count() != 0){ if (selectedLB->count() == 0 && add_->availableLB->count() != 0){
// open the find dialog // open the find dialog
add(); add();

View File

@ -36,7 +36,7 @@ QFloatDialog::QFloatDialog(QFloat * form)
// enable span columns checkbox // enable span columns checkbox
floatFP->useWide(); floatFP->useWide();
// enable sideways checkbox // enable sideways checkbox
floatFP->useSideways(); floatFP->useSideways();

View File

@ -55,7 +55,7 @@ void QRef::build_dialog()
bcview().addReadOnly(dialog_->referenceED); bcview().addReadOnly(dialog_->referenceED);
bcview().addReadOnly(dialog_->typeCO); bcview().addReadOnly(dialog_->typeCO);
bcview().addReadOnly(dialog_->bufferCO); bcview().addReadOnly(dialog_->bufferCO);
restored_buffer_ = -1; restored_buffer_ = -1;
} }
@ -63,14 +63,14 @@ void QRef::build_dialog()
void QRef::update_contents() void QRef::update_contents()
{ {
InsetCommandParams const & params = controller().params(); InsetCommandParams const & params = controller().params();
int orig_type = dialog_->typeCO->currentItem(); int orig_type = dialog_->typeCO->currentItem();
dialog_->referenceED->setText(toqstr(params.getContents())); dialog_->referenceED->setText(toqstr(params.getContents()));
dialog_->nameED->setText(toqstr(params.getOptions())); dialog_->nameED->setText(toqstr(params.getOptions()));
dialog_->nameED->setReadOnly(!nameAllowed() && !readOnly()); dialog_->nameED->setReadOnly(!nameAllowed() && !readOnly());
// restore type settings for new insets // restore type settings for new insets
if (params.getContents().empty()) if (params.getContents().empty())
dialog_->typeCO->setCurrentItem(orig_type); dialog_->typeCO->setCurrentItem(orig_type);
@ -90,7 +90,7 @@ void QRef::update_contents()
dialog_->bufferCO->insertItem(toqstr(*it)); dialog_->bufferCO->insertItem(toqstr(*it));
} }
// restore the buffer combo setting for new insets // restore the buffer combo setting for new insets
if (params.getContents().empty() && restored_buffer_ != -1 if (params.getContents().empty() && restored_buffer_ != -1
&& restored_buffer_ < dialog_->bufferCO->count()) && restored_buffer_ < dialog_->bufferCO->count())
dialog_->bufferCO->setCurrentItem(restored_buffer_); dialog_->bufferCO->setCurrentItem(restored_buffer_);
else else
@ -107,7 +107,7 @@ void QRef::apply()
params.setCmdName(InsetRef::getName(dialog_->typeCO->currentItem())); params.setCmdName(InsetRef::getName(dialog_->typeCO->currentItem()));
params.setContents(fromqstr(dialog_->referenceED->text())); params.setContents(fromqstr(dialog_->referenceED->text()));
params.setOptions(fromqstr(dialog_->nameED->text())); params.setOptions(fromqstr(dialog_->nameED->text()));
restored_buffer_ = dialog_->bufferCO->currentItem(); restored_buffer_ = dialog_->bufferCO->currentItem();
} }
@ -164,7 +164,7 @@ void QRef::gotoRef()
void QRef::redoRefs() void QRef::redoRefs()
{ {
int lastref = dialog_->refsLB->currentItem(); int lastref = dialog_->refsLB->currentItem();
dialog_->refsLB->setAutoUpdate(false); dialog_->refsLB->setAutoUpdate(false);
dialog_->refsLB->clear(); dialog_->refsLB->clear();
@ -181,12 +181,12 @@ void QRef::redoRefs()
dialog_->refsLB->sort(); dialog_->refsLB->sort();
dialog_->referenceED->setText(tmp); dialog_->referenceED->setText(tmp);
// restore the last selection for new insets // restore the last selection for new insets
if (tmp.isEmpty() && lastref != -1 if (tmp.isEmpty() && lastref != -1
&& lastref < int(dialog_->refsLB->count())) && lastref < int(dialog_->refsLB->count()))
dialog_->refsLB->setCurrentItem(lastref); dialog_->refsLB->setCurrentItem(lastref);
else else
for (unsigned int i = 0; i < dialog_->refsLB->count(); ++i) { for (unsigned int i = 0; i < dialog_->refsLB->count(); ++i) {
if (tmp == dialog_->refsLB->text(i)) if (tmp == dialog_->refsLB->text(i))
dialog_->refsLB->setCurrentItem(i); dialog_->refsLB->setCurrentItem(i);

View File

@ -62,7 +62,7 @@ private:
/// at a reference ? /// at a reference ?
bool at_ref_; bool at_ref_;
/// store the buffer settings /// store the buffer settings
int restored_buffer_; int restored_buffer_;

View File

@ -56,4 +56,3 @@ void QVSpaceDialog::enableCustom(int)
valueLE->setEnabled(enable); valueLE->setEnabled(enable);
unitCO->setEnabled(enable); unitCO->setEnabled(enable);
} }

View File

@ -110,55 +110,55 @@ OSErr checkAppleEventForMissingParams(const AppleEvent& theAppleEvent)
{ {
DescType returnedType; DescType returnedType;
Size actualSize; Size actualSize;
OSErr err = AEGetAttributePtr(&theAppleEvent, keyMissedKeywordAttr, OSErr err = AEGetAttributePtr(&theAppleEvent, keyMissedKeywordAttr,
typeWildCard, &returnedType, nil, 0, typeWildCard, &returnedType, nil, 0,
&actualSize); &actualSize);
switch (err) { switch (err) {
case errAEDescNotFound: case errAEDescNotFound:
return noErr; return noErr;
case noErr: case noErr:
return errAEEventNotHandled; return errAEEventNotHandled;
default: default:
return err; return err;
} }
} }
} }
pascal OSErr handleOpenDocuments(const AppleEvent* inEvent, pascal OSErr handleOpenDocuments(const AppleEvent* inEvent,
AppleEvent* /*reply*/, long /*refCon*/) AppleEvent* /*reply*/, long /*refCon*/)
{ {
QString s_arg; QString s_arg;
AEDescList documentList; AEDescList documentList;
OSErr err = AEGetParamDesc(inEvent, keyDirectObject, typeAEList, OSErr err = AEGetParamDesc(inEvent, keyDirectObject, typeAEList,
&documentList); &documentList);
if (err != noErr) if (err != noErr)
return err; return err;
err = checkAppleEventForMissingParams(*inEvent); err = checkAppleEventForMissingParams(*inEvent);
if (err == noErr) { if (err == noErr) {
long documentCount; long documentCount;
err = AECountItems(&documentList, &documentCount); err = AECountItems(&documentList, &documentCount);
for (long documentIndex = 1; for (long documentIndex = 1;
err == noErr && documentIndex <= documentCount; err == noErr && documentIndex <= documentCount;
documentIndex++) { documentIndex++) {
DescType returnedType; DescType returnedType;
Size actualSize; Size actualSize;
AEKeyword keyword; AEKeyword keyword;
FSRef ref; FSRef ref;
char qstr_buf[1024]; char qstr_buf[1024];
err = AESizeOfNthItem(&documentList, documentIndex, err = AESizeOfNthItem(&documentList, documentIndex,
&returnedType, &actualSize); &returnedType, &actualSize);
if (err == noErr) { if (err == noErr) {
err = AEGetNthPtr(&documentList, documentIndex, err = AEGetNthPtr(&documentList, documentIndex,
typeFSRef, &keyword, typeFSRef, &keyword,
&returnedType, (Ptr)&ref, &returnedType, (Ptr)&ref,
sizeof(FSRef), &actualSize); sizeof(FSRef), &actualSize);
if (err == noErr) { if (err == noErr) {
FSRefMakePath(&ref, (UInt8*)qstr_buf, FSRefMakePath(&ref, (UInt8*)qstr_buf,
1024); 1024);
s_arg=QString::fromUtf8(qstr_buf); s_arg=QString::fromUtf8(qstr_buf);
wa_ptr->dispatch( wa_ptr->dispatch(
FuncRequest(LFUN_FILE_OPEN, FuncRequest(LFUN_FILE_OPEN,
fromqstr(s_arg))); fromqstr(s_arg)));
break; break;
} }

View File

@ -22,7 +22,7 @@ void addCheckedLineEdit(BCView & bcview,
{ {
bcview.addCheckedWidget(new CheckedLineEdit(input, label)); bcview.addCheckedWidget(new CheckedLineEdit(input, label));
} }
namespace { namespace {
@ -38,14 +38,14 @@ void setWarningColor(QWidget * widget)
widget->setPalette(pal); widget->setPalette(pal);
} }
void setWidget(bool valid, QLineEdit * input, QLabel * label) void setWidget(bool valid, QLineEdit * input, QLabel * label)
{ {
if (valid) if (valid)
input->unsetPalette(); input->unsetPalette();
else else
setWarningColor(input); setWarningColor(input);
if (!label) if (!label)
return; return;

View File

@ -162,7 +162,7 @@ void FloatPlacement::set(InsetFloatParams const & params)
spanCB->setChecked(params.wide); spanCB->setChecked(params.wide);
sidewaysCB->setChecked(params.sideways); sidewaysCB->setChecked(params.sideways);
sidewaysCB->setEnabled(params.type == "figure" sidewaysCB->setEnabled(params.type == "figure"
|| params.type == "table"); || params.type == "table");
checkAllowed(); checkAllowed();
} }

View File

@ -93,7 +93,7 @@ extern bool lyxX11EventFilter(XEvent * xev);
#ifdef Q_WS_MACX #ifdef Q_WS_MACX
extern bool macEventFilter(EventRef event); extern bool macEventFilter(EventRef event);
extern pascal OSErr extern pascal OSErr
handleOpenDocuments(const AppleEvent* inEvent, AppleEvent* /*reply*/, handleOpenDocuments(const AppleEvent* inEvent, AppleEvent* /*reply*/,
long /*refCon*/); long /*refCon*/);
#endif #endif
@ -127,13 +127,13 @@ LQApplication::~LQApplication()
#ifdef Q_WS_MACX #ifdef Q_WS_MACX
bool LQApplication::macEventFilter(EventRef event) bool LQApplication::macEventFilter(EventRef event)
{ {
if (GetEventClass(event) == kEventClassAppleEvent) { if (GetEventClass(event) == kEventClassAppleEvent) {
EventRecord eventrec; EventRecord eventrec;
ConvertEventRefToEventRecord(event, &eventrec); ConvertEventRefToEventRecord(event, &eventrec);
AEProcessAppleEvent(&eventrec); AEProcessAppleEvent(&eventrec);
return false; return false;
} }
return false; return false;

View File

@ -75,11 +75,11 @@ void addFontPath()
FSRef fontDirRef; FSRef fontDirRef;
FSSpec fontDirSpec; FSSpec fontDirSpec;
CFStringRef filePath = CFStringCreateWithBytes(kCFAllocatorDefault, CFStringRef filePath = CFStringCreateWithBytes(kCFAllocatorDefault,
(UInt8 *) "Fonts", strlen("Fonts"), (UInt8 *) "Fonts", strlen("Fonts"),
kCFStringEncodingISOLatin1, false); kCFStringEncodingISOLatin1, false);
myAppResourcesURL = CFBundleCopyResourcesDirectoryURL(myAppBundle); myAppResourcesURL = CFBundleCopyResourcesDirectoryURL(myAppBundle);
FontsURL = CFURLCreateCopyAppendingPathComponent(kCFAllocatorDefault, FontsURL = CFURLCreateCopyAppendingPathComponent(kCFAllocatorDefault,
myAppResourcesURL, filePath, true); myAppResourcesURL, filePath, true);
if (lyxerr.debugging(Debug::FONT)) { if (lyxerr.debugging(Debug::FONT)) {
UInt8 buf[255]; UInt8 buf[255];
@ -87,12 +87,12 @@ void addFontPath()
lyxerr << "Adding Fonts directory: " << buf << endl; lyxerr << "Adding Fonts directory: " << buf << endl;
} }
CFURLGetFSRef (FontsURL, &fontDirRef); CFURLGetFSRef (FontsURL, &fontDirRef);
OSStatus err = FSGetCatalogInfo (&fontDirRef, kFSCatInfoNone, OSStatus err = FSGetCatalogInfo (&fontDirRef, kFSCatInfoNone,
NULL, NULL, &fontDirSpec, NULL); NULL, NULL, &fontDirSpec, NULL);
if (err) if (err)
lyxerr << "FSGetCatalogInfo err = " << err << endl; lyxerr << "FSGetCatalogInfo err = " << err << endl;
err = FMActivateFonts (&fontDirSpec, NULL, NULL, err = FMActivateFonts (&fontDirSpec, NULL, NULL,
kFMLocalActivationContext); kFMLocalActivationContext);
if (err) if (err)
lyxerr << "FMActivateFonts err = " << err << endl; lyxerr << "FMActivateFonts err = " << err << endl;
#endif #endif

View File

@ -215,7 +215,7 @@ bool LyXScreen::fitCursor(BufferView * bv)
bv->cursor().getDim(asc, desc); bv->cursor().getDim(asc, desc);
//lyxerr << "LyXScreen::fitCursor: x: " << x << " y: " << y //lyxerr << "LyXScreen::fitCursor: x: " << x << " y: " << y
// << " top_y: " << top_y << endl; // << " top_y: " << top_y << endl;
bool const big_row = h / 4 < asc + desc && asc + desc < h; bool const big_row = h / 4 < asc + desc && asc + desc < h;
if (y + desc - top_y >= h) { if (y + desc - top_y >= h) {

View File

@ -78,7 +78,7 @@ void FormBibtex::build()
// callback for double click in browser // callback for double click in browser
fl_set_browser_dblclick_callback(dialog_->browser_styles, fl_set_browser_dblclick_callback(dialog_->browser_styles,
C_FormDialogView_InputCB, 2); C_FormDialogView_InputCB, 2);
fl_addto_choice(dialog_->choice_btprint, fl_addto_choice(dialog_->choice_btprint,
_(" all cited references " _(" all cited references "
"| all uncited references " "| all uncited references "
@ -113,7 +113,7 @@ void FormBibtex::build()
"the styles which are in directories where TeX finds them " "the styles which are in directories where TeX finds them "
"are listed!"); "are listed!");
tooltips().init(dialog_->button_rescan, str); tooltips().init(dialog_->button_rescan, str);
str = _("The bibliography section contains..."); str = _("The bibliography section contains...");
tooltips().init(dialog_->choice_btprint, str); tooltips().init(dialog_->choice_btprint, str);
} }
@ -198,14 +198,14 @@ void FormBibtex::update()
} }
} }
fl_set_input(dialog_->input_style, bibstyle.c_str()); fl_set_input(dialog_->input_style, bibstyle.c_str());
string btprint = controller().params().getSecOptions(); string btprint = controller().params().getSecOptions();
int btp = 1; int btp = 1;
if (btprint == "btPrintNotCited") if (btprint == "btPrintNotCited")
btp = 2; btp = 2;
else if (btprint == "btPrintAll") else if (btprint == "btPrintAll")
btp = 3; btp = 3;
fl_set_choice(dialog_->choice_btprint, btp); fl_set_choice(dialog_->choice_btprint, btp);
setEnabled(dialog_->choice_btprint, bibtopic); setEnabled(dialog_->choice_btprint, bibtopic);
@ -260,11 +260,11 @@ void FormBibtex::apply()
controller().params().setOptions(bibtotoc + ',' + bibstyle); controller().params().setOptions(bibtotoc + ',' + bibstyle);
} else { } else {
// At least one of addtotoc and bibstyle is empty. // At least one of addtotoc and bibstyle is empty.
// No harm to output both! // No harm to output both!
controller().params().setOptions(bibtotoc + bibstyle); controller().params().setOptions(bibtotoc + bibstyle);
} }
// bibtopic allows three kinds of sections: // bibtopic allows three kinds of sections:
// 1. sections that include all cited references of the database(s) // 1. sections that include all cited references of the database(s)
// 2. sec. that include all uncited references of the database(s) // 2. sec. that include all uncited references of the database(s)
@ -283,7 +283,7 @@ void FormBibtex::apply()
break; break;
} }
} }
else else
controller().params().setSecOptions(""); controller().params().setSecOptions("");
} }

View File

@ -285,4 +285,3 @@ ButtonPolicy::SMInput FormBox::input(FL_OBJECT * ob, long)
return ButtonPolicy::SMI_VALID; return ButtonPolicy::SMI_VALID;
} }

View File

@ -117,7 +117,7 @@ void FormCitation::apply()
string const before = getString(dialog_->input_before); string const before = getString(dialog_->input_before);
controller().params().setSecOptions(before); controller().params().setSecOptions(before);
string const after = getString(dialog_->input_after); string const after = getString(dialog_->input_after);
controller().params().setOptions(after); controller().params().setOptions(after);
} }
@ -464,7 +464,7 @@ void FormCitation::update()
fl_set_input(dialog_->input_after, fl_set_input(dialog_->input_after,
controller().params().getOptions().c_str()); controller().params().getOptions().c_str());
fl_set_input(dialog_->input_before, fl_set_input(dialog_->input_before,
controller().params().getSecOptions().c_str()); controller().params().getSecOptions().c_str());
} }

View File

@ -315,12 +315,12 @@ void FormDocument::build()
bcview().addReadOnly(options_->choice_citation_format); bcview().addReadOnly(options_->choice_citation_format);
bcview().addReadOnly(options_->input_float_placement); bcview().addReadOnly(options_->input_float_placement);
bcview().addReadOnly(options_->choice_postscript_driver); bcview().addReadOnly(options_->choice_postscript_driver);
// add cite style radio buttons // add cite style radio buttons
citestyle_.init(options_->radio_use_defcite, DEFCITE); citestyle_.init(options_->radio_use_defcite, DEFCITE);
citestyle_.init(options_->radio_use_natbib, NATBIB); citestyle_.init(options_->radio_use_natbib, NATBIB);
citestyle_.init(options_->radio_use_jurabib, JURABIB); citestyle_.init(options_->radio_use_jurabib, JURABIB);
// set up the tooltips for optionss form // set up the tooltips for optionss form
string str = _("Use LaTeX's default citation style"); string str = _("Use LaTeX's default citation style");
tooltips().init(options_->radio_use_defcite, str); tooltips().init(options_->radio_use_defcite, str);
@ -535,8 +535,8 @@ ButtonPolicy::SMInput FormDocument::input(FL_OBJECT * ob, long)
fl_set_choice_text(class_->choice_skip_units, fl_set_choice_text(class_->choice_skip_units,
default_unit.c_str()); default_unit.c_str());
} else if (ob == options_->radio_use_jurabib || } else if (ob == options_->radio_use_jurabib ||
ob == options_->radio_use_defcite || ob == options_->radio_use_defcite ||
ob == options_->radio_use_natbib) { ob == options_->radio_use_natbib) {
setEnabled(options_->choice_citation_format, setEnabled(options_->choice_citation_format,
fl_get_button(options_->radio_use_natbib)); fl_get_button(options_->radio_use_natbib));
@ -784,12 +784,12 @@ void FormDocument::branch_input(FL_OBJECT * ob)
bool const selecting = ob == branch_->button_select; bool const selecting = ob == branch_->button_select;
string current_branch; string current_branch;
// When selecting, take highlighted item from left browser, // When selecting, take highlighted item from left browser,
// when deselecting, from right browser: // when deselecting, from right browser:
if (selecting) { if (selecting) {
int const i = fl_get_browser(branch_->browser_all_branches); int const i = fl_get_browser(branch_->browser_all_branches);
current_branch = current_branch =
fl_get_browser_line(branch_->browser_all_branches, i); fl_get_browser_line(branch_->browser_all_branches, i);
} else { } else {
int const i = fl_get_browser(branch_->browser_selection); int const i = fl_get_browser(branch_->browser_selection);

View File

@ -133,7 +133,7 @@ private:
std::vector<std::string> lang_; std::vector<std::string> lang_;
/// Contains all legal branches for this doc /// Contains all legal branches for this doc
BranchList branchlist_; BranchList branchlist_;
/// citation style buttons /// citation style buttons
RadioButtonGroup citestyle_; RadioButtonGroup citestyle_;
}; };

View File

@ -367,14 +367,14 @@ void FormExternal::build()
bcview().addReadOnly(options_->input_option); bcview().addReadOnly(options_->input_option);
// initial setting // initial setting
// addCheckedPositiveFloat(bcview(), scale_->input_width); // addCheckedPositiveFloat(bcview(), scale_->input_width);
// As I haven't written addCheckedPositiveFloat, we default to // As I haven't written addCheckedPositiveFloat, we default to
// always checking that it is a valide LyXLength, even when // always checking that it is a valide LyXLength, even when
// I'm 'scaling'. No harm done, just not as strict as it might be. // I'm 'scaling'. No harm done, just not as strict as it might be.
addCheckedLyXLength(bcview(), scale_->input_width); addCheckedLyXLength(bcview(), scale_->input_width);
addCheckedLyXLength(bcview(), scale_->input_height); addCheckedLyXLength(bcview(), scale_->input_height);
// addCheckedPositiveFloat(bcview(), input_displayscale); // addCheckedPositiveFloat(bcview(), input_displayscale);
fl_set_input_filter(lyxview_->input_displayscale, fl_set_input_filter(lyxview_->input_displayscale,
fl_unsigned_int_filter); fl_unsigned_int_filter);
@ -745,10 +745,10 @@ void FormExternal::widthUnitChanged()
bool useHeight = fl_get_choice(scale_->choice_width) > 1; bool useHeight = fl_get_choice(scale_->choice_width) > 1;
// if (useHeight) // if (useHeight)
// widthED->setValidator(unsignedLengthValidator(widthED)); // widthED->setValidator(unsignedLengthValidator(widthED));
// else // else
// widthED->setValidator(new QDoubleValidator(0, 1000, 2, widthED)); // widthED->setValidator(new QDoubleValidator(0, 1000, 2, widthED));
setEnabled(scale_->input_height, useHeight); setEnabled(scale_->input_height, useHeight);
setEnabled(scale_->choice_height, useHeight); setEnabled(scale_->choice_height, useHeight);

View File

@ -230,13 +230,13 @@ ButtonPolicy::SMInput FormFloat::input(FL_OBJECT * ob, long)
setEnabled(dialog_->check_here, alternatives && !wide); setEnabled(dialog_->check_here, alternatives && !wide);
setEnabled(dialog_->radio_here_definitely, !wide); setEnabled(dialog_->radio_here_definitely, !wide);
setEnabled(dialog_->check_bottom, alternatives && !wide); setEnabled(dialog_->check_bottom, alternatives && !wide);
} else if (ob == dialog_->check_sideways) { } else if (ob == dialog_->check_sideways) {
setEnabled(dialog_->radio_default, !sideways); setEnabled(dialog_->radio_default, !sideways);
setEnabled(dialog_->radio_alternatives, !sideways); setEnabled(dialog_->radio_alternatives, !sideways);
setEnabled(dialog_->radio_here_definitely, !wide && !sideways); setEnabled(dialog_->radio_here_definitely, !wide && !sideways);
setEnabled(dialog_->check_top, alternatives && !sideways); setEnabled(dialog_->check_top, alternatives && !sideways);
setEnabled(dialog_->check_bottom, setEnabled(dialog_->check_bottom,
alternatives && !wide && !sideways); alternatives && !wide && !sideways);
setEnabled(dialog_->check_page, alternatives && !sideways); setEnabled(dialog_->check_page, alternatives && !sideways);
setEnabled(dialog_->check_here, alternatives && !wide && !sideways); setEnabled(dialog_->check_here, alternatives && !wide && !sideways);

View File

@ -37,7 +37,7 @@ int const delim_rversion[] = {
1,1,3,3,4,5,7,7,9,9,10,11, 1,1,3,3,4,5,7,7,9,9,10,11,
3,13,15,15,16,17,19,19,20,21,22 3,13,15,15,16,17,19,19,20,21,22
}; };
int const delim_size = int const delim_size =
sizeof(delim_rversion) / sizeof(delim_rversion[0]); sizeof(delim_rversion) / sizeof(delim_rversion[0]);
char const * delim_values[] = { char const * delim_values[] = {

View File

@ -85,7 +85,7 @@ ButtonPolicy::SMInput FormSearch::input(FL_OBJECT * ob, long)
getString(dialog_->input_replace), getString(dialog_->input_replace),
fl_get_button(dialog_->check_casesensitive), fl_get_button(dialog_->check_casesensitive),
fl_get_button(dialog_->check_matchword), fl_get_button(dialog_->check_matchword),
!fl_get_button(dialog_->check_searchbackwards), !fl_get_button(dialog_->check_searchbackwards),
all); all);
} }

View File

@ -325,7 +325,7 @@ bool XformsColor::read(string const & filename)
if (f.readable() && !lexrc.setFile(filename)) { if (f.readable() && !lexrc.setFile(filename)) {
lyxerr << "XformsColor::read(" << filename << ")\n" lyxerr << "XformsColor::read(" << filename << ")\n"
<< _("Failed to open file.") << std::endl; << _("Failed to open file.") << std::endl;
return false; return false;
} }
while (lexrc.isOK()) { while (lexrc.isOK()) {
@ -370,7 +370,7 @@ bool XformsColor::write(string const & filename)
if (!os) { if (!os) {
lyxerr << "XformsColor::write(" << filename << ")\n" lyxerr << "XformsColor::write(" << filename << ")\n"
<< _("Failed to open file.") << std::endl; << _("Failed to open file.") << std::endl;
return false; return false;
} }
os << "###" os << "###"

View File

@ -91,8 +91,8 @@ bool operator==(FuncRequest const & lhs, FuncRequest const & rhs)
std::ostream & operator<<(std::ostream & os, FuncRequest const & cmd) std::ostream & operator<<(std::ostream & os, FuncRequest const & cmd)
{ {
return os return os
<< " action: " << cmd.action << " action: " << cmd.action
<< " arg: '" << cmd.argument << "'" << " arg: '" << cmd.argument << "'"
<< " x: " << cmd.x << " x: " << cmd.x
<< " y: " << cmd.y; << " y: " << cmd.y;
} }

View File

@ -112,7 +112,7 @@ string const ResizeLatexCommand::front_impl() const
if (!data.height.zero()) if (!data.height.zero())
height = data.height.asLatexString(); height = data.height.asLatexString();
} }
os << "\\resizebox{" os << "\\resizebox{"
<< width << "}{" << width << "}{"
<< height << "}{"; << height << "}{";

View File

@ -67,7 +67,7 @@ public:
virtual MathInset * asMathInset() { return 0; } virtual MathInset * asMathInset() { return 0; }
/// identification as non-math inset /// identification as non-math inset
virtual UpdatableInset * asUpdatableInset() { return 0; } virtual UpdatableInset * asUpdatableInset() { return 0; }
/// true for 'math' math inset, but not for e.g. mbox /// true for 'math' math inset, but not for e.g. mbox
virtual bool inMathed() const { return false; } virtual bool inMathed() const { return false; }
// the real dispatcher // the real dispatcher
@ -107,7 +107,7 @@ public:
virtual bool covers(int x, int y) const; virtual bool covers(int x, int y) const;
/// get the screen positions of the cursor (see note in cursor.C) /// get the screen positions of the cursor (see note in cursor.C)
virtual void getCursorPos(CursorSlice const & cur, int & x, int & y) const; virtual void getCursorPos(CursorSlice const & cur, int & x, int & y) const;
/// is this an inset that can be moved into? /// is this an inset that can be moved into?
virtual bool isActive() const { return nargs() > 0; } virtual bool isActive() const { return nargs() > 0; }
/// Where should we go when we press the up or down cursor key? /// Where should we go when we press the up or down cursor key?
@ -147,12 +147,12 @@ public:
virtual int cellXOffset(idx_type) const { return 0; } virtual int cellXOffset(idx_type) const { return 0; }
/// any additional y-offset when drawing a cell? /// any additional y-offset when drawing a cell?
virtual int cellYOffset(idx_type) const { return 0; } virtual int cellYOffset(idx_type) const { return 0; }
/// number of embedded cells /// number of embedded cells
virtual size_t nargs() const { return 0; } virtual size_t nargs() const { return 0; }
/// number of rows in gridlike structures /// number of rows in gridlike structures
virtual size_t nrows() const { return 0; } virtual size_t nrows() const { return 0; }
/// number of columns in gridlike structures /// number of columns in gridlike structures
virtual size_t ncols() const { return 0; } virtual size_t ncols() const { return 0; }
/// is called when the cursor leaves this inset /// is called when the cursor leaves this inset
virtual void notifyCursorLeaves(idx_type) {} virtual void notifyCursorLeaves(idx_type) {}

View File

@ -77,7 +77,7 @@ void InsetBibtex::priv_dispatch(LCursor & cur, FuncRequest & cmd)
setParams(p); setParams(p);
break; break;
} }
default: default:
InsetCommand::priv_dispatch(cur, cmd); InsetCommand::priv_dispatch(cur, cmd);
break; break;
@ -103,7 +103,7 @@ int InsetBibtex::latex(Buffer const & buffer, ostream & os,
// 2. \begin{btSect}{database} // 2. \begin{btSect}{database}
// 3. \btPrint{Cited|NotCited|All} // 3. \btPrint{Cited|NotCited|All}
// 4. \end{btSect} // 4. \end{btSect}
// the database string // the database string
string adb; string adb;
string db_in = getContents(); string db_in = getContents();
@ -115,8 +115,8 @@ int InsetBibtex::latex(Buffer const & buffer, ostream & os,
while (!adb.empty()) { while (!adb.empty()) {
if (!runparams.nice && if (!runparams.nice &&
IsFileReadable(MakeAbsPath(adb, buffer.filePath())+".bib")) IsFileReadable(MakeAbsPath(adb, buffer.filePath())+".bib"))
adb = os::external_path(MakeAbsPath(adb, adb = os::external_path(MakeAbsPath(adb,
buffer.filePath())); buffer.filePath()));
db_out += adb; db_out += adb;
db_out += ','; db_out += ',';
db_in = split(db_in, adb,','); db_in = split(db_in, adb,',');
@ -132,7 +132,7 @@ int InsetBibtex::latex(Buffer const & buffer, ostream & os,
style = split(style, bibtotoc, ','); style = split(style, bibtotoc, ',');
} }
} }
// line count // line count
int i = 0; int i = 0;
@ -145,7 +145,7 @@ int InsetBibtex::latex(Buffer const & buffer, ostream & os,
os << "\\bibliographystyle{" << style << "}\n"; os << "\\bibliographystyle{" << style << "}\n";
i += 1; i += 1;
} }
if (buffer.params().use_bibtopic){ if (buffer.params().use_bibtopic){
os << "\\begin{btSect}{" << db_out << "}\n"; os << "\\begin{btSect}{" << db_out << "}\n";
string btprint = getSecOptions(); string btprint = getSecOptions();
@ -186,7 +186,7 @@ int InsetBibtex::latex(Buffer const & buffer, ostream & os,
os << "\\bibliography{" << db_out << "}\n"; os << "\\bibliography{" << db_out << "}\n";
i += 1; i += 1;
} }
return i; return i;
} }
@ -290,4 +290,3 @@ void InsetBibtex::validate(LaTeXFeatures & features) const
if (features.bufferParams().use_bibtopic) if (features.bufferParams().use_bibtopic)
features.require("bibtopic"); features.require("bibtopic");
} }

View File

@ -154,7 +154,7 @@ void InsetBox::setButtonLabel()
void InsetBox::metrics(MetricsInfo & m, Dimension & dim) const void InsetBox::metrics(MetricsInfo & m, Dimension & dim) const
{ {
MetricsInfo mi = m; MetricsInfo mi = m;
mi.base.textwidth = params_.width.inPixels(m.base.textwidth); mi.base.textwidth = params_.width.inPixels(m.base.textwidth);
InsetCollapsable::metrics(mi, dim); InsetCollapsable::metrics(mi, dim);
//if (params_.inner_box && isOpen()) //if (params_.inner_box && isOpen())
// dim.wid = mi.base.textwidth; // dim.wid = mi.base.textwidth;

View File

@ -130,7 +130,7 @@ void InsetCharStyle::draw(PainterInfo & pi, int x, int y) const
int a = 0; int a = 0;
int d = 0; int d = 0;
font_metrics::rectText(params_.type, font, w, a, d); font_metrics::rectText(params_.type, font, w, a, d);
pi.pain.rectText(x + (dim_.wid - w) / 2, pi.pain.rectText(x + (dim_.wid - w) / 2,
y + InsetText::descent() + a, y + InsetText::descent() + a,
params_.type, font, LColor::none, LColor::none); params_.type, font, LColor::none, LColor::none);
} }

View File

@ -101,8 +101,8 @@ string const getNatbibLabel(Buffer const & buffer,
cite_type == "citeyearpar") cite_type == "citeyearpar")
before_str = before + ' '; before_str = before + ' ';
// In CITE (jurabib), the "before" string is used to attach // In CITE (jurabib), the "before" string is used to attach
// the annotator (of legal texts) to the author(s) of the // the annotator (of legal texts) to the author(s) of the
// first reference. // first reference.
else if (cite_type == "cite") else if (cite_type == "cite")
before_str = '/' + before; before_str = '/' + before;
} }
@ -143,7 +143,7 @@ string const getNatbibLabel(Buffer const & buffer,
label += author + before_str + sep_str; label += author + before_str + sep_str;
else else
label += author + sep_str; label += author + sep_str;
// (authors1 (<before> year); ... ; // (authors1 (<before> year); ... ;
// authors_last (<before> year, <after>) // authors_last (<before> year, <after>)
} else if (cite_type == "citet") { } else if (cite_type == "citet") {
@ -286,7 +286,7 @@ InsetCitation::Cache::Style InsetCitation::getStyle(Buffer const & buffer) const
style = Cache::NATBIB_AY; style = Cache::NATBIB_AY;
} }
} }
if (buffer.params().use_jurabib) if (buffer.params().use_jurabib)
style = Cache::JURABIB; style = Cache::JURABIB;
@ -344,7 +344,7 @@ int InsetCitation::latex(Buffer const & buffer, ostream & os,
if (buffer.params().use_natbib) if (buffer.params().use_natbib)
os << getCmdName(); os << getCmdName();
else if (buffer.params().use_jurabib) { else if (buffer.params().use_jurabib) {
// jurabib does not (yet) support "force upper case" // jurabib does not (yet) support "force upper case"
// and "full author name". Fallback. // and "full author name". Fallback.
string cmd = getCmdName(); string cmd = getCmdName();
if (cmd[0] == 'C') if (cmd[0] == 'C')
@ -358,7 +358,7 @@ int InsetCitation::latex(Buffer const & buffer, ostream & os,
string const before = getSecOptions(); string const before = getSecOptions();
string const after = getOptions(); string const after = getOptions();
if (!before.empty() if (!before.empty()
&& (buffer.params().use_natbib || buffer.params().use_jurabib)) && (buffer.params().use_natbib || buffer.params().use_jurabib))
os << '[' << before << "][" << after << ']'; os << '[' << before << "][" << after << ']';
else if (!after.empty()) else if (!after.empty())

View File

@ -183,7 +183,7 @@ void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const
if (openinlined_) if (openinlined_)
InsetText::draw(pi, x + dimc.width(), InsetText::draw(pi, x + dimc.width(),
y - aa + textdim_.asc); y - aa + textdim_.asc);
else else
InsetText::draw(pi, x, dimc.height() InsetText::draw(pi, x, dimc.height()
+ y - aa + textdim_.asc); + y - aa + textdim_.asc);
} }

View File

@ -64,7 +64,7 @@ public:
void setLabel(std::string const & l); void setLabel(std::string const & l);
/// ///
virtual void setButtonLabel() {} virtual void setButtonLabel() {}
/// ///
void setLabelFont(LyXFont & f); void setLabelFont(LyXFont & f);
/// ///
int scroll(bool recursive = true) const; int scroll(bool recursive = true) const;

View File

@ -104,7 +104,7 @@ void InsetCommand::priv_dispatch(LCursor & cur, FuncRequest & cmd)
case LFUN_INSET_MODIFY: { case LFUN_INSET_MODIFY: {
InsetCommandParams p; InsetCommandParams p;
InsetCommandMailer::string2params(mailer_name_, cmd.argument, p); InsetCommandMailer::string2params(mailer_name_, cmd.argument, p);
if (p.getCmdName().empty()) { if (p.getCmdName().empty()) {
cur.undispatched(); cur.undispatched();
} else { } else {
setParams(p); setParams(p);

View File

@ -29,7 +29,7 @@ InsetCommandParams::InsetCommandParams(string const & n,
string const & c, string const & c,
string const & o, string const & o,
string const & s) string const & s)
: cmdname(n), contents(c), options(o), sec_options(s), : cmdname(n), contents(c), options(o), sec_options(s),
preview_(false) preview_(false)
{} {}
@ -39,7 +39,7 @@ void InsetCommandParams::scanCommand(string const & cmd)
string tcmdname, toptions, tsecoptions, tcontents; string tcmdname, toptions, tsecoptions, tcontents;
if (cmd.empty()) return; if (cmd.empty()) return;
enum { WS, CMDNAME, OPTION, SECOPTION, CONTENT } state = WS; enum { WS, CMDNAME, OPTION, SECOPTION, CONTENT } state = WS;
// Used to handle things like \command[foo[bar]]{foo{bar}} // Used to handle things like \command[foo[bar]]{foo{bar}}
@ -100,7 +100,7 @@ void InsetCommandParams::scanCommand(string const & cmd)
<< "> == <" << getCommand() << "> == <" << getCommand()
<< "> == <" << getCmdName() << "> == <" << getCmdName()
<< '|' << getContents() << '|' << getContents()
<< '|' << getOptions() << '|' << getOptions()
<< '|' << getSecOptions() << '>' << endl; << '|' << getSecOptions() << '>' << endl;
} }

View File

@ -182,7 +182,7 @@ void InsetFloat::priv_dispatch(LCursor & cur, FuncRequest & cmd)
InsetCollapsable::priv_dispatch(cur, cmd); InsetCollapsable::priv_dispatch(cur, cmd);
break; break;
} }
default: default:
InsetCollapsable::priv_dispatch(cur, cmd); InsetCollapsable::priv_dispatch(cur, cmd);
break; break;
@ -201,7 +201,7 @@ void InsetFloatParams::write(ostream & os) const
os << "wide true\n"; os << "wide true\n";
else else
os << "wide false\n"; os << "wide false\n";
if (sideways) if (sideways)
os << "sideways true\n"; os << "sideways true\n";
else else
@ -261,7 +261,7 @@ void InsetFloat::validate(LaTeXFeatures & features) const
if (contains(params_.placement, 'H')) { if (contains(params_.placement, 'H')) {
features.require("float"); features.require("float");
} }
if (params_.sideways) if (params_.sideways)
features.require("rotating"); features.require("rotating");

View File

@ -471,7 +471,7 @@ void InsetTabular::priv_dispatch(LCursor & cur, FuncRequest & cmd)
} }
break; break;
case LFUN_LEFTSEL: case LFUN_LEFTSEL:
case LFUN_LEFT: case LFUN_LEFT:
cell(cur.idx()).dispatch(cur, cmd); cell(cur.idx()).dispatch(cur, cmd);
cur.dispatched(); // override the cell's decision cur.dispatched(); // override the cell's decision
@ -695,7 +695,7 @@ bool InsetTabular::getStatus(LCursor & cur, FuncRequest const & cmd,
switch (cmd.action) { switch (cmd.action) {
case LFUN_TABULAR_FEATURE: { case LFUN_TABULAR_FEATURE: {
int actcell = cur.idx(); int actcell = cur.idx();
int action = LyXTabular::LAST_ACTION; int action = LyXTabular::LAST_ACTION;
int i = 0; int i = 0;
for (; tabularFeature[i].action != LyXTabular::LAST_ACTION; ++i) { for (; tabularFeature[i].action != LyXTabular::LAST_ACTION; ++i) {
string const tmp = tabularFeature[i].feature; string const tmp = tabularFeature[i].feature;
@ -1540,7 +1540,7 @@ void InsetTabular::cutSelection(LCursor & cur)
bool const track = cur.bv().buffer()->params().tracking_changes; bool const track = cur.bv().buffer()->params().tracking_changes;
int rs, re, cs, ce; int rs, re, cs, ce;
getSelection(cur, rs, re, cs, ce); getSelection(cur, rs, re, cs, ce);
for (int i = rs; i <= re; ++i) for (int i = rs; i <= re; ++i)
for (int j = cs; j <= ce; ++j) for (int j = cs; j <= ce; ++j)
cell(tabular.getCellNumber(i, j)).clear(track); cell(tabular.getCellNumber(i, j)).clear(track);
@ -1801,4 +1801,3 @@ string const InsetTabularMailer::params2string(InsetTabular const & inset)
data << "\\end_inset\n"; data << "\\end_inset\n";
return data.str(); return data.str();
} }

View File

@ -150,7 +150,7 @@ public:
bool insetAllowed(Code) const { return true; } bool insetAllowed(Code) const { return true; }
/// ///
bool allowSpellCheck() const { return true; } bool allowSpellCheck() const { return true; }
protected: protected:
/// ///
void priv_dispatch(LCursor & cur, FuncRequest & cmd); void priv_dispatch(LCursor & cur, FuncRequest & cmd);

View File

@ -95,7 +95,7 @@ void InsetWrap::priv_dispatch(LCursor & cur, FuncRequest & cmd)
case LFUN_INSET_DIALOG_UPDATE: case LFUN_INSET_DIALOG_UPDATE:
InsetWrapMailer(*this).updateDialog(&cur.bv()); InsetWrapMailer(*this).updateDialog(&cur.bv());
break; break;
case LFUN_MOUSE_RELEASE: { case LFUN_MOUSE_RELEASE: {
if (cmd.button() == mouse_button::button3 && hitButton(cmd)) { if (cmd.button() == mouse_button::button3 && hitButton(cmd)) {
InsetWrapMailer(*this).showDialog(&cur.bv()); InsetWrapMailer(*this).showDialog(&cur.bv());

View File

@ -367,5 +367,3 @@ bool findNextChange(BufferView * bv)
} // find namespace } // find namespace
} // lyx namespace } // lyx namespace

View File

@ -488,7 +488,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
break; break;
default: default:
cur.getStatus(cmd, flag); cur.getStatus(cmd, flag);
if (!flag.enabled()) if (!flag.enabled())
flag = view()->getStatus(cmd); flag = view()->getStatus(cmd);
@ -562,7 +562,7 @@ void loadTextclass(string const & name)
Alert::error(_("Could not change class"), s); Alert::error(_("Could not change class"), s);
} }
} }
} //namespace anon } //namespace anon
@ -1342,14 +1342,14 @@ void LyXFunc::dispatch(FuncRequest const & cmd, bool verbose)
case LFUN_LYXRC_APPLY: { case LFUN_LYXRC_APPLY: {
istringstream ss(argument); istringstream ss(argument);
bool const success = lyxrc.read(ss) == 0; bool const success = lyxrc.read(ss) == 0;
if (!success) { if (!success) {
lyxerr << "Warning in LFUN_LYXRC_APPLY!\n" lyxerr << "Warning in LFUN_LYXRC_APPLY!\n"
<< "Unable to read lyxrc data" << "Unable to read lyxrc data"
<< endl; << endl;
} }
break; break;
} }
default: { default: {
DispatchResult res = view()->cursor().dispatch(cmd); DispatchResult res = view()->cursor().dispatch(cmd);

View File

@ -320,4 +320,3 @@ LyXLex & LyXLex::operator>>(bool & s)
} }
return *this; return *this;
} }

View File

@ -580,7 +580,7 @@ int LyXRC::read(LyXLex & lexrc)
chktex_command = lexrc.getString(); chktex_command = lexrc.getString();
} }
break; break;
case RC_BIBTEX_COMMAND: case RC_BIBTEX_COMMAND:
if (lexrc.next()) { if (lexrc.next()) {
bibtex_command = lexrc.getString(); bibtex_command = lexrc.getString();
@ -2012,7 +2012,7 @@ string const LyXRC::getDescription(LyXRCTags tag)
case RC_CHKTEX_COMMAND: case RC_CHKTEX_COMMAND:
str = _("Define how to run chktex. E.g. \"chktex -n11 -n1 -n3 -n6 -n9 -22 -n25 -n30 -n38\" Refer to the ChkTeX documentation."); str = _("Define how to run chktex. E.g. \"chktex -n11 -n1 -n3 -n6 -n9 -22 -n25 -n30 -n38\" Refer to the ChkTeX documentation.");
break; break;
case RC_BIBTEX_COMMAND: case RC_BIBTEX_COMMAND:
str = _("Define the options of bibtex (cf. man bibtex) or select and alternative compiler (e.g. mlbibtex or bibulus)."); str = _("Define the options of bibtex (cf. man bibtex) or select and alternative compiler (e.g. mlbibtex or bibulus).");
break; break;

View File

@ -124,4 +124,3 @@ void Row::dump(const char * s) const
<< " top_of_text: " << top_of_text_ << " top_of_text: " << top_of_text_
<< " y_offset: " << y_offset_ << std::endl; << " y_offset: " << y_offset_ << std::endl;
} }

View File

@ -78,7 +78,7 @@ public:
int fd() const; int fd() const;
/// Connection status /// Connection status
bool connected() const; bool connected() const;
/// Line buffered input from the socket /// Line buffered input from the socket
bool readln(std::string &); bool readln(std::string &);
/// Write the string + '\n' to the socket /// Write the string + '\n' to the socket
void writeln(std::string const &); void writeln(std::string const &);

View File

@ -51,7 +51,7 @@ public:
typedef lyx::pos_type pos_type; typedef lyx::pos_type pos_type;
/// ///
typedef lyx::par_type par_type; typedef lyx::par_type par_type;
/// constructor /// constructor
explicit LyXText(BufferView *); explicit LyXText(BufferView *);
/// ///
@ -265,7 +265,7 @@ public:
/// current text heigth /// current text heigth
int height() const; int height() const;
/// updates all counters /// updates all counters
void updateCounters(); void updateCounters();
/// Returns an inset if inset was hit, or 0 if not. /// Returns an inset if inset was hit, or 0 if not.
@ -299,7 +299,7 @@ public:
ParagraphList & paragraphs() const; ParagraphList & paragraphs() const;
/// return true if this is the main text /// return true if this is the main text
bool isMainText() const; bool isMainText() const;
/// return first row of text /// return first row of text
RowList::iterator firstRow() const; RowList::iterator firstRow() const;
/// return last row of text /// return last row of text
@ -377,7 +377,7 @@ private:
/// return past-the-last paragraph influenced by a layout /// return past-the-last paragraph influenced by a layout
/// change on pit /// change on pit
par_type undoSpan(par_type pit); par_type undoSpan(par_type pit);
/// rebreaks the given par /// rebreaks the given par
void redoParagraphInternal(par_type pit); void redoParagraphInternal(par_type pit);
/// used in setlayout /// used in setlayout

View File

@ -82,7 +82,7 @@ void MathColorInset::write(WriteStream & os) const
{ {
if (oldstyle_) if (oldstyle_)
os << "{\\color" << '{' << cell(0) << '}' << cell(1) << '}'; os << "{\\color" << '{' << cell(0) << '}' << cell(1) << '}';
else else
os << "\\textcolor" << '{' << cell(0) << "}{" << cell(1) << '}'; os << "\\textcolor" << '{' << cell(0) << "}{" << cell(1) << '}';
} }

View File

@ -22,7 +22,7 @@ class PainterInfo;
class MathDimInset : public MathInset { class MathDimInset : public MathInset {
public: public:
/// ///
MathDimInset(); MathDimInset();
/// ///
Dimension dimensions() const { return dim_; } Dimension dimensions() const { return dim_; }

View File

@ -39,11 +39,11 @@ public:
bool inMathed() const { return false; } bool inMathed() const { return false; }
/// ///
LyXText * getText(int) const; LyXText * getText(int) const;
/// ///
void getCursorPos(CursorSlice const & cur, int & x, int & y) const; void getCursorPos(CursorSlice const & cur, int & x, int & y) const;
protected: protected:
/// ///
mutable LyXText text_; mutable LyXText text_;
/// ///
BufferView * const bv_; BufferView * const bv_;

View File

@ -543,9 +543,9 @@ void MathNestInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
break; break;
case LFUN_ESCAPE: case LFUN_ESCAPE:
if (cur.selection()) if (cur.selection())
cur.selClear(); cur.selClear();
else else
cmd = FuncRequest(LFUN_FINISHED_LEFT); cmd = FuncRequest(LFUN_FINISHED_LEFT);
break; break;

View File

@ -111,7 +111,7 @@ void MathScriptInset::ensure(bool up)
// just nucleus so far // just nucleus so far
cells_.push_back(MathArray()); cells_.push_back(MathArray());
cell_1_is_up_ = up; cell_1_is_up_ = up;
} else if (nargs() == 2 && !has(up)) { } else if (nargs() == 2 && !has(up)) {
if (up) { if (up) {
cells_.push_back(cell(1)); cells_.push_back(cell(1));
cell(1).clear(); cell(1).clear();

View File

@ -60,7 +60,7 @@ void RefInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
if (cmd.getArg(0) == "ref") { if (cmd.getArg(0) == "ref") {
MathArray ar; MathArray ar;
if (createMathInset_fromDialogStr(cmd.argument, ar)) { if (createMathInset_fromDialogStr(cmd.argument, ar)) {
*this = *ar[0].nucleus()->asRefInset(); *this = *ar[0].nucleus()->asRefInset();
break; break;
} }
} }

View File

@ -68,14 +68,14 @@ void docbookParagraphs(Buffer const & buf,
ParagraphList::iterator pend = const_cast<ParagraphList&>(paragraphs).end(); ParagraphList::iterator pend = const_cast<ParagraphList&>(paragraphs).end();
Counters & counters = buf.params().getLyXTextClass().counters(); Counters & counters = buf.params().getLyXTextClass().counters();
for (; par != pend; ++par) { for (; par != pend; ++par) {
LyXLayout_ptr const & style = par->layout(); LyXLayout_ptr const & style = par->layout();
// environment tag closing // environment tag closing
for (; depth > par->params().depth(); --depth) { for (; depth > par->params().depth(); --depth) {
sgml::closeEnvTags(os, false, environment_inner[depth], sgml::closeEnvTags(os, false, environment_inner[depth],
item_tag, command_depth + depth); item_tag, command_depth + depth);
sgml::closeTag(os, depth + command_depth, false, environment_stack[depth]); sgml::closeTag(os, depth + command_depth, false, environment_stack[depth]);
environment_stack[depth].erase(); environment_stack[depth].erase();
@ -85,14 +85,14 @@ void docbookParagraphs(Buffer const & buf,
if (depth == par->params().depth() if (depth == par->params().depth()
&& environment_stack[depth] != style->latexname() && environment_stack[depth] != style->latexname()
&& !environment_stack[depth].empty()) { && !environment_stack[depth].empty()) {
sgml::closeEnvTags(os, false, environment_inner[depth], sgml::closeEnvTags(os, false, environment_inner[depth],
item_tag, command_depth + depth); item_tag, command_depth + depth);
sgml::closeTag(os, depth + command_depth, false, environment_stack[depth]); sgml::closeTag(os, depth + command_depth, false, environment_stack[depth]);
environment_stack[depth].erase(); environment_stack[depth].erase();
environment_inner[depth].erase(); environment_inner[depth].erase();
} }
string ls = ""; string ls = "";
bool labelid = false; bool labelid = false;
// Write opening SGML tags. // Write opening SGML tags.
@ -111,11 +111,11 @@ void docbookParagraphs(Buffer const & buf,
if (depth != 0) if (depth != 0)
//error(ErrorItem(_("Error"), _("Wrong depth for LatexType Command."), par->id(), 0, par->size())); //error(ErrorItem(_("Error"), _("Wrong depth for LatexType Command."), par->id(), 0, par->size()));
; ;
command_name = style->latexname(); command_name = style->latexname();
cmd_depth = style->commanddepth; cmd_depth = style->commanddepth;
if (command_flag) { if (command_flag) {
if (cmd_depth < command_base) { if (cmd_depth < command_base) {
for (Paragraph::depth_type j = command_depth; for (Paragraph::depth_type j = command_depth;
@ -160,25 +160,25 @@ void docbookParagraphs(Buffer const & buf,
if (!labelid && !style->latexparam().empty()) { if (!labelid && !style->latexparam().empty()) {
ls = style->latexparam(); ls = style->latexparam();
if (ls.find('#') != string::npos) { if (ls.find('#') != string::npos) {
string el = expandLabel(buf.params().getLyXTextClass(), string el = expandLabel(buf.params().getLyXTextClass(),
style, false); style, false);
ls = subst(ls, "#", el); ls = subst(ls, "#", el);
} }
} }
sgml::openTag(os, depth + command_depth, false, command_name, ls); sgml::openTag(os, depth + command_depth, false, command_name, ls);
// Label around sectioning number: // Label around sectioning number:
if (!style->labeltag().empty()) { if (!style->labeltag().empty()) {
sgml::openTag(os, depth + 1 + command_depth, false, sgml::openTag(os, depth + 1 + command_depth, false,
style->labeltag()); style->labeltag());
os << expandLabel(buf.params().getLyXTextClass(), style, false); os << expandLabel(buf.params().getLyXTextClass(), style, false);
sgml::closeTag(os, depth + 1 + command_depth, false, sgml::closeTag(os, depth + 1 + command_depth, false,
style->labeltag()); style->labeltag());
} }
// Inner tagged header text, e.g. <title> for sectioning: // Inner tagged header text, e.g. <title> for sectioning:
sgml::openTag(os, depth + 1 + command_depth, false, sgml::openTag(os, depth + 1 + command_depth, false,
style->innertag()); style->innertag());
break; break;
@ -197,10 +197,10 @@ void docbookParagraphs(Buffer const & buf,
environment_stack[depth] = style->latexname(); environment_stack[depth] = style->latexname();
environment_inner[depth] = "!-- --"; environment_inner[depth] = "!-- --";
// outputs <environment_stack[depth] latexparam()> // outputs <environment_stack[depth] latexparam()>
sgml::openTag(os, depth + command_depth, false, sgml::openTag(os, depth + command_depth, false,
environment_stack[depth], style->latexparam()); environment_stack[depth], style->latexparam());
} else { } else {
sgml::closeEnvTags(os, false, environment_inner[depth], sgml::closeEnvTags(os, false, environment_inner[depth],
style->itemtag(), command_depth + depth); style->itemtag(), command_depth + depth);
} }
@ -209,7 +209,7 @@ void docbookParagraphs(Buffer const & buf,
if (style->innertag() == "CDATA") if (style->innertag() == "CDATA")
os << "<![CDATA["; os << "<![CDATA[";
else else
sgml::openTag(os, depth + command_depth, false, sgml::openTag(os, depth + command_depth, false,
style->innertag()); style->innertag());
} }
break; break;
@ -234,7 +234,7 @@ void docbookParagraphs(Buffer const & buf,
// write closing SGML tags // write closing SGML tags
switch (style->latextype) { switch (style->latextype) {
case LATEX_COMMAND: case LATEX_COMMAND:
sgml::closeTag(os, depth + command_depth, false, sgml::closeTag(os, depth + command_depth, false,
style->innertag()); style->innertag());
break; break;
case LATEX_ENVIRONMENT: case LATEX_ENVIRONMENT:
@ -242,7 +242,7 @@ void docbookParagraphs(Buffer const & buf,
if (style->innertag() == "CDATA") if (style->innertag() == "CDATA")
os << "]]>"; os << "]]>";
else else
sgml::closeTag(os, depth + command_depth, false, sgml::closeTag(os, depth + command_depth, false,
style->innertag()); style->innertag());
} }
break; break;
@ -261,7 +261,7 @@ void docbookParagraphs(Buffer const & buf,
// Close open tags // Close open tags
for (int d = depth; d >= 0; --d) { for (int d = depth; d >= 0; --d) {
if (!environment_stack[depth].empty()) { if (!environment_stack[depth].empty()) {
sgml::closeEnvTags(os, false, environment_inner[depth], sgml::closeEnvTags(os, false, environment_inner[depth],
item_tag, command_depth + depth); item_tag, command_depth + depth);
} }
} }
@ -272,4 +272,3 @@ void docbookParagraphs(Buffer const & buf,
os << endl; os << endl;
} }
} }

View File

@ -36,7 +36,7 @@ void linuxdocParagraphs(Buffer const & buf,
ostream & os, ostream & os,
OutputParams const & runparams) OutputParams const & runparams)
{ {
Paragraph::depth_type depth = 0; // paragraph depth Paragraph::depth_type depth = 0; // paragraph depth
string item_name; string item_name;
vector<string> environment_stack(5); vector<string> environment_stack(5);
@ -160,5 +160,3 @@ void linuxdocParagraphs(Buffer const & buf,
for (int i = depth; i >= 0; --i) for (int i = depth; i >= 0; --i)
sgml::closeTag(os, depth, false, environment_stack[i]); sgml::closeTag(os, depth, false, environment_stack[i]);
} }

View File

@ -24,6 +24,6 @@ void linuxdocParagraphs(Buffer const & buf,
ParagraphList const & paragraphs, ParagraphList const & paragraphs,
std::ostream & os, std::ostream & os,
OutputParams const & runparams); OutputParams const & runparams);
#endif #endif

View File

@ -1881,5 +1881,3 @@ unsigned char Paragraph::transformChar(unsigned char c, pos_type pos) const
return Encodings::TransformChar(c, Encodings::FORM_ISOLATED); return Encodings::TransformChar(c, Encodings::FORM_ISOLATED);
} }
} }

View File

@ -341,7 +341,7 @@ Paragraph const & ownerPar(Buffer const & buf, InsetBase const * inset)
} }
/// return the range of pars [beg, end[ owning the range of y [ystart, yend] /// return the range of pars [beg, end[ owning the range of y [ystart, yend]
void getParsInRange(ParagraphList & pars, int ystart, int yend, void getParsInRange(ParagraphList & pars, int ystart, int yend,
par_type & beg, par_type & end) par_type & beg, par_type & end)
{ {

View File

@ -64,7 +64,7 @@ lyx::par_type outerPar(Buffer const & buf, InsetBase const * inset);
/// find owning paragraph containing an inset /// find owning paragraph containing an inset
Paragraph const & ownerPar(Buffer const & buf, InsetBase const * inset); Paragraph const & ownerPar(Buffer const & buf, InsetBase const * inset);
/// return the range of pars [beg, end[ owning the range of y [ystart, yend] /// return the range of pars [beg, end[ owning the range of y [ystart, yend]
void getParsInRange(ParagraphList & plist, void getParsInRange(ParagraphList & plist,
int ystart, int yend, int ystart, int yend,
lyx::par_type & beg, lyx::par_type & beg,

View File

@ -37,7 +37,7 @@ int closeTag(std::ostream & os, lyx::depth_type depth,
bool mixcont, std::string const & latexname); bool mixcont, std::string const & latexname);
/// ///
unsigned int closeEnvTags(std::ostream & os, unsigned int closeEnvTags(std::ostream & os,
bool mixcont, bool mixcont,
std::string const & environment_inner_depth, std::string const & environment_inner_depth,
std::string const & item_tag, std::string const & item_tag,

View File

@ -38,7 +38,7 @@ public:
/** Those child processes that are found to have finished are removed /** Those child processes that are found to have finished are removed
* from the list and their callback function is passed the final * from the list and their callback function is passed the final
* return state. * return state.
*/ */
void handleCompletedProcesses(); void handleCompletedProcesses();
/// Add a new child process to the list of controlled processes. /// Add a new child process to the list of controlled processes.

View File

@ -623,7 +623,7 @@ int LyXText::leftMargin(par_type pit, pos_type pos) const
break; break;
} }
} }
if (!pars_[pit].params().leftIndent().zero()) if (!pars_[pit].params().leftIndent().zero())
x += pars_[pit].params().leftIndent().inPixels(maxwidth_); x += pars_[pit].params().leftIndent().inPixels(maxwidth_);
@ -791,7 +791,7 @@ void LyXText::rowBreakPoint(par_type pit, Row & row) const
break; break;
} }
} }
if (!pars_[pit].isInset(i) || pars_[pit].getInset(i)->isChar()) { if (!pars_[pit].isInset(i) || pars_[pit].getInset(i)->isChar()) {
// some insets are line separators too // some insets are line separators too
if (pars_[pit].isLineSeparator(i)) { if (pars_[pit].isLineSeparator(i)) {
@ -1397,7 +1397,7 @@ void LyXText::cursorLeftOneWord(LCursor & cur)
if (cur.pos() == 0 && cur.par() != 0) { if (cur.pos() == 0 && cur.par() != 0) {
--cur.par(); --cur.par();
cur.pos() = cur.lastpos(); cur.pos() = cur.lastpos();
} else { } else {
// Skip through initial nonword stuff. // Skip through initial nonword stuff.
// Treat floats and insets as words. // Treat floats and insets as words.
while (cur.pos() != 0 && !cur.paragraph().isWord(cur.pos() - 1)) while (cur.pos() != 0 && !cur.paragraph().isWord(cur.pos() - 1))
@ -1587,7 +1587,7 @@ void LyXText::Delete(LCursor & cur)
CursorSlice sl = cur.top(); CursorSlice sl = cur.top();
cursorRight(cur); cursorRight(cur);
if (sl != cur.top()) { if (sl != cur.top()) {
recordUndo(cur, Undo::DELETE, cur.par(), recordUndo(cur, Undo::DELETE, cur.par(),
max(par_type(0), cur.par() - 1)); max(par_type(0), cur.par() - 1));
backspace(cur); backspace(cur);
} }
@ -2019,7 +2019,7 @@ int LyXText::cursorX(CursorSlice const & cur) const
return xo_; return xo_;
Row const & row = *pars_[pit].getRow(cur.pos()); Row const & row = *pars_[pit].getRow(cur.pos());
pos_type pos = cur.pos(); pos_type pos = cur.pos();
pos_type cursor_vpos = 0; pos_type cursor_vpos = 0;

View File

@ -336,7 +336,7 @@ bool changeDepthAllowed(LyXText::DEPTH_CHANGE type,
bool LyXText::changeDepthAllowed(LCursor & cur, DEPTH_CHANGE type) const bool LyXText::changeDepthAllowed(LCursor & cur, DEPTH_CHANGE type) const
{ {
BOOST_ASSERT(this == cur.text()); BOOST_ASSERT(this == cur.text());
par_type beg, end; par_type beg, end;
getSelectionSpan(cur, beg, end); getSelectionSpan(cur, beg, end);
int max_depth = 0; int max_depth = 0;
if (beg != 0) if (beg != 0)
@ -412,8 +412,8 @@ void LyXText::setFont(LCursor & cur, LyXFont const & font, bool toggleall)
par_type const beg = cur.selBegin().par(); par_type const beg = cur.selBegin().par();
par_type const end = cur.selEnd().par(); par_type const end = cur.selEnd().par();
DocIterator pos = cur.selectionBegin(); DocIterator pos = cur.selectionBegin();
DocIterator posend = cur.selectionEnd(); DocIterator posend = cur.selectionEnd();
BufferParams const & params = bv()->buffer()->params(); BufferParams const & params = bv()->buffer()->params();
@ -422,7 +422,7 @@ void LyXText::setFont(LCursor & cur, LyXFont const & font, bool toggleall)
f.update(font, params.language, toggleall); f.update(font, params.language, toggleall);
setCharFont(pos.par(), pos.pos(), f); setCharFont(pos.par(), pos.pos(), f);
} }
redoParagraphs(beg, end + 1); redoParagraphs(beg, end + 1);
} }
@ -819,7 +819,7 @@ void LyXText::updateCounters()
bv()->buffer()->params().getLyXTextClass().counters().reset(); bv()->buffer()->params().getLyXTextClass().counters().reset();
bool update_pos = false; bool update_pos = false;
par_type end = paragraphs().size(); par_type end = paragraphs().size();
for (par_type pit = 0; pit != end; ++pit) { for (par_type pit = 0; pit != end; ++pit) {
string const oldLabel = pars_[pit].params().labelString(); string const oldLabel = pars_[pit].params().labelString();
@ -949,7 +949,7 @@ void LyXText::setCursor(CursorSlice & cur, par_type par,
// This shouldn't happen. // This shouldn't happen.
BOOST_ASSERT(false); BOOST_ASSERT(false);
} }
if (pos < row.pos()) { if (pos < row.pos()) {
lyxerr << "dont like 3 please report pos:" << pos lyxerr << "dont like 3 please report pos:" << pos
<< " size: " << para.size() << " size: " << para.size()
@ -1017,7 +1017,7 @@ pos_type LyXText::getColumnNearX(par_type pit,
{ {
x -= xo_; x -= xo_;
RowMetrics const r = computeRowMetrics(pit, row); RowMetrics const r = computeRowMetrics(pit, row);
pos_type vc = row.pos(); pos_type vc = row.pos();
pos_type end = row.endpos(); pos_type end = row.endpos();
pos_type c = 0; pos_type c = 0;
@ -1198,7 +1198,7 @@ void LyXText::cursorRight(LCursor & cur)
} }
if (cur.pos() != cur.lastpos()) { if (cur.pos() != cur.lastpos()) {
if (!checkAndActivateInset(cur, true)) { if (!checkAndActivateInset(cur, true)) {
setCursor(cur, cur.par(), cur.pos() + 1, true, false); setCursor(cur, cur.par(), cur.pos() + 1, true, false);
if (false && bidi.isBoundary(*bv()->buffer(), cur.paragraph(), if (false && bidi.isBoundary(*bv()->buffer(), cur.paragraph(),
cur.pos())) cur.pos()))

View File

@ -595,7 +595,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
if (!cur.mark()) if (!cur.mark())
cur.clearSelection(); cur.clearSelection();
finishChange(cur, false); finishChange(cur, false);
if (cur.par() == 0 && cur.textRow().pos() == 0) { if (cur.par() == 0 && cur.textRow().pos() == 0) {
cur.undispatched(); cur.undispatched();
cmd = FuncRequest(LFUN_FINISHED_UP); cmd = FuncRequest(LFUN_FINISHED_UP);
} else { } else {
@ -1001,21 +1001,21 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
c = par.getChar(pos - 1); c = par.getChar(pos - 1);
LyXLayout_ptr const & style = par.layout(); LyXLayout_ptr const & style = par.layout();
BufferParams const & bufparams = bv->buffer()->params(); BufferParams const & bufparams = bv->buffer()->params();
if (!style->pass_thru if (!style->pass_thru
&& par.getFontSettings(bufparams, pos).language()->lang() != "hebrew") { && par.getFontSettings(bufparams, pos).language()->lang() != "hebrew") {
string arg = cmd.argument; string arg = cmd.argument;
if (arg == "single") if (arg == "single")
cur.insert(new InsetQuotes(c, cur.insert(new InsetQuotes(c,
bufparams.quotes_language, bufparams.quotes_language,
InsetQuotes::SingleQ)); InsetQuotes::SingleQ));
else if (arg == "double") else if (arg == "double")
cur.insert(new InsetQuotes(c, cur.insert(new InsetQuotes(c,
bufparams.quotes_language, bufparams.quotes_language,
InsetQuotes::DoubleQ)); InsetQuotes::DoubleQ));
else else
cur.insert(new InsetQuotes(c, bufparams)); cur.insert(new InsetQuotes(c, bufparams));
} }
else else
bv->owner()->dispatch(FuncRequest(LFUN_SELFINSERT, "\"")); bv->owner()->dispatch(FuncRequest(LFUN_SELFINSERT, "\""));
@ -1756,7 +1756,7 @@ bool LyXText::getStatus(LCursor & cur, FuncRequest const & cmd,
case LFUN_LDOTS: case LFUN_LDOTS:
case LFUN_END_OF_SENTENCE: case LFUN_END_OF_SENTENCE:
case LFUN_SPACE_INSERT: case LFUN_SPACE_INSERT:
case LFUN_INSET_DIALOG_SHOW: case LFUN_INSET_DIALOG_SHOW:
break; break;
case LFUN_EMPH: case LFUN_EMPH:

View File

@ -95,7 +95,7 @@ void recordUndo(Undo::undo_kind kind,
undo.pars = ParagraphList(first, last); undo.pars = ParagraphList(first, last);
} }
// push the undo entry to undo stack // push the undo entry to undo stack
//lyxerr << "undo record: " << stack.top() << std::endl; //lyxerr << "undo record: " << stack.top() << std::endl;
stack.push(undo); stack.push(undo);

View File

@ -17,7 +17,7 @@
#define UNDO_H #define UNDO_H
#include "dociterator.h" #include "dociterator.h"
#include "ParagraphList_fwd.h" #include "ParagraphList_fwd.h"
#include "support/types.h" #include "support/types.h"

View File

@ -83,12 +83,12 @@ char nextToken(string & data)
lyx_advance(data, 1); lyx_advance(data, 1);
return '+'; return '+';
} }
if (prefixIs(data, "plus")) { if (prefixIs(data, "plus")) {
lyx_advance(data, 4); lyx_advance(data, 4);
return '+'; return '+';
} }
if (data[0] == '-') { if (data[0] == '-') {
lyx_advance(data, 1); lyx_advance(data, 1);
return '-'; return '-';
@ -467,7 +467,7 @@ string const VSpace::asLatexCommand(BufferParams const & params) const
case VFILL: case VFILL:
return keep_ ? "\\vspace*{\\fill}" : "\\vfill{}"; return keep_ ? "\\vspace*{\\fill}" : "\\vfill{}";
case LENGTH: case LENGTH:
return keep_ ? "\\vspace*{" + len_.asLatexString() + '}' return keep_ ? "\\vspace*{" + len_.asLatexString() + '}'
: "\\vspace{" + len_.asLatexString() + '}'; : "\\vspace{" + len_.asLatexString() + '}';
@ -482,7 +482,7 @@ string const VSpace::asLatexCommand(BufferParams const & params) const
int VSpace::inPixels(BufferView const & bv) const int VSpace::inPixels(BufferView const & bv) const
{ {
// Height of a normal line in pixels (zoom factor considered) // Height of a normal line in pixels (zoom factor considered)
int const default_height = defaultRowHeight(); int const default_height = defaultRowHeight();
switch (kind_) { switch (kind_) {