]> git.lyx.org Git - features.git/commitdiff
Disable newlines and paragraph breaks in non-fixed width tabular cells (bug 1938)
authorJürgen Spitzmüller <spitz@lyx.org>
Thu, 28 Jul 2005 09:45:43 +0000 (09:45 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Thu, 28 Jul 2005 09:45:43 +0000 (09:45 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10366 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/ChangeLog
src/insets/insettabular.C

index f6d46467411f526ee38d9a8d7fafd0ef66e3a27c..4d77c36db5c2c91514300c3778870cf1c827271f 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-28  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
+
+       * insettabular.C (getStatus): disable line and paragraph breaks
+       in non-fixed-width cells (bug 1938).
+
 2005-07-27  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
 
        * insetfloat.C: 
index ac76e28039101f070fb4ae746c5c05b13d3ca2e4..55db9855af21f78cbca0e8d98c3d57d2e4ded6ff 100644 (file)
@@ -1006,6 +1006,17 @@ bool InsetTabular::getStatus(LCursor & cur, FuncRequest const & cmd,
                }
        }
 
+       // 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);