From 00e1771f945d7c32d67177f70ec56c6ccbe7dbd4 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Mon, 30 Apr 2007 10:31:51 +0000 Subject: [PATCH] Now that setPosCache() is in Inset, InsetMathDim is not needed anymore: ERASED! git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18110 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/scons/scons_manifest.py | 2 -- src/mathed/InsetFormulaMacro.cpp | 11 ++++----- src/mathed/InsetMathBig.h | 4 ++-- src/mathed/InsetMathDim.cpp | 35 ---------------------------- src/mathed/InsetMathDim.h | 36 ----------------------------- src/mathed/InsetMathDots.h | 4 ++-- src/mathed/InsetMathGrid.cpp | 2 +- src/mathed/InsetMathMBox.h | 4 ++-- src/mathed/InsetMathNest.cpp | 2 +- src/mathed/InsetMathNest.h | 4 ++-- src/mathed/InsetMathUnknown.h | 4 ++-- src/mathed/Makefile.am | 2 -- src/mathed/MathMacro.cpp | 2 +- src/mathed/MathMacroArgument.h | 4 ++-- 14 files changed, 19 insertions(+), 97 deletions(-) delete mode 100644 src/mathed/InsetMathDim.cpp delete mode 100644 src/mathed/InsetMathDim.h diff --git a/development/scons/scons_manifest.py b/development/scons/scons_manifest.py index edd4d43b96..b7f0dd3e70 100644 --- a/development/scons/scons_manifest.py +++ b/development/scons/scons_manifest.py @@ -186,7 +186,6 @@ src_mathed_header_files = Split(''' InsetMathDecoration.h InsetMathDelim.h InsetMathDiff.h - InsetMathDim.h InsetMathDots.h InsetMathEnv.h InsetMathExFunc.h @@ -267,7 +266,6 @@ src_mathed_files = Split(''' InsetMathDecoration.cpp InsetMathDelim.cpp InsetMathDiff.cpp - InsetMathDim.cpp InsetMathDots.cpp InsetMathEnv.cpp InsetMathExFunc.cpp diff --git a/src/mathed/InsetFormulaMacro.cpp b/src/mathed/InsetFormulaMacro.cpp index 9931662791..1a64d33af4 100644 --- a/src/mathed/InsetFormulaMacro.cpp +++ b/src/mathed/InsetFormulaMacro.cpp @@ -30,17 +30,14 @@ #include - -namespace lyx { - -using odocstream; -using support::bformat; - using std::string; using std::auto_ptr; using std::ostream; using std::endl; +namespace lyx { + +using support::bformat; InsetFormulaMacro::InsetFormulaMacro() @@ -49,7 +46,7 @@ InsetFormulaMacro::InsetFormulaMacro() InsetFormulaMacro::InsetFormulaMacro - (string const & name, int nargs, string const & type) + (docstring const & name, int nargs, docstring const & type) : InsetMathNest(2), name_(name) { MathMacroTable::create(MathAtom(new MathMacroTemplate(name, nargs, type))); diff --git a/src/mathed/InsetMathBig.h b/src/mathed/InsetMathBig.h index 5c2bbb80f5..80a2199f85 100644 --- a/src/mathed/InsetMathBig.h +++ b/src/mathed/InsetMathBig.h @@ -12,7 +12,7 @@ #ifndef MATH_BIGINSET_H #define MATH_BIGINSET_H -#include "InsetMathDim.h" +#include "InsetMath.h" #include @@ -20,7 +20,7 @@ namespace lyx { /// Inset for \\bigl & Co. -class InsetMathBig : public InsetMathDim { +class InsetMathBig : public InsetMath { public: /// InsetMathBig(docstring const & name, docstring const & delim); diff --git a/src/mathed/InsetMathDim.cpp b/src/mathed/InsetMathDim.cpp deleted file mode 100644 index 782a74700b..0000000000 --- a/src/mathed/InsetMathDim.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/** - * \file InsetMathDim.cpp - * This file is part of LyX, the document processor. - * Licence details can be found in the file COPYING. - * - * \author André Pönitz - * - * Full author contact details are available in file CREDITS. - */ - -#include - -#include "InsetMathDim.h" - -#include "BufferView.h" -#include "CoordCache.h" -#include "debug.h" -#include "MetricsInfo.h" - - -namespace lyx { - - -InsetMathDim::InsetMathDim() -{} - - -void InsetMathDim::setPosCache(PainterInfo const & pi, int x, int y) const -{ - //lyxerr << "InsetMathDim: cache to " << x << " " << y << std::endl; - pi.base.bv->coordCache().insets().add(this, x, y); -} - - -} // namespace lyx diff --git a/src/mathed/InsetMathDim.h b/src/mathed/InsetMathDim.h deleted file mode 100644 index 94f72be40f..0000000000 --- a/src/mathed/InsetMathDim.h +++ /dev/null @@ -1,36 +0,0 @@ -// -*- C++ -*- -/** - * \file InsetMathDim.h - * This file is part of LyX, the document processor. - * Licence details can be found in the file COPYING. - * - * \author André Pönitz - * - * Full author contact details are available in file CREDITS. - */ - -#ifndef MATH_DIMINSET_H -#define MATH_DIMINSET_H - -#include -#include "InsetMath.h" - -namespace lyx { - -class PainterInfo; - - -/// things that need the dimension cache -class InsetMathDim : public InsetMath { -public: - /// - InsetMathDim(); - - /// - void setPosCache(PainterInfo const & pi, int x, int y) const; -}; - - -} // namespace lyx - -#endif diff --git a/src/mathed/InsetMathDots.h b/src/mathed/InsetMathDots.h index f8148a20e8..af3d26bd97 100644 --- a/src/mathed/InsetMathDots.h +++ b/src/mathed/InsetMathDots.h @@ -12,7 +12,7 @@ #ifndef MATH_DOTSINSET_H #define MATH_DOTSINSET_H -#include "InsetMathDim.h" +#include "InsetMath.h" namespace lyx { @@ -20,7 +20,7 @@ namespace lyx { class latexkeys; /// The different kinds of ellipsis -class InsetMathDots : public InsetMathDim { +class InsetMathDots : public InsetMath { public: /// explicit InsetMathDots(latexkeys const * l); diff --git a/src/mathed/InsetMathGrid.cpp b/src/mathed/InsetMathGrid.cpp index 0d6918d1bb..594b1c264b 100644 --- a/src/mathed/InsetMathGrid.cpp +++ b/src/mathed/InsetMathGrid.cpp @@ -1039,7 +1039,7 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd) break; case LFUN_INSET_DIALOG_UPDATE: - GridInsetMailer(*this).updateDialog(&cur.bv()); +// GridInsetMailer(*this).updateDialog(&cur.bv()); break; // insert file functions diff --git a/src/mathed/InsetMathMBox.h b/src/mathed/InsetMathMBox.h index 8fea011a14..47fd08f982 100644 --- a/src/mathed/InsetMathMBox.h +++ b/src/mathed/InsetMathMBox.h @@ -16,7 +16,7 @@ #ifndef MATH_MBOXINSET_H #define MATH_MBOXINSET_H -#include "InsetMathDim.h" +#include "InsetMath.h" #include "Text.h" @@ -27,7 +27,7 @@ class BufferView; // almost a substitute for the real text inset... -class InsetMathMBox : public InsetMathDim { +class InsetMathMBox : public InsetMath { public: /// explicit InsetMathMBox(); diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp index a80c791554..2941b4c32f 100644 --- a/src/mathed/InsetMathNest.cpp +++ b/src/mathed/InsetMathNest.cpp @@ -983,7 +983,7 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd) } default: - InsetMathDim::doDispatch(cur, cmd); + InsetMath::doDispatch(cur, cmd); break; } } diff --git a/src/mathed/InsetMathNest.h b/src/mathed/InsetMathNest.h index 0460e93e8d..41387136d6 100644 --- a/src/mathed/InsetMathNest.h +++ b/src/mathed/InsetMathNest.h @@ -12,7 +12,7 @@ #ifndef MATH_NESTINSET_H #define MATH_NESTINSET_H -#include "InsetMathDim.h" +#include "InsetMath.h" namespace lyx { @@ -23,7 +23,7 @@ namespace lyx { single symbol. */ -class InsetMathNest : public InsetMathDim { +class InsetMathNest : public InsetMath { public: /// nestinsets have a fixed size to start with explicit InsetMathNest(idx_type ncells); diff --git a/src/mathed/InsetMathUnknown.h b/src/mathed/InsetMathUnknown.h index 3391f938c9..9c8a81b19a 100644 --- a/src/mathed/InsetMathUnknown.h +++ b/src/mathed/InsetMathUnknown.h @@ -12,14 +12,14 @@ #ifndef MATH_UNKNOWNINSET_H #define MATH_UNKNOWNINSET_H -#include "InsetMathDim.h" +#include "InsetMath.h" namespace lyx { /// LaTeX names for objects that we really don't know -class InsetMathUnknown : public InsetMathDim { +class InsetMathUnknown : public InsetMath { public: /// explicit InsetMathUnknown(docstring const & name, diff --git a/src/mathed/Makefile.am b/src/mathed/Makefile.am index 356fa40cec..9b2e2039eb 100644 --- a/src/mathed/Makefile.am +++ b/src/mathed/Makefile.am @@ -44,8 +44,6 @@ libmathed_la_SOURCES = \ InsetMathDFrac.h \ InsetMathDiff.cpp \ InsetMathDiff.h \ - InsetMathDim.cpp \ - InsetMathDim.h \ InsetMathDots.cpp \ InsetMathDots.h \ InsetMathEnv.cpp \ diff --git a/src/mathed/MathMacro.cpp b/src/mathed/MathMacro.cpp index b955cd659e..d38cedaea3 100644 --- a/src/mathed/MathMacro.cpp +++ b/src/mathed/MathMacro.cpp @@ -35,7 +35,7 @@ using std::vector; /// This class is the value of a macro argument, technically /// a wrapper of the cells of MathMacro. -class MathMacroArgumentValue : public InsetMathDim { +class MathMacroArgumentValue : public InsetMath { public: /// MathMacroArgumentValue(MathData const * value, docstring const & macroName) diff --git a/src/mathed/MathMacroArgument.h b/src/mathed/MathMacroArgument.h index 8a8ef5ea6a..bee2ccc7c8 100644 --- a/src/mathed/MathMacroArgument.h +++ b/src/mathed/MathMacroArgument.h @@ -13,14 +13,14 @@ #ifndef MATHMACROARGUMENT_H #define MATHMACROARGUMENT_H -#include "InsetMathDim.h" +#include "InsetMath.h" namespace lyx { /// A macro argument. -class MathMacroArgument : public InsetMathDim { +class MathMacroArgument : public InsetMath { public: /// explicit MathMacroArgument(std::size_t); -- 2.39.2