]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfind.cpp
Mark constructors with only one parameter as explicit
[lyx.git] / src / lyxfind.cpp
index af9896f3820010f53b36c9429c5457c47405b39e..4c8386c3bae4a864c9fe9234afd2977314d6ca72 100644 (file)
@@ -93,7 +93,7 @@ class IgnoreFormats {
        ///
        bool getLanguage() { return ignoreLanguage_; };
        ///
-       void setIgnoreFormat(string type, bool value);
+       void setIgnoreFormat(string const & type, bool value);
 
 private:
        ///
@@ -119,7 +119,7 @@ private:
 };
 
 
-void IgnoreFormats::setIgnoreFormat(string type, bool value)
+void IgnoreFormats::setIgnoreFormat(string const & type, bool value)
 {
        if (type == "color") {
                ignoreColor_ = value;
@@ -160,7 +160,7 @@ void IgnoreFormats::setIgnoreFormat(string type, bool value)
 IgnoreFormats ignoreFormats;
 
 
-void setIgnoreFormat(string type, bool value)
+void setIgnoreFormat(string const & type, bool value)
 {
   ignoreFormats.setIgnoreFormat(type, value);
 }
@@ -1323,13 +1323,13 @@ static void buildAccentsMap()
   accents["lyxmathsym{ß}"] = "ß";
   accents["text{ß}"] = "ß";
   accents["ddot{\\imath}"] = "ï";
-  buildaccent("ddot", "aAeEiIioOuUyY",
-                      "äÄëËïÏïöÖüÜÿŸ");   // umlaut
-  buildaccent("dot|.", "cCeEGgIizZaAoObBdDfFyY",
-                       "ċĊėĖĠġİİżŻȧȦȯȮḃḂḋḊḟḞẏẎ");        // dot{i} can only happen if ignoring case, but there is no lowercase of 'İ'
+  buildaccent("ddot", "aAeEhHiIioOtuUwWxXyY",
+                      "äÄëËḧḦïÏïöÖẗüÜẅẄẍẌÿŸ");      // umlaut
+  buildaccent("dot|.", "aAbBcCdDeEfFGghHIimMnNoOpPrRsStTwWxXyYzZ",
+                       "ȧȦḃḂċĊḋḊėĖḟḞĠġḣḢİİṁṀṅṄȯȮṗṖṙṘṡṠṫṪẇẆẋẊẏẎżŻ");  // dot{i} can only happen if ignoring case, but there is no lowercase of 'İ'
   accents["acute{\\imath}"] = "í";
-  buildaccent("acute", "aAcCeElLoOnNrRsSuUyYzZiI",
-                       "áÁćĆéÉĺĹóÓńŃŕŔśŚúÚýÝźŹíÍ");
+  buildaccent("acute", "aAcCeEgGkKlLmMoOnNpPrRsSuUwWyYzZiI",
+                       "áÁćĆéÉǵǴḱḰĺĹḿḾóÓńŃṕṔŕŔśŚúÚẃẂýÝźŹíÍ");
   buildaccent("dacute|H|h", "oOuU", "őŐűŰ");       // double acute
   buildaccent("mathring|r", "aAuUwy",
                             "åÅůŮẘẙ"); // ring
@@ -1339,14 +1339,14 @@ static void buildAccentsMap()
                          "čČďĎǎǍěĚǐǏǒǑǔǓǧǦǩǨȟȞľĽňŇřŘšŠŤťžŽ");  // caron
   accents["hat{\\imath}"] = "î";
   accents["hat{\\jmath}"] = "ĵ";
-  buildaccent("hat|^", "aAeEiIcCgGhHjJsSwWyYzZoOuU",
-                       "âÂêÊîÎĉĈĝĜĥĤĵĴŝŜŵŴŷŶẑẐôÔûÛ");      // circ
+  buildaccent("hat|^", "aAcCeEgGhHiIjJoOsSuUwWyYzZ",
+                       "âÂĉĈêÊĝĜĥĤîÎĵĴôÔŝŜûÛŵŴŷŶẑẐ");      // circ
   accents["bar{\\imath}"] = "ī";
   buildaccent("bar|=", "aAeEiIoOuUyY",
                        "āĀēĒīĪōŌūŪȳȲ");    // macron
   accents["tilde{\\imath}"] = "ĩ";
-  buildaccent("tilde", "aAnNoOiIuU",
-                       "ãÃñÑõÕĩĨũŨ");        // tilde
+  buildaccent("tilde", "aAeEiInNoOuUvVyY",
+                       "ãÃẽẼĩĨñÑõÕũŨṽṼỹỸ");      // tilde
   accents["breve{\\imath}"] = "ĭ";
   buildaccent("breve|u", "aAeEgGiIoOuU",
                          "ăĂĕĔğĞĭĬŏŎŭŬ");  // breve
@@ -1373,6 +1373,8 @@ static void buildAccentsMap()
   accents["textroundcap{\\i}"] = "ȉ";
   buildaccent("rcap|textroundcap", "AaEeIiOoRrUu",
                                    "ȂȃȆȇȊȋȎȏȒȓȖȗ"); // inverted breve
+  buildaccent("slashed", "oO",
+                         "øØ"); // slashed
 }
 
 /*
@@ -1383,7 +1385,7 @@ void Intervall::removeAccents()
 {
   if (accents.empty())
     buildAccentsMap();
-  static regex const accre("\\\\(([\\S]|grave|breve|lyxmathsym|text|ddot|dot|acute|dacute|mathring|check|hat|bar|tilde|subdot|ogonek|cedilla|subring|textsubring|subhat|textsubcircum|subtilde|textsubtilde|dgrave|textdoublegrave|rcap|textroundcap)\\{[^\\{\\}]+\\}|(i|imath|jmath)(?![a-zA-Z]))");
+  static regex const accre("\\\\(([\\S]|grave|breve|lyxmathsym|text|ddot|dot|acute|dacute|mathring|check|hat|bar|tilde|subdot|ogonek|cedilla|subring|textsubring|subhat|textsubcircum|subtilde|textsubtilde|dgrave|textdoublegrave|rcap|textroundcap|slashed)\\{[^\\{\\}]+\\}|(i|imath|jmath)(?![a-zA-Z]))");
   smatch sub;
   for (sregex_iterator itacc(par.begin(), par.end(), accre), end; itacc != end; ++itacc) {
     sub = *itacc;
@@ -1476,7 +1478,8 @@ class LatexInfo {
   void removeHead(KeyInfo&, int count=0);
 
  public:
- LatexInfo(string par, bool isPatternString) : entidx_(-1), interval_(isPatternString, par)
+ LatexInfo(string const & par, bool isPatternString)
+        : entidx_(-1), interval_(isPatternString, par)
   {
     buildKeys(isPatternString);
     entries_ = vector<KeyInfo>();
@@ -1586,7 +1589,7 @@ class MathInfo {
   MathInfo() {
     actualIdx_ = 0;
   }
-  void insert(string wait, size_t start, size_t end) {
+  void insert(string const & wait, size_t start, size_t end) {
     MathEntry m = MathEntry();
     m.wait = wait;
     m.mathStart = start;