]> git.lyx.org Git - features.git/commitdiff
A couple cosmetic changes. Move the unicode problem where it belongs.
authorRichard Heck <rgheck@comcast.net>
Sat, 29 Mar 2008 14:49:13 +0000 (14:49 +0000)
committerRichard Heck <rgheck@comcast.net>
Sat, 29 Mar 2008 14:49:13 +0000 (14:49 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24036 a592a061-630c-0410-9148-cb99ea01b6c8

src/Buffer.cpp
src/BufferView.cpp
src/insets/InsetBibtex.cpp
src/insets/InsetBibtex.h

index 47220166462c9a25729867baa947dfcb1e509089..4830642631585e7214f4a033678c61d6fedd31ce 100644 (file)
@@ -1405,7 +1405,7 @@ void Buffer::updateBibfilesCache() const
                if (it->lyxCode() == BIBTEX_CODE) {
                        InsetBibtex const & inset =
                                static_cast<InsetBibtex const &>(*it);
-                       EmbeddedFileList const bibfiles = inset.embeddedFiles();
+                       EmbeddedFileList const bibfiles = inset.getBibFiles();
                        d->bibfilesCache_.insert(d->bibfilesCache_.end(),
                                bibfiles.begin(),
                                bibfiles.end());
index 4c4cc6afe0e3531127d0110fedf1ca2d6ea74e67..8f6e5e04b79c0b4fed00969505a54c56d0c25804 100644 (file)
@@ -1248,7 +1248,7 @@ bool BufferView::dispatch(FuncRequest const & cmd)
                InsetBibtex * inset = getInsetByCode<InsetBibtex>(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<InsetBibtex>(tmpcur,
                                                BIBTEX_CODE);
                if (inset) {
-                       if (inset->delDatabase(to_utf8(cmd.argument())))
+                       if (inset->delDatabase(cmd.argument()))
                                buffer_.updateBibfilesCache();
                }
                break;
index 02fcde287595b98d1c7fe102fa4840e3d91d834b..4f6ae2b9883e116c48139b3b31563242c261ebff 100644 (file)
@@ -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
index 3d841e9f5f995ee03c81a80373932a74007d969f..3711c390984e9d6740ae53a27f80850266939169 100644 (file)
@@ -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;
        ///