#include "support/LAssert.h"
#include "support/tostr.h"
#include "support/filetools.h"
+#include "support/path_defines.h"
#include <boost/bind.hpp>
#include <boost/signals/connection.hpp>
LyXText * text = bv_->getLyXText();
if (text->real_current_font.isRightToLeft()
&& !(bv_->theLockingInset()
- && bv_->theLockingInset()->lyxCode() == Inset::ERT_CODE))
+ && bv_->theLockingInset()->lyxCode() == InsetOld::ERT_CODE))
{
if (owner_->getIntl().keymap == Intl::PRIMARY)
owner_->getIntl().KeyMapSec();
*/
-Inset * BufferView::Pimpl::getInsetByCode(Inset::Code code)
+InsetOld * BufferView::Pimpl::getInsetByCode(InsetOld::Code code)
{
#if 0
LyXCursor cursor = bv_->getLyXText()->cursor;
make_pair(string(_("Documents|#o#O")),
string(lyxrc.document_path)),
make_pair(string(_("Examples|#E#e")),
- string(AddPath(system_lyxdir, "examples"))));
+ string(AddPath(system_lyxdir(), "examples"))));
FileDialog::Result result =
fileDlg.open(initpath,
#warning changes FIXME
//moveCursorUpdate(false);
- bool found = lyxfind::findNextChange(bv_);
+ bool found = lyx::find::findNextChange(bv_);
if (found) {
owner_->getDialogs().show("changes");
return;
string label = ev.argument;
if (label.empty()) {
InsetRef * inset =
- static_cast<InsetRef*>(getInsetByCode(Inset::REF_CODE));
+ static_cast<InsetRef*>(getInsetByCode(InsetOld::REF_CODE));
if (inset) {
label = inset->getContents();
savePosition(0);
break;
case LFUN_INSET_INSERT: {
- Inset * inset = createInset(ev);
+ InsetOld * inset = createInset(ev);
if (inset && insertInset(inset)) {
updateInset(inset);
case LFUN_FLOAT_LIST:
if (tclass.floats().typeExist(ev.argument)) {
- Inset * inset = new InsetFloatList(ev.argument);
+ InsetOld * inset = new InsetFloatList(ev.argument);
if (!insertInset(inset, tclass.defaultLayoutName()))
delete inset;
} else {
params2string(*par, data);
// Will the paragraph accept changes from the dialog?
- Inset * const inset = par->inInset();
+ InsetOld * const inset = par->inInset();
bool const accept =
!(inset && inset->forceDefaultParagraphs(inset));
#warning FIXME changes
//moveCursorUpdate(false);
- while (lyxfind::findNextChange(bv_)) {
+ while (lyx::find::findNextChange(bv_)) {
bv_->getLyXText()->acceptChange();
}
update(BufferView::SELECT);
#warning FIXME changes
//moveCursorUpdate(false);
- while (lyxfind::findNextChange(bv_)) {
+ while (lyx::find::findNextChange(bv_)) {
bv_->getLyXText()->rejectChange();
}
update(BufferView::SELECT);
}
-bool BufferView::Pimpl::insertInset(Inset * inset, string const & lout)
+bool BufferView::Pimpl::insertInset(InsetOld * inset, string const & lout)
{
// if we are in a locking inset we should try to insert the
// inset there otherwise this is a illegal function now
}
// not quite sure if we want this...
- setCursorParUndo(bv_);
+ recordUndo(bv_, Undo::ATOMIC);
freezeUndo();
beforeChange(bv_->text);
}
-void BufferView::Pimpl::updateInset(Inset * inset)
+void BufferView::Pimpl::updateInset(InsetOld * inset)
{
if (!inset || !available())
return;
// then check if the inset is a top_level inset (has no owner)
// if yes do the update as always otherwise we have to update the
// toplevel inset where this inset is inside
- Inset * tl_inset = inset;
+ InsetOld * tl_inset = inset;
while (tl_inset->owner())
tl_inset = tl_inset->owner();
if (tl_inset == inset) {