mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Tiny unicode optimization: avoid ucs4->utf8->ucs4 roundtrip
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15735 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b61b9cc6a4
commit
d06475855c
@ -166,7 +166,7 @@ InsetBase * createInset(BufferView * bv, FuncRequest const & cmd)
|
||||
// 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);
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ public:
|
||||
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);
|
||||
|
@ -576,7 +576,7 @@ void LyXText::toggleFree(LCursor & cur, LyXFont const & font, bool toggleall)
|
||||
}
|
||||
|
||||
|
||||
string LyXText::getStringToIndex(LCursor const & cur)
|
||||
docstring LyXText::getStringToIndex(LCursor const & cur)
|
||||
{
|
||||
BOOST_ASSERT(this == cur.text());
|
||||
|
||||
@ -598,7 +598,7 @@ string LyXText::getStringToIndex(LCursor const & cur)
|
||||
idxstring = tmpcur.selectionAsString(false);
|
||||
}
|
||||
|
||||
return to_utf8(idxstring);
|
||||
return idxstring;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user