]> git.lyx.org Git - lyx.git/blobdiff - src/Text.cpp
Shortcut for LyX HTML output. (Makes my life easier!)
[lyx.git] / src / Text.cpp
index 769285a14924a94ed54cd7d431fe558b50a7aff3..d8436b2ddc7eed3cfa789a052477a5ef8401ac01 100644 (file)
@@ -274,8 +274,8 @@ InsetText const & Text::inset() const
 void Text::readParToken(Paragraph & par, Lexer & lex,
        string const & token, Font & font, Change & change, ErrorList & errorList)
 {
-       Buffer const & buf = owner_->buffer();
-       BufferParams const & bp = buf.params();
+       Buffer * buf = const_cast<Buffer *>(&owner_->buffer());
+       BufferParams const & bp = buf->params();
 
        if (token[0] != '\\') {
                docstring dstr = lex.getDocString();
@@ -397,18 +397,18 @@ void Text::readParToken(Paragraph & par, Lexer & lex,
                auto_ptr<Inset> inset;
                inset.reset(new InsetSpecialChar);
                inset->read(lex);
-               inset->setBuffer(const_cast<Buffer &>(buf));
+               inset->setBuffer(*buf);
                par.insertInset(par.size(), inset.release(), font, change);
        } else if (token == "\\backslash") {
                par.appendChar('\\', font, change);
        } else if (token == "\\LyXTable") {
-               auto_ptr<Inset> inset(new InsetTabular(const_cast<Buffer &>(buf)));
+               auto_ptr<Inset> inset(new InsetTabular(buf));
                inset->read(lex);
                par.insertInset(par.size(), inset.release(), font, change);
        } else if (token == "\\lyxline") {
                auto_ptr<Inset> inset;
                inset.reset(new InsetLine);
-               inset->setBuffer(const_cast<Buffer &>(buf));
+               inset->setBuffer(*buf);
                par.insertInset(par.size(), inset.release(), font, change);
        } else if (token == "\\change_unchanged") {
                change = Change(Change::UNCHANGED);
@@ -915,7 +915,8 @@ void Text::insertChar(Cursor & cur, char_type c)
        cur.checkBufferStructure();
 
 //             cur.updateFlags(Update::Force);
-       bool boundary = tm.isRTLBoundary(cur.pit(), cur.pos() + 1);
+       bool boundary = cur.boundary()
+               || tm.isRTLBoundary(cur.pit(), cur.pos() + 1);
        setCursor(cur, cur.pit(), cur.pos() + 1, false, boundary);
        charInserted(cur);
 }