#include "paragraph_pimpl.h"
#include "buffer.h"
+#include "bufferparams.h"
#include "encoding.h"
#include "debug.h"
#include "gettext.h"
#include "language.h"
#include "latexrunparams.h"
-
-#include "support/std_sstream.h"
+#include "lyxrc.h"
+#include "lyxrow.h"
+#include "texrow.h"
+#include "vspace.h"
#include "insets/insetbibitem.h"
#include "insets/insetoptarg.h"
#include "support/lstrings.h"
-#include "support/LAssert.h"
#include "support/textutils.h"
+#include "support/std_sstream.h"
+using lyx::pos_type;
-using namespace lyx::support;
+using lyx::support::contains;
+using lyx::support::subst;
-using std::ostream;
-using std::ostringstream;
using std::endl;
-using std::fstream;
-using std::ios;
-using std::lower_bound;
-using std::upper_bound;
-using lyx::pos_type;
+using std::ostream;
+using std::ostringstream;
Paragraph::Paragraph()
InsetOld * Paragraph::getInset(pos_type pos)
{
- Assert(pos < size());
+ BOOST_ASSERT(pos < size());
return insetlist.get(pos);
}
InsetOld const * Paragraph::getInset(pos_type pos) const
{
- Assert(pos < size());
+ BOOST_ASSERT(pos < size());
return insetlist.get(pos);
}
LyXFont const Paragraph::getFontSettings(BufferParams const & bparams,
pos_type pos) const
{
- Assert(pos <= size());
+ BOOST_ASSERT(pos <= size());
Pimpl::FontList::const_iterator cit = pimpl_->fontlist.begin();
Pimpl::FontList::const_iterator end = pimpl_->fontlist.end();
lyx::pos_type Paragraph::getEndPosOfFontSpan(lyx::pos_type pos) const
{
- Assert(pos <= size());
+ BOOST_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
{
- Assert(pos >= 0);
+ BOOST_ASSERT(pos >= 0);
LyXLayout_ptr const & lout = layout();
void Paragraph::setFont(pos_type pos, LyXFont const & font)
{
- Assert(pos <= size());
+ BOOST_ASSERT(pos <= size());
// First, reduce font against layout/label font
// Update: The SetCharFont() routine in text2.C already
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)
getInset(i)->ascii(buffer, os);
}
- return STRCONV(os.str());
+ return os.str();
}
Change::Type Paragraph::lookupChange(lyx::pos_type pos) const
{
- Assert(!size() || pos < size());
+ BOOST_ASSERT(!size() || pos < size());
return pimpl_->lookupChange(pos);
}
Change const Paragraph::lookupChangeFull(lyx::pos_type pos) const
{
- Assert(!size() || pos < size());
+ BOOST_ASSERT(!size() || pos < size());
return pimpl_->lookupChangeFull(pos);
}