mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
RTL fixes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4630 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0785d52b2b
commit
67d0aa74f4
@ -1,3 +1,8 @@
|
|||||||
|
2002-07-13 Dekel Tsur <dekelts@tau.ac.il>
|
||||||
|
|
||||||
|
* lyxfunc.C (dispatch): Correct cursor behaviour when exiting
|
||||||
|
an inset in a RTL paragraph.
|
||||||
|
|
||||||
2002-07-12 John Levon <moz@compsoc.man.ac.uk>
|
2002-07-12 John Levon <moz@compsoc.man.ac.uk>
|
||||||
|
|
||||||
* lyxfunc.C: repaint after a font size update
|
* lyxfunc.C: repaint after a font size update
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2002-07-13 Dekel Tsur <dekelts@tau.ac.il>
|
||||||
|
|
||||||
|
* insettext.C (unlockInsetInInset): Correct cursor behaviour for
|
||||||
|
RTL paragraphs.
|
||||||
|
|
||||||
2002-07-05 Angus Leeming <leeming@lyx.org>
|
2002-07-05 Angus Leeming <leeming@lyx.org>
|
||||||
|
|
||||||
* inset.h (generatePreview): new virtual method.
|
* inset.h (generatePreview): new virtual method.
|
||||||
|
@ -585,10 +585,17 @@ void InsetTabular::edit(BufferView * bv, bool front)
|
|||||||
the_locking_inset = 0;
|
the_locking_inset = 0;
|
||||||
inset_x = 0;
|
inset_x = 0;
|
||||||
inset_y = 0;
|
inset_y = 0;
|
||||||
if (front)
|
if (front) {
|
||||||
|
if (isRightToLeft(bv))
|
||||||
|
actcell = tabular->GetLastCellInRow(0);
|
||||||
|
else
|
||||||
actcell = 0;
|
actcell = 0;
|
||||||
|
} else {
|
||||||
|
if (isRightToLeft(bv))
|
||||||
|
actcell = tabular->GetFirstCellInRow(tabular->rows()-1);
|
||||||
else
|
else
|
||||||
actcell = tabular->GetNumberOfCells() - 1;
|
actcell = tabular->GetNumberOfCells() - 1;
|
||||||
|
}
|
||||||
clearSelection();
|
clearSelection();
|
||||||
resetPos(bv);
|
resetPos(bv);
|
||||||
bv->fitCursor();
|
bv->fitCursor();
|
||||||
|
@ -932,7 +932,7 @@ bool InsetText::unlockInsetInInset(BufferView * bv, UpdatableInset * inset,
|
|||||||
getLyXText(bv)->updateInset(bv, inset);
|
getLyXText(bv)->updateInset(bv, inset);
|
||||||
the_locking_inset = 0;
|
the_locking_inset = 0;
|
||||||
if (lr)
|
if (lr)
|
||||||
moveRight(bv, false);
|
moveRightIntern(bv, true, false);
|
||||||
old_par = 0; // force layout setting
|
old_par = 0; // force layout setting
|
||||||
if (scroll())
|
if (scroll())
|
||||||
scroll(bv, 0.0F);
|
scroll(bv, 0.0F);
|
||||||
@ -1842,7 +1842,7 @@ UpdatableInset::RESULT
|
|||||||
InsetText::moveRight(BufferView * bv, bool activate_inset, bool selecting)
|
InsetText::moveRight(BufferView * bv, bool activate_inset, bool selecting)
|
||||||
{
|
{
|
||||||
if (getLyXText(bv)->cursor.par()->isRightToLeftPar(bv->buffer()->params))
|
if (getLyXText(bv)->cursor.par()->isRightToLeftPar(bv->buffer()->params))
|
||||||
return moveLeftIntern(bv, true, activate_inset, selecting);
|
return moveLeftIntern(bv, false, activate_inset, selecting);
|
||||||
else
|
else
|
||||||
return moveRightIntern(bv, true, activate_inset, selecting);
|
return moveRightIntern(bv, true, activate_inset, selecting);
|
||||||
}
|
}
|
||||||
@ -1852,7 +1852,7 @@ UpdatableInset::RESULT
|
|||||||
InsetText::moveLeft(BufferView * bv, bool activate_inset, bool selecting)
|
InsetText::moveLeft(BufferView * bv, bool activate_inset, bool selecting)
|
||||||
{
|
{
|
||||||
if (getLyXText(bv)->cursor.par()->isRightToLeftPar(bv->buffer()->params))
|
if (getLyXText(bv)->cursor.par()->isRightToLeftPar(bv->buffer()->params))
|
||||||
return moveRightIntern(bv, false, activate_inset, selecting);
|
return moveRightIntern(bv, true, activate_inset, selecting);
|
||||||
else
|
else
|
||||||
return moveLeftIntern(bv, false, activate_inset, selecting);
|
return moveLeftIntern(bv, false, activate_inset, selecting);
|
||||||
}
|
}
|
||||||
|
@ -878,18 +878,14 @@ string const LyXFunc::dispatch(kb_action action, string argument)
|
|||||||
goto exit_with_message;
|
goto exit_with_message;
|
||||||
// If UNDISPATCHED, just soldier on
|
// If UNDISPATCHED, just soldier on
|
||||||
else if (result == UpdatableInset::FINISHED) {
|
else if (result == UpdatableInset::FINISHED) {
|
||||||
if (TEXT()->cursor.par()->isRightToLeftPar(owner->buffer()->params)) {
|
|
||||||
TEXT()->cursorRight(owner->view());
|
|
||||||
moveCursorUpdate(true, false);
|
|
||||||
owner->showState();
|
|
||||||
}
|
|
||||||
goto exit_with_message;
|
goto exit_with_message;
|
||||||
|
// We do not need special RTL handling here:
|
||||||
|
// FINISHED means that the cursor should be
|
||||||
|
// one position after the inset.
|
||||||
} else if (result == UpdatableInset::FINISHED_RIGHT) {
|
} else if (result == UpdatableInset::FINISHED_RIGHT) {
|
||||||
if (!TEXT()->cursor.par()->isRightToLeftPar(owner->buffer()->params)) {
|
|
||||||
TEXT()->cursorRight(owner->view());
|
TEXT()->cursorRight(owner->view());
|
||||||
moveCursorUpdate(true, false);
|
moveCursorUpdate(true, false);
|
||||||
owner->showState();
|
owner->showState();
|
||||||
}
|
|
||||||
goto exit_with_message;
|
goto exit_with_message;
|
||||||
} else if (result == UpdatableInset::FINISHED_UP) {
|
} else if (result == UpdatableInset::FINISHED_UP) {
|
||||||
if (TEXT()->cursor.irow()->previous()) {
|
if (TEXT()->cursor.irow()->previous()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user