#include "insets/insetspecialchar.h"
#include "insets/insettext.h"
#include "insets/insetfloat.h"
#include "insets/insetspecialchar.h"
#include "insets/insettext.h"
#include "insets/insetfloat.h"
#include "support/LAssert.h"
#include "support/textutils.h"
#include "support/lstrings.h"
#include "support/LAssert.h"
#include "support/textutils.h"
#include "support/lstrings.h"
// Try implicit word selection
// If there is a change in the language the implicit word selection
// is disabled.
LyXCursor const reset_cursor = cursor;
bool const implicitSelection = selectWordWhenUnderCursor(bview, PREVIOUS_WORD);
// Try implicit word selection
// If there is a change in the language the implicit word selection
// is disabled.
LyXCursor const reset_cursor = cursor;
bool const implicitSelection = selectWordWhenUnderCursor(bview, PREVIOUS_WORD);
- idxstring = selectionAsString(bview->buffer(), false);
+ // Reset cursors to their original position.
+ cursor = reset_cursor;
+ setCursor(bview, cursor.par(), cursor.pos());
+ selection.cursor = cursor;
textclass.counters().step(layout->latexname());
// Is there a label? Useful for Chapter layout
if (!par->params().appendix()) {
textclass.counters().step(layout->latexname());
// Is there a label? Useful for Chapter layout
if (!par->params().appendix()) {
int head = textclass.maxcounter() - LABEL_COUNTER_CHAPTER;
if (!par->params().appendix()) {
numbertype = "sectioning";
int head = textclass.maxcounter() - LABEL_COUNTER_CHAPTER;
if (!par->params().appendix()) {
numbertype = "sectioning";
.numberLabel(layout->latexname(),
numbertype, langtype, head);
.numberLabel(layout->latexname(),
numbertype, langtype, head);
- .numberLabel(enumcounter,
- "enumeration", langtype);
- par->params().labelString(s.str().c_str());
+ .numberLabel(enumcounter, "enumeration");
+ par->params().labelString(STRCONV(s.str()));
while (tmppar && tmppar->inInset()
// the single '=' is intended below
&& (in = tmppar->inInset()->owner())) {
while (tmppar && tmppar->inInset()
// the single '=' is intended below
&& (in = tmppar->inInset()->owner())) {
// CHECK if this is really needed. (Lgb)
bview->buffer()->params.getLyXTextClass().counters().reset();
// CHECK if this is really needed. (Lgb)
bview->buffer()->params.getLyXTextClass().counters().reset();
- setLayout(bview, copylayouttype);
+ // do nothing if there has been no previous copyEnvironmentType()
+ if (!copylayouttype.empty())
+ setLayout(bview, copylayouttype);
-// sets the selection over the number of characters of string, no check!!
-void LyXText::setSelectionOverString(BufferView * bview, string const & str)
+void LyXText::setSelectionRange(BufferView * bview, lyx::pos_type length)