From: Richard Heck Date: Sat, 29 Mar 2008 14:49:13 +0000 (+0000) Subject: A couple cosmetic changes. Move the unicode problem where it belongs. X-Git-Tag: 1.6.10~5365 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=2ce335e013ef425016dfbdd0c13287b55669607d;p=features.git A couple cosmetic changes. Move the unicode problem where it belongs. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24036 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 4722016646..4830642631 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -1405,7 +1405,7 @@ void Buffer::updateBibfilesCache() const if (it->lyxCode() == BIBTEX_CODE) { InsetBibtex const & inset = static_cast(*it); - EmbeddedFileList const bibfiles = inset.embeddedFiles(); + EmbeddedFileList const bibfiles = inset.getBibFiles(); d->bibfilesCache_.insert(d->bibfilesCache_.end(), bibfiles.begin(), bibfiles.end()); diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 4c4cc6afe0..8f6e5e04b7 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -1248,7 +1248,7 @@ bool BufferView::dispatch(FuncRequest const & cmd) InsetBibtex * inset = getInsetByCode(tmpcur, BIBTEX_CODE); if (inset) { - if (inset->addDatabase(to_utf8(cmd.argument()))) + if (inset->addDatabase(cmd.argument())) buffer_.updateBibfilesCache(); } break; @@ -1260,7 +1260,7 @@ bool BufferView::dispatch(FuncRequest const & cmd) InsetBibtex * inset = getInsetByCode(tmpcur, BIBTEX_CODE); if (inset) { - if (inset->delDatabase(to_utf8(cmd.argument()))) + if (inset->delDatabase(cmd.argument())) buffer_.updateBibfilesCache(); } break; diff --git a/src/insets/InsetBibtex.cpp b/src/insets/InsetBibtex.cpp index 02fcde2875..4f6ae2b988 100644 --- a/src/insets/InsetBibtex.cpp +++ b/src/insets/InsetBibtex.cpp @@ -706,8 +706,9 @@ void InsetBibtex::fillWithBibKeys(BiblioInfo & keylist, -bool InsetBibtex::addDatabase(string const & db) +bool InsetBibtex::addDatabase(docstring const & database) { + string db = to_utf8(database); EmbeddedFile file(changeExtension(db, "bib"), buffer().filePath()); // only compare filename @@ -723,8 +724,9 @@ bool InsetBibtex::addDatabase(string const & db) } -bool InsetBibtex::delDatabase(string const & db) +bool InsetBibtex::delDatabase(docstring const & database) { + string db = to_utf8(database); EmbeddedFile file(changeExtension(db, "bib"), buffer().filePath()); // only compare filename diff --git a/src/insets/InsetBibtex.h b/src/insets/InsetBibtex.h index 3d841e9f5f..3711c39098 100644 --- a/src/insets/InsetBibtex.h +++ b/src/insets/InsetBibtex.h @@ -44,9 +44,9 @@ public: /// EmbeddedFileList const & getBibFiles() const; /// - bool addDatabase(std::string const &); + bool addDatabase(docstring const &); /// - bool delDatabase(std::string const &); + bool delDatabase(docstring const &); /// void validate(LaTeXFeatures &) const; ///