saving again some utf8 conversions
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16365
a592a061-630c-0410-9148-
cb99ea01b6c8
-string const LColor::getGUIName(LColor::color c) const
+docstring const LColor::getGUIName(LColor::color c) const
{
Pimpl::InfoTab::const_iterator it = pimpl_->infotab.find(c);
if (it != pimpl_->infotab.end())
{
Pimpl::InfoTab::const_iterator it = pimpl_->infotab.find(c);
if (it != pimpl_->infotab.end())
- return to_utf8(_(it->second.guiname));
- return "none";
+ return _(it->second.guiname);
+ return from_ascii("none");
#ifndef LCOLOR_H
#define LCOLOR_H
#ifndef LCOLOR_H
#define LCOLOR_H
+#include "support/docstring.h"
+
#include <boost/scoped_ptr.hpp>
#include <boost/scoped_ptr.hpp>
bool setColor(std::string const & lyxname, std::string const & x11name);
/// Get the GUI name of \c color.
bool setColor(std::string const & lyxname, std::string const & x11name);
/// Get the GUI name of \c color.
- std::string const getGUIName(LColor::color c) const;
+ docstring const getGUIName(LColor::color c) const;
/// Get the X11 name of \c color.
std::string const getX11Name(LColor::color c) const;
/// Get the X11 name of \c color.
std::string const getX11Name(LColor::color c) const;
}
if (lyxerr.debugging(Debug::FONT)) {
}
if (lyxerr.debugging(Debug::FONT)) {
- lyxerr[Debug::FONT] << "Font '" << f.stateText(0)
+ lyxerr[Debug::FONT] << "Font '" << to_utf8(f.stateText(0))
<< "' matched by\n" << fromqstr(font.family()) << endl;
}
<< "' matched by\n" << fromqstr(font.family()) << endl;
}
using std::endl;
using std::string;
using std::ostream;
using std::endl;
using std::string;
using std::ostream;
-using std::ostringstream;
#ifndef CXX_GLOBAL_CSTD
using std::strlen;
#ifndef CXX_GLOBAL_CSTD
using std::strlen;
-/// Build GUI description of font state
-string const LyXFont::stateText(BufferParams * params) const
+docstring const LyXFont::stateText(BufferParams * params) const
if (family() != INHERIT_FAMILY)
if (family() != INHERIT_FAMILY)
- os << to_utf8(_(GUIFamilyNames[family()])) << ", ";
+ os << _(GUIFamilyNames[family()]) << ", ";
if (series() != INHERIT_SERIES)
if (series() != INHERIT_SERIES)
- os << to_utf8(_(GUISeriesNames[series()])) << ", ";
+ os << _(GUISeriesNames[series()]) << ", ";
if (shape() != INHERIT_SHAPE)
if (shape() != INHERIT_SHAPE)
- os << to_utf8(_(GUIShapeNames[shape()])) << ", ";
+ os << _(GUIShapeNames[shape()]) << ", ";
if (size() != INHERIT_SIZE)
if (size() != INHERIT_SIZE)
- os << to_utf8(_(GUISizeNames[size()])) << ", ";
+ os << _(GUISizeNames[size()]) << ", ";
if (color() != LColor::inherit)
os << lcolor.getGUIName(color()) << ", ";
if (emph() != INHERIT)
if (color() != LColor::inherit)
os << lcolor.getGUIName(color()) << ", ";
if (emph() != INHERIT)
- os << to_utf8(bformat(_("Emphasis %1$s, "),
- _(GUIMiscNames[emph()])));
+ os << bformat(_("Emphasis %1$s, "),
+ _(GUIMiscNames[emph()]));
if (underbar() != INHERIT)
if (underbar() != INHERIT)
- os << to_utf8(bformat(_("Underline %1$s, "),
- _(GUIMiscNames[underbar()])));
+ os << bformat(_("Underline %1$s, "),
+ _(GUIMiscNames[underbar()]));
- os << to_utf8(bformat(_("Noun %1$s, "),
- _(GUIMiscNames[noun()])));
+ os << bformat(_("Noun %1$s, "),
+ _(GUIMiscNames[noun()]));
- os << to_utf8(_("Default")) << ", ";
+ os << _("Default") << ", ";
if (!params || (language() != params->language))
if (!params || (language() != params->language))
- os << to_utf8(bformat(_("Language: %1$s, "),
- _(language()->display())));
+ os << bformat(_("Language: %1$s, "),
+ _(language()->display()));
- os << to_utf8(bformat(_(" Number %1$s"),
- _(GUIMiscNames[number()])));
+ os << bformat(_(" Number %1$s"),
+ _(GUIMiscNames[number()]));
return rtrim(os.str(), ", ");
}
return rtrim(os.str(), ", ");
}
LyXFont const & next) const;
/// Build GUI description of font state
LyXFont const & next) const;
/// Build GUI description of font state
- std::string const stateText(BufferParams * params) const;
+ docstring const stateText(BufferParams * params) const;
///
LColor_color realColor() const;
///
LColor_color realColor() const;
<< endl;
features.require("noun");
lyxerr[Debug::LATEX] << "Noun enabled. Font: "
<< endl;
features.require("noun");
lyxerr[Debug::LATEX] << "Noun enabled. Font: "
- << fcit->font().stateText(0)
+ << to_utf8(fcit->font().stateText(0))
<< endl;
}
switch (fcit->font().color()) {
<< endl;
}
switch (fcit->font().color()) {
default:
features.require("color");
lyxerr[Debug::LATEX] << "Color enabled. Font: "
default:
features.require("color");
lyxerr[Debug::LATEX] << "Color enabled. Font: "
- << fcit->font().stateText(0)
+ << to_utf8(fcit->font().stateText(0))
LyXFont font = real_current_font;
font.reduce(buf.params().getFont());
LyXFont font = real_current_font;
font.reduce(buf.params().getFont());
- // FIXME UNICODE
- os << bformat(_("Font: %1$s"), from_utf8(font.stateText(&buf.params())));
+ os << bformat(_("Font: %1$s"), font.stateText(&buf.params()));
// The paragraph depth
int depth = cur.paragraph().getDepth();
// The paragraph depth
int depth = cur.paragraph().getDepth();