Commit Graph

59 Commits

Author SHA1 Message Date
André Pönitz
49d3f19860 cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21892 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-01 00:12:03 +00:00
André Pönitz
2506e0d643 assimilate BOOST_CURRENT_FUNCTION
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21867 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-29 21:10:35 +00:00
André Pönitz
9d0ea8aeff Move debug.{cpp,h}, Messages.{cpp,h} and gettext.{cpp,h} to support/.
Now support/* should have no dependencies on src/* anymore.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21851 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-29 07:04:28 +00:00
Abdelrazak Younes
d3887a2ce0 fix MSVC warning.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21713 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-22 07:49:25 +00:00
Jean-Marc Lasgouttes
8b1cc5bfef * src/Text2.cpp (deleteEmptyParagraphMechanism): do not reset the
appendix marker if the deleted paragraph was the last one (bug 4352)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21639 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-16 13:33:21 +00:00
André Pönitz
e1ce2f92db reduce line noise
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21631 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-15 20:04:51 +00:00
Abdelrazak Younes
cdf1378200 Introducing TextClassPtr.h to minimize header dependencies.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21506 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-07 23:25:08 +00:00
Dov Feldstern
3e2af36af1 Fix LFUN_LANGUAGE bug due to Font/Language separation (r21240):
the LFUN had stopped working, because since language is no longer part of the
font, changes to the language were no longer being registered in the fontInfo, 
and so we were wrongly under the impression that nothing had been changed.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21305 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-30 22:55:33 +00:00
Abdelrazak Younes
d2bfe05827 Forbid implicit conversion from FontInfo to Font.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21250 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-28 23:32:18 +00:00
Abdelrazak Younes
5ddc612b73 Splitup Font in saner bits:
* Font::FontBits -> FontInfo
* Font::FONT_XXX -> all enums transfered to FontEnums.h and renamed to FontXxx

I've replaced Font uses with FontInfo were the language() member was not needed, basically all draw() and metrics methods. There's one problematic cases with InsetQuotes which I solved by taking the Buffer main language.




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21240 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-28 18:51:54 +00:00
Abdelrazak Younes
eea79637c7 Move Color::color enum to ColorCode.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21198 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-25 12:41:02 +00:00
Dov Feldstern
662b58497e Getting rid of LTR bias --- part 1/?
This is the first patch in a series meant to remove LTR bias from the code.
Currently, there are many places in the code where "right" and "left" are used,
but where we actually mean "forward" and "backwards" --- which is the same 
thing in LTR text, but not in RTL/Bidi text.

See full details in http://permalink.gmane.org/gmane.editors.lyx.devel/97550.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21128 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-22 22:18:52 +00:00
Abdelrazak Younes
6725b2db59 Reduce header dependencies in Paragraph.h
- Move Changes.h out of Paragraph.h
- pimpl the inset list.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21033 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-18 15:29:51 +00:00
Abdelrazak Younes
55beda376a Refactor Undo/Redo framework into an Undo class owned by a Buffer. This reduces header dependencies from Undo.h which was including lots of stuff previously. This also solves the bug where undo/redo were reset upon buffer switching. Now, each buffer has a truly independant undo/redo architecture.
In the future, when Cursor has been fixed to work correctly with multiple views of the same Buffer, we could transfer the Undo owner from Buffer to Cursor.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21031 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-18 11:51:17 +00:00
Abdelrazak Younes
589170bd4b Remove mostly unused function.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20943 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-13 12:58:43 +00:00
Abdelrazak Younes
9a458ec6e9 Move private part of BufferView to a private implementation.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20896 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-11 09:59:01 +00:00
André Pönitz
b847b8c7df the delegate patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20667 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-02 18:27:20 +00:00
André Pönitz
cd72af583f cosmetics
(maily move layout related enums into a header of there own to remov
include dependencies, alos rename a few things)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20598 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-29 20:02:32 +00:00
Dov Feldstern
4c8544239e Upon exiting an inset, set the font back to what it was when entering.
This is related to the move of current_font from text to cursor (r19999).
Specifically, after r20261, this is necessary in order that the font not
remain in "latex_language" when exiting an ERT inset.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20477 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-24 22:20:03 +00:00
Jean-Marc Lasgouttes
1a702924d4 Small tweak to r20121
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20122 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-07 10:04:10 +00:00
Jean-Marc Lasgouttes
6e974a3d42 Fix bug 4212
* Text2.cpp (deleteEmptyParagraphMechanism):
	* paragraph_func.cpp (breakParagraph): make sure that the start of 
	appendix marker is not lost when deleting or breaking a paragraph


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20121 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-07 09:55:57 +00:00
Abdelrazak Younes
2ea432bab1 * TextMetrics: getDisplayFont() and isRTLBoundary() takes pit instead of Paragraph.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20015 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 22:28:49 +00:00
Abdelrazak Younes
d35d25460b * Text: Move some more stuff from Text to TextMetrics:
- getFont() becomes TextMetrics::getDisplayFont()
- setCharFont() now needs a display font.
- setInsetFont() and setFont() now needs a BufferView, will be transferred to TextMetrics too.
- isRTL(): moved to TextMetrics
- isRTLBoundary(): ditto
- font_: ditto

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20014 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 21:48:49 +00:00
Abdelrazak Younes
bc6304d760 Don't save background color in Text. Hand it down at drawing time.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20002 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 14:34:15 +00:00
Abdelrazak Younes
af06ed5ff1 Transfer current_font and real_current_font from Text to Cursor.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19999 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 13:35:48 +00:00
Abdelrazak Younes
13e8185afa header cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19997 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 11:46:05 +00:00
Abdelrazak Younes
67fc32064f header cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19996 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 11:33:04 +00:00
Abdelrazak Younes
502b048246 Transfer metrics and screen related methods from Text to TextMetrics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19994 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 11:21:33 +00:00
Abdelrazak Younes
4048448236 Transfer metrics and screen related methods from Text to TextMetrics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19991 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 09:44:08 +00:00
Jürgen Spitzmüller
e606e5eacc * src/Text2.cpp:
- fix wrong DEPM in ct mode (bug 3961).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19884 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-29 13:04:29 +00:00
André Pönitz
39c7e2faf0 rename Layout_ptr into LayoutPtr
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19758 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-23 19:59:07 +00:00
Abdelrazak Younes
0fcae6cc10 * BufferView::buffer() returns a reference instead of a pointer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19691 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-21 13:03:55 +00:00
Alfredo Braunstein
c1b155fbe8 simplify setInsetFont, removing a potential bug (an invalid DocIterator was built). Use CursorSlices when possible.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19690 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-21 10:54:04 +00:00
Richard Heck
de373da67b Add LFUN_PARAGRAPH_PARAMS (= paragraph-params), used for changing a paragraph's alignment, spacing, etc. This is complementary to LFUN_PARAGRAPH_PARAMS_APPLY, which sets the parameters. The difference is that APPLY over-rides all existing parameters, setting any not given to the default, whereas this one simply changes those that are given. So
paragraph-params \align right
will align the paragraph right, leaving spacing, etc, as they were, whereas
  paragraph-params-apply \align right
will align the paragraph right but also reset all other parameters to defaults. Note, by the way, that this means that
  paragraph-params-apply
sets everything to default.

Some new arguments have also been introduced. These are:
  \indent
  \indent-toggle
  \spacing default
Of course, none of these are found in valid LyX files, but they are useful in menu bindings, etc.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19581 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-15 02:21:09 +00:00
Alfredo Braunstein
bc0a64efc3 * DocIterator.h (forwardPosNoDescend): remove method
* DocIterator.cpp (forwardPos, backwardPos): move the 'flat' part to...
* CursorSlice.{h,cpp} (forwardPos, backwardPos, at_end, at_begin): new methods, the first two are part of their DocIterator homonym
* Text2.cpp (setFont): receive CursorSlice arguments as the function is not recursive, adapt
* Text.cpp:
* lyxfind.cpp (findNextChange):
* insets/InsetCollapsable.cpp: adapt



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19500 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-13 13:36:19 +00:00
Christian Ridderström
1050cc4471 Converted '#warning ...' into FIXME-comments
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19397 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-10 11:47:12 +00:00
Richard Heck
519e73acc8 Make LYX_ALIGN_LAYOUT always be an available layout. This simplifies a couple
chunks of code and makes a lot of sense.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19332 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-06 05:04:38 +00:00
Abdelrazak Younes
4a53fa6e01 Allow unicode in Layout names.
* Layout.h:
  - name_, obsoleted_by_, depends_on_ are now docstrings.

All other changes results from the above string -> docstring changes. In particular, we now try to translate the layout names only if possible (i.e. if they are ASCII only).



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19042 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-11 13:39:08 +00:00
Richard Heck
3fcc6711f0 Fix some issues with the paragraph settings dialog. The main change
is that we distinguish between the "Default" alignment and whatever
that default happens to be: I.e., so far as the code goes, the UI now
distinguishes LYX_ALIGN_LAYOUT from LYX_ALIGN_WHATEVER, when WHATEVER
happens to be the default. So you can explicitly force, say, left-align,
and that will stick between document classes.

* src/Paragraph.cpp:
Don't output params if alignment is the default.

* src/ParagraphParameters.cpp
Treat LYX_ALIGN_LAYOUT as its own alignment.

* src/Text2.cpp
Treat LYX_ALIGN_LAYOUT as its own alignment, and force it to be accepted
as a possible alignment.

* src/frontends/controllers/ControlParagraph.{h,cpp}
New method haveMultiParSelection().

*src/frontends/qt4/QParagraph.{h,cpp}
*src/frontends/qt4/ui/ParagraphUi.ui
UI adjustments as mentioned.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18922 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-28 00:48:06 +00:00
Dov Feldstern
d8040b41af When inserting an inset use the current font.
This fixes http://bugzilla.lyx.org/show_bug.cgi?id=3011


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18781 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-15 10:43:10 +00:00
Stefan Schimanski
41e194bf88 * safe Text::setCurrentFont which does not use Text::bidi and hence
does not depend on paragraph metrics (fixes #3790, #3801, #3809)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18705 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-07 19:55:22 +00:00
Stefan Schimanski
ff8fcc268a * no_bidi_isboundary.patch: added isRTLBoundary as a replacement to several references to the Text::bidi object.
(fixes #3790, #3801, #3809)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18704 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-07 19:50:02 +00:00
Stefan Schimanski
6d67f77467 * stay in front of insets/segment on RTL/LTR boundary
(fixes bug 3754: Cursor movement at RTL-LTR boundary)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18666 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-04 18:35:03 +00:00
Stefan Schimanski
57294cd9c7 * help future developers reading my code and wondering what the heck I am doing here with all those variables
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18578 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-30 07:30:17 +00:00
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