From d62a9764da0e58808f7d2b3844d9b9c02f7026c4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Wed, 29 May 2002 13:28:11 +0000 Subject: [PATCH] more white spacei changes git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4267 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 1 + src/lyxtextclasslist.C | 25 ++++++++++--------------- src/lyxtextclasslist.h | 8 ++------ src/text.C | 4 ++-- src/text2.C | 20 +++++++++----------- 5 files changed, 24 insertions(+), 34 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2b8510668f..2b24839fdf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,7 @@ * text.C: * sp_pspell.h: + * textclasslist.[Ch]: * sp_ispell.h: whitespace change 2002-05-29 Jean-Marc Lasgouttes diff --git a/src/lyxtextclasslist.C b/src/lyxtextclasslist.C index 6050c266cb..ea21f14b0e 100644 --- a/src/lyxtextclasslist.C +++ b/src/lyxtextclasslist.C @@ -129,22 +129,17 @@ bool LyXTextClassList::Read () lyxerr[Debug::TCLASS] << "Fname: " << fname << endl; if (lex.next()) { string const clname = lex.getString(); - lyxerr[Debug::TCLASS] - << "Clname: " << clname << endl; + lyxerr[Debug::TCLASS] << "Clname: " << clname << endl; if (lex.next()) { - string const desc = lex.getString(); - lyxerr[Debug::TCLASS] - << "Desc: " << desc << endl; - // This code is run when we have - // fname, clname and desc - LyXTextClass tmpl(fname, - clname, - desc); - if (lyxerr. - debugging(Debug::TCLASS)) { - tmpl.load(); - } - Add (tmpl); + string const desc = lex.getString(); + lyxerr[Debug::TCLASS] << "Desc: " << desc << endl; + // This code is run when we have + // fname, clname and desc + LyXTextClass tmpl(fname, clname, desc); + if (lyxerr.debugging(Debug::TCLASS)) { + tmpl.load(); + } + Add(tmpl); } } } diff --git a/src/lyxtextclasslist.h b/src/lyxtextclasslist.h index a84a05aac5..a5aa7cedb9 100644 --- a/src/lyxtextclasslist.h +++ b/src/lyxtextclasslist.h @@ -42,18 +42,14 @@ public: /// const_iterator end() const { return classlist.end(); } - /** Gets textclass number from name. - Returns -1 if textclass name does not exist - */ + /// Gets textclass number from name, -1 if textclass name does not exist std::pair const NumberOfClass(string const & textclass) const; /// LyXTextClass const & operator[](lyx::textclass_type textclass) const; - /** Read textclass list. - Returns false if this fails - */ + /// Read textclass list. Returns false if this fails. bool Read(); private: /// diff --git a/src/text.C b/src/text.C index 3a655e5b04..8dd52d5517 100644 --- a/src/text.C +++ b/src/text.C @@ -317,8 +317,7 @@ void LyXText::computeBidiTables(Buffer const * buf, Row * row) const bool rtl0 = false; pos_type const main_body = beginningOfMainBody(buf, row->par()); - for (pos_type lpos = bidi_start; - lpos <= bidi_end; ++lpos) { + for (pos_type lpos = bidi_start; lpos <= bidi_end; ++lpos) { bool is_space = row->par()->isLineSeparator(lpos); pos_type const pos = (is_space && lpos + 1 <= bidi_end && @@ -434,6 +433,7 @@ bool LyXText::isBoundary(Buffer const * buf, Paragraph * par, return rtl != rtl2; } + void LyXText::drawNewline(DrawRowParams & p, pos_type const pos) { // Draw end-of-line marker diff --git a/src/text2.C b/src/text2.C index f51d91178d..a17aa8ed45 100644 --- a/src/text2.C +++ b/src/text2.C @@ -915,9 +915,9 @@ void LyXText::fullRebreak(BufferView * bview) // important for the screen -/* the cursor set functions have a special mechanism. When they - * realize, that you left an empty paragraph, they will delete it. - * They also delete the corresponding row */ +// the cursor set functions have a special mechanism. When they +// realize, that you left an empty paragraph, they will delete it. +// They also delete the corresponding row // need the selection cursor: void LyXText::setSelection(BufferView * bview) @@ -1147,11 +1147,11 @@ pos_type LyXText::beginningOfMainBody(Buffer const * buf, } -/* the DTP switches for paragraphs. LyX will store them in the -* first physicla paragraph. When a paragraph is broken, the top settings -* rest, the bottom settings are given to the new one. So I can make shure, -* they do not duplicate themself and you cannnot make dirty things with -* them! */ +// the DTP switches for paragraphs. LyX will store them in the first +// physicla paragraph. When a paragraph is broken, the top settings rest, +// the bottom settings are given to the new one. So I can make shure, +// they do not duplicate themself and you cannnot make dirty things with +// them! void LyXText::setParagraph(BufferView * bview, bool line_top, bool line_bottom, @@ -1339,9 +1339,7 @@ void LyXText::setCounter(Buffer const * buf, Paragraph * par) const par->enumdepth = par->depthHook(par->getDepth())->enumdepth; par->setCounter(6 + par->enumdepth, par->depthHook(par->getDepth())->getCounter(6 + par->enumdepth)); - /* reset the counters. - * A depth change is like a breaking layout - */ + // reset the counters.A depth change is like a breaking layout for (int i = 6 + par->enumdepth + 1; i < 10; ++i) par->setCounter(i, 0); } -- 2.39.2