make it compile again

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14973 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2006-09-11 10:07:39 +00:00
parent a6444784dc
commit fc83b49fd4
5 changed files with 18 additions and 17 deletions

View File

@ -25,6 +25,7 @@
#include <algorithm> #include <algorithm>
using lyx::docstring;
using lyx::support::bformat; using lyx::support::bformat;
using std::pair; using std::pair;

View File

@ -863,9 +863,9 @@ void QPrefsDialog::remove_format()
return; return;
string const current_text = form_->formats().get(nr).name(); string const current_text = form_->formats().get(nr).name();
if (form_->converters().formatIsUsed(current_text)) { if (form_->converters().formatIsUsed(current_text)) {
Alert::error(lyx::to_utf8(_("Format in use")), Alert::error(_("Format in use"),
lyx::to_utf8(_("Cannot remove a Format used by a Converter. " _("Cannot remove a Format used by a Converter. "
"Remove the converter first."))); "Remove the converter first."));
return; return;
} }
form_->formats().erase(current_text); form_->formats().erase(current_text);

View File

@ -154,28 +154,28 @@ docstring const qstring_to_ucs4(QString const & str)
} }
string const formatted(string const & text, int w) docstring const formatted(docstring const & text, int w)
{ {
string sout; docstring sout;
if (text.empty()) if (text.empty())
return sout; return sout;
string::size_type curpos = 0; docstring::size_type curpos = 0;
string line; docstring line;
for (;;) { for (;;) {
string::size_type const nxtpos1 = text.find(' ', curpos); docstring::size_type const nxtpos1 = text.find(' ', curpos);
string::size_type const nxtpos2 = text.find('\n', curpos); docstring::size_type const nxtpos2 = text.find('\n', curpos);
string::size_type const nxtpos = std::min(nxtpos1, nxtpos2); docstring::size_type const nxtpos = std::min(nxtpos1, nxtpos2);
string const word = nxtpos == string::npos ? docstring const word = nxtpos == docstring::npos ?
text.substr(curpos) : text.substr(curpos, nxtpos-curpos); text.substr(curpos) : text.substr(curpos, nxtpos-curpos);
bool const newline = (nxtpos2 != string::npos && bool const newline = (nxtpos2 != docstring::npos &&
nxtpos2 < nxtpos1); nxtpos2 < nxtpos1);
string const line_plus_word = docstring const line_plus_word =
line.empty() ? word : line + ' ' + word; line.empty() ? word : line + ' ' + word;
// FIXME: make w be size_t // FIXME: make w be size_t

View File

@ -36,7 +36,7 @@ void lengthToWidgets(QLineEdit * input, LengthCombo * combo,
std::string const & len, LyXLength::UNIT default_unit); std::string const & len, LyXLength::UNIT default_unit);
/// format a string to the given width /// format a string to the given width
std::string const formatted(std::string const & text, int w = 80); lyx::docstring const formatted(lyx::docstring const & text, int w = 80);
/** /**
* toqstr - convert char * into unicode * toqstr - convert char * into unicode

View File

@ -138,9 +138,9 @@ QValidator::State PathValidator::validate(QString & qtext, int &) const
static int counter = 0; static int counter = 0;
if (counter == 0) { if (counter == 0) {
Alert::error(lyx::to_utf8(_("Invalid filename")), Alert::error(_("Invalid filename"),
lyx::to_utf8(_("LyX does not provide LateX support for file names containing any of these characters:\n")) + _("LyX does not provide LateX support for file names containing any of these characters:\n") +
printable_list(invalid_chars)); lyx::from_utf8(printable_list(invalid_chars)));
} }
++counter; ++counter;
return QValidator::Intermediate; return QValidator::Intermediate;