+2002-03-06 Lars Gullik Bjønnes <larsbj@birdstep.com>
+
+ * paragraph.C (breakParagraph): dont call clear do the work manually
+
+ * paragraph.[Ch] (clear): remove function
+
+2002-03-05 Lars Gullik Bjønnes <larsbj@birdstep.com>
+
+ * paragraph.C (Paragraph): dont call clear, the work has already
+ been done.
+
+ * lyxtextclass.C (operator): assert if n is empty
+
+ * CutAndPaste.C (cutSelection): dont call Paragraph::clear, do the
+ work manually instead.
+
2002-03-01 John Levon <moz@compsoc.man.ac.uk>
* BufferView_pimpl.C: protect selectionLost against text == 0
(*endpar)->previous(startpar);
// the cut selection should begin with standard layout
- if (realcut)
- buf->clear();
-
+ if (realcut) {
+ buf->params().clear();
+ buf->bibkey = 0;
+ buf->layout(textclasslist[current_view->buffer()->params.textclass].defaultLayoutName());
+ }
+
// paste the paragraphs again, if possible
if (doclear)
startpar->next()->stripLeadingSpaces(textclass);
+2002-03-06 Lars Gullik Bjønnes <larsbj@birdstep.com>
+
+ * insetert.C (getMaxWidth): make w unsigned int.
+
2002-03-05 Juergen Vigna <jug@sad.it>
* insetert.C (status): change behaviour of Inlined.
int InsetERT::getMaxWidth(BufferView * bv, UpdatableInset const * in) const
{
- int w = InsetCollapsable::getMaxWidth(bv, in);
+ unsigned int w = InsetCollapsable::getMaxWidth(bv, in);
if (status_ != Inlined || w < 0)
return w;
LyXText * text = inset.getLyXText(bv);
LyXLayout const & LyXTextClass::operator[](string const & n) const
{
+ lyx::Assert(!n.empty());
+
if (n.empty())
lyxerr << "Operator[] called with empty n" << endl;
LyXLayout & LyXTextClass::operator[](string const & n)
{
+ lyx::Assert(!n.empty());
+
if (n.empty())
lyxerr << "Operator[] called with empty n" << endl;
enumdepth = 0;
itemdepth = 0;
bibkey = 0; // ale970302
- clear();
}
// end
bibkey = 0; // ale970302
-
- clear();
}
// end of minibuffer
-
-void Paragraph::clear()
-{
- params().clear();
-
- layout_.erase();
-
- bibkey = 0;
-}
-
-
void Paragraph::erase(pos_type pos)
{
pimpl_->erase(pos);
tmp->params().pagebreakTop(params().pagebreakTop());
tmp->params().spaceTop(params().spaceTop());
tmp->bibkey = bibkey;
- clear();
+
+ bibkey = 0;
+ params().clear();
+ layout(textclasslist[bparams.textclass].defaultLayoutName());
+
// layout stays the same with latex-environments
if (flag) {
layout(tmp->layout());
void Paragraph::layout(string const & new_layout)
{
+ lyx::Assert(!new_layout.empty());
+
layout_ = new_layout;
}
///
bool isWord(lyx::pos_type pos) const;
- /** This one resets all layout and dtp switches but not the font
- of the single characters
- */
- void clear();
-
/** paste this paragraph with the next one
be carefull, this doesent make any check at all
*/