#include "bufferparams.h"
#include "buffer.h"
#include "debug.h"
+#include "intl.h"
#include "lyxrc.h"
#include "encoding.h"
#include "frontends/LyXView.h"
#include "frontends/Painter.h"
#include "frontends/font_metrics.h"
#include "frontends/screen.h"
+#include "frontends/WorkArea.h"
#include "bufferview_funcs.h"
#include "BufferView.h"
#include "language.h"
#include "ParagraphParameters.h"
#include "undo_funcs.h"
#include "WordLangTuple.h"
-#include "funcrequest.h"
+#include "paragraph_funcs.h"
#include "insets/insetbib.h"
#include "insets/insettext.h"
Buffer::inset_iterator it = bview->buffer()->inset_iterator_begin();
Buffer::inset_iterator end = bview->buffer()->inset_iterator_end();
for (; it != end; ++it) {
- if (*it == inset) {
+ if (&(*it) == inset) {
par = it.getPar();
pos = it.getPos();
break;
drawForeignMark(p, orig_x, orig_font);
-#ifdef INHERIT_LANGUAGE
-#ifdef WITH_WARNINGS
- if ((font.language() == inherit_language) ||
- (font.language() == ignore_language))
- lyxerr << "No this shouldn't happen!\n";
-#endif
-#endif
return true;
}
} else {
// find the next level paragraph
- Paragraph * newpar =
- row->par()->outerHook();
+ Paragraph * newpar = row->par()->outerHook();
// make a corresponding row. Needed to call LeftMargin()
// paragraph before or behind and we should react on that one
// but we can fix this in 1.3.0 (Jug 20020509)
bool const isempty = (layout->keepempty && cursor.par()->empty());
- cursor.par()->breakParagraph(bview->buffer()->params, cursor.pos(),
- keep_layout);
+ ::breakParagraph(bview->buffer()->params, cursor.par(), cursor.pos(),
+ keep_layout);
// well this is the caption hack since one caption is really enough
if (layout->labeltype == LABEL_SENSITIVE) {
&& cursor.par()->getAlign() == tmppar->getAlign()) {
removeParagraph(tmprow);
removeRow(tmprow);
- cursor.par()->pasteParagraph(bview->buffer()->params);
+ pasteParagraph(bview->buffer()->params, cursor.par());
if (!cursor.pos() || !cursor.par()->isSeparator(cursor.pos() - 1))
; //cursor.par()->insertChar(cursor.pos(), ' ');
{
return cursor.par()->getDepth();
}
-
-
-Inset::RESULT LyXText::lfunAppendix(FuncRequest const & cmd)
-{
- BufferView * bv = cmd.view();
- // what is this good for?
- if (!bv->available())
- return Inset::UNDISPATCHED;
-
- Paragraph * par = cursor.par();
- bool start = !par->params().startOfAppendix();
-
- // ensure that we have only one start_of_appendix in this document
- Paragraph * tmp = ownerParagraph();
- for (; tmp; tmp = tmp->next()) {
- tmp->params().startOfAppendix(false);
- }
-
- par->params().startOfAppendix(start);
-
- // we can set the refreshing parameters now
- status(cmd.view(), LyXText::NEED_MORE_REFRESH);
- refresh_y = 0;
- refresh_row = 0; // not needed for full update
- updateCounters(cmd.view());
- setCursor(cmd.view(), cursor.par(), cursor.pos());
- bv->update(this,
- BufferView::SELECT
- | BufferView::FITCUR
- | BufferView::CHANGE);
- return Inset::DISPATCHED;
-}
-
-
-Inset::RESULT LyXText::dispatch(FuncRequest const & cmd)
-{
- switch (cmd.action) {
- case LFUN_APPENDIX:
- return lfunAppendix(cmd);
-
- default:
- return Inset::UNDISPATCHED;
- }
- // shut up compiler
- return Inset::UNDISPATCHED;
-}