X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fparagraph.C;h=730b7d0159785ab38a5dd73d88407faae3e7740b;hb=cd03e2b7db8379a91f3d31eac2c5bc25b159c541;hp=7db14f10eeccde5a17fe32fc884eeac58efb0696;hpb=b0a5773d95a73a57db7a2c9290616757715375c0;p=lyx.git diff --git a/src/paragraph.C b/src/paragraph.C index 7db14f10ee..730b7d0159 100644 --- a/src/paragraph.C +++ b/src/paragraph.C @@ -21,34 +21,33 @@ #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 "RowList.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() @@ -294,14 +293,14 @@ bool Paragraph::insetAllowed(InsetOld::Code code) 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); } @@ -310,7 +309,7 @@ InsetOld const * Paragraph::getInset(pos_type pos) const 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(); @@ -330,7 +329,7 @@ LyXFont const Paragraph::getFontSettings(BufferParams const & bparams, 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(); @@ -363,7 +362,7 @@ LyXFont const Paragraph::getFirstFontSettings() const 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(); @@ -485,7 +484,7 @@ Paragraph::getUChar(BufferParams const & bparams, pos_type pos) const 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 @@ -1154,14 +1153,14 @@ string const Paragraph::asString(Buffer const & buffer, 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(); } @@ -1208,14 +1207,14 @@ void Paragraph::cleanChanges() 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); }