#include <config.h>
#include "lyxtext.h"
+
+#include "buffer.h"
+#include "bufferparams.h"
#include "BufferView.h"
-#include "funcrequest.h"
-#include "lyxrc.h"
-#include "Lsstream.h"
#include "debug.h"
-#include "buffer.h"
-#include "ParagraphParameters.h"
-#include "gettext.h"
#include "factory.h"
+#include "funcrequest.h"
+#include "gettext.h"
#include "intl.h"
#include "language.h"
-#include "support/tostr.h"
-#include "support/lstrings.h"
-#include "support/LAssert.h"
-#include "frontends/LyXView.h"
+#include "lyxrc.h"
+#include "lyxrow.h"
+#include "paragraph.h"
+#include "ParagraphParameters.h"
+#include "text_funcs.h"
+#include "undo_funcs.h"
+#include "vspace.h"
+
#include "frontends/Dialogs.h"
-#include "insets/insetspecialchar.h"
-#include "insets/insettext.h"
+#include "frontends/LyXView.h"
+
#include "insets/insetcommand.h"
#include "insets/insetnewline.h"
-#include "undo_funcs.h"
-#include "text_funcs.h"
+#include "insets/insetspecialchar.h"
+#include "insets/insettext.h"
+
+#include "support/lstrings.h"
+#include "support/tostr.h"
+#include "support/std_sstream.h"
+#include <clocale>
using namespace lyx::support;
using namespace bv_funcs;
using std::endl;
using std::find;
+
+using std::istringstream;
using std::vector;
+
using lyx::pos_type;
+
extern string current_layout;
extern int bibitemMaxWidth(BufferView *, LyXFont const &);
return 0;
// get inset dimensions
- Assert(par->getInset(pos));
+ BOOST_ASSERT(par->getInset(pos));
LyXFont const & font = text.getFont(par, pos);
case LFUN_WORDRIGHT:
if (!selection.mark())
bv->beforeChange(this);
- if (cursor.par()->isRightToLeftPar(bv->buffer()->params))
+ if (cursor.par()->isRightToLeftPar(bv->buffer()->params()))
cursorLeftOneWord();
else
cursorRightOneWord();
case LFUN_WORDLEFT:
if (!selection.mark())
bv->beforeChange(this);
- if (cursor.par()->isRightToLeftPar(bv->buffer()->params))
+ if (cursor.par()->isRightToLeftPar(bv->buffer()->params()))
cursorRightOneWord();
else
cursorLeftOneWord();
case LFUN_RIGHTSEL:
if (!selection.set())
selection.cursor = cursor;
- if (cursor.par()->isRightToLeftPar(bv->buffer()->params))
+ if (cursor.par()->isRightToLeftPar(bv->buffer()->params()))
cursorLeft(bv);
else
cursorRight(bv);
case LFUN_LEFTSEL:
if (!selection.set())
selection.cursor = cursor;
- if (cursor.par()->isRightToLeftPar(bv->buffer()->params))
+ if (cursor.par()->isRightToLeftPar(bv->buffer()->params()))
cursorRight(bv);
else
cursorLeft(bv);
break;
case LFUN_WORDRIGHTSEL:
- if (cursor.par()->isRightToLeftPar(bv->buffer()->params))
+ if (cursor.par()->isRightToLeftPar(bv->buffer()->params()))
cursorLeftOneWord();
else
cursorRightOneWord();
break;
case LFUN_WORDLEFTSEL:
- if (cursor.par()->isRightToLeftPar(bv->buffer()->params))
+ if (cursor.par()->isRightToLeftPar(bv->buffer()->params()))
cursorRightOneWord();
else
cursorLeftOneWord();
}
case LFUN_RIGHT: {
- bool is_rtl = cursor.par()->isRightToLeftPar(bv->buffer()->params);
+ bool is_rtl = cursor.par()->isRightToLeftPar(bv->buffer()->params());
if (!selection.mark())
bv->beforeChange(this);
if (is_rtl)
case LFUN_LEFT: {
// This is soooo ugly. Isn`t it possible to make
// it simpler? (Lgb)
- bool const is_rtl = cursor.par()->isRightToLeftPar(bv->buffer()->params);
+ bool const is_rtl = cursor.par()->isRightToLeftPar(bv->buffer()->params());
if (!selection.mark())
bv->beforeChange(this);
LyXCursor const cur = cursor;
case LFUN_BREAKPARAGRAPH:
replaceSelection(bv->getLyXText());
- breakParagraph(bv->buffer()->paragraphs, 0);
+ breakParagraph(bv->buffer()->paragraphs(), 0);
bv->update();
selection.cursor = cursor;
bv->switchKeyMap();
case LFUN_BREAKPARAGRAPHKEEPLAYOUT:
replaceSelection(bv->getLyXText());
- breakParagraph(bv->buffer()->paragraphs, 1);
+ breakParagraph(bv->buffer()->paragraphs(), 1);
bv->update();
selection.cursor = cursor;
bv->switchKeyMap();
}
}
else {
- breakParagraph(bv->buffer()->paragraphs, 0);
+ breakParagraph(bv->buffer()->paragraphs(), 0);
}
bv->update();
selection.cursor = cur;
}
case LFUN_INSET_SETTINGS:
- Assert(bv->theLockingInset());
+ BOOST_ASSERT(bv->theLockingInset());
bv->theLockingInset()->getLockingInset()->showInsetDialog(bv);
break;
// Derive layout number from given argument (string)
// and current buffer's textclass (number)
- LyXTextClass const & tclass = bv->buffer()->params.getLyXTextClass();
+ LyXTextClass const & tclass = bv->buffer()->params().getLyXTextClass();
bool hasLayout = tclass.hasLayout(cmd.argument);
string layout = cmd.argument;
LyXLayout_ptr const & style = pit->layout();
+ BufferParams const & bufparams = bv->buffer()->params();
if (style->pass_thru ||
- pit->getFontSettings(bv->buffer()->params,
- pos).language()->lang() == "hebrew" ||
- (!bv->insertInset(new InsetQuotes(c, bv->buffer()->params))))
+ pit->getFontSettings(bufparams,pos).language()->lang() == "hebrew" ||
+ !bv->insertInset(new InsetQuotes(c, bufparams)))
bv->owner()->dispatch(FuncRequest(LFUN_SELFINSERT, "\""));
break;
}