]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlCitation.C
Reorganised, cleaned-up and improved documentation of controllers.
[lyx.git] / src / frontends / controllers / ControlCitation.C
index 9e25086f29821eb0b46ffb5ad0f58281765b8d0b..7a882f7f1766febb9ed9b224c798eecff752c45c 100644 (file)
@@ -4,7 +4,7 @@
  *
  *           LyX, The Document Processor
  *
- *           Copyright 2000 The LyX Team.
+ *           Copyright 2001 The LyX Team.
  *
  * ======================================================
  *
 
 #include "ControlCitation.h"
 #include "buffer.h"
-#include "ButtonController.h"
 #include "Dialogs.h"
 #include "LyXView.h"
-#include "ViewBase.h"
+#include "helper_funcs.h"
 #include "support/lstrings.h"
 #include "support/LRegex.h"
 
@@ -46,10 +45,9 @@ ControlCitation::ControlCitation(LyXView & lv, Dialogs & d)
 }
 
 
-void ControlCitation::hide()
+void ControlCitation::clearParams()
 {
        bibkeysInfo_.clear();
-       ControlCommand::hide(); 
 }
 
 
@@ -129,29 +127,6 @@ string const ControlCitation::getBibkeyInfo(string const & key)
 }
 
 
-string const getStringFromVector(vector<string> const & vec, char delim)
-{
-       string str;
-       for (vector<string>::size_type i=0; i<vec.size(); ++i) {
-               if (i > 0) str += tostr(delim);
-               str += vec[i];
-       }
-       return str;
-}
-
-vector<string> const getVectorFromString(string const & str, char delim)
-{
-       vector<string> vec;
-       string keys(str);
-       string tmp;
-       keys = frontStrip(split(keys, tmp, delim));
-       while (!tmp.empty()) {
-               vec.push_back(tmp);
-               keys = frontStrip(split(keys, tmp, delim));
-       }
-       return vec;
-}
-
 vector<string>::const_iterator
 searchKeys(ControlCitation const & controller,
           vector<string> const & keys,
@@ -185,7 +160,7 @@ simpleSearch(ControlCitation const & controller,
             ControlCitation::Direction dir,
             bool caseSensitive)
 {
-       vector<string> searchwords = getVectorFromString(expr, ' ');
+       vector<string> searchwords = getVectorFromString(expr, " ");
 
        // Loop over all keys from start...
        for (vector<string>::const_iterator it = start;