Commit Graph

294 Commits

Author SHA1 Message Date
Vincent van Ravesteijn
9bb61acfd5 Fix inset-begin and inset-end. Now, if the cursor was at the beginning of a paragraph in the middle of the inset, inset-begin would jump out of the inset.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31199 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-22 14:34:50 +00:00
Uwe Stöhr
f7aa1c1c5d Text3.cpp: fix crash reported in #6133, patch from Tommaso
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31070 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-15 22:53:15 +00:00
Abdelrazak Younes
cd8e483f3a Text::dispatch(): the spellchecking code is now uneeded.
TextMetrics::drawParagraph(): really check the whole row and not only the first word.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30971 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-10 21:17:08 +00:00
Abdelrazak Younes
673ff83263 outline(): avoid paragraph copying by using RandomAccessList::splice().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30961 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 20:25:20 +00:00
Abdelrazak Younes
1a27aaca77 RandomAccessList: new swap() method for swapping two elements without any copy.
LFUN_PARAGRAPH_MOVE_UP and LFUN_PARAGRAPH_MOVE_DOWN: use that.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30958 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 19:51:12 +00:00
Abdelrazak Younes
2b9e44cb01 Move contents of paragraph_funcs.* to Text.h and Text.cpp.
The goal is to simplify the code afterwards.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30955 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 17:30:41 +00:00
Abdelrazak Younes
2bf63aa652 Get rid of some Paragraph::inInset() access.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30953 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 17:01:04 +00:00
Abdelrazak Younes
f35561d055 Cleanup: Replace a bunch of Cursor arguments with DocIterators.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30951 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 16:49:41 +00:00
Abdelrazak Younes
5425c53fd1 Now that Text knows its owner, use the associated Buffer access.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30941 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 15:29:34 +00:00
Vincent van Ravesteijn
3114ce609c Some small code simplications.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30866 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-04 23:01:06 +00:00
Vincent van Ravesteijn
690878bd4a Fix #6045: Possible to insert table floats to figure floats.
The lfuns, LFUN_FLOAT_INSERT and LFUN_WRAP_INSERT are now only enabled when they should be.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30740 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-21 20:04:52 +00:00
Vincent van Ravesteijn
77d67595fd In r30560, the setLayout function was removed from InsetCollapsable. This function also set the buttonLabel for the inset. After removing the setLayout calls in this place, the button label is not initialized for Notes, Boxes and Phantoms.
This commit restores the behaviour as it was, such that the labels are initialized again.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30677 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-18 19:35:27 +00:00
Pavel Sanda
091e3908b0 Kill LFUN_PARAGRAPH_SPACING in favour of LFUN_PARAGRAPH_PARAMS.
We don't want duplicit code.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30638 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-16 22:55:23 +00:00
Richard Heck
0facb603fe Give inset codes to all the math insets, so we get more information when
we run into assertions.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30634 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-16 19:00:24 +00:00
Jean-Marc Lasgouttes
41003ea0eb remove some explicit tests against ERT_CODE; more to come
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30625 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-16 10:08:13 +00:00
Jean-Marc Lasgouttes
0e8b1dc29a define InsetText::insetAllowed properly and rely on it for inset insertion in Text::dispatchsvndiff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30593 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-14 21:56:22 +00:00
Jean-Marc Lasgouttes
bec171ed32 logic was reversed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30569 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-14 16:00:22 +00:00
Jean-Marc Lasgouttes
30360e1b19 move more functions from InsetCollapsable::getStatus to Text
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30566 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-14 15:27:48 +00:00
Jean-Marc Lasgouttes
7a0107f4df move tab-insert/delete from InsetCollapsable to Text
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30565 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-14 14:52:11 +00:00
Jean-Marc Lasgouttes
e33095f10d Move special handling of paste function from InsetCollapsable to InsetText
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30562 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-14 13:00:42 +00:00
Jean-Marc Lasgouttes
95bd716cdf replace gratuitously complicated code by sane one, and make cursor leave inset after inserting an index
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30561 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-14 12:21:35 +00:00
Jean-Marc Lasgouttes
5bf8df4fbc Remove the layout_ cache in InsetCollapsable.
Remove setLayout methods and all the calls to it.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30560 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-14 12:07:51 +00:00
Jean-Marc Lasgouttes
4dbe411ba9 Remove all BufferParam arguments in InsetXXX methods (since insets know about their Buffer)
Add an assertion in Inset::dispatch that checks that buffer() == *cur.buffer()


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30540 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-13 12:56:20 +00:00
Jean-Marc Lasgouttes
081fad9557 First step of InsetLayout cleanup.
Get rid of Inset::getLayout(BufferParams), since all insets have access to
their own buffer. Inset::getLayout() does the same now.

Get rid of InsetCollapsable::getLayout(BufferParams) too, and remove most references to InsetCollapsable::layout_. For now IC::getLayout() still returns layout_, but the idea is to change this (provided there is no performance problem).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30530 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-13 00:28:22 +00:00
Uwe Stöhr
802067ecdc support for matrix decoration in the MathMatrix dialog;
introduces a new LFUN and fixes #4620

This can in principle also go to branch when new LFUNs are there allowed, Jürgen?

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30523 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-12 21:39:21 +00:00
Vincent van Ravesteijn
c4feab5f13 Cosmetics, squeeze some warnings, remove unused code.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30310 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-30 00:10:55 +00:00
Jürgen Spitzmüller
3a16b6dbf7 Implement LFUN_OUTLINE_DRAGMOVE.
Contribution by Rob Oakes.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30278 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-28 08:40:34 +00:00
Jean-Marc Lasgouttes
7e5bdec673 fix assertion when inserting math inset
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30244 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-23 14:47:29 +00:00
Abdelrazak Younes
8a421dcd37 Really spellcheck continuously.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30241 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-23 09:17:39 +00:00
Jürgen Spitzmüller
e9cbe2f80f A GUI for nomencl settings. Adds the possibility to enter a custom length.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29779 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-22 16:26:15 +00:00
Vincent van Ravesteijn
a7d545170b Fix bug #5888. Yes, I do shame.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29665 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-14 12:35:04 +00:00
Richard Heck
d6966dd5f5 Style.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29601 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-09 21:58:16 +00:00
Vincent van Ravesteijn
b946e2209a Fix bug #5930: Crash when undoing info-insert in math mode.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29598 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-09 21:02:14 +00:00
Vincent van Ravesteijn
ba37ec9813 Fix bug #5435: DEPM is not executed when leaving an inset.
Now, it is fixed for char-forward and char-backward.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29585 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-09 16:56:49 +00:00
Jürgen Spitzmüller
74784942ed * disable some invalid insets in description items (covers bug 5937).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29584 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-09 16:53:51 +00:00
Richard Heck
6537f7aca0 Fix outliner crash reported by Vincent.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29583 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-09 15:49:09 +00:00
Jürgen Spitzmüller
abc5debb42 Compile fix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29574 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-08 15:12:28 +00:00
Jürgen Spitzmüller
9d9f14ed38 * also enable LFUN_BRANCH_INSERT if we have branches only in a child.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29569 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-08 12:38:58 +00:00
Pavel Sanda
6fde8f8067 Introduce double underline and wavy underline styles from ulem
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg150803.html


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29542 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-05 09:26:28 +00:00
Vincent van Ravesteijn
0731078d5f Fixing small bugs of r29518.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29526 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-03 23:32:16 +00:00
Pavel Sanda
381b86788d Introduce strikeout text style (strike-through)
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg150743.html

Somewhat related to http://www.lyx.org/trac/ticket/4248 .


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29523 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-03 22:45:14 +00:00
Vincent van Ravesteijn
d782be1cc9 Cosmetics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29519 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-03 19:02:03 +00:00
Vincent van Ravesteijn
0da78f8bbd Introduce new LFUN_SECTION_SELECT. When this lfun is called and the cursor is in a section heading, the whole section is selected.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29518 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-03 18:58:00 +00:00
Vincent van Ravesteijn
c7a09888a1 Add the emf and wmf graphics format as parameters to LFUN_PASTE.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29509 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-03 11:22:01 +00:00
Vincent van Ravesteijn
7108b8e463 Add accept/reject change to the edit context menu.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29478 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-01 17:06:36 +00:00
Jürgen Spitzmüller
d12426a340 New inset dialog for InsetPrintIndex (only used with multiple indices)..
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29290 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-17 14:29:32 +00:00
Jürgen Spitzmüller
c52bd08442 Introduce splitindex support. File format change.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29255 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-16 07:29:01 +00:00
Vincent van Ravesteijn
2d40854a46 Move handling of LFUN_INSET_SETTINGS to Inset.cpp
* Inset
Handle LFUN_INSET_SETTINGS.

* LyXAction
Use the AtPoint command flag.

* BufferView
* Text3
Remove code that handled LFUN_INSET_SETTINGS. The inset/next-inset part is handled by the AtPoint lfun flag. showInsetDialog is called by Inset::doDispatch and getStatus will be handled by all insets themselves.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29171 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-09 23:17:20 +00:00
Jürgen Spitzmüller
5be56b517a Fix bug 5827 (validate date-insert argument):
* src/support/os*.{cpp,h}:
	- new function is_valid_strftime that validates strftime arguments, 
	  OS dependant (win32 differs here)

* src/Text3.cpp:
	- use is_valid_strftime in LFUN_DATE_INSERT status check.

* src/frontends/qt4/GuiPrefs.{cpp, h}:
	- new GUI validator for strftime.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28932 a592a061-630c-0410-9148-cb99ea01b6c8
2009-03-27 11:22:54 +00:00
Vincent van Ravesteijn
b0d53e3250 Fix bug 5526: screen-recenter LFUN doesn't work
http://bugzilla.lyx.org/show_bug.cgi?id=5526

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28916 a592a061-630c-0410-9148-cb99ea01b6c8
2009-03-26 00:09:16 +00:00