X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathRef.cpp;h=501e67b979c6553de8fbd8317cf132494c0764a8;hb=fc6ce7cd08562fd7bab4427880b46390bb7d2f07;hp=0817fc642c1b1cd8db484681f48eb07a491a7bab;hpb=f497296c30e6da2f97b16da8ad1c9e96feffb16b;p=lyx.git diff --git a/src/mathed/InsetMathRef.cpp b/src/mathed/InsetMathRef.cpp index 0817fc642c..501e67b979 100644 --- a/src/mathed/InsetMathRef.cpp +++ b/src/mathed/InsetMathRef.cpp @@ -14,16 +14,16 @@ #include "BufferView.h" #include "LaTeXFeatures.h" -#include "buffer.h" -#include "cursor.h" +#include "Buffer.h" +#include "Cursor.h" #include "debug.h" -#include "funcrequest.h" +#include "FuncRequest.h" #include "FuncStatus.h" #include "gettext.h" #include "MathData.h" #include "MathFactory.h" #include "MathSupport.h" -#include "outputparams.h" +#include "OutputParams.h" #include "sgml.h" #include "insets/InsetCommand.h" @@ -36,34 +36,34 @@ 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 RefInset::doClone() const +auto_ptr InsetMathRef::doClone() const { - return auto_ptr(new RefInset(*this)); + return auto_ptr(new InsetMathRef(*this)); } -void RefInset::infoize(odocstream & os) const +void InsetMathRef::infoize(odocstream & os) const { os << "Ref: " << cell(0); } -void RefInset::doDispatch(LCursor & cur, FuncRequest & cmd) +void InsetMathRef::doDispatch(Cursor & cur, FuncRequest & cmd) { switch (cmd.action) { case LFUN_INSET_MODIFY: if (cmd.getArg(0) == "ref") { - MathArray ar; + MathData ar; if (createInsetMath_fromDialogStr(cmd.argument(), ar)) { *this = *ar[0].nucleus()->asRefInset(); break; @@ -105,7 +105,7 @@ void RefInset::doDispatch(LCursor & cur, FuncRequest & cmd) } -bool RefInset::getStatus(LCursor & 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(LCursor & 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: "))},