]> git.lyx.org Git - lyx.git/blobdiff - src/Text2.cpp
Cleanup: Replace a bunch of Cursor arguments with DocIterators.
[lyx.git] / src / Text2.cpp
index be95232d1271a6da80bfab4c370d7e886e0c0e08..5eedf4f3078bcf079c0844e8ec7924c8f8596f01 100644 (file)
@@ -503,12 +503,12 @@ void Text::insertInset(Cursor & cur, Inset * inset)
 
 
 // needed to insert the selection
-void Text::insertStringAsLines(Cursor & cur, docstring const & str)
+void Text::insertStringAsLines(DocIterator const & dit, docstring const & str,
+               Font const & font)
 {
        BufferParams const & bparams = owner_->buffer().params();
-       pit_type pit = cur.pit();
-       pos_type pos = cur.pos();
-       Font font = cur.current_font;
+       pit_type pit = dit.pit();
+       pos_type pos = dit.pos();
 
        // insert the string, don't insert doublespace
        bool space_inserted = true;
@@ -555,7 +555,8 @@ void Text::insertStringAsLines(Cursor & cur, docstring const & str)
 
 // turn double CR to single CR, others are converted into one
 // blank. Then insertStringAsLines is called
-void Text::insertStringAsParagraphs(Cursor & cur, docstring const & str)
+void Text::insertStringAsParagraphs(DocIterator const & dit, docstring const & str,
+               Font const & font)
 {
        docstring linestr = str;
        bool newline_inserted = false;
@@ -576,7 +577,7 @@ void Text::insertStringAsParagraphs(Cursor & cur, docstring const & str)
                        newline_inserted = false;
                }
        }
-       insertStringAsLines(cur, linestr);
+       insertStringAsLines(dit, linestr, font);
 }