#include <sstream>
-using lyx::docstring;
-using lyx::odocstream;
+
+namespace lyx {
using std::string;
using std::auto_ptr;
void InsetBranch::init()
{
- setInsetName("Branch");
+ setInsetName(from_utf8("Branch"));
setButtonLabel();
}
font.decSize();
font.decSize();
- // FIXME UNICODE
- docstring s = _("Branch: ") + lyx::from_utf8(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;
s = _("Undef: ") + s;
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;
}
+void InsetBranch::textString(Buffer const & buf, odocstream & os) const
+{
+ if (isBranchSelected(buf))
+ os << paragraphs().begin()->asString(buf, true);
+}
+
+
void InsetBranch::validate(LaTeXFeatures & features) const
{
InsetText::validate(features);
void InsetBranchParams::write(ostream & os) const
{
- os << "Branch " << branch << '\n';
+ os << "Branch " << to_utf8(branch) << '\n';
}
{
lex >> branch;
}
+
+} // namespace lyx