From 4a22588963638866c0cecc35a6e68c73071031e8 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Wed, 30 Apr 2008 21:04:49 +0000 Subject: [PATCH] Corrections, thanks to Bernhard. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24570 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetBibtex.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/insets/InsetBibtex.cpp b/src/insets/InsetBibtex.cpp index 3ebee05101..82c85a16ce 100644 --- a/src/insets/InsetBibtex.cpp +++ b/src/insets/InsetBibtex.cpp @@ -694,13 +694,13 @@ void InsetBibtex::fillWithBibKeys(BiblioInfo & keylist, docstring entryType; - if (!ifs) { - lyxerr << "InsetBibtex::fillWithBibKeys: Unexpected end of file." << std::endl; + if (!readTypeOrKey(entryType, ifs, from_ascii("{("), docstring(), makeLowerCase)) { + lyxerr << "InsetBibtex::fillWithBibKeys: Error reading entry type." << std::endl; continue; } - if (!readTypeOrKey(entryType, ifs, from_ascii("{("), docstring(), makeLowerCase)) { - lyxerr << "InsetBibtex::fillWithBibKeys: Error reading entry type." << std::endl; + if (!ifs) { + lyxerr << "InsetBibtex::fillWithBibKeys: Unexpected end of file." << std::endl; continue; } @@ -729,13 +729,13 @@ void InsetBibtex::fillWithBibKeys(BiblioInfo & keylist, docstring name; docstring value; - if (!ifs) { - lyxerr << "InsetBibtex::fillWithBibKeys: Unexpected end of file." << std::endl; + if (!readTypeOrKey(name, ifs, from_ascii("="), from_ascii("#{}(),"), makeLowerCase)) { + lyxerr << "InsetBibtex::fillWithBibKeys: Error reading string name." << std::endl; continue; } - if (!readTypeOrKey(name, ifs, from_ascii("="), from_ascii("#{}(),"), makeLowerCase)) { - lyxerr << "InsetBibtex::fillWithBibKeys: Error reading string name." << std::endl; + if (!ifs) { + lyxerr << "InsetBibtex::fillWithBibKeys: Unexpected end of file." << std::endl; continue; } @@ -771,17 +771,17 @@ void InsetBibtex::fillWithBibKeys(BiblioInfo & keylist, // Citation entry. Try to read the key. docstring key; - if (!ifs) { - lyxerr << "InsetBibtex::fillWithBibKeys: Unexpected end of file." << std::endl; - continue; - } - if (!readTypeOrKey(key, ifs, from_ascii(","), from_ascii("}"), keepCase)) { lyxerr << "InsetBibtex::fillWithBibKeys: Unable to read key for entry type:" << entryType << "." << std::endl; continue; } + if (!ifs) { + lyxerr << "InsetBibtex::fillWithBibKeys: Unexpected end of file." << std::endl; + continue; + } + ///////////////////////////////////////////// // now we have a key, so we will add an entry // (even if it's empty, as bibtex does) -- 2.39.5