Commit Graph

158 Commits

Author SHA1 Message Date
Abdelrazak Younes
b3d7fce1b2 delete unused code.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30969 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-10 20:11:48 +00:00
Abdelrazak Younes
8c053ea10c Move depthHook(), outerHook(), isFirstInSequence(), outerFont() to Text methods.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30957 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 18:35:39 +00:00
Abdelrazak Younes
5fd5cf41c0 Move setLabelWidthStringToSequence() to Text private member.
Move isFullyDeleted() to static function in CutAndPaste.cpp.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30956 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 17:45:24 +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
eef8720eca Move Text::insertStringAsLines and Text::insertStringAsParagraphs from Text2.cpp to Text.cpp.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30954 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 17:14:41 +00:00
Abdelrazak Younes
730a67e0d1 Text::Inset(): now returns a reference in order to make clear that the owner is mandatory.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30947 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 16:19:43 +00:00
Abdelrazak Younes
df0072228f Text: Get rid of BufferParams arguments.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30945 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 15:52:33 +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
Jürgen Spitzmüller
35db143564 * Text.cpp (dissolveInset):
- perform updateLabels also after dissolving an empty inset (bug 6003).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30771 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-25 08:22:37 +00:00
Vincent van Ravesteijn
68ae319d7c Fix bug #5061. Patches from Dov (a long time ago).
see:
http://permalink.gmane.org/gmane.editors.lyx.devel/113506
http://permalink.gmane.org/gmane.editors.lyx.devel/113507

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30765 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-24 21:33:50 +00:00
Vincent van Ravesteijn
966687d98b Fix bug #6058: Change tracking not usable in version control.
This patch makes sure that there are minimal changes when loading and saving a file with change tracking.

- the authors are assigned a buffer_id, such that when the file is saved, they get the same id,
- the authorlist is sorted according to the buffer_id,
- the buffer_id is written to the file in the author list (file format change)
- the ids start with 1, because 0 is internally reserved for the current Author,
- when writing the file, the current author is assigned an id if he didn't already have it.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30756 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-23 20:08:05 +00:00
Vincent van Ravesteijn
da2c479003 * Text.cpp: simplification of code.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30749 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-22 20:36:40 +00:00
Jean-Marc Lasgouttes
408b96bb92 un-revert r30531, after Richard told me how to avoid the crash. Now, before
accepting changes in a clipboard copy (CutAndPaste.cpp), we set the buffer
of insets (and we reset them later).

Doing this makes sense because we know this is the only operation on these
out-of-document paragraphs that will require access to a buffer.

Also, this commit gets rid of one explicit test against ERT_CODE and 
LISTING_CODE.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30623 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-16 08:37:32 +00:00
Jean-Marc Lasgouttes
c3be74085f revert r30531, which causes a crash when copying an inset.
Basically, insets in cut stack do not have a buffer, and therefore cannot
acess to buffer parameters. What is annoying here is that acceptChanges 
requires this buffer params only to be able to read a font in moveItem,
in order to read the buffer language, and I doubt this is really needed...

Another change in this patch is that Inset::getLayout now returns a 
plainLayout when the inset does not have a buffer_. This fixes a remaining 
crash where dEPM reads isFreeSpacing() for an inset in the clipboard, but
this looks like a fragile situation. And it will not do the right thing when
doing depm in a freespacing inset.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30605 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-15 14:19:10 +00:00
Jean-Marc Lasgouttes
067a685263 remove BufferParams parameter from Inset::accept/rejectChanges; adapt rest of code accordingly
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30531 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-13 00:57:51 +00:00
Abdelrazak Younes
5387379c24 Introduce Paragraph::isWordSeparator() and use it instead of Paragraph::isLetter(). Note here a change in behavior WRT to word selection: a deleted character is not considered a word separator. This new behavior will impact word finding and spellchecking.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30211 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-21 14:30:57 +00:00
Uwe Stöhr
8f3acbb484 remove unused includes of convert.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29772 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-21 21:02:14 +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
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
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
Abdelrazak Younes
1b168bbc69 Paragraph::updateWord() and collectWords(): Remove unneeded CursorSlice argument.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29466 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-01 09:56:20 +00:00
Abdelrazak Younes
30c70c1670 Transfer word locating code from Text to Paragraph.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29455 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-01 07:26:12 +00:00
Vincent van Ravesteijn
4706961841 Fix bug 1802: http://bugzilla.lyx.org/show_bug.cgi?id=1802.
* allows the selection of a whole cell with shift+key
* shift-movement between empty cells with a single keystroke 


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28385 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-07 15:24:47 +00:00
Jean-Marc Lasgouttes
1106072176 Oops! forgot to set a sane layout (bug 4859 again)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28347 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-04 14:23:16 +00:00
Jean-Marc Lasgouttes
a5e8cc750b avoid creating empty paragraph list also in the case of an inner insettext (bug 4859 again)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28346 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-04 11:28:29 +00:00
Jean-Marc Lasgouttes
deac053e36 avoid a crash on empty documents (bug 4859)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28345 a592a061-630c-0410-9148-cb99ea01b6c8
2009-02-04 10:46:54 +00:00
Pavel Sanda
4e4e8afcc2 Sort order
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27940 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-21 01:54:04 +00:00
André Pönitz
6192345f60 add Buffer * member to DocIterator
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27603 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-17 11:46:07 +00:00
André Pönitz
f8f5a7b28d move updateLables to buffer
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27562 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-16 16:43:49 +00:00
André Pönitz
f1cba8ff64 more latin1..utf8 schanges. all of src/* should be utf8 now
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27425 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-14 15:58:50 +00:00
Abdelrazak Younes
2f3fcfcb66 revert hazardous part of r26957 and add a comment, take 2.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27170 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-28 17:55:00 +00:00
Abdelrazak Younes
6a8219c190 Paragraph:
- constify some parameters
- getFontSettings():
- getFirstFontSettings(): return a const ref instead of a copy. This brings a consistent 4% improvement in LateX generation. Might speedup rtl handling too.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26957 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-19 07:03:44 +00:00
Abdelrazak Younes
45cd1149e4 Full text in toc for index entries.
* Text::asString(): new method.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26601 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-28 17:10:16 +00:00
André Pönitz
4c7fdddd74 streamlining setter syntax. using mutable references seems a bit
outlandish compared to the rest of LyX


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26527 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-24 21:27:41 +00:00
Abdelrazak Younes
d81071086f rev26385: don't know why but some file were not committed...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26387 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-13 20:19:32 +00:00
Jean-Marc Lasgouttes
4d63bd347b constification without any code change. This is part of and effort to see whether BufferView::cursor() could be made const
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26141 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-13 13:46:19 +00:00
Richard Heck
cca78e3c8a Change the "empty layout" to the "plain layout", to try to avoid confusion.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26025 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-01 20:57:27 +00:00
Abdelrazak Younes
4bc7feaa96 * Inset: ensure that the Buffer pointer is not copied. This was the cause of very weird bugs with copy and paste within table.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25837 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-23 12:13:41 +00:00
Bo Peng
763ef015ce Improve the local layout feature by better handling of unknown textclass, unknown layouts, and switch between textclasses.
* src/TextClass.h[.cpp]: add addLayoutIfNeeded() and createDefaultLayout()
	* src/Layout.h[.cpp]: add unknown_ to mark if a layout is a default layout for an unknown one.
	* src/LayoutFile.cpp: add addDefaultClass and change addLayoutFile to addLocalLayout.
	* src/Text.cpp: add unknown layouts that are not recognizable by a new textclass.
	* src/frontends/qt4/GuiToolbar.cpp: display (unknown) for unknown layouts.
	* src/frontends/qt4/GuiDocument.cpp: restore 'browse layout' button.
	* src/frontends/qt4/ui/LaTeXUi.ui: restore 'browse layout' button.
	* src/CutAndPaste.cpp: do not convert unknown layouts from pasted text
	* src/BufferParams.cpp: add a default textclass when a document with unknown textclass is loaded.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25555 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-11 02:43:02 +00:00
Richard Heck
780bce0f96 Rename empty layout stuff to plain layout stuff.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25541 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-10 17:41:52 +00:00
Jean-Marc Lasgouttes
1f9aaff77b typo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25505 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-08 09:24:28 +00:00
Jean-Marc Lasgouttes
67774abaf2 * Text.cpp (cursorForwardOneWord, cursorBackwardOneWord): fix
moving in mac-like mode (a space is not a char)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25504 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-08 09:19:41 +00:00
Jean-Marc Lasgouttes
32ccbb7f58 please Abdel
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25414 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-01 15:12:28 +00:00
Jean-Marc Lasgouttes
5cef8b6887 * LyXRC.cpp:
* development/MacOSX/lyxrc.dist.in: new variable mac_like_word_movement,
	set to true on Mac OS X. There is no GUI for it now.

	* src/Paragraph.cpp (isSpace): new method
	(isChar): return false for a space.

	* src/Text.cpp (cursorForwardOneWord, cursorBackWardOneWord): implement
	mac-like cursor movement.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25413 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-01 14:42:32 +00:00
Jean-Marc Lasgouttes
0bc9149eda one more step towards good word-level movement: let paragraph breaks be word boundaries
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25405 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-30 12:45:27 +00:00
Jean-Marc Lasgouttes
2c0f0d3312 stupid off-by-one error in r25373
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25375 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-24 09:57:38 +00:00
Jean-Marc Lasgouttes
cfbe5dd9e1 Fix bug http://bugzilla.lyx.org/show_bug.cgi?id=3580
* Paragraph.cpp (isChar): new method; returns true when pointer is on 
	a character that is not a letter. Note that a footnote inset, for 
	example is neither a letter nor a character.

	* Text.cpp (cursorForwardOneWord, cursorBackwardOneWord): rewrite by
	using 3 character categories: letters, characters and others. 


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25373 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-24 09:19:52 +00:00
Abdelrazak Younes
eb28cb8755 Unify Paragraph::asString() methods.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24882 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-22 14:01:33 +00:00
Dov Feldstern
553d896bb6 visual mode for bidi cursor movement --- at the word-at-a-time level
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24602 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-04 20:22:19 +00:00