#include "LaTeXFeatures.h"
#include "Buffer.h"
#include "Cursor.h"
-#include "debug.h"
+#include "support/debug.h"
#include "FuncRequest.h"
#include "FuncStatus.h"
-#include "gettext.h"
+#include "support/gettext.h"
#include "MathData.h"
#include "MathFactory.h"
#include "MathSupport.h"
#include "insets/InsetCommand.h"
+#include <ostream>
-namespace lyx {
-
-using std::string;
-using std::auto_ptr;
-using std::endl;
+using namespace std;
+namespace lyx {
InsetMathRef::InsetMathRef()
: CommandInset(from_ascii("ref"))
{}
-auto_ptr<InsetBase> InsetMathRef::doClone() const
+Inset * InsetMathRef::clone() const
{
- return auto_ptr<InsetBase>(new InsetMathRef(*this));
+ return new InsetMathRef(*this);
}
case LFUN_MOUSE_RELEASE:
if (cmd.button() == mouse_button::button3) {
- lyxerr << "trying to goto ref '" << to_utf8(asString(cell(0))) << "'" << endl;
+ LYXERR0("trying to goto ref '" << to_utf8(asString(cell(0))) << "'");
cur.bv().dispatch(FuncRequest(LFUN_LABEL_GOTO, asString(cell(0))));
break;
}
if (cmd.button() == mouse_button::button1) {
// Eventually trigger dialog with button 3, not 1
string const data = createDialogStr("ref");
- cur.bv().showInsetDialog("ref", data, this);
+ cur.bv().showDialog("ref", data, this);
break;
}
cur.undispatched();
int InsetMathRef::docbook(Buffer const & buf, odocstream & os,
- OutputParams const & runparams) const
+ OutputParams const & runparams) const
{
if (cell(1).empty()) {
os << "<xref linkend=\""
string const InsetMathRef::createDialogStr(string const & name) const
{
- InsetCommandParams icp(to_ascii(commandname()));
+ InsetCommandParams icp(REF_CODE, to_ascii(commandname()));
icp["reference"] = asString(cell(0));
if (!cell(1).empty())
icp["name"] = asString(cell(1));
InsetMathRef::ref_type_info InsetMathRef::types[] = {
- { from_ascii("ref"), from_ascii(N_("Standard")), from_ascii(N_("Ref: "))},
+ { from_ascii("ref"), from_ascii(N_("Standard[[mathref]]")), 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: "))},
{ from_ascii("vpageref"), from_ascii(N_("Textual Page Number")), from_ascii(N_("TextPage: "))},