]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph.C
Change to use preffered calling of Boost.Function
[lyx.git] / src / paragraph.C
index 153648a93696b189c13ee0fba6d480315843885b..05a525c53a9e22dbfd891308c190d3e6ab31fae7 100644 (file)
@@ -138,12 +138,12 @@ void Paragraph::write(Buffer const & buf, ostream & os,
        if (dth != params().depth()) {
                if (params().depth() > dth) {
                        while (params().depth() > dth) {
-                               os << "\n\\begin_deeper ";
+                               os << "\n\\begin_deeper";
                                ++dth;
                        }
                } else {
                        while (params().depth() < dth) {
-                               os << "\n\\end_deeper ";
+                               os << "\n\\end_deeper";
                                --dth;
                        }
                }
@@ -192,13 +192,13 @@ void Paragraph::write(Buffer const & buf, ostream & os,
                                } else {
                                        os << "\n\\begin_inset ";
                                        inset->write(buf, os);
-                                       os << "\n\\end_inset \n\n";
+                                       os << "\n\\end_inset\n\n";
                                        column = 0;
                                }
                }
                break;
                case '\\':
-                       os << "\n\\backslash \n";
+                       os << "\n\\backslash\n";
                        column = 0;
                        break;
                case '.':
@@ -1481,15 +1481,15 @@ bool IsInsetChar(char c)
 
 bool Paragraph::isHfill(pos_type pos) const
 {
-       return
-               isInset(pos) && getInset(pos)->lyxCode() == InsetBase::HFILL_CODE;
+       return isInset(pos) 
+               && getInset(pos)->lyxCode() == InsetBase::HFILL_CODE;
 }
 
 
 bool Paragraph::isNewline(pos_type pos) const
 {
-       return
-               isInset(pos) && getInset(pos)->lyxCode() == InsetBase::NEWLINE_CODE;
+       return isInset(pos) 
+               && getInset(pos)->lyxCode() == InsetBase::NEWLINE_CODE;
 }
 
 
@@ -1736,25 +1736,6 @@ void Paragraph::rejectChange(pos_type start, pos_type end)
 }
 
 
-Paragraph::value_type Paragraph::getChar(pos_type pos) const
-{
-       // This is in the critical path!
-       pos_type const siz = text_.size();
-
-       BOOST_ASSERT(0 <= pos);
-       BOOST_ASSERT(pos <= siz);
-
-       if (pos == siz) {
-               lyxerr << "getChar() on pos " << pos << " in par id "
-                      << id() << " of size " << siz
-                      << "  is a bit silly !" << endl;
-               BOOST_ASSERT(false);
-       }
-
-       return text_[pos];
-}
-
-
 int Paragraph::id() const
 {
        return pimpl_->id_;