]> git.lyx.org Git - lyx.git/blobdiff - src/DocIterator.cpp
Embedding: saving inzip name to .lyx file so that embedded files can always be found...
[lyx.git] / src / DocIterator.cpp
index ddd261187f98db217fb32348c6b2b097a9eba499..51d21921a0990be19c59106f7823b209b5b3f9f9 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "DocIterator.h"
 
-#include "debug.h"
+#include "support/debug.h"
 #include "InsetList.h"
 #include "Paragraph.h"
 #include "Text.h"
@@ -28,6 +28,7 @@
 
 #include <ostream>
 
+using namespace std;
 
 namespace lyx {
 
@@ -496,9 +497,9 @@ DocIterator::idx_type DocIterator::find(InsetMath const * inset) const
 }
 
 
-void DocIterator::cutOff(DocIterator::idx_type above, std::vector<CursorSlice> & cut)
+void DocIterator::cutOff(DocIterator::idx_type above, vector<CursorSlice> & cut)
 {
-       cut = std::vector<CursorSlice>(slices_.begin() + above + 1, slices_.end());
+       cut = vector<CursorSlice>(slices_.begin() + above + 1, slices_.end());
        slices_.resize(above + 1);
 }
 
@@ -509,7 +510,7 @@ void DocIterator::cutOff(DocIterator::idx_type above)
 }
 
 
-void DocIterator::append(std::vector<CursorSlice> const & x) 
+void DocIterator::append(vector<CursorSlice> const & x) 
 {
        slices_.insert(slices_.end(), x.begin(), x.end());
 }
@@ -523,7 +524,7 @@ void DocIterator::append(DocIterator::idx_type idx, pos_type pos)
 }
 
 
-std::ostream & operator<<(std::ostream & os, DocIterator const & dit)
+ostream & operator<<(ostream & os, DocIterator const & dit)
 {
        for (size_t i = 0, n = dit.depth(); i != n; ++i)
                os << " " << dit[i] << "\n";
@@ -531,29 +532,6 @@ std::ostream & operator<<(std::ostream & os, DocIterator const & dit)
 }
 
 
-bool operator<(DocIterator const & p, DocIterator const & q)
-{
-       size_t depth = std::min(p.depth(), q.depth());
-       for (size_t i = 0 ; i < depth ; ++i) {
-               if (p[i] != q[i])
-                       return p[i] < q[i];
-       }
-       return p.depth() < q.depth();
-}
-
-
-bool operator>(DocIterator const & p, DocIterator const & q)
-{
-       return q < p;
-}
-
-
-bool operator<=(DocIterator const & p, DocIterator const & q)
-{
-       return !(q < p);
-}
-
-
 ///////////////////////////////////////////////////////
 
 StableDocIterator::StableDocIterator(DocIterator const & dit)
@@ -592,7 +570,7 @@ DocIterator StableDocIterator::asDocIterator(Inset * inset) const
 }
 
 
-std::ostream & operator<<(std::ostream & os, StableDocIterator const & dit)
+ostream & operator<<(ostream & os, StableDocIterator const & dit)
 {
        for (size_t i = 0, n = dit.data_.size(); i != n; ++i)
                os << " " << dit.data_[i] << "\n";