#include <sstream>
+
+namespace lyx {
+
using std::string;
using std::auto_ptr;
using std::istringstream;
void InsetBranch::init()
{
- setInsetName("Branch");
+ setInsetName(from_utf8("Branch"));
setButtonLabel();
}
}
-string const InsetBranch::editMessage() const
+docstring const InsetBranch::editMessage() const
{
- // FIXME UNICODE
- return lyx::to_utf8(_("Opened Branch Inset"));
+ return _("Opened Branch Inset");
}
font.decSize();
font.decSize();
- // FIXME UNICODE
- string s = lyx::to_utf8(_("Branch: ")) + params_.branch;
+ docstring s = _("Branch: ") + params_.branch;
font.setColor(LColor::foreground);
if (!params_.branch.empty()) {
- LColor_color c = lcolor.getFromLyXName(params_.branch);
+ // FIXME UNICODE
+ LColor_color c = lcolor.getFromLyXName(to_utf8(params_.branch));
if (c == LColor::none) {
c = LColor::error;
- // FIXME UNICODE
- s = lyx::to_utf8(_("Undef: ")) + s;
+ s = _("Undef: ") + s;
}
setBackgroundColor(c);
} else
switch (cmd.action) {
case LFUN_INSET_MODIFY: {
InsetBranchParams params;
- InsetBranchMailer::string2params(lyx::to_utf8(cmd.argument()), params);
+ InsetBranchMailer::string2params(to_utf8(cmd.argument()), params);
params_.branch = params.branch;
setButtonLabel();
break;
}
-int InsetBranch::latex(Buffer const & buf, ostream & os,
+int InsetBranch::latex(Buffer const & buf, odocstream & os,
OutputParams const & runparams) const
{
return isBranchSelected(buf) ?
}
-int InsetBranch::docbook(Buffer const & buf, std::ostream & os,
+int InsetBranch::docbook(Buffer const & buf, odocstream & os,
OutputParams const & runparams) const
{
return isBranchSelected(buf) ?
}
-int InsetBranch::plaintext(Buffer const & buf, std::ostream & os,
+int InsetBranch::plaintext(Buffer const & buf, odocstream & os,
OutputParams const & runparams) const
{
return isBranchSelected(buf) ?
void InsetBranchParams::write(ostream & os) const
{
- os << "Branch " << branch << '\n';
+ os << "Branch " << to_utf8(branch) << '\n';
}
{
lex >> branch;
}
+
+} // namespace lyx