shown-2.diff

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7187 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2003-06-18 13:53:11 +00:00
parent 9ccb4e171c
commit 9740810c16
2 changed files with 16 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2003-06-18 Lars Gullik Bjønnes <larsbj@gullik.net>
* CutAndPaste.C (availableSelections): potentially check all
paragraphs in a cut to fill the shown strings.
2003-06-18 André Pönitz <poenitz@gmx.net>

View File

@ -58,8 +58,18 @@ CutAndPaste::availableSelections(Buffer const & buffer)
CutStack::const_iterator end = cuts.end();
for (; cit != end; ++cit) {
ParagraphList const & pars = cit->first;
string asciiPar(pars.front().asString(&buffer, false), 0, 25);
selList.push_back(asciiPar);
string asciiSel;
ParagraphList::const_iterator pit = pars.begin();
ParagraphList::const_iterator pend = pars.end();
for (; pit != pend; ++pit) {
asciiSel += pit->asString(&buffer, false);
if (asciiSel.size() > 25) {
asciiSel.replace(22, string::npos, "...");
break;
}
}
selList.push_back(asciiSel);
}
return selList;