fix bug 391, parrot patch from herbert

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4313 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2002-05-31 12:17:28 +00:00
parent 6f74c2c9b9
commit c3f9ef4313
6 changed files with 34 additions and 6 deletions

View 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

View 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

View 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") {

View 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

View 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);
}

View File

@ -135,6 +135,8 @@ public:
}
///
int getMaxWidth(BufferView *, UpdatableInset const *) const;
///
void update(BufferView *, LyXFont const &, bool =false);
private:
///