#include "support/lassert.h"
#include "support/limited_stack.h"
#include "support/lstrings.h"
+#include "support/lyxalgo.h"
#include "support/TempFile.h"
#include "frontends/alert.h"
#include "frontends/Selection.h"
#include <boost/tuple/tuple.hpp>
-#include <boost/next_prior.hpp>
#include <string>
// Paste it!
if (empty) {
- pars.insert(boost::next(pars.begin(), pit),
+ pars.insert(next(pars.begin(), pit),
insertion.begin(),
insertion.end());
mergeParagraph(buffer.params(), pars,
pit + insertion.size() - 1);
} else {
- pars.insert(boost::next(pars.begin(), pit + 1),
+ pars.insert(next(pars.begin(), pit + 1),
insertion.begin(),
insertion.end());
LASSERT(startpit != endpit || start <= end, return);
// Clone the paragraphs within the selection.
- ParagraphList copy_pars(boost::next(pars.begin(), startpit),
- boost::next(pars.begin(), endpit + 1));
+ ParagraphList copy_pars(next(pars.begin(), startpit),
+ next(pars.begin(), endpit + 1));
// Remove the end of the last paragraph; afterwards, remove the
// beginning of the first paragraph. Keep this order - there may only
// we do not use cit-> here because gcc 2.9x does not
// like it (JMarc)
ParagraphList const & pars = (*cit).first;
- docstring asciiSel;
+ docstring textSel;
ParagraphList::const_iterator pit = pars.begin();
ParagraphList::const_iterator pend = pars.end();
for (; pit != pend; ++pit) {
- Paragraph par(*pit, 0, 26);
+ Paragraph par(*pit, 0, 46);
// adapt paragraph to current buffer.
par.setBuffer(const_cast<Buffer &>(*buf));
- asciiSel += par.asString(AS_STR_INSETS);
- if (asciiSel.size() > 25) {
- asciiSel.replace(22, docstring::npos,
- from_ascii("..."));
+ textSel += par.asString(AS_STR_INSETS);
+ if (textSel.size() > 45) {
+ support::truncateWithEllipsis(textSel,45);
break;
}
}
-
- selList.push_back(asciiSel);
+ selList.push_back(textSel);
}
return selList;