]> git.lyx.org Git - lyx.git/blobdiff - src/bufferview_funcs.C
LFUN_UNICODE_INSERT - unicode-insert
[lyx.git] / src / bufferview_funcs.C
index b5cdfd0d4885b07b531dfa120ae4814b42267366..40210a018b59cb80eda917f74af0b0b9318b4400 100644 (file)
 
 #include <sstream>
 
-using lyx::support::bformat;
+
+namespace lyx {
+
+using support::bformat;
 
 using std::istringstream;
 using std::ostringstream;
@@ -153,7 +156,8 @@ bool string2font(string const & data, LyXFont & font, bool & toggle)
 // the next two should probably go elsewhere
 // this give the position relative to (0, baseline) of outermost
 // paragraph
-Point coordOffset(DocIterator const & dit, bool boundary)
+Point coordOffset(BufferView const & bv, DocIterator const & dit,
+               bool boundary)
 {
        int x = 0;
        int y = 0;
@@ -163,7 +167,7 @@ Point coordOffset(DocIterator const & dit, bool boundary)
                CursorSlice const & sl = dit[i];
                int xx = 0;
                int yy = 0;
-               sl.inset().cursorPos(sl, boundary && ((i+1) == dit.depth()), xx, yy);
+               sl.inset().cursorPos(bv, sl, boundary && ((i+1) == dit.depth()), xx, yy);
                x += xx;
                y += yy;
                //lyxerr << "LCursor::getPos, i: "
@@ -212,7 +216,7 @@ Point getPos(BufferView & bv, DocIterator const & dit, bool boundary)
                //lyxerr << "cursor out of view" << std::endl;
                return Point(-1, -1);
        }
-       Point p = coordOffset(dit, boundary); // offset from outer paragraph
+       Point p = coordOffset(bv, dit, boundary); // offset from outer paragraph
        p.y_ += it->second.y_;
        return p;
 }
@@ -317,3 +321,6 @@ void gotoInset(BufferView * bv, InsetBase_code code, bool same_content)
 
 
 } // namespace bv_funcs
+
+
+} // namespace lyx