From e7aa8ce683718fc217ceffca647a94e202fc7e91 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Wed, 24 Oct 2007 22:55:02 +0000 Subject: [PATCH] cosmetics... less than intented git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21190 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Length.cpp | 2 +- src/Length.h | 22 +++++++++++++--- src/Makefile.am | 1 - src/VSpace.cpp | 3 ++- src/frontends/qt4/GuiBox.cpp | 2 +- src/frontends/qt4/GuiExternal.cpp | 3 +-- src/frontends/qt4/GuiGraphics.cpp | 3 +-- src/frontends/qt4/LengthCombo.cpp | 2 +- src/frontends/qt4/qt_helpers.cpp | 8 +++--- src/lengthcommon.cpp | 2 +- src/lengthcommon.h | 42 ------------------------------- src/tex2lyx/text.cpp | 9 +++---- 12 files changed, 35 insertions(+), 64 deletions(-) delete mode 100644 src/lengthcommon.h diff --git a/src/Length.cpp b/src/Length.cpp index a47052b506..4627f8bf47 100644 --- a/src/Length.cpp +++ b/src/Length.cpp @@ -16,10 +16,10 @@ #include #include "Length.h" -#include "lengthcommon.h" #include "LyXRC.h" #include "support/docstream.h" + #include #include diff --git a/src/Length.h b/src/Length.h index 725943503c..a5dd75143f 100644 --- a/src/Length.h +++ b/src/Length.h @@ -12,8 +12,8 @@ * Full author contact details are available in file CREDITS. */ -#ifndef LYX_LENGTH_H -#define LYX_LENGTH_H +#ifndef LENGTH_H +#define LENGTH_H #include "support/docstring.h" @@ -182,6 +182,22 @@ bool operator!=(GlueLength const & l1, GlueLength const & l2); stored into "result", if that is not 0. */ bool isValidGlueLength(std::string const & data, GlueLength * result = 0); +/// the number of units possible +extern int const num_units; + +/** + * array of unit names + * + * FIXME: I am not sure if "mu" should be possible to select (Lgb) + */ +extern char const * const unit_name[]; +extern char const * const unit_name_gui[]; + +/// return the unit given a string representation such as "cm" +Length::UNIT unitFromString(std::string const & data); + + + } // namespace lyx -#endif // LYXLENGTH_H +#endif // LENGTH_H diff --git a/src/Makefile.am b/src/Makefile.am index d73e7f1d09..318fd20ce8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -181,7 +181,6 @@ liblyxcore_la_SOURCES = \ Length.cpp \ Length.h \ lengthcommon.cpp \ - lengthcommon.h \ Lexer.cpp \ Lexer.h \ lfuns.h \ diff --git a/src/VSpace.cpp b/src/VSpace.cpp index c080e7d994..f377edebae 100644 --- a/src/VSpace.cpp +++ b/src/VSpace.cpp @@ -11,11 +11,12 @@ #include #include "VSpace.h" + #include "Buffer.h" #include "BufferParams.h" #include "BufferView.h" #include "gettext.h" -#include "lengthcommon.h" +#include "Length.h" #include "Text.h" #include "TextMetrics.h" // for defaultRowHeight() diff --git a/src/frontends/qt4/GuiBox.cpp b/src/frontends/qt4/GuiBox.cpp index 93bf7b57b7..2ec93db89c 100644 --- a/src/frontends/qt4/GuiBox.cpp +++ b/src/frontends/qt4/GuiBox.cpp @@ -18,8 +18,8 @@ #include "gettext.h" #include "LengthCombo.h" +#include "Length.h" #include "qt_helpers.h" -#include "lengthcommon.h" #include "LyXRC.h" // to set the default length values #include "Validator.h" diff --git a/src/frontends/qt4/GuiExternal.cpp b/src/frontends/qt4/GuiExternal.cpp index f16d6ed8aa..386bc1fcfa 100644 --- a/src/frontends/qt4/GuiExternal.cpp +++ b/src/frontends/qt4/GuiExternal.cpp @@ -14,11 +14,10 @@ #include "GuiExternal.h" -#include "GuiExternal.h" #include "frontend_helpers.h" #include "FuncRequest.h" #include "gettext.h" -#include "lengthcommon.h" +#include "Length.h" #include "LyXRC.h" #include "insets/ExternalSupport.h" diff --git a/src/frontends/qt4/GuiGraphics.cpp b/src/frontends/qt4/GuiGraphics.cpp index fb22af2244..66a01ca51c 100644 --- a/src/frontends/qt4/GuiGraphics.cpp +++ b/src/frontends/qt4/GuiGraphics.cpp @@ -16,10 +16,9 @@ #include "GuiGraphics.h" -#include "GuiGraphics.h" #include "debug.h" #include "LengthCombo.h" -#include "lengthcommon.h" +#include "Length.h" #include "LyXRC.h" #include "qt_helpers.h" #include "Validator.h" diff --git a/src/frontends/qt4/LengthCombo.cpp b/src/frontends/qt4/LengthCombo.cpp index 648bc7a246..9b1db41b46 100644 --- a/src/frontends/qt4/LengthCombo.cpp +++ b/src/frontends/qt4/LengthCombo.cpp @@ -12,7 +12,7 @@ #include #include "LengthCombo.h" -#include "lengthcommon.h" + #include "qt_helpers.h" diff --git a/src/frontends/qt4/qt_helpers.cpp b/src/frontends/qt4/qt_helpers.cpp index 9bfa3955d3..9734a29b08 100644 --- a/src/frontends/qt4/qt_helpers.cpp +++ b/src/frontends/qt4/qt_helpers.cpp @@ -12,17 +12,17 @@ #include -#include "LengthCombo.h" #include "qt_helpers.h" -#include "lengthcommon.h" +#include "LengthCombo.h" + +#include "debug.h" #include "gettext.h" +#include "Length.h" #include "support/os.h" #include "support/lstrings.h" -#include "debug.h" - #include #include #include diff --git a/src/lengthcommon.cpp b/src/lengthcommon.cpp index 191eca85ba..9897dc3413 100644 --- a/src/lengthcommon.cpp +++ b/src/lengthcommon.cpp @@ -12,7 +12,7 @@ #include -#include "lengthcommon.h" +#include "Length.h" #include "gettext.h" diff --git a/src/lengthcommon.h b/src/lengthcommon.h deleted file mode 100644 index 4d4acc9bb3..0000000000 --- a/src/lengthcommon.h +++ /dev/null @@ -1,42 +0,0 @@ -// -*- C++ -*- -/** - * \file lengthcommon.h - * This file is part of LyX, the document processor. - * Licence details can be found in the file COPYING. - * - * \author Lars Gullik Bjønnes - * \author Matthias Ettrich - * \author Jean-Marc Lasgouttes - * \author John Levon - * - * Full author contact details are available in file CREDITS. - */ - -#ifndef LENGTH_COMMON_H -#define LENGTH_COMMON_H - -#include "Length.h" - - -namespace lyx { - - -/// the number of units possible -extern int const num_units; - -/** - * array of unit names - * - * FIXME: I am not sure if "mu" should be possible to select (Lgb) - */ -extern char const * const unit_name[]; -extern char const * const unit_name_gui[]; - -/// return the unit given a string representation such as "cm" -Length::UNIT unitFromString(std::string const & data); - - - -} // namespace lyx - -#endif // LENGTH_COMMON_H diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index 1993098ff6..e1f9c2412f 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -14,15 +14,16 @@ #include #include "tex2lyx.h" + #include "Context.h" -#include "Layout.h" #include "FloatList.h" -#include "lengthcommon.h" +#include "Layout.h" +#include "Length.h" + #include "support/lstrings.h" #include "support/convert.h" #include "support/filetools.h" -#include #include #include @@ -52,8 +53,6 @@ using support::suffixIs; using support::contains; using support::subst; -namespace fs = boost::filesystem; - void parse_text_in_inset(Parser & p, ostream & os, unsigned flags, bool outer, Context const & context) -- 2.39.2