http://bugzilla.lyx.org/show_bug.cgi?id=1938

Patch attached.

However, there are still some problems: 
1. if you change a fixed width cell with  paragraph breaks to a 
non-fixed-width cell, the paragraphs are not remerged. 
2. In the case of newlines, LyX even asserts if the cursor is in lastpos 
(because the linebreak inset is counted for pos, but not for size()):

Assertion triggered in const LyXFont Paragraph::getFontSettings(const 
BufferParams&, int) const by failing check "pos <= size()" in file 
paragraph.C:309

OK to apply the patch?

Jürgen
Index: insettabular.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insettabular.C,v
retrieving revision 1.481
diff -p -u -r1.481 insettabular.C
--- insettabular.C	18 Jul 2005 17:12:28 -0000	1.481
+++ insettabular.C	21 Jul 2005 09:35:39 -0000
@@ -1006,6 +1006,17 @@ bool InsetTabular::getStatus(LCursor & c
 		}
 	}
 
+	// disable in non-fixed-width cells
+	case LFUN_BREAKLINE:
+	case LFUN_BREAKPARAGRAPH:
+	case LFUN_BREAKPARAGRAPHKEEPLAYOUT:
+	case LFUN_BREAKPARAGRAPH_SKIP: {
+		if (tabular.getPWidth(cur.idx()).zero()) {
+			status.enabled(false);
+			return true;
+		}
+	}
+
 	case LFUN_INSET_MODIFY:
 		if (translate(cmd.getArg(0)) == TABULAR_CODE) {
 			status.enabled(true);

Reply via email to