]> git.lyx.org Git - lyx.git/blobdiff - src/CutAndPaste.C
fix aspell encoding (confirmed on linux, cygwin and native windows,
[lyx.git] / src / CutAndPaste.C
index c2ddae5c60dfcd7720ca3933fb553b34cf921502..d82aab8faa82d0c5597035705fc66eefc5568ac4 100644 (file)
@@ -649,7 +649,7 @@ void pasteSelection(LCursor & cur, ErrorList & errorList, size_t sel_index)
 
 
 // simple replacing. The font of the first selected character is used
-void replaceSelectionWithString(LCursor & cur, string const & str, bool backwards)
+void replaceSelectionWithString(LCursor & cur, docstring const & str, bool backwards)
 {
        recordUndo(cur);
        DocIterator selbeg = cur.selectionBegin();
@@ -661,10 +661,10 @@ void replaceSelectionWithString(LCursor & cur, string const & str, bool backward
        // Insert the new string
        pos_type pos = cur.selEnd().pos();
        Paragraph & par = cur.selEnd().paragraph();
-       string::const_iterator cit = str.begin();
-       string::const_iterator end = str.end();
+       docstring::const_iterator cit = str.begin();
+       docstring::const_iterator end = str.end();
        for (; cit != end; ++cit, ++pos)
-               par.insertChar(pos, (*cit), font, cur.buffer().params().trackChanges);
+               par.insertChar(pos, *cit, font, cur.buffer().params().trackChanges);
 
        // Cut the selection
        cutSelection(cur, true, false);