]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetoptarg.C
changelogs
[lyx.git] / src / insets / insetoptarg.C
index 2e47c6b6a4f9641a6ca16c6fecd40deffd43e7b8..6b889fd726c74141f2e78636ec03fbf3a8b6471c 100644 (file)
@@ -45,7 +45,7 @@ InsetOptArg::InsetOptArg(InsetOptArg const & in)
 }
 
 
-auto_ptr<InsetBase> InsetOptArg::clone() const
+auto_ptr<InsetBase> InsetOptArg::doClone() const
 {
        return auto_ptr<InsetBase>(new InsetOptArg(*this));
 }
@@ -75,10 +75,10 @@ int InsetOptArg::latexOptional(Buffer const & buf, ostream & os,
                               OutputParams const & runparams) const
 {
        ostringstream ss;
-       InsetText::latex(buf, ss, runparams);
+       int ret = InsetText::latex(buf, ss, runparams);
        string str = ss.str();
-       if (str.find(']') != string::npos) 
+       if (str.find(']') != string::npos)
                str = '{' + str + '}';
        os << '[' << str << ']';
-       return str.length() + 2;
+       return ret;
 }