-/* This file is part of
- * ======================================================
+/**
+ * \file paragraph.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
*
- * LyX, The Document Processor
+ * \author Asger Alstrup
+ * \author Lars Gullik Bjønnes
+ * \author Jean-Marc Lasgouttes
+ * \author Angus Leeming
+ * \author John Levon
+ * \author André Pönitz
+ * \author Dekel Tsur
+ * \author Jürgen Vigna
*
- * Copyright 1995 Matthias Ettrich
- * Copyright 1995-2001 The LyX Team.
- *
- * ====================================================== */
+ * Full author contact details are available in file CREDITS.
+ */
#include <config.h>
Paragraph::Paragraph()
- : pimpl_(new Paragraph::Pimpl(this))
+ : y(0), pimpl_(new Paragraph::Pimpl(this))
{
enumdepth = 0;
itemdepth = 0;
Paragraph::Paragraph(Paragraph const & lp)
- : pimpl_(new Paragraph::Pimpl(*lp.pimpl_, this))
+ : y(0), pimpl_(new Paragraph::Pimpl(*lp.pimpl_, this))
{
enumdepth = 0;
itemdepth = 0;
for (; it != end; ++it) {
// currently we hold Inset*, not InsetBase*
it->inset = static_cast<InsetOld*>(it->inset->clone().release());
- // tell the new inset who is the boss now
- it->inset->parOwner(this);
}
}
InsetList::iterator end = insetlist.end();
for (; it != end; ++it) {
it->inset = static_cast<InsetOld*>(it->inset->clone().release());
- // tell the new inset who is the boss now
- it->inset->parOwner(this);
}
}
}
-void Paragraph::write(Buffer const * buf, ostream & os,
+void Paragraph::write(Buffer const & buf, ostream & os,
BufferParams const & bparams,
depth_type & dth) const
{
}
-void Paragraph::insertInset(pos_type pos, InsetOld * inset, LyXFont const & font, Change change)
+void Paragraph::insertInset(pos_type pos, InsetOld * inset,
+ LyXFont const & font, Change change)
{
pimpl_->insertInset(pos, inset, font, change);
}
// This one spits out the text of the paragraph
-bool Paragraph::simpleTeXOnePar(Buffer const * buf,
+bool Paragraph::simpleTeXOnePar(Buffer const & buf,
BufferParams const & bparams,
LyXFont const & outerfont,
ostream & os, TexRow & texrow,
// Convert the paragraph to a string.
// Used for building the table of contents
-string const Paragraph::asString(Buffer const * buffer, bool label) const
+string const Paragraph::asString(Buffer const & buffer, bool label) const
{
#if 0
string s;
}
-string const Paragraph::asString(Buffer const * buffer,
+string const Paragraph::asString(Buffer const & buffer,
pos_type beg, pos_type end, bool label) const
{
ostringstream os;
os << params().labelString() << ' ';
for (pos_type i = beg; i < end; ++i) {
- value_type const c = getUChar(buffer->params, i);
+ value_type const c = getUChar(buffer.params, i);
if (IsPrintable(c))
os << c;
else if (c == META_INSET)
}
-void Paragraph::resizeInsetsLyXText(BufferView * bv)
-{
- insetlist.resizeInsetsLyXText(bv);
-}
-
-
void Paragraph::setContentsFromPar(Paragraph const & par)
{
pimpl_->setContentsFromPar(par);
return true;
// for now we just need this, later should we need this in some
- // other way we can always add a function to InsetOld::() too.
+ // other way we can always add a function to InsetOld too.
if (pimpl_->inset_owner && pimpl_->inset_owner->owner())
return pimpl_->inset_owner->owner()->lyxCode() == InsetOld::ERT_CODE;
return false;