mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
fix insetert drupdate problems (bug #176); fix row breaking after protected chars
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3529 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d1e32bd66c
commit
919b745fa6
@ -1,3 +1,10 @@
|
||||
2002-02-13 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
|
||||
|
||||
* text.C (nextBreakPoint): use Paragraph::isLineSeparator
|
||||
|
||||
* paragraph.C (isLineSeparator): call Inset::isLineSeparator if
|
||||
there is an inset.
|
||||
|
||||
2002-02-12 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
|
||||
|
||||
* lyxfunc.C (getStatus): change the rules for LFUN_INSET_TOGGLE to
|
||||
|
@ -1,3 +1,15 @@
|
||||
2002-02-13 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
|
||||
|
||||
* insetspecialchar.C (isLineSeparator): line breaking is allowed
|
||||
after HYPHENATION and MENU_SEPARATOR
|
||||
|
||||
* inset.h (isLineSeparator): new method, returns false by default.
|
||||
|
||||
2002-02-12 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
|
||||
|
||||
* insetert.C (status): do not update the text inset, but the ERT
|
||||
inset.
|
||||
|
||||
2002-02-11 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* insetnote.C: use notebg for background
|
||||
|
@ -309,9 +309,12 @@ public:
|
||||
virtual bool isChar() const { return false; }
|
||||
// is this equivalent to a letter?
|
||||
virtual bool isLetter() const { return false; }
|
||||
// is this equivalent to a space?
|
||||
// is this equivalent to a space (which is BTW different from
|
||||
// a line separator)?
|
||||
virtual bool isSpace() const { return false; }
|
||||
// if this inset has paragraphs should they be outpu all as default
|
||||
// should we break lines after this inset?
|
||||
virtual bool isLineSeparator() const { return false; }
|
||||
// if this inset has paragraphs should they be output all as default
|
||||
// paragraphs with "Standard" layout?
|
||||
virtual bool forceDefaultParagraphs(Inset const *) const;
|
||||
// needed for widths which are % of something
|
||||
|
@ -637,7 +637,7 @@ void InsetERT::status(BufferView * bv, ERTStatus const st) const
|
||||
break;
|
||||
}
|
||||
if (bv)
|
||||
bv->updateInset(const_cast<InsetText *>(&inset), false);
|
||||
bv->updateInset(const_cast<InsetERT *>(this), false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -340,3 +340,9 @@ bool InsetSpecialChar::isSpace() const
|
||||
{
|
||||
return kind_ == PROTECTED_SEPARATOR;
|
||||
}
|
||||
|
||||
|
||||
bool InsetSpecialChar::isLineSeparator() const
|
||||
{
|
||||
return kind_ == HYPHENATION || kind_ == MENU_SEPARATOR;
|
||||
}
|
||||
|
@ -87,8 +87,11 @@ public:
|
||||
bool isChar() const;
|
||||
/// is this equivalent to a letter?
|
||||
bool isLetter() const;
|
||||
/// is this equivalent to a space?
|
||||
/// is this equivalent to a space (which is BTW different from
|
||||
// a line separator)?
|
||||
bool isSpace() const;
|
||||
// should we break lines after this inset?
|
||||
bool isLineSeparator() const;
|
||||
private:
|
||||
/// And which kind is this?
|
||||
Kind kind_;
|
||||
|
@ -1903,7 +1903,9 @@ bool Paragraph::isSeparator(pos_type pos) const
|
||||
|
||||
bool Paragraph::isLineSeparator(pos_type pos) const
|
||||
{
|
||||
return IsLineSeparatorChar(getChar(pos));
|
||||
value_type const c = getChar(pos);
|
||||
return IsLineSeparatorChar(c)
|
||||
|| (IsInsetChar(c) && getInset(pos)->isLineSeparator());
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
2002-02-13 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
|
||||
|
||||
* textutils.h: remove IsLineSeparatorChar(char, Inset *)
|
||||
|
||||
2002-02-10 Kayvan Sylvan <kayvan@sylvan.com>
|
||||
|
||||
* os_win32.C: Add "using std::endl" to fix compilation for GCC 3.X.
|
||||
|
@ -46,14 +46,6 @@ bool IsLineSeparatorChar(char c) {
|
||||
return (c == ' ');
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
inline
|
||||
bool IsLineSeparatorChar(char c, Inset * in) {
|
||||
return ((c == ' ') || (in && in->isSpace()));
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
inline
|
||||
bool IsKommaChar(char c) {
|
||||
|
@ -986,7 +986,7 @@ LyXText::nextBreakPoint(BufferView * bview, Row const * row, int width) const
|
||||
if (i == pos) {
|
||||
if (pos < last-1) {
|
||||
last_separator = i;
|
||||
if (IsLineSeparatorChar(par->getChar(i+1)))
|
||||
if (par->isLineSeparator(i+1))
|
||||
++last_separator;
|
||||
} else
|
||||
last_separator = last; // to avoid extra rows
|
||||
@ -1007,7 +1007,7 @@ LyXText::nextBreakPoint(BufferView * bview, Row const * row, int width) const
|
||||
last_separator = i - 1;
|
||||
}
|
||||
} else {
|
||||
if (IsLineSeparatorChar(c, in))
|
||||
if (par->isLineSeparator(i))
|
||||
last_separator = i;
|
||||
x += singleWidth(bview, par, i, c);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user