]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCitation.cpp
* src/paragraph_funcs.cpp (breakParagraph): change parameter 'flag' to
[lyx.git] / src / insets / InsetCitation.cpp
index 1cd5c8e4b0620831b55c690eb9fbb69bbdbe3185..0f0f1bb78967490f6cedb037d0a5499859d24fcf 100644 (file)
@@ -20,8 +20,6 @@
 #include "FuncRequest.h"
 #include "LaTeXFeatures.h"
 
-#include "frontends/controllers/frontend_helpers.h"
-
 #include "support/fs_extras.h"
 #include "support/lstrings.h"
 
@@ -53,7 +51,7 @@ namespace {
 
 vector<string> const init_possible_cite_commands()
 {
-       char const * const pos[] = {
+       char const * const possible[] = {
                "cite", "citet", "citep", "citealt", "citealp",
                "citeauthor", "citeyear", "citeyearpar",
                "citet*", "citep*", "citealt*", "citealp*", "citeauthor*",
@@ -64,16 +62,16 @@ vector<string> const init_possible_cite_commands()
                "footcitealp", "footciteauthor", "footciteyear", "footciteyearpar",
                "citefield", "citetitle", "cite*"
        };
-       size_t const size_pos = sizeof(pos) / sizeof(pos[0]);
+       size_t const size_possible = sizeof(possible) / sizeof(possible[0]);
 
-       return vector<string>(pos, pos + size_pos);
+       return vector<string>(possible, possible + size_possible);
 }
 
 
 vector<string> const & possible_cite_commands()
 {
-       static vector<string> const pos = init_possible_cite_commands();
-       return pos;
+       static vector<string> const possible = init_possible_cite_commands();
+       return possible;
 }
 
 
@@ -130,20 +128,20 @@ string const
                                output = input;
                        break;
 
-                       case biblio::ENGINE_JURABIB: {
-               // Jurabib does not support the 'uppercase' natbib style.
-                               if (input[0] == 'C')
-                                       output = string(1, 'c') + input.substr(1);
-                               else
-                                       output = input;
+               case biblio::ENGINE_JURABIB: {
+                       // Jurabib does not support the 'uppercase' natbib style.
+                       if (input[0] == 'C')
+                               output = string(1, 'c') + input.substr(1);
+                       else
+                               output = input;
 
-               // Jurabib does not support the 'full' natbib style.
-                               string::size_type const n = output.size() - 1;
-                               if (output != "cite*" && output[n] == '*')
-                                       output = output.substr(0, n);
+                       // Jurabib does not support the 'full' natbib style.
+                       string::size_type const n = output.size() - 1;
+                       if (output != "cite*" && output[n] == '*')
+                               output = output.substr(0, n);
 
-                               break;
-                       }
+                       break;
+               }
        }
 
        return output;
@@ -459,9 +457,7 @@ int InsetCitation::plaintext(Buffer const & buffer, odocstream & os,
 }
 
 
-namespace {
-
-docstring const cleanupWhitespace(docstring const & citelist)
+static docstring const cleanupWhitespace(docstring const & citelist)
 {
        docstring::const_iterator it  = citelist.begin();
        docstring::const_iterator end = citelist.end();
@@ -478,8 +474,6 @@ docstring const cleanupWhitespace(docstring const & citelist)
        return result;
 }
 
-// end anon namyspace
-}
 
 int InsetCitation::docbook(Buffer const &, odocstream & os,
                           OutputParams const &) const