* src/Cursor.cpp (selectionAsString):

- Fix a crash when selecting multiple cells of a tabular.
	  (I might have a look at the missing table->asString later).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@27080 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2008-10-24 11:20:12 +00:00
parent 53d504dde0
commit f8ee0a7758
2 changed files with 17 additions and 0 deletions

View File

@ -1350,6 +1350,21 @@ docstring Cursor::selectionAsString(bool label) const
return docstring();
if (inTexted()) {
idx_type const startidx = selBegin().idx();
idx_type const endidx = selEnd().idx();
if (startidx != endidx) {
// multicell selection
#if 0
// FIXME: we do not have table->asString, thus we have to return docstring() here.
InsetTabular * table = static_cast<InsetTabular*>(&inset());
BOOST_ASSERT(table);
if (!table)
return docstring();
table->asString(startidx, endidx);
#endif
return docstring();
}
Buffer const & buffer = *bv().buffer();
ParagraphList const & pars = text()->paragraphs();

View File

@ -147,6 +147,8 @@ What's new
- Fix a crash on some systems when using the math panel (bug 5189).
- Fix a crash when selecting multiple cells of a tabular.
- Fix the input behaviour when multiple cells of a table were selected,
including a possible assertion (bug 5225).