From 48b2b1d3292a6aa9a567b30f9ea910361d422d21 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Sun, 4 Nov 2007 09:51:26 +0000 Subject: [PATCH] cosmetics git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21417 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/TextClass.cpp | 15 +++++++-------- src/TextClass.h | 8 ++++---- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/TextClass.cpp b/src/TextClass.cpp index 72bd662bed..38367c27b3 100644 --- a/src/TextClass.cpp +++ b/src/TextClass.cpp @@ -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; 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.printError(s.c_str()); Layout lay; - error = do_readStyle(lexrc, lay); + error = readStyle(lexrc, lay); } else if (hasLayout(name)) { Layout * lay = operator[](name).get(); - error = do_readStyle(lexrc, *lay); + error = readStyle(lexrc, *lay); } else { Layout lay; lay.setName(name); if (le == TC_ENVIRONMENT) lay.is_environment = true; - error = do_readStyle(lexrc, lay); + error = readStyle(lexrc, lay); if (!error) layoutlist_.push_back( boost::shared_ptr(new Layout(lay)) @@ -332,7 +332,7 @@ bool TextClass::read(FileName const & filename, ReadType rt) if (lexrc.next()) { docstring const style = from_utf8(subst(lexrc.getString(), '_', ' ')); - if (!delete_layout(style)) + if (!deleteLayout(style)) lyxerr << "Cannot delete style `" << to_utf8(style) << '\'' << endl; // lexrc.printError("Cannot delete style" @@ -1022,12 +1022,11 @@ LayoutPtr const & TextClass::operator[](docstring const & name) const BOOST_ASSERT(false); } - return (*cit); + return *cit; } - -bool TextClass::delete_layout(docstring const & name) +bool TextClass::deleteLayout(docstring const & name) { if (name == defaultLayoutName()) return false; diff --git a/src/TextClass.h b/src/TextClass.h index a6b0bbb13d..554b3b53d9 100644 --- a/src/TextClass.h +++ b/src/TextClass.h @@ -7,8 +7,8 @@ * Full author contact details are available in file CREDITS. */ -#ifndef LYXTEXTCLASS_H -#define LYXTEXTCLASS_H +#ifndef TEXTCLASS_H +#define TEXTCLASS_H #include "ColorCode.h" #include "FontInfo.h" @@ -202,9 +202,9 @@ public: bool hasTocLevels() const; private: /// - bool delete_layout(docstring const &); + bool deleteLayout(docstring const &); /// - bool do_readStyle(Lexer &, Layout &); + bool readStyle(Lexer &, Layout &); /// Layout file name std::string name_; /// document class name -- 2.39.2