Commit Graph

15 Commits

Author SHA1 Message Date
Stefan Schimanski
fb74387b44 * put debug variables into #ifdef 0 block. Good that modern computer
science can enforce good code quality by stopping compilation if
  unused variables are found.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18577 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-30 06:58:08 +00:00
Stefan Schimanski
880b6c4d6e 1. switch LFUN_UP/DOWN handling to a structural approach, i.e. the
dispatchers in mathed and text only do local work, i.e. only try to
move the cursor with their local knowledge, not globally as before in
the Cursor::goUpDown function before. The old approach used one of
brutefind functions as a last way out to really move the cursor up or
down. The result was some strange behavior that the nearest inset was
selected when jumping from math to text, not one in the next line. 
2. removed LFUN_FINISHED_UP/DOWN, as there seem to be no effect and it
seems to be obsolete.
3. target_x is working again, mainly by adding a textTargetOffset_
member to the Cursor which keeps the difference between the target_x
and the actual position of the cursor on screen. As long as
pos+offset=target is fulfilled the target_x is not touched and the
cursor keep the column while going up/down.
4. moved the text cursor up/down code to the Cursor class, in analogy
to the mathed code.
5. For 1 it is necessary to know the cursor position before the
dispatch. So this data is added to the Cursor.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18569 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-29 20:53:32 +00:00
Jürgen Spitzmüller
ac45b49fb9 Fix bug 2555:
* src/Text2.cpp:
	- (setFont): set font of inset as well, not only content
	-  (setCharFont): remove obsolete assert

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18563 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-29 17:02:29 +00:00
Lars Gullik Bjønnes
897436efbb Whitespace cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18550 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-28 22:27:45 +00:00
Stefan Schimanski
15055e721a * depending on "front" the last position is a valid one (Dov Feldstern's patch)
* fixes http://bugzilla.lyx.org/show_bug.cgi?id=3720


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18532 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-27 08:16:17 +00:00
Georg Baum
7930b9e5b6 fix bug 1973 (hopefully)
* src/Text2.cpp
	(Text::setCharFont): Assert
	(Text::setInsetFont): New, set the font recursively in insets
	(Text::setFont): Call setInsetFont instead of setCharFont if needed

	* src/DocIterator.cpp
	(DocIterator::forwardIdx): Implement

	* src/Text.h
	(Text::setInsetFont): New, set the font recursively in insets
	(Text::setCharFont): Document



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18452 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-22 10:51:38 +00:00
José Matox
4729f795bc Fix a crash which occurs when RTL flag is turned on.
The crash was being caused by the fact that when moving back from the
beginning of the line to the previous line (by pressing RIGHT in an
RTL paragraph, or LEFT in an LTR one), Bidi metrics for the new line
do not yet exist, but an attempt is made to access them.

Basically, this patch was created by trying to "symmetrically" copy
cursorRight (which seems to work well) to cursorLeft (which was
problematic).



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18389 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-17 21:53:11 +00:00
Richard Heck
3430c35ee3 [Bugs 3461 and 3630] Allow real_current_font to be reset in Text::setFont even when we have a selection.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18382 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-17 12:17:38 +00:00
Abdelrazak Younes
e9780fe317 Fix cursor movement inside insets within RTL mode.
* Bidi.{h,cpp}:
  - isWithinRtlParagraph(): new helper function.

* Text2.cpp: use function above for cursor up and down instead of needReverseDirection() which is about cursor left and right.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18364 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-16 09:35:12 +00:00
Abdelrazak Younes
06676b6d5b rev 18350: forgot this.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18352 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-15 17:25:30 +00:00
Abdelrazak Younes
105b8b2bf1 rev 18350: forgot this.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18351 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-15 17:24:26 +00:00
Bernhard Roider
9b5b7587a3 add comments and rtl support for cursor positioning problem
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18323 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-14 20:03:40 +00:00
Bernhard Roider
5d9e65058c fix cursor movement (up/down) problem at the end of lines in insets and table cells.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18293 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-13 19:53:06 +00:00
Michael Schmitt
8dcc7cf00e * src/Text2.cpp: fix error message (do not refer to old, non-existing menu item);
I wonder whether this message is used at all, as it does not occur when
	runnig font-free-apply after program start


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18149 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-01 10:25:46 +00:00
André Pönitz
e0d54dd3b4 LyXText -> Text
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18103 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 23:33:02 +00:00