]> git.lyx.org Git - lyx.git/blobdiff - src/BranchList.C
Real fix from Bernhard Roider
[lyx.git] / src / BranchList.C
index 90aabdc0350638b90d47aa66871d685af470f37a..9cec82928edfc11763b0efd08fb944f850946958 100644 (file)
@@ -25,17 +25,17 @@ using std::string;
 
 Branch::Branch()
 {
-       theApp->getRgbColor(LColor::background, color_);
+       theApp()->getRgbColor(LColor::background, color_);
 }
 
 
-string const & Branch::getBranch() const
+docstring const & Branch::getBranch() const
 {
        return branch_;
 }
 
 
-void Branch::setBranch(string const & s)
+void Branch::setBranch(docstring const & s)
 {
        branch_ = s;
 }
@@ -74,11 +74,11 @@ void Branch::setColor(string const & c)
                color_ = RGBColor(c);
        else
                // no color set or invalid color - use normal background
-               theApp->getRgbColor(LColor::background, color_);
+               theApp()->getRgbColor(LColor::background, color_);
 }
 
 
-Branch * BranchList::find(std::string const & name)
+Branch * BranchList::find(docstring const & name)
 {
        List::iterator it =
                std::find_if(list.begin(), list.end(), BranchNamesEqual(name));
@@ -86,7 +86,7 @@ Branch * BranchList::find(std::string const & name)
 }
 
 
-Branch const * BranchList::find(std::string const & name) const
+Branch const * BranchList::find(docstring const & name) const
 {
        List::const_iterator it =
                std::find_if(list.begin(), list.end(), BranchNamesEqual(name));
@@ -94,14 +94,14 @@ Branch const * BranchList::find(std::string const & name) const
 }
 
 
-bool BranchList::add(string const & s)
+bool BranchList::add(docstring const & s)
 {
        bool added = false;
-       string::size_type i = 0;
+       docstring::size_type i = 0;
        while (true) {
-               string::size_type const j = s.find_first_of(separator_, i);
-               string name;
-               if (j == string::npos)
+               docstring::size_type const j = s.find_first_of(separator_, i);
+               docstring name;
+               if (j == docstring::npos)
                        name = s.substr(i);
                else
                        name = s.substr(i, j - i);
@@ -116,7 +116,7 @@ bool BranchList::add(string const & s)
                        br.setSelected(false);
                        list.push_back(br);
                }
-               if (j == string::npos)
+               if (j == docstring::npos)
                        break;
                i = j + 1;
        }
@@ -124,7 +124,7 @@ bool BranchList::add(string const & s)
 }
 
 
-bool BranchList::remove(string const & s)
+bool BranchList::remove(docstring const & s)
 {
        size_t const size = list.size();
        list.remove_if(BranchNamesEqual(s));