#include <csignal>
#include <ctime>
+using namespace lyx::support;
+
using std::ostream;
using std::endl;
using std::fstream;
InsetList::iterator it = insetlist.begin();
InsetList::iterator end = insetlist.end();
for (; it != end; ++it) {
- it->inset = it->inset->clone();
+ // currently we hold Inset*, not InsetBase*
+ it->inset = static_cast<Inset*>(it->inset->clone());
// tell the new inset who is the boss now
it->inset->parOwner(this);
}
InsetList::iterator it = insetlist.begin();
InsetList::iterator end = insetlist.end();
for (; it != end; ++it) {
- it->inset = it->inset->clone();
+ it->inset = static_cast<Inset*>(it->inset->clone());
// tell the new inset who is the boss now
it->inset->parOwner(this);
}
minibuffer_inset = 0;
if (minibuffer_char == Paragraph::META_INSET) {
if (getInset(pos)) {
- minibuffer_inset = getInset(pos)->clone();
+ minibuffer_inset = static_cast<Inset *>(getInset(pos)->clone());
} else {
minibuffer_inset = 0;
minibuffer_char = ' ';
Inset * Paragraph::getInset(pos_type pos)
{
- lyx::Assert(pos < size());
+ Assert(pos < size());
return insetlist.get(pos);
}
Inset const * Paragraph::getInset(pos_type pos) const
{
- lyx::Assert(pos < size());
+ Assert(pos < size());
return insetlist.get(pos);
}
LyXFont const Paragraph::getFontSettings(BufferParams const & bparams,
pos_type pos) const
{
- lyx::Assert(pos <= size());
+ Assert(pos <= size());
Pimpl::FontList::const_iterator cit = pimpl_->fontlist.begin();
Pimpl::FontList::const_iterator end = pimpl_->fontlist.end();
LyXFont const Paragraph::getFont(BufferParams const & bparams, pos_type pos,
LyXFont const & outerfont) const
{
- lyx::Assert(pos >= 0);
+ Assert(pos >= 0);
LyXLayout_ptr const & lout = layout();
void Paragraph::setFont(pos_type pos, LyXFont const & font)
{
- lyx::Assert(pos <= size());
+ Assert(pos <= size());
// First, reduce font against layout/label font
// Update: The SetCharFont() routine in text2.C already
// Used for building the table of contents
string const Paragraph::asString(Buffer const * buffer, bool label) const
{
+#if 0
string s;
if (label && !params().labelString().empty())
s += params().labelString() + ' ';
}
return s;
+#else
+ // This should really be done by the caller and not here.
+ string ret(asString(buffer, 0, size(), label));
+ return subst(ret, '\n', ' ');
+#endif
}
Change::Type Paragraph::lookupChange(lyx::pos_type pos) const
{
- lyx::Assert(!size() || pos < size());
+ Assert(!size() || pos < size());
return pimpl_->lookupChange(pos);
}
Change const Paragraph::lookupChangeFull(lyx::pos_type pos) const
{
- lyx::Assert(!size() || pos < size());
+ Assert(!size() || pos < size());
return pimpl_->lookupChangeFull(pos);
}