]> git.lyx.org Git - features.git/commitdiff
fix bug 391, parrot patch from herbert
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 31 May 2002 12:17:28 +0000 (12:17 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 31 May 2002 12:17:28 +0000 (12:17 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4313 a592a061-630c-0410-9148-cb99ea01b6c8

po/POTFILES.in
src/ChangeLog
src/buffer.C
src/insets/ChangeLog
src/insets/insetert.C
src/insets/insetert.h

index d0c3a8bdd9cbe34f7256070e99b526b0168df1da..f7ce0b3646a924fb403c43bb10f08640dd37738b 100644 (file)
@@ -198,9 +198,6 @@ src/MenuBackend.C
 src/minibuffer.C
 src/paragraph.C
 src/support/filetools.C
-src/support/getUserName.C
-src/support/path.C
-src/support/path.h
 src/tabular.C
 src/text2.C
 src/text.C
index 16e6fa9cea6e3a067c978f9ce37afb90bcf158dc..7832e299aa613ca585e8fc75044ba206044f8a6f 100644 (file)
@@ -1,3 +1,8 @@
+2002-04-30  Herbert Voss  <voss@lyx.org>
+
+       * buffer.C (parseSingleLyXformat2Token): fix bug with ignored
+       "keep" option
+
 2002-05-31  John Levon  <moz@compsoc.man.ac.uk>
 
        * lyxvc.C: fix bug 416 (make sure buffer is saved before
index 481ca4990a549bc0ef8b096e934786a2b2896097..afb5d022c081919472f16e3be14fa530f06c5ce3 100644 (file)
@@ -1180,15 +1180,21 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
        } else if (token == "\\added_space_top") {
                lex.nextToken();
                VSpace value = VSpace(lex.getString());
+               // only add the length when value > 0 or
+               // with option keep
                if ((value.length().len().value() != 0) ||
+                   value.keep() ||
                    (value.kind() != VSpace::LENGTH))
-                   par->params().spaceTop(value);
+                       par->params().spaceTop(value);
        } else if (token == "\\added_space_bottom") {
                lex.nextToken();
                VSpace value = VSpace(lex.getString());
+               // only add the length when value > 0 or
+               // with option keep
                if ((value.length().len().value() != 0) ||
+                   value.keep() ||
                    (value.kind() != VSpace::LENGTH))
-                   par->params().spaceBottom(value);
+                       par->params().spaceBottom(value);
 #ifndef NO_COMPABILITY
 #ifndef NO_PEXTRA_REALLY
        } else if (token == "\\pextra_type") {
index 279584d2c995347d05f2451b25ceca73b77a244f..6aa13832588e9835b532af002a0799840ca7fa2f 100644 (file)
@@ -1,3 +1,9 @@
+2002-05-31  Juergen Vigna  <jug@sad.it>
+
+       * insetert.C (get_new_label): add '...' for multi-paragraph ert
+       insets too
+       (update) new method
+
 2002-05-30  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
        * insetexternal.C (clone): fix () bug when using new
index a7f743cf344f9662660c67d60ebdc9068486baf3..7bd95628797842b7c38e907b7bcc53ff5701e92e 100644 (file)
@@ -492,7 +492,7 @@ string const InsetERT::get_new_label() const
                la += inset.paragraph()->getChar(j);
                ++i;
        }
-       if (i > 0 && j < p_siz) {
+       if (inset.paragraph()->next() || (i > 0 && j < p_siz)) {
                la += "...";
        }
        if (la.empty()) {
@@ -709,3 +709,15 @@ int InsetERT::getMaxWidth(BufferView * bv, UpdatableInset const * in) const
                return -1;
        return w;
 }
+
+
+void InsetERT::update(BufferView * bv, LyXFont const & font,
+                      bool reinit)
+{
+       if (inset.need_update & InsetText::INIT ||
+               inset.need_update & InsetText::FULL)
+       {
+               setButtonLabel();
+       }
+       InsetCollapsable::update(bv, font, reinit);
+}
index 7e169a2796ef6745fdbb2e1a3cbcdf4202df943a..8aaf1310cc97543076bf75d65a7b404f75207d68 100644 (file)
@@ -135,6 +135,8 @@ public:
        }
        ///
        int getMaxWidth(BufferView *, UpdatableInset const *) const;
+       ///
+       void update(BufferView *, LyXFont const &, bool =false);
 
 private:
        ///