mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 14:29:21 +00:00
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:
parent
a6444784dc
commit
fc83b49fd4
@ -25,6 +25,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
using lyx::docstring;
|
||||
using lyx::support::bformat;
|
||||
|
||||
using std::pair;
|
||||
|
@ -863,9 +863,9 @@ void QPrefsDialog::remove_format()
|
||||
return;
|
||||
string const current_text = form_->formats().get(nr).name();
|
||||
if (form_->converters().formatIsUsed(current_text)) {
|
||||
Alert::error(lyx::to_utf8(_("Format in use")),
|
||||
lyx::to_utf8(_("Cannot remove a Format used by a Converter. "
|
||||
"Remove the converter first.")));
|
||||
Alert::error(_("Format in use"),
|
||||
_("Cannot remove a Format used by a Converter. "
|
||||
"Remove the converter first."));
|
||||
return;
|
||||
}
|
||||
form_->formats().erase(current_text);
|
||||
|
@ -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())
|
||||
return sout;
|
||||
|
||||
string::size_type curpos = 0;
|
||||
string line;
|
||||
docstring::size_type curpos = 0;
|
||||
docstring line;
|
||||
|
||||
for (;;) {
|
||||
string::size_type const nxtpos1 = text.find(' ', curpos);
|
||||
string::size_type const nxtpos2 = text.find('\n', curpos);
|
||||
string::size_type const nxtpos = std::min(nxtpos1, nxtpos2);
|
||||
docstring::size_type const nxtpos1 = text.find(' ', curpos);
|
||||
docstring::size_type const nxtpos2 = text.find('\n', curpos);
|
||||
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);
|
||||
|
||||
bool const newline = (nxtpos2 != string::npos &&
|
||||
bool const newline = (nxtpos2 != docstring::npos &&
|
||||
nxtpos2 < nxtpos1);
|
||||
|
||||
string const line_plus_word =
|
||||
docstring const line_plus_word =
|
||||
line.empty() ? word : line + ' ' + word;
|
||||
|
||||
// FIXME: make w be size_t
|
||||
|
@ -36,7 +36,7 @@ void lengthToWidgets(QLineEdit * input, LengthCombo * combo,
|
||||
std::string const & len, LyXLength::UNIT default_unit);
|
||||
|
||||
/// 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
|
||||
|
@ -138,9 +138,9 @@ QValidator::State PathValidator::validate(QString & qtext, int &) const
|
||||
|
||||
static int counter = 0;
|
||||
if (counter == 0) {
|
||||
Alert::error(lyx::to_utf8(_("Invalid filename")),
|
||||
lyx::to_utf8(_("LyX does not provide LateX support for file names containing any of these characters:\n")) +
|
||||
printable_list(invalid_chars));
|
||||
Alert::error(_("Invalid filename"),
|
||||
_("LyX does not provide LateX support for file names containing any of these characters:\n") +
|
||||
lyx::from_utf8(printable_list(invalid_chars)));
|
||||
}
|
||||
++counter;
|
||||
return QValidator::Intermediate;
|
||||
|
Loading…
Reference in New Issue
Block a user