]> git.lyx.org Git - features.git/blobdiff - src/bufferview_funcs.C
Replace LString.h with support/std_string.h,
[features.git] / src / bufferview_funcs.C
index c343a5d4168bee022be5d2e25ebd72303eb1ea6f..d2a945e8fb5fa6be06e26d22e14c76f30ccf137d 100644 (file)
@@ -3,40 +3,32 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Lars Gullik Bjønnes
+ * \author Lars Gullik Bjønnes
  * \author Jean-Marc Lasgouttes
  * \author John Levon
  * \author Angus Leeming
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 
 #include "bufferview_funcs.h"
 #include "BufferView.h"
-#include "paragraph.h"
-#include "lyxfont.h"
 #include "lyxlex.h"
-#include "lyxtext.h"
 #include "buffer.h"
-#include "lyx_cb.h"
 #include "language.h"
 #include "gettext.h"
 #include "ParagraphParameters.h"
-#include "author.h"
-#include "changes.h"
 
 #include "frontends/LyXView.h"
 #include "frontends/Alert.h"
 #include "mathed/math_cursor.h"
 
 #include "support/tostr.h"
-#include "Lsstream.h"
+#include "support/std_sstream.h"
 
-#include "insets/updatableinset.h"
-#include <boost/bind.hpp>
-#include <algorithm>
+#include "insets/insettext.h"
 
 using namespace lyx::support;
 
@@ -232,8 +224,7 @@ bool changeDepth(BufferView * bv, LyXText * text, DEPTH_CHANGE type, bool test_o
 
        bool const changed = text->changeDepth(type, false);
        if (text->inset_owner)
-               bv->updateInset();
-       bv->update();
+               bv->updateInset(text->inset_owner);
        return changed;
 }
 
@@ -363,7 +354,10 @@ string const currentState(BufferView * bv)
        }
 #ifdef DEVEL_VERSION
        state << _(", Paragraph: ") << text->cursor.par()->id();
-       state << "  Inset: " <<
+       state << _(", Position: ") << text->cursor.pos();
+       RowList::iterator rit = text->cursorRow();
+       state << bformat(_(", Row b:%1$d e:%2$d"), rit->pos(), rit->end());
+       state << _(", Inset: ") <<
                (text->cursor.par()->inInset() ? text->cursor.par()->inInset()->id() : -1);
 #endif
        return STRCONV(state.str());
@@ -390,9 +384,10 @@ void toggleAndShow(BufferView * bv, LyXFont const & font, bool toggleall)
        if (font.language() != ignore_language ||
            font.number() != LyXFont::IGNORE) {
                LyXCursor & cursor = text->cursor;
-               text->computeBidiTables(bv->buffer(), text->cursorRow());
+               text->computeBidiTables(text->cursor.par(), *bv->buffer(),
+                       text->cursorRow());
                if (cursor.boundary() !=
-                   text->isBoundary(bv->buffer(), *cursor.par(), cursor.pos(),
+                   text->isBoundary(*bv->buffer(), *cursor.par(), cursor.pos(),
                                     text->real_current_font))
                        text->setCursor(cursor.par(), cursor.pos(),
                                        false, !cursor.boundary());