re-enable --with-included-string

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7223 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2003-06-30 15:06:30 +00:00
parent 5552f4045f
commit fa78e1ddb6
10 changed files with 70 additions and 26 deletions

View File

@ -1,3 +1,11 @@
2003-06-30 André Pönitz <poenitz@gmx.net>
* Chktex.C:
* funcrequest.C:
* lyxtext.h:
* text.C: re-enable --with-included-string
2003-06-28 Lars Gullik Bjønnes <larsbj@gullik.net>
* textcursor.C: add <config.h>

View File

@ -32,9 +32,6 @@
using std::ifstream;
using std::getline;
/*
* CLASS Chktex
*/
Chktex::Chktex(string const & chktex, string const & f, string const & p)
: cmd(chktex), file(f), path(p)
@ -48,7 +45,7 @@ int Chktex::run(TeXErrors &terr)
string log = OnlyFilename(ChangeExtension(file, ".log"));
string tmp = cmd + " -q -v0 -b0 -x " + file + " -o " + log;
Systemcall one;
int result= one.startscript(Systemcall::Wait, tmp);
int result = one.startscript(Systemcall::Wait, tmp);
if (result == 0) {
result = scanLogFile(terr);
} else {
@ -66,7 +63,7 @@ int Chktex::scanLogFile(TeXErrors & terr)
string const tmp = OnlyFilename(ChangeExtension(file, ".log"));
#if USE_BOOST_FORMAT
boost::format msg(_("ChkTeX warning id # %1$d"));
boost::format msg(STRCONV(_("ChkTeX warning id # %1$d")));
#else
string const msg(_("ChkTeX warning id # "));
#endif
@ -87,7 +84,7 @@ int Chktex::scanLogFile(TeXErrors & terr)
#if USE_BOOST_FORMAT
msg % warno;
terr.insertError(lineno, msg.str(), warning);
terr.insertError(lineno, STRCONV(msg.str()), warning);
msg.clear();
#else
terr.insertError(lineno, msg + warno, warning);

View File

@ -71,7 +71,7 @@ void getTexFileList(string const & filename, std::vector<string> & list)
std::vector<string>::iterator it = list.begin();
std::vector<string>::iterator end = list.end();
for (; it != end; ++it) {
*it = regex.Merge(*it, "/");
*it = STRCONV(regex.Merge(it->c_str(), "/"));
}
lyx::eliminate_duplicates(list);
@ -84,14 +84,14 @@ string const getListOfOptions(string const & classname, string const & type)
string optionList = string();
std::ifstream is(filename.c_str());
while (is) {
string s;
is >> s;
if (contains(s,"DeclareOption")) {
s = s.substr(s.find("DeclareOption"));
s = split(s,'{'); // cut front
s = token(s,'}',0); // cut end
optionList += (s + '\n');
}
string s;
is >> s;
if (contains(s,"DeclareOption")) {
s = s.substr(s.find("DeclareOption"));
s = split(s,'{'); // cut front
s = token(s,'}',0); // cut end
optionList += (s + '\n');
}
}
return optionList;
}

View File

@ -107,7 +107,7 @@ void FuncRequest::errorMessage(string const & msg) const
void split(vector<string> & args, string str)
{
istringstream is(str);
istringstream is(STRCONV(str));
while (is) {
char c;
string s;

View File

@ -1,3 +1,10 @@
2003-06-30 André Pönitz <poenitz@gmx.net>
* insetcite.C (localDispatch): fix case of missing return value
* insetcite.C (ascii): remove unneeded temporary
2003-06-28 Lars Gullik Bjønnes <larsbj@gullik.net>
* insetspace.h: fix \file

View File

@ -279,8 +279,7 @@ public:
void clearSelection();
/// select the word we need depending on word_location
void getWord(LyXCursor & from, LyXCursor & to,
word_location loc);
void getWord(LyXCursor & from, LyXCursor & to, word_location const);
/// just selects the word the cursor is in
void selectWord(word_location loc);
/// returns the inset at cursor (if it exists), 0 otherwise

View File

@ -1,3 +1,9 @@
2003-06-30 André Pönitz <poenitz@gmx.net>
* filetools.C:
* lstrings.C: re-enable --with-included-string
2003-06-28 Lars Gullik Bjønnes <larsbj@gullik.net>
* filetools.h: fix some \param issue

View File

@ -692,7 +692,7 @@ string const NormalizePath(string const & path)
// Normalise paths like /foo//bar ==> /foo/bar
boost::RegEx regex("/{2,}");
RTemp = regex.Merge(RTemp, "/");
RTemp = STRCONV(regex.Merge(STRCONV(RTemp), "/"));
while (!RTemp.empty()) {
// Split by next /

View File

@ -613,29 +613,39 @@ string const getStringFromVector(vector<string> const & vec,
string bformat(string const & fmt, string const & arg1)
{
return STRCONV((boost::format(fmt) % STRCONV(arg1)).str());
return STRCONV((boost::format(STRCONV(fmt)) % STRCONV(arg1)).str());
}
string bformat(string const & fmt, string const & arg1, string const & arg2)
{
return STRCONV((boost::format(fmt) % STRCONV(arg1) % STRCONV(arg2)).str());
return STRCONV((boost::format(STRCONV(fmt)) % STRCONV(arg1)
% STRCONV(arg2)).str());
}
string bformat(string const & fmt, string const & arg1, string const & arg2,
string const & arg3)
{
return STRCONV((boost::format(fmt) % STRCONV(arg1) % STRCONV(arg2)
% STRCONV(arg3)).str());
return STRCONV((boost::format(STRCONV(fmt)) % STRCONV(arg1)
% STRCONV(arg2) % STRCONV(arg3)).str());
}
string bformat(string const & fmt, string const & arg1, string const & arg2,
string const & arg3, string const & arg4)
{
return STRCONV((boost::format(fmt) % STRCONV(arg1) % STRCONV(arg2)
% STRCONV(arg3) % STRCONV(arg4)).str());
return STRCONV((boost::format(STRCONV(fmt)) % STRCONV(arg1)
% STRCONV(arg2) % STRCONV(arg3) % STRCONV(arg4)).str());
}
string bformat(string const & fmt, string const & arg1, string const & arg2,
string const & arg3, string const & arg4, string const & arg5)
{
return STRCONV((boost::format(STRCONV(fmt)) % STRCONV(arg1)
% STRCONV(arg2) % STRCONV(arg3) % STRCONV(arg4)
% STRCONV(arg5)).str());
}
#else
@ -685,4 +695,21 @@ string bformat(string const & fmt, string const & arg1, string const & arg2,
return subst(str, "%%", "%");
}
string bformat(string const & fmt, string const & arg1, string const & arg2,
string const & arg3, string const & arg4, string const & arg5)
{
lyx::Assert(contains(fmt, "%1$s"));
lyx::Assert(contains(fmt, "%2$s"));
lyx::Assert(contains(fmt, "%3$s"));
lyx::Assert(contains(fmt, "%4$s"));
lyx::Assert(contains(fmt, "%5$s"));
string str = subst(fmt, "%1$s", arg1);
str = subst(str, "%2$s", arg2);
str = subst(str, "%3$s", arg3);
str = subst(str, "%4$s", arg4);
str = subst(str, "%5$s", arg5);
return subst(str, "%%", "%");
}
#endif

View File

@ -2046,7 +2046,7 @@ void LyXText::cursorLeftOneWord(LyXCursor & cur)
// Select current word. This depends on behaviour of
// CursorLeftOneWord(), so it is patched as well.
void LyXText::getWord(LyXCursor & from, LyXCursor & to,
word_location loc)
word_location const loc)
{
// first put the cursor where we wana start to select the word
from = cursor;