// Try and generate a valid index entry.
InsetCommandParams icp("index");
icp["name"] = cmd.argument().empty() ?
// Try and generate a valid index entry.
InsetCommandParams icp("index");
icp["name"] = cmd.argument().empty() ?
- from_utf8(bv->getLyXText()->getStringToIndex(bv->cursor())) :
+ bv->getLyXText()->getStringToIndex(bv->cursor()) :
cmd.argument();
return new InsetIndex(icp);
}
cmd.argument();
return new InsetIndex(icp);
}
void toggleFree(LCursor & cur, LyXFont const &, bool toggleall = false);
///
void toggleFree(LCursor & cur, LyXFont const &, bool toggleall = false);
///
- std::string getStringToIndex(LCursor const & cur);
+ docstring getStringToIndex(LCursor const & cur);
/// insert a character at cursor position
void insertChar(LCursor & cur, char_type c);
/// insert a character at cursor position
void insertChar(LCursor & cur, char_type c);
-string LyXText::getStringToIndex(LCursor const & cur)
+docstring LyXText::getStringToIndex(LCursor const & cur)
{
BOOST_ASSERT(this == cur.text());
{
BOOST_ASSERT(this == cur.text());
idxstring = tmpcur.selectionAsString(false);
}
idxstring = tmpcur.selectionAsString(false);
}
- return to_utf8(idxstring);