ws cleanup

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3803 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2002-03-21 17:27:08 +00:00
parent a654de29ea
commit 8283e978f8
197 changed files with 3762 additions and 3783 deletions

View File

@ -199,19 +199,19 @@ void BufferView::insetUnlock()
bool BufferView::focus() const
{
return pimpl_->focus();
return pimpl_->focus();
}
void BufferView::focus(bool f)
{
pimpl_->focus(f);
pimpl_->focus(f);
}
bool BufferView::active() const
{
return pimpl_->active();
return pimpl_->active();
}

View File

@ -87,10 +87,10 @@ public:
LyXView * owner() const;
///
void beforeChange(LyXText *);
///
void savePosition(unsigned int i);
///
void restorePosition(unsigned int i);
///
void savePosition(unsigned int i);
///
void restorePosition(unsigned int i);
///
bool isSavedPosition(unsigned int i);
/** This holds the mapping between buffer paragraphs and screen rows.

View File

@ -560,7 +560,7 @@ void BufferView::showLockedInsetCursor(int x, int y, int asc, int desc)
(cursor.par()->getInset(cursor.pos() - 1) ==
locking_inset))
text->setCursor(this, cursor,
cursor.par(), cursor.pos() - 1);
cursor.par(), cursor.pos() - 1);
LyXScreen::Cursor_Shape shape = LyXScreen::BAR_SHAPE;
LyXText * txt = getLyXText();
if (locking_inset->isTextInset() &&
@ -625,8 +625,8 @@ void BufferView::lockedInsetStoreUndo(Undo::undo_kind kind)
if (kind == Undo::EDIT) // in this case insets would not be stored!
kind = Undo::FINISH;
setUndo(this, kind,
text->cursor.par(),
text->cursor.par()->next());
text->cursor.par(),
text->cursor.par()->next());
}

View File

@ -587,7 +587,7 @@ void BufferView::Pimpl::workAreaMotionNotify(int x, int y, unsigned int state)
// Single-click on work area
void BufferView::Pimpl::workAreaButtonPress(int xpos, int ypos,
unsigned int button)
unsigned int button)
{
if (!buffer_ || !screen_.get())
return;
@ -682,7 +682,7 @@ void BufferView::Pimpl::workAreaButtonPress(int xpos, int ypos,
owner_->getLyXFunc()->dispatch(LFUN_PASTE);
else
owner_->getLyXFunc()->dispatch(LFUN_PASTESELECTION,
"paragraph");
"paragraph");
selection_possible = false;
return;
}
@ -1173,7 +1173,7 @@ void BufferView::Pimpl::cursorPrevious(LyXText * text)
if ((cursorrow == text->cursor.row()))
text->cursorUp(bv_);
if (text->inset_owner ||
if (text->inset_owner ||
text->cursor.row()->height() < workarea_.height())
screen_->draw(bv_->text, bv_,
text->cursor.y()
@ -1201,7 +1201,7 @@ void BufferView::Pimpl::cursorNext(LyXText * text)
if ((cursorrow == bv_->text->cursor.row()))
text->cursorDown(bv_);
if (text->inset_owner ||
if (text->inset_owner ||
text->cursor.row()->height() < workarea_.height())
screen_->draw(bv_->text, bv_, text->cursor.y() -
text->cursor.row()->baseline());
@ -1250,7 +1250,7 @@ void BufferView::Pimpl::restorePosition(unsigned int i)
if (fname != buffer_->fileName()) {
Buffer * b = bufferlist.exists(fname) ?
bufferlist.getBuffer(fname) :
bufferlist.getBuffer(fname) :
bufferlist.loadLyXFile(fname); // don't ask, just load it
if (b != 0) buffer(b);
}
@ -1883,7 +1883,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument)
InsetRef * inset =
static_cast<InsetRef*>(getInsetByCode(Inset::REF_CODE));
if (inset) {
label = inset->getContents();
label = inset->getContents();
savePosition(0);
}
}
@ -2906,11 +2906,11 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument)
case LFUN_GETFONT:
{
LyXFont & font = bv_->getLyXText()->current_font;
if (font.shape() == LyXFont::ITALIC_SHAPE)
if (font.shape() == LyXFont::ITALIC_SHAPE)
owner_->getLyXFunc()->setMessage("E");
else if (font.shape() == LyXFont::SMALLCAPS_SHAPE)
else if (font.shape() == LyXFont::SMALLCAPS_SHAPE)
owner_->getLyXFunc()->setMessage("N");
else
else
owner_->getLyXFunc()->setMessage("0");
}

View File

@ -46,7 +46,7 @@ struct BufferView::Pimpl : public SigC::Object {
void update();
//
void update(LyXText *, BufferView::UpdateCodes);
/// Update pixmap of screen
/// Update pixmap of screen
void updateScreen();
///
void workAreaExpose();

View File

@ -1,5 +1,7 @@
2002-03-21 Lars Gullik Bjønnes <larsbj@birdstep.com>
* most files: ws cleanup
* buffer.[Ch]: ws changes
* Makefile.am (LYX_CONV_LIBS): remove ld -r stuff.

View File

@ -49,7 +49,7 @@ int Chktex::run(TeXErrors &terr)
// run bibtex
string log = OnlyFilename(ChangeExtension(file, ".log"));
string tmp = cmd + " -q -v0 -b0 -x " + file + " -o " + log;
Systemcall one;
Systemcall one;
int result= one.startscript(Systemcall::Wait, tmp);
if (result == 0) {
result = scanLogFile(terr);

View File

@ -73,7 +73,7 @@ GC LyXColorHandler::getGCForeground(LColor::color c)
// lyxerr << "Painter drawable: " << drawable() << endl;
//}
if (colorGCcache[c] != 0)
if (colorGCcache[c] != 0)
return colorGCcache[c];
XColor xcol;
@ -83,7 +83,7 @@ GC LyXColorHandler::getGCForeground(LColor::color c)
// Look up the RGB values for the color, and an approximate
// color that we can hope to get on this display.
if (XLookupColor(display, colormap, s.c_str(), &xcol, &ccol) == 0) {
if (XLookupColor(display, colormap, s.c_str(), &xcol, &ccol) == 0) {
lyxerr << _("LyX: Unknown X11 color ") << s
<< _(" for ") << lcolor.getGUIName(c) << '\n'
<< _(" Using black instead, sorry!") << endl;

View File

@ -80,7 +80,7 @@ void DeleteBuffer()
bool CutAndPaste::cutSelection(Paragraph * startpar, Paragraph ** endpar,
int start, int & end, char tc, bool doclear,
int start, int & end, char tc, bool doclear,
bool realcut)
{
if (!startpar || (start > startpar->size()))
@ -103,7 +103,7 @@ bool CutAndPaste::cutSelection(Paragraph * startpar, Paragraph ** endpar,
for (; i < end; ++i) {
if (realcut)
startpar->copyIntoMinibuffer(*current_view->buffer(),
start);
start);
startpar->erase(start);
if (realcut)
buf->insertFromMinibuffer(buf->size());
@ -112,12 +112,12 @@ bool CutAndPaste::cutSelection(Paragraph * startpar, Paragraph ** endpar,
} else {
// more than one paragraph
(*endpar)->breakParagraphConservative(current_view->buffer()->params,
end);
end);
*endpar = (*endpar)->next();
end = 0;
startpar->breakParagraphConservative(current_view->buffer()->params,
start);
start);
// store the selection
if (realcut) {
@ -160,7 +160,7 @@ bool CutAndPaste::cutSelection(Paragraph * startpar, Paragraph ** endpar,
bool CutAndPaste::copySelection(Paragraph * startpar, Paragraph * endpar,
int start, int end, char tc)
int start, int end, char tc)
{
if (!startpar || (start > startpar->size()))
return false;
@ -218,7 +218,7 @@ bool CutAndPaste::copySelection(Paragraph * startpar, Paragraph * endpar,
bool CutAndPaste::pasteSelection(Paragraph ** par, Paragraph ** endpar,
int & pos, char tc)
int & pos, char tc)
{
if (!checkPastePossible(*par))
return false;
@ -324,7 +324,7 @@ bool CutAndPaste::pasteSelection(Paragraph ** par, Paragraph ** endpar,
// make sure there is no class difference
SwitchLayoutsBetweenClasses(textclass, tc, buf,
current_view->buffer()->params);
current_view->buffer()->params);
// make the buf exactly the same layout than
// the cursor paragraph
@ -341,7 +341,7 @@ bool CutAndPaste::pasteSelection(Paragraph ** par, Paragraph ** endpar,
// if necessary
if (((*par)->size() > pos) || !(*par)->next()) {
(*par)->breakParagraphConservative(current_view->buffer()->params,
pos);
pos);
paste_the_end = true;
}
// set the end for redoing later

View File

@ -45,8 +45,8 @@ public:
*/
static
int SwitchLayoutsBetweenClasses(lyx::textclass_type class1,
lyx::textclass_type class2,
Paragraph * par,
lyx::textclass_type class2,
Paragraph * par,
BufferParams const & bparams);
///
static

View File

@ -249,4 +249,3 @@ void DepTable::read(string const & f)
deplist[nome] = di;
}
}

View File

@ -71,4 +71,3 @@ private:
};
#endif

View File

@ -5,7 +5,7 @@
* LyX, The Document Processor
*
* Copyright 1997 Asger Alstrup
* and the LyX Team.
* and the LyX Team.
*
* ====================================================== */

View File

@ -50,7 +50,7 @@ bool FuncStatus::unknown () const
FuncStatus & FuncStatus::disabled (bool b)
{
if (b)
v_ |= DISABLED;
v_ |= DISABLED;
else
v_ &= !DISABLED;
return *this;

View File

@ -158,7 +158,7 @@ public:
/// Color used for bottom background
buttonbg,
// Logical attributes
// Logical attributes
/// Color is inherited
inherit,

View File

@ -62,7 +62,7 @@ extern BufferList bufferlist;
void TeXErrors::insertError(int line, string const & error_desc,
string const & error_text)
{
Error newerr(line, error_desc, error_text);
Error newerr(line, error_desc, error_text);
errors.push_back(newerr);
}
@ -358,7 +358,7 @@ int LaTeX::operator()()
#else // cmd.exe (OS/2) causes SYS0003 error at "/dev/null"
string tmp = cmd + ' ' + file + " > nul";
#endif
Systemcall one;
Systemcall one;
return one.startscript(Systemcall::Wait, tmp);
}

View File

@ -292,7 +292,7 @@ string const LaTeXFeatures::getMacros() const
if (isRequired("guillemotright"))
macros << guillemotright_def << '\n';
// Math mode
// Math mode
if (isRequired("boldsymbol") && !isRequired("amsmath"))
macros << boldsymbol_def << '\n';
if (isRequired("binom") && !isRequired("amsmath"))

View File

@ -27,7 +27,7 @@ using std::endl;
Here's the set of rules to apply when a new command name is introduced:
1) Use the object.event order. That is, use `word-forward'
instead of `forward-word'.
instead of `forward-word'.
2) Don't introduce an alias for an already named object. Same for events.
3) Forward movement or focus is called `forward' (not `right').
4) Backward movement or focus is called `backward' (not `left').
@ -582,17 +582,17 @@ int LyXAction::getApproxFunc(string const & func) const
// Checking for prefix is not so simple, but
// using a simple bounding function gives
// a similar result. [ale 19981103]
func_map::const_iterator fit =
lyx_func_map.lower_bound(func);
func_map::const_iterator fit =
lyx_func_map.lower_bound(func);
if (fit != lyx_func_map.end()) {
if (fit != lyx_func_map.end()) {
action = fit->second;
}
} else { // Go get the next function
func_map::const_iterator fit =
lyx_func_map.upper_bound(func);
func_map::const_iterator fit =
lyx_func_map.upper_bound(func);
if (fit != lyx_func_map.end()) {
if (fit != lyx_func_map.end()) {
action = fit->second;
}
}
@ -666,7 +666,7 @@ string const LyXAction::helpText(int pseudoaction) const
bool LyXAction::funcHasFlag(kb_action action,
LyXAction::func_attrib flag) const
LyXAction::func_attrib flag) const
{
info_map::const_iterator ici = lyx_info_map.find(action);

View File

@ -51,8 +51,8 @@ public:
Noop = 0,
/// can be used in RO mode (perhaps this should change)
ReadOnly = 1, // ,
/// Can be used when there is no document open
NoBuffer = 2,
/// Can be used when there is no document open
NoBuffer = 2,
//Interactive = 2, // Is interactive (requires a GUI)
///
Argument = 4 // Requires argument
@ -68,13 +68,13 @@ public:
created if needed. */
int LookupFunc(string const & func_name) const;
/** Returns an action tag which name is the most similar to a string.
/** Returns an action tag which name is the most similar to a string.
Don't include arguments, they would be ignored. */
int getApproxFunc(string const & func) const;
int getApproxFunc(string const & func) const;
/** Returns an action name the most similar to a string.
/** Returns an action name the most similar to a string.
Don't include arguments, they would be ignored. */
string const getApproxFuncName(string const & func) const;
string const getApproxFuncName(string const & func) const;
/// Returns a pseudo-action given an action and its argument.
int getPseudoAction(kb_action action, string const & arg) const;

View File

@ -1,4 +1,3 @@
/* This file is part of
* ======================================================
*

View File

@ -132,14 +132,14 @@ public:
ItemList::size_type size() const { return items_.size(); }
///
bool hasSubmenu(string const &) const;
///
const_iterator begin() const {
return items_.begin();
}
///
const_iterator end() const {
return items_.end();
}
///
const_iterator begin() const {
return items_.begin();
}
///
const_iterator end() const {
return items_.end();
}
// Check whether the menu shortcuts are unique
void checkShortcuts() const;
@ -175,14 +175,14 @@ public:
Menu const & getMenu (string const &) const;
//
bool empty() const { return menulist_.empty(); }
///
const_iterator begin() const {
return menulist_.begin();
}
///
const_iterator end() const {
return menulist_.end();
}
///
const_iterator begin() const {
return menulist_.begin();
}
///
const_iterator end() const {
return menulist_.end();
}
private:
///
MenuList menulist_;

View File

@ -88,7 +88,7 @@ PainterBase & Painter::lines(int const * xp, int const * yp, int np,
points[i].y = yp[i];
}
XDrawLines(display(), owner.getPixmap(),
XDrawLines(display(), owner.getPixmap(),
lyxColorHandler->getGCLinepars(ls, lw, col),
points.get(), np, CoordModeOrigin);
@ -139,9 +139,9 @@ PainterBase & Painter::arc(int x, int y,
unsigned int w, unsigned int h,
int a1, int a2, LColor::color col)
{
XDrawArc(display(), owner.getPixmap(),
XDrawArc(display(), owner.getPixmap(),
lyxColorHandler->getGCForeground(col),
x, y, w, h, a1, a2);
x, y, w, h, a1, a2);
return *this;
}

View File

@ -50,7 +50,7 @@ public:
LColor::color = LColor::foreground);
/// Draw lines from x1,y1 to x2,y2. They are arrays
PainterBase & segments(int const * x1, int const * y1,
PainterBase & segments(int const * x1, int const * y1,
int const * x2, int const * y2, int ns,
LColor::color = LColor::foreground,
enum line_style = line_solid,

View File

@ -92,7 +92,7 @@ public:
LColor::color = LColor::foreground) = 0;
/// Draw lines from x1,y1 to x2,y2. They are arrays
virtual PainterBase & segments(
virtual PainterBase & segments(
int const * x1, int const * y1,
int const * x2, int const * y2, int ns,
LColor::color = LColor::foreground,
@ -138,7 +138,7 @@ public:
virtual PainterBase & button(int x, int y, int w, int h);
///
virtual PainterBase & buttonFrame(int x, int y, int w, int h);
virtual PainterBase & buttonFrame(int x, int y, int w, int h);
// For the figure inset

View File

@ -1,4 +1,3 @@
#include <config.h>
#ifdef __GNUG__
@ -36,14 +35,14 @@ void ParagraphParameters::clear()
tmp.labelwidthstring.erase();
tmp.start_of_appendix = false;
#ifndef NO_PEXTRA_REALLY
//tmp.pextra_type = PEXTRA_NONE;
tmp.pextra_type = 0;
tmp.pextra_width.erase();
tmp.pextra_widthp.erase();
//tmp.pextra_alignment = MINIPAGE_ALIGN_TOP;
tmp.pextra_alignment = 0;
tmp.pextra_hfill = false;
tmp.pextra_start_minipage = false;
//tmp.pextra_type = PEXTRA_NONE;
tmp.pextra_type = 0;
tmp.pextra_width.erase();
tmp.pextra_widthp.erase();
//tmp.pextra_alignment = MINIPAGE_ALIGN_TOP;
tmp.pextra_alignment = 0;
tmp.pextra_hfill = false;
tmp.pextra_start_minipage = false;
#endif
set_from_struct(tmp);
}
@ -62,11 +61,11 @@ bool ParagraphParameters::sameLayout(ParagraphParameters const & pp) const
param->spacing == pp.param->spacing &&
#ifndef NO_PEXTRA_REALLY
param->pextra_type == pp.param->pextra_type &&
param->pextra_width == pp.param->pextra_width &&
param->pextra_widthp == pp.param->pextra_widthp &&
param->pextra_alignment == pp.param->pextra_alignment &&
param->pextra_hfill == pp.param->pextra_hfill &&
param->pextra_start_minipage == pp.param->pextra_start_minipage &&
param->pextra_width == pp.param->pextra_width &&
param->pextra_widthp == pp.param->pextra_widthp &&
param->pextra_alignment == pp.param->pextra_alignment &&
param->pextra_hfill == pp.param->pextra_hfill &&
param->pextra_start_minipage == pp.param->pextra_start_minipage &&
#endif
param->noindent == pp.param->noindent &&
param->depth == pp.param->depth;

View File

@ -46,18 +46,18 @@ struct ParameterStruct {
///
string labelwidthstring;
#ifndef NO_PEXTRA_REALLY
///
int pextra_type;
///
string pextra_width;
///
string pextra_widthp;
///
int pextra_alignment;
///
bool pextra_hfill;
///
bool pextra_start_minipage;
///
int pextra_type;
///
string pextra_width;
///
string pextra_widthp;
///
int pextra_alignment;
///
bool pextra_hfill;
///
bool pextra_start_minipage;
#endif
};

View File

@ -73,11 +73,11 @@ struct PrinterParams {
///
bool unsorted_copies;
///
int count_copies;
int count_copies;
// The settings below should allow us to print any read-only doc in
// whatever size/orientation we want it -- overriding the documents
// settings.
// Override the documents orientation
// Override the documents orientation
// bool orientation;
// Print n pages per physical sheet
// unsigned int nup;
@ -104,7 +104,7 @@ struct PrinterParams {
}
switch (target) {
case PRINTER:
// Assert(!printer_name.empty());
// Assert(!printer_name.empty());
break;
case FILE:
lyx::Assert(!file_name.empty());

View File

@ -1,4 +1,3 @@
#include <config.h>
#ifdef __GNUG__

View File

@ -87,7 +87,7 @@ void ToolbarDefaults::init()
add(LFUN_DEPTH_PLUS);
add(SEPARATOR);
add(LFUN_MATH_MODE);
add(LFUN_MATH_MODE);
add(SEPARATOR);
add(LFUN_INSET_GRAPHICS);

View File

@ -27,7 +27,7 @@ class LyXLex;
///
class ToolbarDefaults {
public:
/// The special toolbar actions
/// The special toolbar actions
enum ItemType {
/// adds space between buttons in the toolbar
SEPARATOR=-3,

View File

@ -80,4 +80,3 @@ int main() {
}
#endif

View File

@ -54,24 +54,24 @@ extern "C" {
// Just a bunch of C wrappers around static members of WorkArea
static
void C_WorkArea_scroll_cb(FL_OBJECT * ob, long buf)
{
{
WorkArea::scroll_cb(ob, buf);
}
}
static
int C_WorkArea_work_area_handler(FL_OBJECT * ob, int event,
FL_Coord, FL_Coord,
int key, void * xev)
{
{
return WorkArea::work_area_handler(ob, event,
0, 0, key, xev);
}
}
static
int C_WorkAreaEventCB(FL_FORM * form, void * xev) {
WorkArea * wa = static_cast<WorkArea*>(form->u_vdata);
int ret = wa->event_cb(static_cast<XEvent*>(xev));
int ret = wa->event_cb(static_cast<XEvent*>(xev));
lyxerr << "Pending: " << XPending(fl_get_display()) << endl;
return ret;

View File

@ -1,4 +1,3 @@
/* This file is part of
* ======================================================
*
@ -171,7 +170,7 @@ void XFormsView::create_form_form_main(int width, int height)
// Misc
//
// assign an icon to main form
// assign an icon to main form
string iconname = LibFileSearch("images", "lyx", "xpm");
if (!iconname.empty()) {
unsigned int w, h;

View File

@ -154,7 +154,7 @@ bool BufferList::qwriteAll()
if (!unsaved.empty() && lyxrc.exit_confirmation) {
return Alert::askQuestion(_("Some documents were not saved:"),
unsaved, _("Exit anyway?"));
unsaved, _("Exit anyway?"));
}
return true;
@ -183,7 +183,7 @@ bool BufferList::close(Buffer * buf)
// Trace back why we need to use buf->getUser here.
// Perhaps slight rewrite is in order? (Lgb)
if (buf->getUser())
if (buf->getUser())
buf->getUser()->insetUnlock();
if (buf->paragraph && !buf->isLyxClean() && !quitting) {
@ -301,7 +301,7 @@ void BufferList::emergencyWriteAll()
void BufferList::emergencyWrite(Buffer * buf)
{
// assert(buf) // this is not good since C assert takes an int
// and a pointer is a long (JMarc)
// and a pointer is a long (JMarc)
assert(buf != 0); // use c assert to avoid a loop
@ -542,7 +542,7 @@ Buffer * BufferList::loadLyXFile(string const & filename, bool tolastfiles)
if (LyXVC::file_not_found_hook(s)) {
// Ask if the file should be checked out for
// viewing/editing, if so: load it.
if (Alert::askQuestion(_("Do you want to retrieve file under version control?"))) {
if (Alert::askQuestion(_("Do you want to retrieve file under version control?"))) {
// How can we know _how_ to do the checkout?
// With the current VC support it has to be,
// a RCS file since CVS do not have special ,v files.

View File

@ -87,7 +87,7 @@ private:
class BufferList : boost::noncopyable {
public:
///
BufferList();
BufferList();
/// state info
enum list_state {
@ -115,7 +115,7 @@ public:
bool empty() const;
///
bool qwriteAll();
bool qwriteAll();
/// Close all open buffers.
void closeAll();

View File

@ -74,8 +74,8 @@ void BufferParams::writeFile(ostream & os) const
// The top of the file is written by the buffer.
// Prints out the buffer info into the .lyx file given by file
// the textclass
os << "\\textclass " << textclasslist[textclass].name() << '\n';
// the textclass
os << "\\textclass " << textclasslist[textclass].name() << '\n';
// then the the preamble
if (!preamble.empty()) {
@ -113,31 +113,31 @@ void BufferParams::writeFile(ostream & os) const
<< "\n\\use_numerical_citations " << use_numerical_citations
<< "\n\\paperorientation " << string_orientation[orientation]
<< '\n';
if (!paperwidth.empty())
if (!paperwidth.empty())
os << "\\paperwidth "
<< VSpace(paperwidth).asLyXCommand() << '\n';
if (!paperheight.empty())
if (!paperheight.empty())
os << "\\paperheight "
<< VSpace(paperheight).asLyXCommand() << '\n';
if (!leftmargin.empty())
if (!leftmargin.empty())
os << "\\leftmargin "
<< VSpace(leftmargin).asLyXCommand() << '\n';
if (!topmargin.empty())
if (!topmargin.empty())
os << "\\topmargin "
<< VSpace(topmargin).asLyXCommand() << '\n';
if (!rightmargin.empty())
if (!rightmargin.empty())
os << "\\rightmargin "
<< VSpace(rightmargin).asLyXCommand() << '\n';
if (!bottommargin.empty())
if (!bottommargin.empty())
os << "\\bottommargin "
<< VSpace(bottommargin).asLyXCommand() << '\n';
if (!headheight.empty())
if (!headheight.empty())
os << "\\headheight "
<< VSpace(headheight).asLyXCommand() << '\n';
if (!headsep.empty())
if (!headsep.empty())
os << "\\headsep "
<< VSpace(headsep).asLyXCommand() << '\n';
if (!footskip.empty())
if (!footskip.empty())
os << "\\footskip "
<< VSpace(footskip).asLyXCommand() << '\n';
os << "\\secnumdepth " << secnumdepth

View File

@ -130,7 +130,7 @@ public:
/** Wether paragraphs are separated by using a indent like in
articles or by using a little skip like in letters.
*/
PARSEP paragraph_separation;
PARSEP paragraph_separation;
///
InsetQuotes::quote_language quotes_language;
///
@ -138,7 +138,7 @@ public:
///
string fontsize;
///
lyx::textclass_type textclass;
lyx::textclass_type textclass;
/* this are for the PaperLayout */
/// the general papersize (papersize2 or paperpackage

View File

@ -259,7 +259,7 @@ enum kb_action {
LFUN_LOFVIEW, // 230 // Dekel 20000519
LFUN_LOTVIEW, // Dekel 20000519
LFUN_LOAVIEW, // Dekel 20000519
LFUN_SET_COLOR, // SLior 20000611
LFUN_SET_COLOR, // SLior 20000611
LFUN_INSET_EXTERNAL, // Alstrup 20000609
LFUN_INSET_MARGINAL, // Lgb 20000626
LFUN_INSET_MINIPAGE, // Lgb 20000627

View File

@ -72,7 +72,7 @@ bool Format::isChildFormat() const
{
if (name_.empty())
return false;
return isdigit(name_[name_.length() - 1]);
return isdigit(name_[name_.length() - 1]);
}
@ -188,7 +188,7 @@ bool Formats::view(Buffer const * buffer, string const & filename,
if (buffer->params.orientation
== BufferParams::ORIENTATION_LANDSCAPE)
command += 'r';
}
}
command += " " + QuoteName(OnlyFilename((filename)));

View File

@ -84,8 +84,8 @@ bool operator<(Format const & a, Format const & b)
///
class Formats {
public:
///
typedef std::vector<Format> FormatList;
///
typedef std::vector<Format> FormatList;
///
typedef FormatList::const_iterator const_iterator;
///
@ -176,7 +176,7 @@ public:
///
class Converters {
public:
typedef std::vector<Converter> ConverterList;
typedef std::vector<Converter> ConverterList;
///
typedef ConverterList::const_iterator const_iterator;
///

View File

@ -275,7 +275,7 @@ unsigned char Encodings::TransformChar(unsigned char c,
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())
return &it->second;
else

View File

@ -126,7 +126,7 @@ int lyxfont::width(char const * s, size_t n, LyXFont const & f)
Uchar c = encoding->ucs(s[i]);
xs[i].byte1 = c >> 8;
xs[i].byte2 = c & 0xff;
}
}
int result = width(xs.get(), n, font);
return result;
}

View File

@ -1,5 +1,7 @@
2002-03-21 Lars Gullik Bjønnes <larsbj@birdstep.com>
* most files: ws cleanup
* Makefile.am: remove ld -r stuff
2002-03-20 Lars Gullik Bjønnes <larsbj@birdstep.com>

View File

@ -444,11 +444,11 @@ void GCacheItem::convertToDisplayFormat()
// ones that may be declared in texmf/tex/latex/config/graphics.cfg.
// for example:
/* -----------snip-------------
{\DeclareGraphicsRule{.pz}{eps}{.bb}{}%
\DeclareGraphicsRule{.eps.Z}{eps}{.eps.bb}{}%
\DeclareGraphicsRule{.ps.Z}{eps}{.ps.bb}{}%
\DeclareGraphicsRule{.ps.gz}{eps}{.ps.bb}{}%
\DeclareGraphicsRule{.eps.gz}{eps}{.eps.bb}{}}}%
{\DeclareGraphicsRule{.pz}{eps}{.bb}{}%
\DeclareGraphicsRule{.eps.Z}{eps}{.eps.bb}{}%
\DeclareGraphicsRule{.ps.Z}{eps}{.ps.bb}{}%
\DeclareGraphicsRule{.ps.gz}{eps}{.ps.bb}{}%
\DeclareGraphicsRule{.eps.gz}{eps}{.eps.bb}{}}}%
-----------snip-------------*/
lyxerr[Debug::GRAPHICS]
@ -635,7 +635,7 @@ ModifiedItemPtr ModifiedItem::changeDisplay()
// Loop over the list of insets. Compare the updated params for each
// with params(). If different, move into a new list.
ListType::iterator begin = insets.begin();
ListType::iterator end = insets.end();
ListType::iterator end = insets.end();
ListType::iterator it =
std::remove_if(begin, end, Params_Changed(params()));

View File

@ -261,7 +261,7 @@ ConvProcess::ConvProcess(string const & script_file,
Forkedcall::SignalTypePtr convert_ptr;
convert_ptr.reset(new Forkedcall::SignalType);
convert_ptr->connect(SigC::slot(this, &ConvProcess::converted));
convert_ptr->connect(SigC::slot(this, &ConvProcess::converted));
Forkedcall call;
int retval = call.startscript(script_command, convert_ptr);

View File

@ -57,4 +57,3 @@ GImage::getScaledDimensions(GParams const & params) const
return std::make_pair(width, height);
}
} // namespace grfx

View File

@ -638,7 +638,7 @@ char * clone_c_string(char const * in)
if (!in)
return 0;
// Don't forget the '\0'
// Don't forget the '\0'
char * out = static_cast<char *>(malloc(strlen(in) + 1));
return strcpy(out, in);
}

View File

@ -31,7 +31,7 @@ public:
#if 0
///
static
bool IsImportable(string const & format);
bool IsImportable(string const & format);
#endif
///
static

View File

@ -103,7 +103,7 @@ void Languages::read(string const & filename)
Language const * Languages::getLanguage(string const & language) const
{
const_iterator it = languagelist.find(language);
const_iterator it = languagelist.find(language);
if (it != languagelist.end())
return &it->second;
else

View File

@ -99,12 +99,12 @@ public:
}
///
const_iterator begin() const {
return languagelist.begin();
}
///
const_iterator end() const {
return languagelist.end();
}
return languagelist.begin();
}
///
const_iterator end() const {
return languagelist.end();
}
///
private:

View File

@ -103,6 +103,6 @@ private:
/** Used by the constructor to set the number of stored last files.
@param num the number of lastfiles to set.
*/
void setNumberOfFiles(unsigned int num);
void setNumberOfFiles(unsigned int num);
};
#endif

View File

@ -265,7 +265,7 @@ void AutoSave(BufferView * bv)
bv->owner()->message(_("Autosaving current document..."));
// create autosave filename
string fname = bv->buffer()->filePath();
string fname = bv->buffer()->filePath();
fname += "#";
fname += OnlyFilename(bv->buffer()->fileName());
fname += "#";
@ -371,7 +371,7 @@ void InsertAsciiFile(BufferView * bv, string const & f, bool asParagraph)
bv->getLyXText()->insertStringAsParagraphs(bv, tmpstr);
if (flag)
bv->update(bv->text,
BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
}
@ -465,7 +465,7 @@ void MenuInsertLabel(BufferView * bv, string const & arg)
par_text = split(par_text, head, ' ');
if (i > 0)
text += '-'; // Is it legal to use spaces in
// labels ?
// labels ?
text += head;
}

View File

@ -37,4 +37,3 @@ void MenuInsertLabel(BufferView * bv, string const & arg);
///
void Reconfigure(BufferView * bv);
#endif

View File

@ -111,7 +111,7 @@ LyXGUI::LyXGUI(LyX * owner, int * argc, char * argv[], bool GUI)
// It appears that, in xforms >=0.89.5, fl_initialize()
// calls setlocale() and ruins our LC_NUMERIC setting.
locale_init();
fl_get_app_resources(res, num_res);
fl_get_app_resources(res, num_res);
static const int geometryBitmask =
XParseGeometry(geometry,
@ -133,7 +133,7 @@ LyXGUI::LyXGUI(LyX * owner, int * argc, char * argv[], bool GUI)
// A width less than 590 pops up an awkward main window
// The minimal values of width/height (590/400) are defined in
// src/lyx.C
if (width < 590) width = 590;
if (width < 590) width = 590;
if (height < 400) height = 400;
// If width is not set by geometry, check it against monitor width
@ -168,8 +168,8 @@ LyXGUI::LyXGUI(LyX * owner, int * argc, char * argv[], bool GUI)
// A destructor is always necessary (asierra-970604)
LyXGUI::~LyXGUI()
{
// Lyxserver was created in this class so should be destroyed
// here. asierra-970604
// Lyxserver was created in this class so should be destroyed
// here. asierra-970604
delete lyxserver;
lyxserver = 0;
delete lyxViews;
@ -196,22 +196,22 @@ void LyXGUI::init()
if (lyxrc.popup_font_encoding.empty())
lyxrc.popup_font_encoding = lyxrc.font_norm;
// Set the font name for popups and menus
string boldfontname = lyxrc.popup_bold_font
+ "-*-*-*-?-*-*-*-*-"
+ lyxrc.popup_font_encoding;
string boldfontname = lyxrc.popup_bold_font
+ "-*-*-*-?-*-*-*-*-"
+ lyxrc.popup_font_encoding;
// "?" means "scale that font"
string fontname = lyxrc.popup_normal_font
+ "-*-*-*-?-*-*-*-*-"
+ lyxrc.popup_font_encoding;
string fontname = lyxrc.popup_normal_font
+ "-*-*-*-?-*-*-*-*-"
+ lyxrc.popup_font_encoding;
int bold = fl_set_font_name(FL_BOLD_STYLE, boldfontname.c_str());
int normal = fl_set_font_name(FL_NORMAL_STYLE, fontname.c_str());
if (bold < 0)
lyxerr << "Could not set menu font to "
if (bold < 0)
lyxerr << "Could not set menu font to "
<< boldfontname << endl;
if (normal < 0)
lyxerr << "Could not set popup font to "
if (normal < 0)
lyxerr << "Could not set popup font to "
<< fontname << endl;
if (bold < 0 && normal < 0) {
@ -232,13 +232,13 @@ void LyXGUI::init()
else if (normal < 0)
fl_set_font_name(FL_NORMAL_STYLE, boldfontname.c_str());
// put here (after fl_initialize) to avoid segfault. Cannot be done
// put here (after fl_initialize) to avoid segfault. Cannot be done
// in setDefaults() (Matthias 140496)
// Moved from ::LyXGUI to ::init to allow popup font customization
// (petr 120997).
fl_setpup_fontstyle(FL_NORMAL_STYLE);
fl_setpup_fontsize(FL_NORMAL_SIZE);
fl_setpup_color(FL_MCOL, FL_BLACK);
fl_setpup_fontstyle(FL_NORMAL_STYLE);
fl_setpup_fontsize(FL_NORMAL_SIZE);
fl_setpup_color(FL_MCOL, FL_BLACK);
fl_set_goodies_font(FL_NORMAL_STYLE, FL_NORMAL_SIZE);
#if FL_REVISION < 89
fl_set_oneliner_font(FL_NORMAL_STYLE, FL_NORMAL_SIZE);

View File

@ -303,7 +303,7 @@ void LyX::init(bool gui)
}
}
bool followlink;
bool followlink;
do {
// Path of binary/../share/name of binary/
searchpath += NormalizePath(AddPath(binpath, "../share/") +
@ -447,11 +447,11 @@ void LyX::init(bool gui)
if (!gui)
lyxrc.use_gui = false;
// Calculate screen dpi as average of x-DPI and y-DPI:
// Calculate screen dpi as average of x-DPI and y-DPI:
if (lyxrc.use_gui) {
lyxrc.dpi = GUIRunTime::getScreenDPI();
lyxerr[Debug::INIT] << "DPI setting detected to be "
<< lyxrc.dpi + 0.5 << endl;
<< lyxrc.dpi + 0.5 << endl;
} else {
lyxrc.dpi = 1; // I hope this is safe
}
@ -570,7 +570,7 @@ void LyX::defaultKeyBindings(kb_keymap * kbmap)
kbmap->bind("KP_Prior", LFUN_PRIOR);
kbmap->bind("KP_Next", LFUN_NEXT);
kbmap->bind("C-Tab", LFUN_TABINSERT); // ale970515
kbmap->bind("C-Tab", LFUN_TABINSERT); // ale970515
kbmap->bind("S-Tab", LFUN_SHIFT_TAB); // jug20000522
kbmap->bind("S-ISO_Left_Tab", LFUN_SHIFT_TAB); // jbl 2001-23-02
}
@ -668,17 +668,17 @@ bool LyX::readRcFile(string const & name)
string const lyxrc_path = LibFileSearch(string(), name);
if (!lyxrc_path.empty()) {
lyxerr[Debug::INIT] << "Found " << name
lyxerr[Debug::INIT] << "Found " << name
<< " in " << lyxrc_path << endl;
if (lyxrc.read(lyxrc_path) < 0) {
Alert::alert(_("LyX Warning!"),
Alert::alert(_("LyX Warning!"),
_("Error while reading ") + lyxrc_path + ".",
_("Using built-in defaults."));
return false;
}
return true;
} else {
lyxerr[Debug::INIT] << "Could not find " << name << endl;
lyxerr[Debug::INIT] << "Could not find " << name << endl;
}
return false;
@ -704,7 +704,7 @@ void LyX::readUIFile(string const & name)
string const ui_path = LibFileSearch("ui", name, "ui");
if (ui_path.empty()) {
lyxerr[Debug::INIT] << "Could not find " << name << endl;
lyxerr[Debug::INIT] << "Could not find " << name << endl;
menubackend.defaults();
return;
}
@ -791,9 +791,9 @@ void commandLineHelp()
"\t-userdir dir try to set user directory to dir\n"
"\t-sysdir dir try to set system directory to dir\n"
"\t-geometry WxH+X+Y set geometry of the main window\n"
"\t-dbg feature[,feature]...\n"
" select the features to debug.\n"
" Type `lyx -dbg' to see the list of features\n"
"\t-dbg feature[,feature]...\n"
" select the features to debug.\n"
" Type `lyx -dbg' to see the list of features\n"
"\t-x [--execute] command\n"
" where command is a lyx command.\n"
"\t-e [--export] fmt\n"

View File

@ -77,14 +77,14 @@ private:
/** Search for and read the LyXRC file name, return
true if successfull.
*/
bool readRcFile(string const & name);
bool readRcFile(string const & name);
/// Read the ui file `name'
void readUIFile(string const & name);
/// Read the languages file `name'
void readLanguagesFile(string const & name);
/// Read the encodings file `name'
void readEncodingsFile(string const & name);
///
///
bool easyParse(int * argc, char * argv[]);
};

View File

@ -52,28 +52,28 @@ string const quotesinglbase_def =
"}";
string const guillemotleft_def =
"\\ProvideTextCommandDefault{\\guillemotleft}{%\n"
" {\\usefont{U}{lasy}{m}{n}\\char'50\\kern-.15em\\char'50}%\n"
"\\penalty10000\\hskip0pt\\relax%\n"
"}";
"\\ProvideTextCommandDefault{\\guillemotleft}{%\n"
" {\\usefont{U}{lasy}{m}{n}\\char'50\\kern-.15em\\char'50}%\n"
"\\penalty10000\\hskip0pt\\relax%\n"
"}";
string const guillemotright_def =
"\\ProvideTextCommandDefault{\\guillemotright}{%\n"
" \\penalty10000\\hskip0pt%\n"
" {\\usefont{U}{lasy}{m}{n}\\char'51\\kern-.15em\\char'51}%\n"
"}";
"\\ProvideTextCommandDefault{\\guillemotright}{%\n"
" \\penalty10000\\hskip0pt%\n"
" {\\usefont{U}{lasy}{m}{n}\\char'51\\kern-.15em\\char'51}%\n"
"}";
string const guilsinglleft_def =
"\\ProvideTextCommandDefault{\\guilsinglleft}{%\n"
" {\\usefont{U}{lasy}{m}{n}\\char'50}%\n"
" \\penalty10000\\hskip0pt\\relax%\n"
"}";
"\\ProvideTextCommandDefault{\\guilsinglleft}{%\n"
" {\\usefont{U}{lasy}{m}{n}\\char'50}%\n"
" \\penalty10000\\hskip0pt\\relax%\n"
"}";
string const guilsinglright_def =
"\\ProvideTextCommandDefault{\\guilsinglright}{%\n"
" \\penalty10000\\hskip0pt%\n"
" {\\usefont{U}{lasy}{m}{n}\\char'51}%\n"
"}";
"\\ProvideTextCommandDefault{\\guilsinglright}{%\n"
" \\penalty10000\\hskip0pt%\n"
" {\\usefont{U}{lasy}{m}{n}\\char'51}%\n"
"}";
string const paragraphindent_def =
"\\newenvironment{LyXParagraphIndent}[1]%\n"
@ -81,10 +81,10 @@ string const paragraphindent_def =
" \\begin{list}{}{%\n"
" \\setlength\\topsep{0pt}%\n"
" \\addtolength{\\leftmargin}{#1}\n"
// "%% \\addtolength{\\leftmargin}{#1\\textwidth}\n"
// "%% \\setlength{\\textwidth}{#2\\textwidth}\n"
// "%% \\setlength\\listparindent\\parindent%\n"
// "%% \\setlength\\itemindent\\parindent%\n"
// "%% \\addtolength{\\leftmargin}{#1\\textwidth}\n"
// "%% \\setlength{\\textwidth}{#2\\textwidth}\n"
// "%% \\setlength\\listparindent\\parindent%\n"
// "%% \\setlength\\itemindent\\parindent%\n"
" \\setlength\\parsep{0pt plus 1pt}%\n"
" }\n"
" \\item[]\n"
@ -125,5 +125,3 @@ string const binom_def =
string const mathcircumflex_def =
"%% For printing a cirumflex inside a formula\n"
"\\newcommand{\\mathcircumflex}[0]{\\mbox{\\^{}}}\n";

View File

@ -33,21 +33,21 @@ enum SearchResult {
/// returns true if the specified string is at the specified position
bool IsStringInText(Paragraph * par, pos_type pos,
string const & str, bool const & = true,
bool const & = false);
string const & str, bool const & = true,
bool const & = false);
/// if the string is found: return true and set the cursor to the new position
SearchResult SearchForward(BufferView *, LyXText * text, string const & str,
bool const & = true, bool const & = false);
bool const & = true, bool const & = false);
///
SearchResult SearchBackward(BufferView *, LyXText * text, string const & str,
bool const & = true, bool const & = false);
bool const & = true, bool const & = false);
int LyXReplace(BufferView * bv,
string const & searchstr, string const & replacestr,
bool forward, bool casesens, bool matchwrd, bool replaceall,
bool once)
string const & searchstr, string const & replacestr,
bool forward, bool casesens, bool matchwrd, bool replaceall,
bool once)
{
if (!bv->available() || bv->buffer()->isReadonly())
return 0;
@ -58,7 +58,7 @@ int LyXReplace(BufferView * bv,
|| (searchstr.length() == 1 && searchstr[0] == ' '))
{
Alert::alert(_("Sorry!"), _("You cannot replace a single space, "
"nor an empty character."));
"nor an empty character."));
return 0;
}
@ -118,8 +118,8 @@ int LyXReplace(BufferView * bv,
}
bool LyXFind(BufferView * bv,
string const & searchstr, bool forward,
bool frominset, bool casesens, bool matchwrd)
string const & searchstr, bool forward,
bool frominset, bool casesens, bool matchwrd)
{
if (!bv->available() || searchstr.empty())
return false;
@ -199,7 +199,7 @@ bool IsStringInText(Paragraph * par, pos_type pos,
while (((pos + i) < par->size())
&& (string::size_type(i) < size)
&& (cs ? (str[i] == par->getChar(pos + i))
: (uppercase(str[i]) == uppercase(par->getChar(pos + i)))))
: (uppercase(str[i]) == uppercase(par->getChar(pos + i)))))
{
++i;
}
@ -220,7 +220,7 @@ bool IsStringInText(Paragraph * par, pos_type pos,
// if the string can be found: return true and set the cursor to
// the new position, cs = casesensitive, mw = matchword
SearchResult SearchForward(BufferView * bv, LyXText * text, string const & str,
bool const & cs, bool const & mw)
bool const & cs, bool const & mw)
{
Paragraph * par = text->cursor.par();
pos_type pos = text->cursor.pos();
@ -265,8 +265,8 @@ SearchResult SearchForward(BufferView * bv, LyXText * text, string const & str,
// if the string can be found: return true and set the cursor to
// the new position, cs = casesensitive, mw = matchword
SearchResult SearchBackward(BufferView * bv, LyXText * text,
string const & str,
bool const & cs, bool const & mw)
string const & str,
bool const & cs, bool const & mw)
{
Paragraph * par = text->cursor.par();
pos_type pos = text->cursor.pos();
@ -307,4 +307,3 @@ SearchResult SearchBackward(BufferView * bv, LyXText * text,
return SR_NOT_FOUND;
}
}

View File

@ -12,11 +12,11 @@
class BufferView;
int LyXReplace(BufferView * bv, string const &, string const &,
bool, bool = true, bool = false,
bool = false, bool = false);
bool, bool = true, bool = false,
bool = false, bool = false);
bool LyXFind(BufferView *,
string const & searchstr, bool forward,
string const & searchstr, bool forward,
bool frominset = false, bool casesens = true,
bool matchwrd = false);

View File

@ -740,7 +740,7 @@ LyXFont & LyXFont::lyxRead(LyXLex & lex)
/// Writes the changes from this font to orgfont in .lyx format in file
void LyXFont::lyxWriteChanges(LyXFont const & orgfont,
#ifdef INHERIT_LANGUAGE
Language const * doclang,
Language const * doclang,
#endif
ostream & os) const
{
@ -904,7 +904,7 @@ int LyXFont::latexWriteStartChanges(ostream & os, LyXFont const & base,
// Returns number of chars written
// This one corresponds to latexWriteStartChanges(). (Asger)
int LyXFont::latexWriteEndChanges(ostream & os, LyXFont const & base,
LyXFont const & next) const
LyXFont const & next) const
{
int count = 0;
bool env = false;

View File

@ -208,7 +208,7 @@ public:
///
LColor::color color() const;
///
///
Language const * language() const;
///
@ -238,7 +238,7 @@ public:
LyXFont & setNumber(LyXFont::FONT_MISC_STATE n);
///
LyXFont & setColor(LColor::color c);
///
///
LyXFont & setLanguage(Language const * l);
/// Set family after LyX text format
@ -296,7 +296,7 @@ public:
void lyxWriteChanges(LyXFont const & orgfont, std::ostream &) const;
#else
void lyxWriteChanges(LyXFont const & orgfont, Language const * doclang,
std::ostream &) const;
std::ostream &) const;
#endif
/** Writes the head of the LaTeX needed to change to this font.

View File

@ -387,8 +387,8 @@ FuncStatus LyXFunc::getStatus(kb_action action,
// I would really like to avoid having this switch and rather try to
// encode this in the function itself.
bool disable = false;
switch (action) {
bool disable = false;
switch (action) {
case LFUN_MENUPRINT:
disable = !Exporter::IsExportable(buf, "dvi")
|| lyxrc.print_command == "none";
@ -479,10 +479,10 @@ FuncStatus LyXFunc::getStatus(kb_action action,
case LFUN_INSET_TOGGLE: {
LyXText * lt = owner->view()->getLyXText();
disable = !(isEditableInset(lt->getInset())
|| (lt->inset_owner
disable = !(isEditableInset(lt->getInset())
|| (lt->inset_owner
&& lt->inset_owner->owner()
&& lt->inset_owner->owner()->isOpen()));
&& lt->inset_owner->owner()->isOpen()));
break;
}
case LFUN_MATH_VALIGN:
@ -808,7 +808,7 @@ void LyXFunc::verboseDispatch(kb_action action,
// the pseudoaction is useful for the bindings
pseudoaction =
lyxaction.searchActionArg(action,
argument);
argument);
if (pseudoaction == LFUN_UNKNOWN_ACTION) {
pseudoaction = action;
@ -832,7 +832,7 @@ void LyXFunc::verboseDispatch(kb_action action,
commandshortcut = "(" + comname + ')';
}
}
}
}
if (res.empty()) {
if (!commandshortcut.empty()) {
@ -849,8 +849,8 @@ string const LyXFunc::dispatch(kb_action action, string argument)
lyxerr[Debug::ACTION] << "LyXFunc::Dispatch: action[" << action
<<"] arg[" << argument << "]" << endl;
// we have not done anything wrong yet.
errorstat = false;
// we have not done anything wrong yet.
errorstat = false;
dispatch_buffer.erase();
#ifdef NEW_DISPATCHER
@ -893,9 +893,9 @@ string const LyXFunc::dispatch(kb_action action, string argument)
goto exit_with_message;
} else if (((result=owner->view()->theLockingInset()->
// Hand-over to inset's own dispatch:
localDispatch(owner->view(), action, argument)) ==
UpdatableInset::DISPATCHED) ||
(result == UpdatableInset::DISPATCHED_NOUPDATE))
localDispatch(owner->view(), action, argument)) ==
UpdatableInset::DISPATCHED) ||
(result == UpdatableInset::DISPATCHED_NOUPDATE))
goto exit_with_message;
// If UNDISPATCHED, just soldier on
else if (result == UpdatableInset::FINISHED) {
@ -1107,7 +1107,7 @@ string const LyXFunc::dispatch(kb_action action, string argument)
Exporter::Export(owner->buffer(), "program", true);
break;
case LFUN_RUNCHKTEX:
case LFUN_RUNCHKTEX:
MenuRunChktex(owner->buffer());
break;
@ -1222,7 +1222,7 @@ string const LyXFunc::dispatch(kb_action action, string argument)
owner->getDialogs()->showTexinfo();
break;
case LFUN_HELP_OPEN:
case LFUN_HELP_OPEN:
{
string const arg = argument;
if (arg.empty()) {
@ -1244,7 +1244,7 @@ string const LyXFunc::dispatch(kb_action action, string argument)
owner->view()->buffer(bufferlist.loadLyXFile(fname, false));
owner->allowInput();
break;
}
}
// --- version control -------------------------------
case LFUN_VC_REGISTER:
@ -1290,8 +1290,8 @@ string const LyXFunc::dispatch(kb_action action, string argument)
// --- buffers ----------------------------------------
case LFUN_SWITCHBUFFER:
owner->view()->buffer(bufferlist.getBuffer(argument));
case LFUN_SWITCHBUFFER:
owner->view()->buffer(bufferlist.getBuffer(argument));
break;
case LFUN_FILE_NEW:
@ -1383,9 +1383,9 @@ string const LyXFunc::dispatch(kb_action action, string argument)
// Either change buffer or load the file
if (bufferlist.exists(s)) {
owner->view()->buffer(bufferlist.getBuffer(s));
owner->view()->buffer(bufferlist.getBuffer(s));
} else {
owner->view()->buffer(bufferlist.loadLyXFile(s));
owner->view()->buffer(bufferlist.loadLyXFile(s));
}
// Set the cursor
@ -1796,7 +1796,7 @@ void LyXFunc::menuNew(bool fromTemplate)
if (fname.empty())
return;
templname = fname;
templname = fname;
}
// find a free buffer
@ -2057,4 +2057,3 @@ void LyXFunc::initMiniBuffer()
owner->message(text);
}

View File

@ -64,18 +64,18 @@ public:
/// The last key was meta
bool wasMetaKey() const;
/// True if lyxfunc reports an error
bool errorStat() const { return errorstat; }
/// Buffer to store result messages
void setMessage(string const & m) const;
/// Buffer to store result messages
void setErrorMessage(string const &) const;
/// Buffer to store result messages from getStatus
void setStatusMessage(string const &) const;
/// Buffer to store result messages
string const getMessage() const { return dispatch_buffer; }
/// Buffer to store result messages
string const getStatusMessage() const { return status_buffer; }
/// True if lyxfunc reports an error
bool errorStat() const { return errorstat; }
/// Buffer to store result messages
void setMessage(string const & m) const;
/// Buffer to store result messages
void setErrorMessage(string const &) const;
/// Buffer to store result messages from getStatus
void setStatusMessage(string const &) const;
/// Buffer to store result messages
string const getMessage() const { return dispatch_buffer; }
/// Buffer to store result messages
string const getStatusMessage() const { return status_buffer; }
/// Handle a accented char keysequenze
void handleKeyFunc(kb_action action);
@ -84,30 +84,30 @@ private:
LyXView * owner;
///
static int psd_idx;
///
kb_sequence keyseq;
///
kb_sequence cancel_meta_seq;
///
kb_sequence keyseq;
///
kb_sequence cancel_meta_seq;
///
unsigned meta_fake_bit;
///
void moveCursorUpdate(bool flag = true, bool selecting = false);
///
void setupLocalKeymap();
///
kb_action lyx_dead_action;
///
kb_action lyx_calling_dead_action;
/// Error status, only Dispatch can change this flag
mutable bool errorstat;
///
kb_action lyx_dead_action;
///
kb_action lyx_calling_dead_action;
/// Error status, only Dispatch can change this flag
mutable bool errorstat;
/** Buffer to store messages and result data. Is there a
/** Buffer to store messages and result data. Is there a
good reason to have this one as static in Dispatch? (Ale)
*/
mutable string dispatch_buffer;
/** Buffer to store messages and result data from getStatus
mutable string dispatch_buffer;
/** Buffer to store messages and result data from getStatus
*/
mutable string status_buffer;
mutable string status_buffer;
/// Command name and shortcut information
string commandshortcut;

View File

@ -139,8 +139,8 @@ LyXLength const & LyXGlueLength::minus() const
bool operator==(LyXGlueLength const & l1, LyXGlueLength const & l2)
{
return l1.len() == l2.len()
&& l1.plus() == l2.plus()
&& l1.minus() == l2.minus();
&& l1.plus() == l2.plus()
&& l1.minus() == l2.minus();
}

View File

@ -1,4 +1,3 @@
/* This file is part of
* ======================================================
*
@ -72,7 +71,7 @@ enum LayoutTags {
LT_RIGHTMARGIN,
LT_SPACING,
LT_TOPSEP,
LT_INTITLE
LT_INTITLE
};
/////////////////////
@ -120,27 +119,27 @@ bool LyXLayout::Read (LyXLex & lexrc, LyXTextClass const & tclass)
{ "bottomsep", LT_BOTTOMSEP },
{ "copystyle", LT_COPYSTYLE },
{ "end", LT_END },
{ "endlabelstring", LT_ENDLABELSTRING },
{ "endlabeltype", LT_ENDLABELTYPE },
{ "endlabelstring", LT_ENDLABELSTRING },
{ "endlabeltype", LT_ENDLABELTYPE },
{ "fill_bottom", LT_FILL_BOTTOM },
{ "fill_top", LT_FILL_TOP },
{ "font", LT_FONT },
{ "freespacing", LT_FREE_SPACING },
{ "font", LT_FONT },
{ "freespacing", LT_FREE_SPACING },
{ "intitle", LT_INTITLE },
{ "itemsep", LT_ITEMSEP },
{ "itemsep", LT_ITEMSEP },
{ "keepempty", LT_KEEPEMPTY },
{ "labelbottomsep", LT_LABEL_BOTTOMSEP },
{ "labelfont", LT_LABELFONT },
{ "labelindent", LT_LABELINDENT },
{ "labelsep", LT_LABELSEP },
{ "labelstring", LT_LABELSTRING },
{ "labelfont", LT_LABELFONT },
{ "labelindent", LT_LABELINDENT },
{ "labelsep", LT_LABELSEP },
{ "labelstring", LT_LABELSTRING },
{ "labelstringappendix", LT_LABELSTRING_APPENDIX },
{ "labeltype", LT_LABELTYPE },
{ "latexname", LT_LATEXNAME },
{ "labeltype", LT_LABELTYPE },
{ "latexname", LT_LATEXNAME },
{ "latexparam", LT_LATEXPARAM },
{ "latextype", LT_LATEXTYPE },
{ "leftmargin", LT_LEFTMARGIN },
{ "margin", LT_MARGIN },
{ "latextype", LT_LATEXTYPE },
{ "leftmargin", LT_LEFTMARGIN },
{ "margin", LT_MARGIN },
{ "needprotect", LT_NEED_PROTECT },
{ "newline", LT_NEWLINE },
{ "nextnoindent", LT_NEXTNOINDENT },
@ -148,7 +147,7 @@ bool LyXLayout::Read (LyXLex & lexrc, LyXTextClass const & tclass)
{ "parindent", LT_PARINDENT },
{ "parsep", LT_PARSEP },
{ "parskip", LT_PARSKIP },
{ "passthru", LT_PASS_THRU },
{ "passthru", LT_PASS_THRU },
{ "preamble", LT_PREAMBLE },
{ "rightmargin", LT_RIGHTMARGIN },
{ "spacing", LT_SPACING },
@ -179,7 +178,7 @@ bool LyXLayout::Read (LyXLex & lexrc, LyXTextClass const & tclass)
break;
case LT_COPYSTYLE: // initialize with a known style
if (lexrc.next()) {
if (lexrc.next()) {
string const style = lexrc.getString();
if (tclass.hasLayout(style)) {
@ -202,7 +201,7 @@ bool LyXLayout::Read (LyXLex & lexrc, LyXTextClass const & tclass)
break;
case LT_OBSOLETEDBY: // replace with a known style
if (lexrc.next()) {
if (lexrc.next()) {
string const style = lexrc.getString();
if (tclass.hasLayout(style)) {
@ -262,8 +261,8 @@ bool LyXLayout::Read (LyXLex & lexrc, LyXTextClass const & tclass)
break;
case LT_LATEXNAME:
if (lexrc.next())
latexname_ = lexrc.getString();
if (lexrc.next())
latexname_ = lexrc.getString();
break;
case LT_LATEXPARAM:
@ -284,7 +283,7 @@ bool LyXLayout::Read (LyXLex & lexrc, LyXTextClass const & tclass)
break;
case LT_LEFTMARGIN: // left margin type
if (lexrc.next())
if (lexrc.next())
leftmargin = lexrc.getString();
break;

View File

@ -210,4 +210,3 @@ bool operator!=(LyXLength const & l1, LyXLength const & l2)
{
return !(l1 == l2);
}

View File

@ -168,7 +168,7 @@ string const LyXLex::getLongString(string const & endtoken)
// We do a case independent comparison, like search_kw
// does.
if (compare_no_case(token, endtoken) != 0) {
if (compare_no_case(token, endtoken) != 0) {
string tmpstr = getString();
if (firstline) {
unsigned int i = 0;
@ -187,7 +187,7 @@ string const LyXLex::getLongString(string const & endtoken)
tmpstr.erase(0, prefix.length() - 1);
}
str += frontStrip(tmpstr, "\t") + '\n';
}
}
else // token == endtoken
break;
}

View File

@ -52,7 +52,7 @@ void InitLyXLookup(Display * display, Window window)
// This part could be done before opening display
string oldlocale = setlocale(LC_CTYPE, 0);
setlocale(LC_CTYPE, "");
if (!XSupportsLocale()) {
if (!XSupportsLocale()) {
lyxerr[Debug::KEY]
<< "InitLyXLookup: X does not support this locale."
<< endl;
@ -191,7 +191,7 @@ int LyXLookupString(XEvent * event,
if (XFilterEvent (event, None)) {
lyxerr[Debug::KEY] <<"XFilterEvent" << endl;
*keysym_return = NoSymbol;
return 0;
return 0;
}
#endif
Status status_return = 0;
@ -282,4 +282,3 @@ void CloseLyXLookup()
}
#endif // HAVE_XOPENIM

View File

@ -105,8 +105,8 @@ keyword_item lyxrcTags[] = {
{ "\\print_landscape_flag", LyXRC::RC_PRINTLANDSCAPEFLAG },
{ "\\print_oddpage_flag", LyXRC::RC_PRINTODDPAGEFLAG },
{ "\\print_pagerange_flag", LyXRC::RC_PRINTPAGERANGEFLAG },
{ "\\print_paper_dimension_flag", LyXRC::RC_PRINTPAPERDIMENSIONFLAG },
{ "\\print_paper_flag", LyXRC::RC_PRINTPAPERFLAG },
{ "\\print_paper_dimension_flag", LyXRC::RC_PRINTPAPERDIMENSIONFLAG },
{ "\\print_paper_flag", LyXRC::RC_PRINTPAPERFLAG },
{ "\\print_reverse_flag", LyXRC::RC_PRINTREVERSEFLAG },
{ "\\print_spool_command", LyXRC::RC_PRINTSPOOL_COMMAND },
{ "\\print_spool_printerprefix", LyXRC::RC_PRINTSPOOL_PRINTERPREFIX },
@ -315,7 +315,7 @@ int LyXRC::read(string const & filename)
}
switch (static_cast<LyXRCTags>(le)) {
case RC_INPUT: // Include file
if (lexrc.next()) {
if (lexrc.next()) {
string const tmp =
LibFileSearch(string(),
lexrc.getString());
@ -483,12 +483,12 @@ int LyXRC::read(string const & filename)
print_spool_printerprefix = lexrc.getString();
break;
case RC_PRINTPAPERDIMENSIONFLAG:
case RC_PRINTPAPERDIMENSIONFLAG:
if (lexrc.next())
print_paper_dimension_flag = lexrc.getString();
break;
case RC_PRINTPAPERFLAG:
case RC_PRINTPAPERFLAG:
if (lexrc.next())
print_paper_flag = lexrc.getString();
break;
@ -504,29 +504,29 @@ int LyXRC::read(string const & filename)
break;
case RC_DEFAULT_PAPERSIZE:
if (lexrc.next()) {
string const size =
if (lexrc.next()) {
string const size =
lowercase(lexrc.getString());
if (size == "usletter")
default_papersize =
default_papersize =
BufferParams::PAPER_USLETTER;
else if (size == "legal")
default_papersize =
default_papersize =
BufferParams::PAPER_LEGALPAPER;
else if (size == "executive")
default_papersize =
default_papersize =
BufferParams::PAPER_EXECUTIVEPAPER;
else if (size == "a3")
default_papersize =
default_papersize =
BufferParams::PAPER_A3PAPER;
else if (size == "a4")
default_papersize =
default_papersize =
BufferParams::PAPER_A4PAPER;
else if (size == "a5")
default_papersize =
default_papersize =
BufferParams::PAPER_A5PAPER;
else if (size == "b5")
default_papersize =
default_papersize =
BufferParams::PAPER_B5PAPER;
}
break;
@ -596,9 +596,9 @@ int LyXRC::read(string const & filename)
lexrc.getFloat();
break;
case RC_SCREEN_FONT_SCALABLE:
if (lexrc.next())
use_scalable_fonts = lexrc.getBool();
case RC_SCREEN_FONT_SCALABLE:
if (lexrc.next())
use_scalable_fonts = lexrc.getBool();
break;
case RC_AUTOSAVE:
@ -632,14 +632,14 @@ int LyXRC::read(string const & filename)
lastfiles = ExpandPath(lexrc.getString());
break;
case RC_NUMLASTFILES:
if (lexrc.next())
num_lastfiles = lexrc.getInteger();
case RC_NUMLASTFILES:
if (lexrc.next())
num_lastfiles = lexrc.getInteger();
break;
case RC_CHECKLASTFILES:
if (lexrc.next())
check_lastfiles = lexrc.getBool();
case RC_CHECKLASTFILES:
if (lexrc.next())
check_lastfiles = lexrc.getBool();
break;
case RC_SCREEN_FONT_ROMAN:
@ -705,8 +705,8 @@ int LyXRC::read(string const & filename)
}
case RC_AUTOREGIONDELETE:
// Auto region delete defaults to true
if (lexrc.next())
auto_region_delete = lexrc.getBool();
if (lexrc.next())
auto_region_delete = lexrc.getBool();
break;
case RC_BIND:
@ -777,7 +777,7 @@ int LyXRC::read(string const & filename)
break;
case RC_ASCIIROFF_COMMAND:
if (lexrc.next())
if (lexrc.next())
ascii_roff_command = lexrc.getString();
break;
case RC_ASCII_LINELEN:
@ -828,8 +828,8 @@ int LyXRC::read(string const & filename)
isp_esc_chars = lexrc.getString();
break;
case RC_MAKE_BACKUP:
if (lexrc.next())
make_backup = lexrc.getBool();
if (lexrc.next())
make_backup = lexrc.getBool();
break;
case RC_BACKUPDIR_PATH:
if (lexrc.next())
@ -1713,7 +1713,7 @@ string const LyXRC::getDescription(LyXRCTags tag)
str = N_("The option to print out in landscape.");
break;
case RC_PRINTPAPERFLAG:
case RC_PRINTPAPERFLAG:
str = N_("The option to specify paper type.");
break;

View File

@ -44,7 +44,7 @@ enum LyXRCTags {
RC_PRINTEXSTRAOPTIONS,
RC_PRINTSPOOL_COMMAND,
RC_PRINTSPOOL_PRINTERPREFIX,
RC_PRINTPAPERFLAG,
RC_PRINTPAPERFLAG,
RC_PRINTPAPERDIMENSIONFLAG,
RC_CUSTOM_EXPORT_COMMAND,
RC_CUSTOM_EXPORT_FORMAT,
@ -139,7 +139,7 @@ enum LyXRCTags {
///
void write(string const & filename) const;
///
void print() const;
void print() const;
///
void output(std::ostream & os) const;
///
@ -178,14 +178,14 @@ enum LyXRCTags {
string print_extra_options;
///
string print_spool_command;
///
///
string print_spool_printerprefix;
///
string print_paper_flag;
///
string print_paper_dimension_flag;
///
string custom_export_command;
string custom_export_command;
///
string custom_export_format;
///
@ -194,8 +194,8 @@ enum LyXRCTags {
string ps_command;
/// option for telling the dvi viewer about the paper size
string view_dvi_paper_option;
/// default paper size for local xdvi/dvips/ghostview/whatever
BufferParams::PAPER_SIZE default_papersize;
/// default paper size for local xdvi/dvips/ghostview/whatever
BufferParams::PAPER_SIZE default_papersize;
/// command to run chktex incl. options
string chktex_command;
///

View File

@ -98,7 +98,7 @@ private:
/// y1 and y2 are coordinates of the screen
void drawFromTo(LyXText *, BufferView *, int y1, int y2,
int y_offset = 0, int x_offset = 0, bool internal=false);
int y_offset = 0, int x_offset = 0, bool internal=false);
/// y is a coordinate of the text
void drawOneRow(LyXText *, BufferView *, Row * row,

View File

@ -10,27 +10,27 @@
/**
Docu : To use the lyxserver define the name of the pipe in your
lyxrc:
\serverpipe "/home/myhome/.lyxpipe"
Then use .lyxpipe.in and .lyxpipe.out to communicate to LyX.
Each message consists of a single line in ASCII. Input lines
(client -> LyX) have the following format:
"LYXCMD:<clientname>:<functionname>:<argument>"
Answers from LyX look like this:
"INFO:<clientname>:<functionname>:<data>"
lyxrc:
\serverpipe "/home/myhome/.lyxpipe"
Then use .lyxpipe.in and .lyxpipe.out to communicate to LyX.
Each message consists of a single line in ASCII. Input lines
(client -> LyX) have the following format:
"LYXCMD:<clientname>:<functionname>:<argument>"
Answers from LyX look like this:
"INFO:<clientname>:<functionname>:<data>"
[asierra970531] Or like this in case of error:
"ERROR:<clientname>:<functionname>:<error message>"
where <clientname> and <functionname> are just echoed.
If LyX notifies about a user defined extension key-sequence,
the line looks like this:
"NOTIFY:<key-sequence>"
"ERROR:<clientname>:<functionname>:<error message>"
where <clientname> and <functionname> are just echoed.
If LyX notifies about a user defined extension key-sequence,
the line looks like this:
"NOTIFY:<key-sequence>"
[asierra970531] New server-only messages to implement a simple protocol
"LYXSRV:<clientname>:<protocol message>"
where <protocol message> can be "hello" or "bye". If hello is
received LyX will inform the client that it's listening its
messages, and 'bye' will inform that lyx is closing.
"LYXSRV:<clientname>:<protocol message>"
where <protocol message> can be "hello" or "bye". If hello is
received LyX will inform the client that it's listening its
messages, and 'bye' will inform that lyx is closing.
See development/server_monitor.c for an example client.
See development/server_monitor.c for an example client.
Purpose: implement a client/server lib for LyX
*/
@ -71,7 +71,7 @@ using std::endl;
// lyxserver.
#ifndef HAVE_MKFIFO
int mkfifo(char const * __path, mode_t __mode) {
return 0;
return 0;
}
#endif
@ -138,13 +138,13 @@ void LyXComm::openConnection()
/// Close pipes
void LyXComm::closeConnection()
{
lyxerr[Debug::LYXSERVER] << "LyXComm: Closing connection" << endl;
lyxerr[Debug::LYXSERVER] << "LyXComm: Closing connection" << endl;
if (pipename.empty()) {
lyxerr[Debug::LYXSERVER]
<< "LyXComm: server is disabled, nothing to do"
<< endl;
return;
return;
}
if (!ready) {
@ -279,9 +279,9 @@ void LyXComm::callback(int fd, void *v)
lyxerr << "LyXComm: Receiving from fd " << fd << endl;
}
const int CMDBUFLEN = 100;
const int CMDBUFLEN = 100;
char charbuf[CMDBUFLEN];
string cmd;
string cmd;
// nb! make lsbuf a class-member for multiple sessions
static string lsbuf;
@ -308,7 +308,7 @@ void LyXComm::callback(int fd, void *v)
<< ", cmd:" << cmd << endl;
if (!cmd.empty())
c->clientcb(c->client, cmd);
//\n or not \n?
//\n or not \n?
}
}
if (errno == EAGAIN)
@ -409,7 +409,7 @@ void LyXServer::callback(LyXServer * serv, string const & msg)
while (*p) {
// --- 1. check 'header' ---
if (compare(p, "LYXSRV:", 7) == 0) {
if (compare(p, "LYXSRV:", 7) == 0) {
server_only = true;
} else if (0 != compare(p, "LYXCMD:", 7)) {
lyxerr << "LyXServer: Unknown request \"" << p << "\"" << endl;
@ -519,7 +519,7 @@ void LyXServer::callback(LyXServer * serv, string const & msg)
buf = "ERROR:";
else
buf = "INFO:";
buf += string(client) + ":" + cmd + ":" + rval + "\n";
buf += string(client) + ":" + cmd + ":" + rval + "\n";
serv->pipes.send(buf);
// !!! we don't do any error checking -
@ -547,4 +547,3 @@ void LyXServer::notifyClient(string const & s)
string buf = string("NOTIFY:") + s + "\n";
pipes.send(buf);
}

View File

@ -111,14 +111,14 @@ public:
// The lyx server should not take an argument "LyXFunc" but this is
// how it will be done for 0.12. In 0.13 we must write a non-gui
// bufferview.
// IMO lyxserver is atypical, and for the moment the only one, non-gui
// bufferview. We just have to find a way to handle situations like if
// lyxserver is using a buffer that is being edited with a bufferview.
// With a common buffer list this is not a problem, maybe. (Alejandro)
// IMO lyxserver is atypical, and for the moment the only one, non-gui
// bufferview. We just have to find a way to handle situations like if
// lyxserver is using a buffer that is being edited with a bufferview.
// With a common buffer list this is not a problem, maybe. (Alejandro)
///
LyXServer(LyXFunc * f, string const & pip)
: numclients(0), func(f), pipes(pip, (this), callback) {}
///
///
~LyXServer();
///
void notifyClient(string const &);

View File

@ -104,9 +104,9 @@ public:
LyXFont const getLabelFont(Buffer const *, Paragraph * par) const;
///
void setCharFont(Buffer const *, Paragraph * par,
lyx::pos_type pos, LyXFont const & font);
lyx::pos_type pos, LyXFont const & font);
void setCharFont(BufferView *, Paragraph * par,
lyx::pos_type pos, LyXFont const & font, bool toggleall);
lyx::pos_type pos, LyXFont const & font, bool toggleall);
/// what you expect when pressing <enter> at cursor position
void breakParagraph(BufferView *, char keep_layout = 0);
@ -264,7 +264,7 @@ public:
mark_ = m;
}
LyXCursor cursor; // temporary cursor to hold a cursor position
// until setSelection is called!
// until setSelection is called!
LyXCursor start; // start of a REAL selection
LyXCursor end; // end of a REAL selection
private:

View File

@ -135,7 +135,7 @@ bool LyXTextClass::Read(string const & filename, bool merge)
LyXLex lexrc(textClassTags, TC_RIGHTMARGIN);
bool error = false;
lexrc.setFile(filename);
lexrc.setFile(filename);
if (!lexrc.isOK()) error = true;
// parsing
@ -157,8 +157,8 @@ bool LyXTextClass::Read(string const & filename, bool merge)
break;
case TC_INPUT: // Include file
if (lexrc.next()) {
string tmp = LibFileSearch("layouts",
if (lexrc.next()) {
string tmp = LibFileSearch("layouts",
lexrc.getString(),
"layout");
@ -238,7 +238,7 @@ bool LyXTextClass::Read(string const & filename, bool merge)
break;
case TC_PAGESTYLE:
lexrc.next();
lexrc.next();
pagestyle_ = strip(lexrc.getString());
break;
@ -251,7 +251,7 @@ bool LyXTextClass::Read(string const & filename, bool merge)
defaultfont_.realize(LyXFont(LyXFont::ALL_SANE));
#else
defaultfont_.realize(LyXFont(LyXFont::ALL_SANE),
default_language);
default_language);
#endif
}
break;
@ -271,9 +271,9 @@ bool LyXTextClass::Read(string const & filename, bool merge)
break;
// First step to support options
case TC_CLASSOPTIONS:
case TC_CLASSOPTIONS:
readClassOptions(lexrc);
break;
break;
case TC_PREAMBLE:
preamble_ = lexrc.getLongString("EndPreamble");
@ -295,7 +295,7 @@ bool LyXTextClass::Read(string const & filename, bool merge)
break;
case TC_LEFTMARGIN: // left margin type
if (lexrc.next())
if (lexrc.next())
leftmargin_ = lexrc.getString();
break;

View File

@ -125,7 +125,7 @@ public:
/// Text that dictates how wide the right margin is on the screen
string const & rightmargin() const;
///
///
int maxcounter() const;
///
int size() const;

View File

@ -112,7 +112,7 @@ bool LyXTextClassList::Read ()
"textclass file `" << MakeDisplayPath(real_file, 1000)
<< "'\nCheck your installation. LyX can't continue."
<< endl;
return false;
return false;
}
bool finished = false;

View File

@ -301,16 +301,16 @@ FL_OBJECT * MiniBuffer::add(int type, FL_Coord x, FL_Coord y,
FL_OBJECT * obj;
the_buffer = obj = fl_add_input(type, x, y, w, h, text.c_str());
fl_set_object_boxtype(obj, FL_DOWN_BOX);
fl_set_object_resize(obj, FL_RESIZE_ALL);
fl_set_object_gravity(obj, SouthWestGravity, SouthEastGravity);
fl_set_object_color(obj, FL_MCOL, FL_MCOL);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_boxtype(obj, FL_DOWN_BOX);
fl_set_object_resize(obj, FL_RESIZE_ALL);
fl_set_object_gravity(obj, SouthWestGravity, SouthEastGravity);
fl_set_object_color(obj, FL_MCOL, FL_MCOL);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
// To intercept Up, Down, Table for history
fl_set_object_prehandler(obj, C_MiniBuffer_peek_event);
obj->u_vdata = this;
obj->wantkey = FL_KEY_TAB;
fl_set_object_prehandler(obj, C_MiniBuffer_peek_event);
obj->u_vdata = this;
obj->wantkey = FL_KEY_TAB;
set_input(text);

View File

@ -56,7 +56,7 @@ public:
///
void redraw();
///
int peek_event(FL_OBJECT *, int, int);
int peek_event(FL_OBJECT *, int, int);
///
SigC::Signal1<void, string const &> stringReady;
///

View File

@ -170,8 +170,8 @@ Paragraph::~Paragraph()
void Paragraph::writeFile(Buffer const * buf, ostream & os,
BufferParams const & bparams,
depth_type dth) const
BufferParams const & bparams,
depth_type dth) const
{
// The beginning or end of a deeper (i.e. nested) area?
if (dth != params().depth()) {
@ -502,7 +502,7 @@ void Paragraph::insertChar(pos_type pos, Paragraph::value_type c)
void Paragraph::insertChar(pos_type pos, Paragraph::value_type c,
LyXFont const & font)
LyXFont const & font)
{
pimpl_->insertChar(pos, c, font);
}
@ -588,7 +588,7 @@ Inset const * Paragraph::getInset(pos_type pos) const
// Gets uninstantiated font setting at position.
LyXFont const Paragraph::getFontSettings(BufferParams const & bparams,
pos_type pos) const
pos_type pos) const
{
lyx::Assert(pos <= size());
@ -1239,9 +1239,9 @@ int Paragraph::getPositionOfInset(Inset const * inset) const
Paragraph * Paragraph::TeXOnePar(Buffer const * buf,
BufferParams const & bparams,
ostream & os, TexRow & texrow,
bool moving_arg)
BufferParams const & bparams,
ostream & os, TexRow & texrow,
bool moving_arg)
{
lyxerr[Debug::LATEX] << "TeXOnePar... " << this << endl;
Inset const * in = inInset();
@ -1302,14 +1302,14 @@ Paragraph * Paragraph::TeXOnePar(Buffer const * buf,
if (language->babel() != previous_language->babel()
// check if we already put language command in TeXEnvironment()
&& !(style.isEnvironment()
&& (!previous() || previous()->layout() != layout() ||
previous()->params().depth() != params().depth())))
&& (!previous() || previous()->layout() != layout() ||
previous()->params().depth() != params().depth())))
{
if (!lyxrc.language_command_end.empty() &&
previous_language->babel() != doc_language->babel())
{
os << subst(lyxrc.language_command_end, "$$lang",
previous_language->babel())
previous_language->babel())
<< endl;
texrow.newline();
}
@ -1318,7 +1318,7 @@ Paragraph * Paragraph::TeXOnePar(Buffer const * buf,
language->babel() != doc_language->babel())
{
os << subst(lyxrc.language_command_begin, "$$lang",
language->babel())
language->babel())
<< endl;
texrow.newline();
}
@ -1339,7 +1339,7 @@ Paragraph * Paragraph::TeXOnePar(Buffer const * buf,
<< style.latexparam();
break;
case LATEX_ITEM_ENVIRONMENT:
if (bibkey) {
if (bibkey) {
bibkey->latex(buf, os, false, false);
} else
os << "\\item ";
@ -1543,9 +1543,9 @@ int Paragraph::endTeXParParams(BufferParams const & bparams,
// This one spits out the text of the paragraph
bool Paragraph::simpleTeXOnePar(Buffer const * buf,
BufferParams const & bparams,
ostream & os, TexRow & texrow,
bool moving_arg)
BufferParams const & bparams,
ostream & os, TexRow & texrow,
bool moving_arg)
{
lyxerr[Debug::LATEX] << "SimpleTeXOnePar... " << this << endl;
@ -1710,11 +1710,11 @@ bool Paragraph::simpleTeXOnePar(Buffer const * buf,
if (next_) {
running_font
.latexWriteEndChanges(os, basefont,
next_->getFont(bparams,
0));
next_->getFont(bparams,
0));
} else {
running_font.latexWriteEndChanges(os, basefont,
basefont);
basefont);
}
#else
#ifdef WITH_WARNINGS
@ -1922,7 +1922,7 @@ bool Paragraph::isLineSeparator(pos_type pos) const
value_type const c = getChar(pos);
return IsLineSeparatorChar(c)
|| (IsInsetChar(c) && getInset(pos) &&
getInset(pos)->isLineSeparator());
getInset(pos)->isLineSeparator());
}

View File

@ -265,7 +265,7 @@ public:
void setFont(lyx::pos_type pos, LyXFont const & font);
/// Returns the height of the highest font in range
LyXFont::FONT_SIZE highestFontInRange(lyx::pos_type startpos,
lyx::pos_type endpos,
lyx::pos_type endpos,
LyXFont::FONT_SIZE const def_size) const;
///
void insertChar(lyx::pos_type pos, value_type c);

View File

@ -108,7 +108,7 @@ void Paragraph::Pimpl::setChar(pos_type pos, value_type c)
void Paragraph::Pimpl::insertChar(pos_type pos, value_type c,
LyXFont const & font)
LyXFont const & font)
{
lyx::Assert(pos <= size());
@ -117,8 +117,8 @@ void Paragraph::Pimpl::insertChar(pos_type pos, value_type c,
// Update the font table.
FontTable search_font(pos, LyXFont());
for (FontList::iterator it = lower_bound(fontlist.begin(),
fontlist.end(),
search_font, matchFT());
fontlist.end(),
search_font, matchFT());
it != fontlist.end(); ++it)
{
it->pos(it->pos() + 1);
@ -127,8 +127,8 @@ void Paragraph::Pimpl::insertChar(pos_type pos, value_type c,
// Update the inset table.
InsetTable search_inset(pos, 0);
for (InsetList::iterator it = lower_bound(owner_->insetlist.begin(),
owner_->insetlist.end(),
search_inset, matchIT());
owner_->insetlist.end(),
search_inset, matchIT());
it != owner_->insetlist.end(); ++it)
{
++it->pos;
@ -226,9 +226,9 @@ void Paragraph::Pimpl::erase(pos_type pos)
void Paragraph::Pimpl::simpleTeXBlanks(ostream & os, TexRow & texrow,
pos_type const i,
int & column, LyXFont const & font,
LyXLayout const & style)
pos_type const i,
int & column, LyXFont const & font,
LyXLayout const & style)
{
if (style.pass_thru) return;
if (column > tex_code_break_column
@ -317,7 +317,7 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const * buf,
}
int tmp = inset->latex(buf, os, moving_arg,
style.free_spacing);
style.free_spacing);
if (close)
os << "}";
@ -471,9 +471,9 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const * buf,
case ' ':
// Blanks are printed before font switching.
// Sure? I am not! (try nice-latex)
// I am sure it's correct. LyX might be smarter
// in the future, but for now, nothing wrong is
// written. (Asger)
// I am sure it's correct. LyX might be smarter
// in the future, but for now, nothing wrong is
// written. (Asger)
break;
default:

View File

@ -112,8 +112,8 @@ void LyXScreen::expose(int x, int y, int exp_width, int exp_height)
void LyXScreen::drawFromTo(LyXText * text, BufferView * bv,
int y1, int y2, int y_offset, int x_offset,
bool internal)
int y1, int y2, int y_offset, int x_offset,
bool internal)
{
int y_text = text->first_y + y1;
@ -127,7 +127,7 @@ void LyXScreen::drawFromTo(LyXText * text, BufferView * bv,
while (row != 0 && y < y2) {
LyXText::text_status st = text->status();
text->getVisibleRow(bv, y + y_offset,
x_offset, row, y + text->first_y);
x_offset, row, y + text->first_y);
internal = internal && (st != LyXText::CHANGED_IN_DRAW);
while (internal && text->status() == LyXText::CHANGED_IN_DRAW) {
if (text->fullRebreak(bv)) {
@ -136,7 +136,7 @@ void LyXScreen::drawFromTo(LyXText * text, BufferView * bv,
}
text->status(bv, st);
text->getVisibleRow(bv, y + y_offset,
x_offset, row, y + text->first_y);
x_offset, row, y + text->first_y);
}
y += row->height();
row = row->next();
@ -168,7 +168,7 @@ void LyXScreen::drawOneRow(LyXText * text, BufferView * bv, Row * row,
text->getVisibleRow(bv, y, x_offset, row,
y + text->first_y);
} while (!text->inset_owner &&
text->status() == LyXText::CHANGED_IN_DRAW);
text->status() == LyXText::CHANGED_IN_DRAW);
bv->text->status(bv, st);
#else
text->getVisibleRow(bv, y, x_offset, row, y + text->first_y);
@ -212,8 +212,8 @@ void LyXScreen::draw(LyXText * text, BufferView * bv, unsigned int y)
old_first - text->first_y);
} else {
drawFromTo(text, bv,
owner.height() + old_first - text->first_y,
owner.height(), 0, 0, internal);
owner.height() + old_first - text->first_y,
owner.height(), 0, 0, internal);
XCopyArea (fl_get_display(),
owner.getWin(),
owner.getWin(),
@ -440,7 +440,7 @@ bool LyXScreen::fitCursor(LyXText * text, BufferView * bv)
void LyXScreen::update(LyXText * text, BufferView * bv,
int y_offset, int x_offset)
int y_offset, int x_offset)
{
switch (text->status()) {
case LyXText::NEED_MORE_REFRESH:

View File

@ -47,4 +47,3 @@ class SpellBase
};
#endif

View File

@ -77,5 +77,3 @@ class ISpell : public SpellBase
};
#endif

View File

@ -61,5 +61,3 @@ class PSpell : public SpellBase
};
#endif

View File

@ -120,7 +120,7 @@ LyXTabular::LyXTabular(BufferParams const & bp,
LyXTabular::LyXTabular(BufferParams const & bp,
InsetTabular * inset, LyXTabular const & lt,
bool same_id)
bool same_id)
{
owner_ = inset;
cur_cell = -1;
@ -198,7 +198,7 @@ LyXTabular * LyXTabular::clone(BufferParams const & bp,
/* activates all lines and sets all widths to 0 */
void LyXTabular::Init(BufferParams const & bp,
int rows_arg, int columns_arg, LyXTabular const * lt)
int rows_arg, int columns_arg, LyXTabular const * lt)
{
rows_ = rows_arg;
columns_ = columns_arg;
@ -675,7 +675,7 @@ void LyXTabular::recalculateMulticolumnsOfColumn(int column)
{
int const cellno = cell_info[row][column].cellno;
SetWidthOfMulticolCell(cellno,
GetWidthOfCell(cellno)-(2 * WIDTH_OF_LINE));
GetWidthOfCell(cellno)-(2 * WIDTH_OF_LINE));
}
}
}
@ -775,7 +775,7 @@ bool LyXTabular::SetMColumnPWidth(int cell, LyXLength const & width)
bool LyXTabular::SetAlignSpecial(int cell, string const & special,
LyXTabular::Feature what)
LyXTabular::Feature what)
{
if (what == SET_SPECIAL_MULTI)
cellinfo_of_cell(cell)->align_special = special;
@ -1314,7 +1314,7 @@ void LyXTabular::ReadNew(Buffer const * buf, istream & is,
void LyXTabular::OldFormatRead(BufferParams const & bp,
LyXLex & lex, string const & fl)
LyXLex & lex, string const & fl)
{
int version;
int i;
@ -2085,7 +2085,7 @@ int LyXTabular::TeXCellPostamble(ostream & os, int cell) const
int LyXTabular::TeXLongtableHeaderFooter(ostream & os, Buffer const * buf,
bool fragile, bool fp) const
bool fragile, bool fp) const
{
if (!is_long_tabular)
return 0;
@ -2185,7 +2185,7 @@ bool LyXTabular::isValidRow(int const row) const
int LyXTabular::TeXRow(ostream & os, int const i, Buffer const * buf,
bool fragile, bool fp) const
bool fragile, bool fp) const
{
int ret = 0;
int cell = GetCellNumber(i, 0);
@ -2446,7 +2446,7 @@ int LyXTabular::docBook(Buffer const * buf, ostream & os) const
// ASCII export function and helpers
//--
int LyXTabular::asciiTopHLine(ostream & os, int row,
vector<unsigned int> const & clen) const
vector<unsigned int> const & clen) const
{
int const fcell = GetFirstCellInRow(row);
int const n = NumberOfCellsInRow(fcell) + fcell;
@ -2493,7 +2493,7 @@ int LyXTabular::asciiTopHLine(ostream & os, int row,
int LyXTabular::asciiBottomHLine(ostream & os, int row,
vector<unsigned int> const & clen) const
vector<unsigned int> const & clen) const
{
int const fcell = GetFirstCellInRow(row);
int const n = NumberOfCellsInRow(fcell) + fcell;
@ -2540,9 +2540,9 @@ int LyXTabular::asciiBottomHLine(ostream & os, int row,
int LyXTabular::asciiPrintCell(Buffer const * buf, ostream & os,
int cell, int row, int column,
vector<unsigned int> const & clen,
bool onlydata) const
int cell, int row, int column,
vector<unsigned int> const & clen,
bool onlydata) const
{
ostringstream sstr;
int ret = GetCellInset(cell)->ascii(buf, sstr, 0);

View File

@ -300,7 +300,7 @@ public:
int docBook(Buffer const * buf, std::ostream & os) const;
///
int ascii(Buffer const *, std::ostream &, int const depth,
bool onlydata, unsigned char delim) const;
bool onlydata, unsigned char delim) const;
///
bool IsMultiColumn(int cell, bool real = false) const;
///
@ -566,24 +566,24 @@ private:
int TeXCellPostamble(std::ostream &, int cell) const;
///
int TeXLongtableHeaderFooter(std::ostream &, Buffer const * buf,
bool fragile, bool fp) const;
bool fragile, bool fp) const;
///
bool isValidRow(int const row) const;
///
int TeXRow(std::ostream &, int const row, Buffer const * buf,
bool fragile, bool fp) const;
bool fragile, bool fp) const;
///
// helper function for ASCII returns number of newlines
///
int asciiTopHLine(std::ostream &, int row,
std::vector<unsigned int> const &) const;
std::vector<unsigned int> const &) const;
///
int asciiBottomHLine(std::ostream &, int row,
std::vector<unsigned int> const &) const;
std::vector<unsigned int> const &) const;
///
int asciiPrintCell(Buffer const *, std::ostream &,
int cell, int row, int column,
std::vector<unsigned int> const &,
int cell, int row, int column,
std::vector<unsigned int> const &,
bool onlydata) const;
/// auxiliary function for docbook
int docbookRow(Buffer const * buf, std::ostream & os, int row) const;

View File

@ -52,14 +52,14 @@ extern bool string2type(string const str, bool & num);
extern bool getTokenValue(string const & str, char const * token, string &ret);
extern bool getTokenValue(string const & str, char const * token, int & num);
extern bool getTokenValue(string const & str, char const * token,
LyXAlignment & num);
LyXAlignment & num);
extern bool getTokenValue(string const & str, char const * token,
LyXTabular::VAlignment & num);
LyXTabular::VAlignment & num);
extern bool getTokenValue(string const & str, char const * token,
LyXTabular::BoxType & num);
LyXTabular::BoxType & num);
extern bool getTokenValue(string const & str, char const * token, bool & flag);
extern bool getTokenValue(string const & str, char const * token,
LyXLength & len);
LyXLength & len);
extern void l_getline(std::istream & is, string & str);
#endif

View File

@ -105,4 +105,3 @@ string const DoAccent(char c, tex_accent accent)
{
return DoAccent(tostr(c), accent);
}

View File

@ -19,12 +19,12 @@
// this file should perhaps be split into even smaller parts
char const * string_paragraph_separation[3] = {
"indent", "skip", ""
"indent", "skip", ""
};
char const * string_quotes_language[7] = {
"english", "swedish", "german", "polish", "french", "danish", ""
"english", "swedish", "german", "polish", "french", "danish", ""
};
@ -45,12 +45,12 @@ char const * string_orientation[3] = {
char const * string_footnotekinds[8] = {
"footnote", "margin", "fig", "tab", "alg", "wide-fig", "wide-tab", ""
"footnote", "margin", "fig", "tab", "alg", "wide-fig", "wide-tab", ""
};
char const * string_align[5] = {
"block", "left", "right", "center", ""
"block", "left", "right", "center", ""
};
@ -64,5 +64,3 @@ char const * tex_graphics[] = {"default", "dvips", "dvitops", "emtex",
char const * tex_fonts[] = {"default", "ae", "pslatex", "times", "palatino",
"helvet", "avant", "newcent", "bookman", ""};

View File

@ -188,7 +188,7 @@ unsigned char LyXText::transformChar(unsigned char c, Paragraph * par,
// Lgb
int LyXText::singleWidth(BufferView * bview, Paragraph * par,
pos_type pos) const
pos_type pos) const
{
char const c = par->getChar(pos);
return singleWidth(bview, par, pos, c);
@ -196,7 +196,7 @@ int LyXText::singleWidth(BufferView * bview, Paragraph * par,
int LyXText::singleWidth(BufferView * bview, Paragraph * par,
pos_type pos, char c) const
pos_type pos, char c) const
{
LyXFont const font = getFont(bview->buffer(), par, pos);
@ -579,7 +579,7 @@ void LyXText::drawArabicComposeChar(DrawRowParams & p, pos_type & vpos)
void LyXText::drawChars(DrawRowParams & p, pos_type & vpos,
bool hebrew, bool arabic)
bool hebrew, bool arabic)
{
pos_type pos = vis2log(vpos);
pos_type const last = rowLastPrintable(p.row);
@ -1200,7 +1200,7 @@ int LyXText::numberOfLabelHfills(Buffer const * buf, Row const * row) const
// returns true, if a expansion is needed.
// Rules are given by LaTeX
bool LyXText::hfillExpansion(Buffer const * buf, Row const * row_ptr,
pos_type pos) const
pos_type pos) const
{
// by the way, is it a hfill?
if (!row_ptr->par()->isHfill(pos))
@ -1292,11 +1292,11 @@ void LyXText::setHeightOfRow(BufferView * bview, Row * row_ptr) const
//lyxerr << "spacing_val = " << spacing_val << endl;
int maxasc = int(lyxfont::maxAscent(font) *
layout.spacing.getValue() *
spacing_val);
layout.spacing.getValue() *
spacing_val);
int maxdesc = int(lyxfont::maxDescent(font) *
layout.spacing.getValue() *
spacing_val);
layout.spacing.getValue() *
spacing_val);
pos_type const pos_end = rowLast(row_ptr);
int labeladdon = 0;
int maxwidth = 0;
@ -1356,8 +1356,8 @@ void LyXText::setHeightOfRow(BufferView * bview, Row * row_ptr) const
{
maxasc += bview->buffer()->params.getDefSkip().inPixels(bview);
} else if (firstpar->previous() &&
textclasslist[bview->buffer()->params.textclass][firstpar->previous()->layout()].isParagraph() &&
firstpar->previous()->getDepth() == 0)
textclasslist[bview->buffer()->params.textclass][firstpar->previous()->layout()].isParagraph() &&
firstpar->previous()->getDepth() == 0)
{
// is it right to use defskip here too? (AS)
maxasc += bview->buffer()->params.getDefSkip().inPixels(bview);
@ -1375,7 +1375,7 @@ void LyXText::setHeightOfRow(BufferView * bview, Row * row_ptr) const
// there height depends on the font of the nearest character
if (firstpar->params().lineTop())
maxasc += 2 * lyxfont::ascent('x', getFont(bview->buffer(),
firstpar, 0));
firstpar, 0));
// and now the pagebreaks
if (firstpar->params().pagebreakTop())
@ -1394,8 +1394,8 @@ void LyXText::setHeightOfRow(BufferView * bview, Row * row_ptr) const
}
labeladdon = int(lyxfont::maxDescent(labelfont) *
layout.spacing.getValue() *
spacing_val)
layout.spacing.getValue() *
spacing_val)
+ int(lyxfont::maxAscent(labelfont) *
layout.spacing.getValue() *
spacing_val);
@ -1485,7 +1485,7 @@ void LyXText::setHeightOfRow(BufferView * bview, Row * row_ptr) const
// there height depends on the font of the nearest character
if (firstpar->params().lineBottom())
maxdesc += 2 * lyxfont::ascent('x',
getFont(bview->buffer(),
getFont(bview->buffer(),
par,
max(pos_type(0), par->size() - 1)));
@ -1698,7 +1698,7 @@ void LyXText::breakParagraph(BufferView * bview, char keep_layout)
if (cursor.pos() < cursor.par()->size()
&& cursor.par()->isLineSeparator(cursor.pos()))
cursor.par()->erase(cursor.pos());
// cursor.pos(cursor.pos() + 1);
// cursor.pos(cursor.pos() + 1);
// break the paragraph
if (keep_layout)
@ -1911,7 +1911,7 @@ void LyXText::insertChar(BufferView * bview, char c)
Row * row = cursor.row();
int y = cursor.y() - row->baseline();
if (c != Paragraph::META_INSET) /* Here case LyXText::InsertInset
* already insertet the character */
* already insertet the character */
cursor.par()->insertChar(cursor.pos(), c);
setCharFont(bview->buffer(), cursor.par(), cursor.pos(), rawtmpfont);
@ -1975,8 +1975,8 @@ void LyXText::insertChar(BufferView * bview, char c)
// recalculate the fill of the row
if (row->fill() >= 0) /* needed because a newline
* will set fill to -1. Otherwise
* we would not get a rebreak! */
* will set fill to -1. Otherwise
* we would not get a rebreak! */
row->fill(fill(bview, row, workWidth(bview)));
if (row->fill() < 0) {
refresh_y = y;
@ -2055,11 +2055,11 @@ void LyXText::charInserted()
void LyXText::prepareToPrint(BufferView * bview,
Row * row, float & x,
float & fill_separator,
float & fill_hfill,
float & fill_label_hfill,
bool bidi) const
Row * row, float & x,
float & fill_separator,
float & fill_hfill,
float & fill_label_hfill,
bool bidi) const
{
float nlh;
float ns;
@ -2116,7 +2116,7 @@ void LyXText::prepareToPrint(BufferView * bview,
&& (inset=row->par()->getInset(row->pos()))
&& (inset->display())) // || (inset->scroll() < 0)))
align = (inset->lyxCode() == Inset::MATHMACRO_CODE)
? LYX_ALIGN_BLOCK : LYX_ALIGN_CENTER;
? LYX_ALIGN_BLOCK : LYX_ALIGN_CENTER;
// ERT insets should always be LEFT ALIGNED on screen
inset = row->par()->inInset();
if (inset && inset->owner() &&
@ -2131,8 +2131,8 @@ void LyXText::prepareToPrint(BufferView * bview,
if (ns && row->next() && row->next()->par() == row->par() &&
!(row->next()->par()->isNewline(row->next()->pos() - 1))
&& !(row->next()->par()->isInset(row->next()->pos())
&& row->next()->par()->getInset(row->next()->pos())
&& row->next()->par()->getInset(row->next()->pos())->display())
&& row->next()->par()->getInset(row->next()->pos())
&& row->next()->par()->getInset(row->next()->pos())->display())
)
{
fill_separator = w / ns;
@ -2197,7 +2197,7 @@ void LyXText::cursorRightOneWord(BufferView * bview) const
}
// Advance through word.
while (tmpcursor.pos() < tmpcursor.par()->size() &&
tmpcursor.par()->isWord(tmpcursor.pos())) {
tmpcursor.par()->isWord(tmpcursor.pos())) {
// printf("Current pos2 %d", tmpcursor.pos()) ;
tmpcursor.pos(tmpcursor.pos() + 1);
++steps;
@ -2211,22 +2211,22 @@ void LyXText::cursorTab(BufferView * bview) const
{
LyXCursor tmpcursor = cursor;
while (tmpcursor.pos() < tmpcursor.par()->size()
&& !tmpcursor.par()->isNewline(tmpcursor.pos()))
tmpcursor.pos(tmpcursor.pos() + 1);
&& !tmpcursor.par()->isNewline(tmpcursor.pos()))
tmpcursor.pos(tmpcursor.pos() + 1);
if (tmpcursor.pos() == tmpcursor.par()->size()) {
if (tmpcursor.par()->next()) {
tmpcursor.par(tmpcursor.par()->next());
tmpcursor.pos(0);
}
if (tmpcursor.par()->next()) {
tmpcursor.par(tmpcursor.par()->next());
tmpcursor.pos(0);
}
} else
tmpcursor.pos(tmpcursor.pos() + 1);
tmpcursor.pos(tmpcursor.pos() + 1);
setCursor(bview, tmpcursor.par(), tmpcursor.pos());
}
/* -------> Skip initial whitespace at end of word and move cursor to *start*
of prior word, not to end of next prior word. */
of prior word, not to end of next prior word. */
void LyXText::cursorLeftOneWord(BufferView * bview) const
{
@ -2339,7 +2339,7 @@ bool LyXText::selectWordWhenUnderCursor(BufferView * bview,
// This function is only used by the spellchecker for NextWord().
// It doesn't handle LYX_ACCENTs and probably never will.
string const LyXText::selectNextWordToSpellcheck(BufferView * bview,
float & value) const
float & value) const
{
if (the_locking_inset) {
string str = the_locking_inset->selectNextWordToSpellcheck(bview, value);
@ -2643,7 +2643,7 @@ void LyXText::Delete(BufferView * bview)
// to make sure undo gets the right cursor position
cursor = old_cursor;
setUndo(bview, Undo::DELETE,
cursor.par(), cursor.par()->next());
cursor.par(), cursor.par()->next());
cursor = tmpcursor;
backspace(bview);
}
@ -2699,11 +2699,11 @@ void LyXText::backspace(BufferView * bview)
if (cursor.par()->previous()) {
setUndo(bview, Undo::DELETE,
cursor.par()->previous(), cursor.par()->next());
cursor.par()->previous(), cursor.par()->next());
}
Paragraph * tmppar = cursor.par();
Row * tmprow = cursor.row();
Paragraph * tmppar = cursor.par();
Row * tmprow = cursor.row();
// We used to do cursorLeftIntern() here, but it is
// not a good idea since it triggers the auto-delete
@ -2712,8 +2712,8 @@ void LyXText::backspace(BufferView * bview)
if (cursor.par()->previous()) {
// steps into the above paragraph.
setCursorIntern(bview, cursor.par()->previous(),
cursor.par()->previous()->size(),
false);
cursor.par()->previous()->size(),
false);
}
/* Pasting is not allowed, if the paragraphs have different
@ -2768,13 +2768,13 @@ void LyXText::backspace(BufferView * bview)
/* this is the code for a normal backspace, not pasting
* any paragraphs */
setUndo(bview, Undo::DELETE,
cursor.par(), cursor.par()->next());
cursor.par(), cursor.par()->next());
// We used to do cursorLeftIntern() here, but it is
// not a good idea since it triggers the auto-delete
// mechanism. So we do a cursorLeftIntern()-lite,
// without the dreaded mechanism. (JMarc)
setCursorIntern(bview, cursor.par(), cursor.pos()- 1,
false, cursor.boundary());
false, cursor.boundary());
// some insets are undeletable here
if (cursor.par()->isInset(cursor.pos())) {
@ -2798,8 +2798,8 @@ void LyXText::backspace(BufferView * bview)
if (cursor.pos() < rowLast(row) ||
!cursor.par()->isLineSeparator(cursor.pos())) {
row->fill(row->fill() + singleWidth(bview,
cursor.par(),
cursor.pos()));
cursor.par(),
cursor.pos()));
}
/* some special code when deleting a newline. This is similar
@ -3213,7 +3213,7 @@ int LyXText::drawLengthMarker(DrawRowParams & p, string const & prefix,
VSpace const & vsp, int start)
{
int const arrow_size = 4;
int const size = getLengthMarkerHeight(p.bv, vsp);
int const size = getLengthMarkerHeight(p.bv, vsp);
int const end = start + size;
// the label to display (if any)
@ -3633,7 +3633,7 @@ void LyXText::paintRowText(DrawRowParams & p)
void LyXText::getVisibleRow(BufferView * bv, int y_offset, int x_offset,
Row * row, int y, bool cleared)
Row * row, int y, bool cleared)
{
if (row->height() <= 0) {
lyxerr << "LYX_ERROR: row.height: "
@ -3762,12 +3762,12 @@ LyXText::getColumnNearX(BufferView * bview, Row * row, int & x,
boundary = false;
bool const lastrow = lyxrc.rtl_support // This is not needed, but gives
// some speedup if rtl_support=false
// some speedup if rtl_support=false
&& (!row->next() || row->next()->par() != row->par());
bool const rtl = (lastrow)
? row->par()->isRightToLeftPar(bview->buffer()->params)
: false; // If lastrow is false, we don't need to compute
// the value of rtl.
// the value of rtl.
if (row->pos() > last) // Row is empty?
c = row->pos();

View File

@ -145,7 +145,7 @@ LyXFont const realizeFont(LyXFont const & font,
tmpfont.realize(textclasslist[buf->params.textclass].defaultfont());
#else
tmpfont.realize(textclasslist[buf->params.textclass].defaultfont(),
buf->params.language);
buf->params.language);
#endif
return tmpfont;
@ -162,7 +162,7 @@ LyXFont const realizeFont(LyXFont const & font,
// If position is -1, we get the layout font of the paragraph.
// If position is -2, we get the font of the manual label of the paragraph.
LyXFont const LyXText::getFont(Buffer const * buf, Paragraph * par,
pos_type pos) const
pos_type pos) const
{
lyx::Assert(pos >= 0);
@ -251,8 +251,8 @@ LyXFont const LyXText::getLabelFont(Buffer const * buf, Paragraph * par) const
void LyXText::setCharFont(BufferView * bv, Paragraph * par,
pos_type pos, LyXFont const & fnt,
bool toggleall)
pos_type pos, LyXFont const & fnt,
bool toggleall)
{
Buffer const * buf = bv->buffer();
LyXFont font = getFont(buf, par, pos);
@ -273,7 +273,7 @@ void LyXText::setCharFont(BufferView * bv, Paragraph * par,
void LyXText::setCharFont(Buffer const * buf, Paragraph * par,
pos_type pos, LyXFont const & fnt)
pos_type pos, LyXFont const & fnt)
{
LyXFont font(fnt);
@ -298,9 +298,9 @@ void LyXText::setCharFont(Buffer const * buf, Paragraph * par,
layoutfont.realize(tclass[tp->layout()].font);
#else
layoutfont.realize(textclasslist.
Style(buf->params.textclass,
tp->layout()).font,
buf->params.language);
Style(buf->params.textclass,
tp->layout()).font,
buf->params.language);
#endif
}
}
@ -321,7 +321,7 @@ void LyXText::setCharFont(Buffer const * buf, Paragraph * par,
// inserts a new row behind the specified row, increments
// the touched counters
void LyXText::insertRow(Row * row, Paragraph * par,
pos_type pos) const
pos_type pos) const
{
Row * tmprow = new Row;
if (!row) {
@ -395,10 +395,10 @@ void LyXText::removeParagraph(Row * row) const
// insert the specified paragraph behind the specified row
void LyXText::insertParagraph(BufferView * bview, Paragraph * par,
Row * row) const
Row * row) const
{
insertRow(row, par, 0); /* insert a new row, starting
* at postition 0 */
* at postition 0 */
setCounter(bview->buffer(), par); // set the counters
@ -702,7 +702,7 @@ void LyXText::setFont(BufferView * bview, LyXFont const & font, bool toggleall)
// Determine basis font
LyXFont layoutfont;
if (cursor.pos() < beginningOfMainBody(bview->buffer(),
cursor.par())) {
cursor.par())) {
layoutfont = getLabelFont(bview->buffer(),
cursor.par());
} else {
@ -722,7 +722,7 @@ void LyXText::setFont(BufferView * bview, LyXFont const & font, bool toggleall)
real_current_font.realize(layoutfont);
#else
real_current_font.realize(layoutfont,
bview->buffer()->params.language);
bview->buffer()->params.language);
#endif
return;
}
@ -733,7 +733,7 @@ void LyXText::setFont(BufferView * bview, LyXFont const & font, bool toggleall)
// and sel_end cursor
setUndo(bview, Undo::EDIT,
selection.start.par(), selection.end.par()->next());
selection.start.par(), selection.end.par()->next());
freezeUndo();
cursor = selection.start;
while (cursor.par() != selection.end.par() ||
@ -762,7 +762,7 @@ void LyXText::setFont(BufferView * bview, LyXFont const & font, bool toggleall)
setCursor(bview, selection.end.par(), selection.end.pos());
setSelection(bview);
setCursor(bview, tmpcursor.par(), tmpcursor.pos(), true,
tmpcursor.boundary());
tmpcursor.boundary());
}
@ -815,7 +815,7 @@ void LyXText::redoDrawingOfParagraph(BufferView * bview, LyXCursor const & cur)
// and the specified par
// This function is needed after SetLayout and SetFont etc.
void LyXText::redoParagraphs(BufferView * bview, LyXCursor const & cur,
Paragraph const * endpar) const
Paragraph const * endpar) const
{
Row * tmprow2;
Paragraph * tmppar = 0;
@ -845,8 +845,8 @@ void LyXText::redoParagraphs(BufferView * bview, LyXCursor const & cur,
status(bview, LyXText::NEED_MORE_REFRESH);
refresh_y = y;
refresh_row = tmprow->previous(); /* the real refresh row will
be deleted, so I store
the previous here */
be deleted, so I store
the previous here */
// remove it
if (tmprow->next())
tmppar = tmprow->next()->par();
@ -863,7 +863,7 @@ void LyXText::redoParagraphs(BufferView * bview, LyXCursor const & cur,
// remove the first one
tmprow2 = tmprow; /* this is because tmprow->previous()
can be 0 */
can be 0 */
tmprow = tmprow->previous();
removeRow(tmprow2);
@ -978,7 +978,7 @@ void LyXText::setSelection(BufferView * bview)
string const LyXText::selectionAsString(Buffer const * buffer,
bool label) const
bool label) const
{
if (!selection.set()) return string();
string result;
@ -1071,7 +1071,7 @@ void LyXText::cursorBottom(BufferView * bview) const
void LyXText::toggleFree(BufferView * bview,
LyXFont const & font, bool toggleall)
LyXFont const & font, bool toggleall)
{
// If the mask is completely neutral, tell user
if (font == LyXFont(LyXFont::ALL_IGNORE)) {
@ -1085,7 +1085,7 @@ void LyXText::toggleFree(BufferView * bview,
// is disabled.
LyXCursor resetCursor = cursor;
bool implicitSelection = (font.language() == ignore_language
&& font.number() == LyXFont::IGNORE)
&& font.number() == LyXFont::IGNORE)
? selectWordWhenUnderCursor(bview, WHOLE_WORD_STRICT) : false;
// Set font
@ -1203,7 +1203,7 @@ void LyXText::setParagraph(BufferView * bview,
cursor.par()->params().pagebreakBottom(pagebreak_bottom);
cursor.par()->params().spaceTop(space_top);
cursor.par()->params().spaceBottom(space_bottom);
cursor.par()->params().spacing(spacing);
cursor.par()->params().spacing(spacing);
// does the layout allow the new alignment?
LyXLayout const & layout = tclass[cursor.par()->layout()];
@ -1372,7 +1372,7 @@ void LyXText::setCounter(Buffer const * buf, Paragraph * par) const
par->params().labelString(layout.labelstring());
else
par->params().labelString(string());
} else {
} else {
if (!layout.labelstring_appendix().empty())
par->params().labelString(layout.labelstring_appendix());
else
@ -1424,7 +1424,7 @@ void LyXText::setCounter(Buffer const * buf, Paragraph * par) const
// case it is, how can this be correct?
// (Lgb)
s << par->getCounter(i) << '.';
break;
break;
}
} else { // appendix
switch (2 * LABEL_COUNTER_CHAPTER - textclass.maxcounter() + i) {
@ -1720,16 +1720,16 @@ void LyXText::cutSelection(BufferView * bview, bool doclear, bool realcut)
endpar = selection.end.par();
int pos = selection.end.pos();
CutAndPaste::cutSelection(selection.start.par(), &endpar,
selection.start.pos(), pos,
bview->buffer()->params.textclass,
selection.start.pos(), pos,
bview->buffer()->params.textclass,
doclear, realcut);
selection.end.pos(pos);
} else {
endpar = selection.end.par();
int pos = selection.end.pos();
CutAndPaste::cutSelection(selection.start.par(), &endpar,
selection.start.pos(), pos,
bview->buffer()->params.textclass,
selection.start.pos(), pos,
bview->buffer()->params.textclass,
doclear, realcut);
cursor.par(endpar);
selection.end.par(endpar);
@ -1777,8 +1777,8 @@ void LyXText::copySelection(BufferView * bview)
selection.start.pos(selection.start.pos() + 1);
CutAndPaste::copySelection(selection.start.par(), selection.end.par(),
selection.start.pos(), selection.end.pos(),
bview->buffer()->params.textclass);
selection.start.pos(), selection.end.pos(),
bview->buffer()->params.textclass);
}
@ -1796,7 +1796,7 @@ void LyXText::pasteSelection(BufferView * bview)
int pos = cursor.pos();
CutAndPaste::pasteSelection(&actpar, &endpar, pos,
bview->buffer()->params.textclass);
bview->buffer()->params.textclass);
redoParagraphs(bview, cursor, endpar);
@ -1934,7 +1934,7 @@ bool LyXText::gotoNextInset(BufferView * bview,
void LyXText::checkParagraph(BufferView * bview, Paragraph * par,
pos_type pos)
pos_type pos)
{
LyXCursor tmpcursor;
@ -2042,8 +2042,8 @@ bool LyXText::updateInset(BufferView * bview, Inset * inset)
bool LyXText::setCursor(BufferView * bview, Paragraph * par,
pos_type pos,
bool setfont, bool boundary) const
pos_type pos,
bool setfont, bool boundary) const
{
LyXCursor old_cursor = cursor;
setCursorIntern(bview, par, pos, setfont, boundary);
@ -2052,7 +2052,7 @@ bool LyXText::setCursor(BufferView * bview, Paragraph * par,
void LyXText::setCursor(BufferView * bview, LyXCursor & cur, Paragraph * par,
pos_type pos, bool boundary) const
pos_type pos, bool boundary) const
{
lyx::Assert(par);
lyx::Assert(bview);
@ -2086,7 +2086,7 @@ void LyXText::setCursor(BufferView * bview, LyXCursor & cur, Paragraph * par,
float fill_hfill;
float fill_label_hfill;
prepareToPrint(bview, row, x, fill_separator, fill_hfill,
fill_label_hfill);
fill_label_hfill);
pos_type cursor_vpos = 0;
pos_type last = rowLastPrintable(row);
@ -2105,7 +2105,7 @@ void LyXText::setCursor(BufferView * bview, LyXCursor & cur, Paragraph * par,
cursor_vpos = (row->par()->isRightToLeftPar(bview->buffer()->params))
? row->pos() : last + 1;
else if (pos > row->pos() &&
(pos > last || boundary))
(pos > last || boundary))
/// Place cursor after char at (logical) position pos - 1
cursor_vpos = (bidi_level(pos - 1) % 2 == 0)
? log2vis(pos - 1) + 1 : log2vis(pos - 1);
@ -2154,7 +2154,7 @@ void LyXText::setCursor(BufferView * bview, LyXCursor & cur, Paragraph * par,
void LyXText::setCursorIntern(BufferView * bview, Paragraph * par,
pos_type pos, bool setfont, bool boundary) const
pos_type pos, bool setfont, bool boundary) const
{
InsetText * it = static_cast<InsetText *>(par->inInset());
if (it) {
@ -2247,7 +2247,7 @@ void LyXText::setCursorFromCoordinates(BufferView * bview, LyXCursor & cur,
cur.pos(row->pos() + column);
cur.x(x);
cur.y(y + row->baseline());
cur.row(row);
cur.row(row);
cur.boundary(bound);
}

View File

@ -61,7 +61,7 @@ public:
/// Init State
class TransInitState : virtual public TransFSMData, public TransState {
class TransInitState : virtual public TransFSMData, public TransState {
public:
///
TransInitState();

View File

@ -53,7 +53,7 @@ bool textUndo(BufferView * bv)
if (first) {
bv->buffer()->redostack.push(
createUndo(bv, undo->kind, first,
bv->buffer()->getParFromID(undo->number_of_behind_par)));
bv->buffer()->getParFromID(undo->number_of_behind_par)));
}
}
}
@ -84,7 +84,7 @@ bool textRedo(BufferView * bv)
if (first) {
bv->buffer()->undostack.push(
createUndo(bv, undo->kind, first,
bv->buffer()->getParFromID(undo->number_of_behind_par)));
bv->buffer()->getParFromID(undo->number_of_behind_par)));
}
}
}
@ -131,8 +131,8 @@ bool textHandleUndo(BufferView * bv, Undo * undo)
// replace the paragraphs with the undo informations
Paragraph * tmppar3 = undo->par;
undo->par = 0; /* otherwise the undo destructor would
delete the paragraph */
undo->par = 0; /* otherwise the undo destructor would
delete the paragraph */
// get last undo par and set the right(new) inset-owner of the
// paragraph if there is any. This is not needed if we don't have
@ -188,7 +188,7 @@ bool textHandleUndo(BufferView * bv, Undo * undo)
before->next(tmppar3);
else
bv->text->ownerParagraph(firstUndoParagraph(bv, undo->number_of_inset_id)->id(),
tmppar3);
tmppar3);
tmppar3->previous(before);
} else {
@ -197,7 +197,7 @@ bool textHandleUndo(BufferView * bv, Undo * undo)
// one is the first!
if (!before && behind) {
bv->text->ownerParagraph(firstUndoParagraph(bv, undo->number_of_inset_id)->id(),
behind);
behind);
tmppar3 = behind;
}
}
@ -228,8 +228,8 @@ bool textHandleUndo(BufferView * bv, Undo * undo)
it = static_cast<UpdatableInset*>(tmppar3->inInset());
if (it) {
it->getLyXText(bv)->redoParagraphs(bv,
it->getLyXText(bv)->cursor,
endpar);
it->getLyXText(bv)->cursor,
endpar);
if (tmppar) {
it = static_cast<UpdatableInset*>(tmppar->inInset());
LyXText * t;
@ -245,7 +245,7 @@ bool textHandleUndo(BufferView * bv, Undo * undo)
}
bv->updateInset(it, false);
bv->text->setCursorIntern(bv, bv->text->cursor.par(),
bv->text->cursor.pos());
bv->text->cursor.pos());
} else {
bv->text->redoParagraphs(bv, bv->text->cursor, endpar);
if (tmppar) {
@ -319,7 +319,7 @@ void unFreezeUndo()
void setUndo(BufferView * bv, Undo::undo_kind kind,
Paragraph const * first, Paragraph const * behind)
Paragraph const * first, Paragraph const * behind)
{
if (!undo_frozen) {
bv->buffer()->undostack.push(createUndo(bv, kind, first, behind));
@ -329,14 +329,14 @@ void setUndo(BufferView * bv, Undo::undo_kind kind,
void setRedo(BufferView * bv, Undo::undo_kind kind,
Paragraph const * first, Paragraph const * behind)
Paragraph const * first, Paragraph const * behind)
{
bv->buffer()->redostack.push(createUndo(bv, kind, first, behind));
}
Undo * createUndo(BufferView * bv, Undo::undo_kind kind,
Paragraph const * first, Paragraph const * behind)
Paragraph const * first, Paragraph const * behind)
{
lyx::Assert(first);
@ -421,8 +421,8 @@ Undo * createUndo(BufferView * bv, Undo::undo_kind kind,
int cursor_pos = undoCursor(bv).pos();
Undo * undo = new Undo(kind, inset_id,
before_number, behind_number,
cursor_par, cursor_pos, undopar);
before_number, behind_number,
cursor_par, cursor_pos, undopar);
undo_finished = false;
return undo;
@ -432,7 +432,7 @@ Undo * createUndo(BufferView * bv, Undo::undo_kind kind,
void setCursorParUndo(BufferView * bv)
{
setUndo(bv, Undo::FINISH, bv->text->cursor.par(),
bv->text->cursor.par()->next());
bv->text->cursor.par()->next());
}

View File

@ -35,13 +35,13 @@ extern void freezeUndo();
extern void unFreezeUndo();
///
extern void setUndo(BufferView *, Undo::undo_kind kind,
Paragraph const * first, Paragraph const * behind);
Paragraph const * first, Paragraph const * behind);
///
extern void setRedo(BufferView *, Undo::undo_kind kind,
Paragraph const * first, Paragraph const * behind);
Paragraph const * first, Paragraph const * behind);
///
extern Undo * createUndo(BufferView *, Undo::undo_kind kind,
Paragraph const * first, Paragraph const * behind);
Paragraph const * first, Paragraph const * behind);
/// for external use in lyx_cb.C
extern void setCursorParUndo(BufferView *);

View File

@ -28,7 +28,7 @@ using std::getline;
int VCS::doVCCommand(string const & cmd, string const & path)
{
lyxerr[Debug::LYXVC] << "doVCCommand: " << cmd << endl;
Systemcall one;
Systemcall one;
Path p(path);
int const ret = one.startscript(Systemcall::Wait, cmd);
return ret;

View File

@ -61,7 +61,7 @@ bool isEndOfData(string const & data)
* @return a char representing the type of token returned
*
* The possible return values are :
* + stretch indicator for glue length
* + stretch indicator for glue length
* - shrink indicator for glue length
* n a numeric value (stored in number array)
* u a unit type (stored in unit array)