#include "support/lstrings.h"
-using lyx::docstring;
-using lyx::odocstream;
-using lyx::support::escape;
+namespace lyx {
+
+using support::escape;
using std::string;
using std::ostream;
int InsetRef::latex(Buffer const &, odocstream & os,
- OutputParams const &) const
+ OutputParams const &) const
{
// Don't output p_["name"], this is only used in docbook
InsetCommandParams p(getCmdName());
int InsetRef::plaintext(Buffer const &, odocstream & os,
- OutputParams const &) const
+ OutputParams const &) const
{
- os << '[' << getParam("reference") << ']';
- return 0;
+ docstring const str = getParam("reference");
+ os << '[' << str << ']';
+ return 2 + str.size();
}
int InsetRef::docbook(Buffer const & buf, odocstream & os,
- OutputParams const & runparams) const
+ OutputParams const & runparams) const
{
docstring const & name = getParam("name");
if (name.empty()) {
if (runparams.flavor == OutputParams::XML) {
os << "<xref linkend=\""
- << lyx::from_ascii(sgml::cleanID(buf, runparams, lyx::to_ascii(getParam("reference"))))
+ << sgml::cleanID(buf, runparams, getParam("reference"))
<< "\" />";
} else {
os << "<xref linkend=\""
- << lyx::from_ascii(sgml::cleanID(buf, runparams, lyx::to_ascii(getParam("reference"))))
+ << sgml::cleanID(buf, runparams, getParam("reference"))
<< "\">";
}
} else {
os << "<link linkend=\""
- << lyx::from_ascii(sgml::cleanID(buf, runparams, lyx::to_ascii(getParam("reference"))))
+ << sgml::cleanID(buf, runparams, getParam("reference"))
<< "\">"
<< getParam("name")
<< "</link>";
{ "pageref", N_("Page Number"), N_("Page: ")},
{ "vpageref", N_("Textual Page Number"), N_("TextPage: ")},
{ "vref", N_("Standard+Textual Page"), N_("Ref+Text: ")},
- { "prettyref", N_("PrettyRef"), N_("PrettyRef: ")},
+ { "prettyref", N_("PrettyRef"), N_("FormatRef: ")},
{ "", "", "" }
};
{
return types[type].latex_name;
}
+
+
+} // namespace lyx