cosmetics

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21417 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2007-11-04 09:51:26 +00:00
parent f26f32155a
commit 48b2b1d329
2 changed files with 11 additions and 12 deletions

View File

@ -129,7 +129,7 @@ bool TextClass::isTeXClassAvailable() const
} }
bool TextClass::do_readStyle(Lexer & lexrc, Layout & lay) bool TextClass::readStyle(Lexer & lexrc, Layout & lay)
{ {
LYXERR(Debug::TCLASS) << "Reading style " << to_utf8(lay.name()) << endl; LYXERR(Debug::TCLASS) << "Reading style " << to_utf8(lay.name()) << endl;
if (!lay.read(lexrc, *this)) { if (!lay.read(lexrc, *this)) {
@ -298,16 +298,16 @@ bool TextClass::read(FileName const & filename, ReadType rt)
+ lexrc.getString() + " is probably not valid UTF-8!"; + lexrc.getString() + " is probably not valid UTF-8!";
lexrc.printError(s.c_str()); lexrc.printError(s.c_str());
Layout lay; Layout lay;
error = do_readStyle(lexrc, lay); error = readStyle(lexrc, lay);
} else if (hasLayout(name)) { } else if (hasLayout(name)) {
Layout * lay = operator[](name).get(); Layout * lay = operator[](name).get();
error = do_readStyle(lexrc, *lay); error = readStyle(lexrc, *lay);
} else { } else {
Layout lay; Layout lay;
lay.setName(name); lay.setName(name);
if (le == TC_ENVIRONMENT) if (le == TC_ENVIRONMENT)
lay.is_environment = true; lay.is_environment = true;
error = do_readStyle(lexrc, lay); error = readStyle(lexrc, lay);
if (!error) if (!error)
layoutlist_.push_back( layoutlist_.push_back(
boost::shared_ptr<Layout>(new Layout(lay)) boost::shared_ptr<Layout>(new Layout(lay))
@ -332,7 +332,7 @@ bool TextClass::read(FileName const & filename, ReadType rt)
if (lexrc.next()) { if (lexrc.next()) {
docstring const style = from_utf8(subst(lexrc.getString(), docstring const style = from_utf8(subst(lexrc.getString(),
'_', ' ')); '_', ' '));
if (!delete_layout(style)) if (!deleteLayout(style))
lyxerr << "Cannot delete style `" lyxerr << "Cannot delete style `"
<< to_utf8(style) << '\'' << endl; << to_utf8(style) << '\'' << endl;
// lexrc.printError("Cannot delete style" // lexrc.printError("Cannot delete style"
@ -1022,12 +1022,11 @@ LayoutPtr const & TextClass::operator[](docstring const & name) const
BOOST_ASSERT(false); BOOST_ASSERT(false);
} }
return (*cit); return *cit;
} }
bool TextClass::deleteLayout(docstring const & name)
bool TextClass::delete_layout(docstring const & name)
{ {
if (name == defaultLayoutName()) if (name == defaultLayoutName())
return false; return false;

View File

@ -7,8 +7,8 @@
* Full author contact details are available in file CREDITS. * Full author contact details are available in file CREDITS.
*/ */
#ifndef LYXTEXTCLASS_H #ifndef TEXTCLASS_H
#define LYXTEXTCLASS_H #define TEXTCLASS_H
#include "ColorCode.h" #include "ColorCode.h"
#include "FontInfo.h" #include "FontInfo.h"
@ -202,9 +202,9 @@ public:
bool hasTocLevels() const; bool hasTocLevels() const;
private: private:
/// ///
bool delete_layout(docstring const &); bool deleteLayout(docstring const &);
/// ///
bool do_readStyle(Lexer &, Layout &); bool readStyle(Lexer &, Layout &);
/// Layout file name /// Layout file name
std::string name_; std::string name_;
/// document class name /// document class name