+2001-12-11 Ben Stanley <bds02@uow.edu.au>
+
+ * paragraph.C: fixed missing line number count when exporting
+ Environments to LaTeX file
+
+ * buffer.C: added informational message for checking line numbers.
+
+2001-12-11 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
+
+ * text2.C (deleteEmptyParagraphMechanism): if there is only one
+ paragraph, do the 'double space' part, but not the 'empty
+ paragraph' one.
+
+ * text.C (workWidth): small optimization
+ (getLengthMarkerHeight): use minimal size for negative lengths.
+
2001-12-11 Dekel Tsur <dekelts@tau.ac.il>
* lyxfont.C (GUIFamilyNames): Fix GUIFamilyNames array
* FontLoader.C:
* lyxfont.[Ch]: support for fraktur font used by \mathfrak
+2001-12-06 John Levon <moz@compsoc.man.ac.uk>
+
+ * text2.C: keep selection on a setFont()
+
2001-12-06 John Levon <moz@compsoc.man.ac.uk>
* lyx_cb.C: another bv->text misuse, from insert label
pos_type pos = 0;
Buffer::inset_iterator it = bview->buffer()->inset_iterator_begin();
-
- for (; it != bview->buffer()->inset_iterator_end(); ++it) {
+ Buffer::inset_iterator end = bview->buffer()->inset_iterator_end();
+ for ( ; it != end; ++it) {
if (*it == inset) {
par = it.getPar();
pos = it.getPos();
int LyXText::getLengthMarkerHeight(BufferView * bv, VSpace const & vsp) const
{
+ int const arrow_size = 4;
+ int const space_size = int(vsp.inPixels(bv));
+
if (vsp.kind() != VSpace::LENGTH) {
- return int(vsp.inPixels(bv));
+ return space_size;
}
-
- int const space_size = int(vsp.inPixels(bv));
- int const arrow_size = 4;
LyXFont font;
font.decSize();
lyxfont::maxAscent(font)
+ lyxfont::maxDescent(font));
- return std::max(min_size, space_size);
+ if (vsp.length().len().value() < 0.0)
+ return min_size;
+ else
+ return std::max(min_size, space_size);
}
redoParagraphs(bview, selection.start, selection.end.par()->next());
// we have to reset the selection, because the
- // geometry could have changed
+ // geometry could have changed, but we keep
+ // it for user convenience
setCursor(bview, selection.start.par(), selection.start.pos());
selection.cursor = cursor;
setCursor(bview, selection.end.par(), selection.end.pos());
- clearSelection();
setSelection(bview);
setCursor(bview, tmpcursor.par(), tmpcursor.pos(), true,
tmpcursor.boundary());
y -= tmprow->height();
}
}
-
+
// we can set the refreshing parameters now
status(bview, LyXText::NEED_MORE_REFRESH);
refresh_y = y;
tmppar = 0;
while (tmppar != endpar) {
removeRow(tmprow->next());
- if (tmprow->next())
+ if (tmprow->next()) {
tmppar = tmprow->next()->par();
- else
+ } else {
tmppar = 0;
- }
+ }
+ }
// remove the first one
tmprow2 = tmprow; /* this is because tmprow->previous()
void LyXText::deleteEmptyParagraphMechanism(BufferView * bview,
LyXCursor const & old_cursor) const
{
- // don't delete anything if this is the ONLY paragraph!
- if (!old_cursor.par()->next() && !old_cursor.par()->previous())
- return;
-
// Would be wrong to delete anything if we have a selection.
if (selection.set()) return;
// We allow all kinds of "mumbo-jumbo" when freespacing.
if (textclasslist.Style(bview->buffer()->params.textclass,
- old_cursor.par()->getLayout()).free_spacing ||
- old_cursor.par()->isFreeSpacing())
+ old_cursor.par()->getLayout()).free_spacing
+ || old_cursor.par()->isFreeSpacing())
{
return;
}
// MISSING
// If the pos around the old_cursor were spaces, delete one of them.
- if (old_cursor.par() != cursor.par() || old_cursor.pos() != cursor.pos()) {
+ if (old_cursor.par() != cursor.par()
+ || old_cursor.pos() != cursor.pos()) {
// Only if the cursor has really moved
if (old_cursor.pos() > 0
}
}
+ // don't delete anything if this is the ONLY paragraph!
+ if (!old_cursor.par()->next() && !old_cursor.par()->previous())
+ return;
+
// Do not delete empty paragraphs with keepempty set.
if ((textclasslist.Style(bview->buffer()->params.textclass,
old_cursor.par()->getLayout())).keepempty)