mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
don't pass temporary string objects as parameters
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15928 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
010145b8ed
commit
646c312740
12
Status.15x
12
Status.15x
@ -45,12 +45,6 @@ SPELL CHECKING (Joost 4/11/06)
|
||||
|
||||
BIBLIOGRAPHY
|
||||
|
||||
* crash on Windows/Mac
|
||||
1. new document
|
||||
2. insert List/TOC->Bibtex Bilio
|
||||
3. add a bibliography
|
||||
4. View Source ->crash
|
||||
|
||||
|
||||
TABLE OF CONTENTS
|
||||
|
||||
@ -369,3 +363,9 @@ CREDITS:
|
||||
* Cursor is still not visible on MAC Bennett (3/11/06).
|
||||
FIXED (Abdel 2006-11-13)
|
||||
|
||||
* crash on Windows/Mac
|
||||
1. new document
|
||||
2. insert List/TOC->Bibtex Bilio
|
||||
3. add a bibliography
|
||||
4. View Source ->crash
|
||||
FIXED (Peter 2006-11-14)
|
@ -151,19 +151,21 @@ int InsetBibtex::latex(Buffer const & buffer, odocstream & os,
|
||||
// use such filenames.)
|
||||
// Otherwise, store the (maybe absolute) path to the original,
|
||||
// unmangled database name.
|
||||
typedef boost::char_separator<char> Separator;
|
||||
typedef boost::tokenizer<Separator> Tokenizer;
|
||||
typedef boost::char_separator<char_type> Separator;
|
||||
typedef boost::tokenizer<Separator, docstring::const_iterator, docstring> Tokenizer;
|
||||
|
||||
Separator const separator(",");
|
||||
Tokenizer const tokens(to_utf8(getParam("bibfiles")), separator);
|
||||
Separator const separator(from_ascii(",").c_str());
|
||||
Tokenizer const tokens(getParam("bibfiles"), separator);
|
||||
Tokenizer::const_iterator const begin = tokens.begin();
|
||||
Tokenizer::const_iterator const end = tokens.end();
|
||||
|
||||
std::ostringstream dbs;
|
||||
odocstringstream dbs;
|
||||
for (Tokenizer::const_iterator it = begin; it != end; ++it) {
|
||||
string const input = trim(*it);
|
||||
docstring const input = trim(*it);
|
||||
// FIXME UNICODE
|
||||
string utf8input(to_utf8(input));
|
||||
string database =
|
||||
normalize_name(buffer, runparams, input, ".bib");
|
||||
normalize_name(buffer, runparams, utf8input, ".bib");
|
||||
string const in_file = database + ".bib";
|
||||
|
||||
if (!runparams.inComment && !runparams.dryrun && !runparams.nice &&
|
||||
@ -184,10 +186,10 @@ int InsetBibtex::latex(Buffer const & buffer, odocstream & os,
|
||||
|
||||
if (it != begin)
|
||||
dbs << ',';
|
||||
dbs << latex_path(database);
|
||||
// FIXME UNICODE
|
||||
dbs << from_utf8(latex_path(database));
|
||||
}
|
||||
// FIXME UNICODE
|
||||
docstring const db_out = from_utf8(dbs.str());
|
||||
docstring const db_out = dbs.str();
|
||||
|
||||
// Post this warning only once.
|
||||
static bool warned_about_spaces = false;
|
||||
|
Loading…
Reference in New Issue
Block a user