]> git.lyx.org Git - features.git/commitdiff
Rename class RefInset to InsetMathRef
authorBo Peng <bpeng@lyx.org>
Sat, 28 Apr 2007 20:49:56 +0000 (20:49 +0000)
committerBo Peng <bpeng@lyx.org>
Sat, 28 Apr 2007 20:49:56 +0000 (20:49 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18077 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/InsetMath.h
src/mathed/InsetMathNest.cpp
src/mathed/InsetMathRef.cpp
src/mathed/InsetMathRef.h
src/mathed/MathFactory.cpp
src/mathed/MathParser.cpp

index aeaebb9d9a812d2c3227902d91405acbdbafc707..8bc070ee32af9061254d9c37fc1610a3d4d4352d 100644 (file)
@@ -70,7 +70,7 @@ class InsetMathSpace;
 class InsetMathSymbol;
 class InsetMathUnknown;
 
-class RefInset;
+class InsetMathRef;
 
 class NormalStream;
 class OctaveStream;
@@ -142,7 +142,7 @@ public:
        virtual InsetMathSymbol const   * asSymbolInset() const   { return 0; }
        virtual InsetMathUnknown        * asUnknownInset()        { return 0; }
        virtual InsetMathUnknown const  * asUnknownInset() const  { return 0; }
-       virtual RefInset                * asRefInset()            { return 0; }
+       virtual InsetMathRef            * asRefInset()            { return 0; }
 
        /// identifies things that can get scripts
        virtual bool isScriptable() const { return false; }
index ddafc5c270e031c7111dea93debd7db25f015998..517c045c31160a837161fcb5a796f715349e451f 100644 (file)
@@ -967,7 +967,7 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
                docstring const & name = cmd.argument();
                string data;
                if (name == "ref") {
-                       RefInset tmp(name);
+                       InsetMathRef tmp(name);
                        data = tmp.createDialogStr(to_utf8(name));
                }
                cur.bv().showInsetDialog(to_utf8(name), data, 0);
index 9945694a68f1b8a55b16328bb725b3fdc68d6f83..a944341049555fc7104a065c4a4e40bf120032cb 100644 (file)
@@ -36,29 +36,29 @@ using std::auto_ptr;
 using std::endl;
 
 
-RefInset::RefInset()
+InsetMathRef::InsetMathRef()
        : CommandInset(from_ascii("ref"))
 {}
 
 
-RefInset::RefInset(docstring const & data)
+InsetMathRef::InsetMathRef(docstring const & data)
        : CommandInset(data)
 {}
 
 
-auto_ptr<InsetBase> RefInset::doClone() const
+auto_ptr<InsetBase> InsetMathRef::doClone() const
 {
-       return auto_ptr<InsetBase>(new RefInset(*this));
+       return auto_ptr<InsetBase>(new InsetMathRef(*this));
 }
 
 
-void RefInset::infoize(odocstream & os) const
+void InsetMathRef::infoize(odocstream & os) const
 {
        os << "Ref: " << cell(0);
 }
 
 
-void RefInset::doDispatch(Cursor & cur, FuncRequest & cmd)
+void InsetMathRef::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
        switch (cmd.action) {
        case LFUN_INSET_MODIFY:
@@ -105,7 +105,7 @@ void RefInset::doDispatch(Cursor & cur, FuncRequest & cmd)
 }
 
 
-bool RefInset::getStatus(Cursor & cur, FuncRequest const & cmd,
+bool InsetMathRef::getStatus(Cursor & cur, FuncRequest const & cmd,
                         FuncStatus & status) const
 {
        switch (cmd.action) {
@@ -123,7 +123,7 @@ bool RefInset::getStatus(Cursor & cur, FuncRequest const & cmd,
 }
 
 
-docstring const RefInset::screenLabel() const
+docstring const InsetMathRef::screenLabel() const
 {
        docstring str;
        for (int i = 0; !types[i].latex_name.empty(); ++i) {
@@ -142,7 +142,7 @@ docstring const RefInset::screenLabel() const
 }
 
 
-void RefInset::validate(LaTeXFeatures & features) const
+void InsetMathRef::validate(LaTeXFeatures & features) const
 {
        if (commandname() == "vref" || commandname() == "vpageref")
                features.require("varioref");
@@ -151,7 +151,7 @@ void RefInset::validate(LaTeXFeatures & features) const
 }
 
 
-int RefInset::docbook(Buffer const & buf, odocstream & os,
+int InsetMathRef::docbook(Buffer const & buf, odocstream & os,
                       OutputParams const & runparams) const
 {
        if (cell(1).empty()) {
@@ -173,7 +173,7 @@ int RefInset::docbook(Buffer const & buf, odocstream & os,
 }
 
 
-string const RefInset::createDialogStr(string const & name) const
+string const InsetMathRef::createDialogStr(string const & name) const
 {
        InsetCommandParams icp(to_ascii(commandname()));
        icp["reference"] = asString(cell(0));
@@ -183,7 +183,7 @@ string const RefInset::createDialogStr(string const & name) const
 }
 
 
-RefInset::ref_type_info RefInset::types[] = {
+InsetMathRef::ref_type_info InsetMathRef::types[] = {
        { from_ascii("ref"),       from_ascii(N_("Standard")),              from_ascii(N_("Ref: "))},
        { from_ascii("eqref"),     from_ascii(N_("Equation")),              from_ascii(N_("EqRef: "))},
        { from_ascii("pageref"),   from_ascii(N_("Page Number")),           from_ascii(N_("Page: "))},
index a0904e3541acb4c9b667cbbe7a03a1020f61da38..fb208d9b969494137d63d707b43610b9815e2260 100644 (file)
@@ -20,12 +20,12 @@ namespace lyx {
 class Buffer;
 
 // for \ref
-class RefInset : public CommandInset {
+class InsetMathRef : public CommandInset {
 public:
        ///
-       RefInset();
+       InsetMathRef();
        ///
-       explicit RefInset(docstring const & data);
+       explicit InsetMathRef(docstring const & data);
        ///
        //void write(WriteStream & os) const;
        ///
@@ -35,7 +35,7 @@ public:
        ///
        void validate(LaTeXFeatures & features) const;
        ///
-       virtual RefInset * asRefInset() { return this; }
+       virtual InsetMathRef * asRefInset() { return this; }
 
        /// docbook output
        int docbook(Buffer const & buf, odocstream & os, OutputParams const &) const;
index 70244a7006e990060c25e43ee969418ed454b469..a034542f29e7ebe06e7958de2edb4e883970e98b 100644 (file)
@@ -265,7 +265,7 @@ MathAtom createInsetMath(docstring const & s)
                docstring const & inset = l->inset;
                //lyxerr << " found inset: '" << inset << '\'' << endl;
                if (inset == "ref")
-                       return MathAtom(new RefInset(l->name));
+                       return MathAtom(new InsetMathRef(l->name));
                if (inset == "overset")
                        return MathAtom(new InsetMathOverset);
                if (inset == "underset")
index 04c69536e7be924b9776c73bdfdfea08d1982ce7..3ce4770b59fd67feeb9dfd32911ee4ab1d6aa26f 100644 (file)
@@ -1106,7 +1106,7 @@ void Parser::parse1(InsetMathGrid & grid, unsigned flags,
 
                else if (t.cs() == "ref" || t.cs() == "prettyref" ||
                                t.cs() == "pageref" || t.cs() == "vpageref" || t.cs() == "vref") {
-                       cell->push_back(MathAtom(new RefInset(t.cs())));
+                       cell->push_back(MathAtom(new InsetMathRef(t.cs())));
                        parse(cell->back().nucleus()->cell(1), FLAG_OPTION, mode);
                        parse(cell->back().nucleus()->cell(0), FLAG_ITEM, mode);
                }