Commit Graph

149 Commits

Author SHA1 Message Date
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
Jean-Marc Lasgouttes
9b4a26a252 rename assert.h to lassert.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24559 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-30 08:26:40 +00:00
André Pönitz
7f461f4392 infrastructure for 'graceful asserts'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24216 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-10 21:49:34 +00:00
André Pönitz
11a0458d3f next try...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24100 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-02 23:06:22 +00:00
André Pönitz
2012beb58e revert last patch. there's something wrong, possibly unrelated to this
patch, but as this was rather largish...


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24099 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-02 22:44:33 +00:00
André Pönitz
7677e9487c simplify Lexer use a bit
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24098 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-02 22:14:45 +00:00
Abdelrazak Younes
2530fdb9ab FontIterator is only used in TextMetrics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24013 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-28 08:45:33 +00:00
Jürgen Spitzmüller
c876a2e7c7 Merge the two linebreak insets into one.
* src/Buffer.cpp:
	- file format change to 324
* development/FORMAT:
	- document file format change

* src/insets/InsetNewline.{cpp,h}:
	- the former two separate derivates are now merged into one inset
	  with proper Params and Mailer. This simplifies the structure and allows for
	  switching between the two kinds.

* src/Text3.cpp:
	- The newline insets are now being generated with 
	   newline-insert [newline|linebreak]

* src/factory.cpp:
* src/Text.cpp:
	- Newline inset is now a proper inset with opening and closing tag.

* src/FuncCode.h:
* src/LyXAction.cpp:
* src/Text3.cpp:
* src/insets/InsetCollapsable.cpp:
* src/insets/InsetTabular.cpp:
* src/mathed/InsetMathGrid.cpp:
* src/mathed/InsetMathHull.cpp:
	- remove LFUN_NEW_LINE, LFUN_LINE_BREAK,
	  add LFUN_NEWLINE_INSERT

* lib/lyx2lyx/LyX.py:
* lib/lyx2lyx/lyx_1_6.py:
	- conversion and reversion routines for newline insets.

* lib/ui/stdmenus.inc:
* lib/ui/stdcontext.inc
	- adapt menu and add context menu to switch between newpage variants.

* lib/bind/*.bind:
	- adapt to new lfuns.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23966 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-26 08:10:01 +00:00
Jürgen Spitzmüller
d2a4c97ab8 Merge the diverse newpage insets into one.
* src/Buffer.cpp:
	- file format change to 323
* development/FORMAT:
	- document file format change

* src/insets/InsetNewpage.cpp:
	- the former four separate derivates are now merged into one inset
	  with proper Params and Mailer. This simplifies the structure and allows for
	  switching between the various kinds.

* factory.cpp:
	- The newpage insets are now being generated with 
	   newpage-insert [newpage|pagebreak|clearpage|cleardoublepage]

* src/Text.cpp:
	- Newpage inset is now a proper inset with opening and closing tag.

* src/FuncCode.h:
* src/LyXAction.cpp:
* src/Text3.cpp:
* src/insets/InsetCollapsable.cpp:
	- remove LFUN_PAGEBREAK_INSERT, LFUN_CLEARPAGE_INSERT
	  and LFUN_CLEARDOUBLEPAGE_INSERT

* lib/lyx2lyx/LyX.py:
* lib/lyx2lyx/lyx_1_6.py:
	- conversion and reversion routines for newpage insets.

* lib/ui/stdmenus.inc:
	- adapt menu and add context menu to switch between newpage variants.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23942 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-25 09:26:03 +00:00
Jürgen Spitzmüller
f2e8cd3cd9 *** File Format Change: UI and enhancement for InsetSpace ***
* src/insets/InsetSpace.{cpp,h}:
	- merge in HFill inset, add support for dotfill, hrulefill,
	  hspace and hspace*
* src/insets/InsetHFill.{cpp,h}:
	- remove

* src/frontends/qt4/GuiHSpace.{cpp,h}:
* src/frontends/qt4/ui/HSpaceUi.ui:
* src/frontends/qt4/GuiView:
	- new GUI for Space insets.

* src/insets/Inset.{cpp,h}:
* src/insets/InsetCode.h:
* src/insets/InsetCollapsable.cpp:
* src/insets/InsetCommandParams.cpp:
	- remove HFILL_CODE and LFUN_HFILL_INSERT, add SPACE_CODE where necessary,
	  new Inset member isStretchableSpace() to indicate HFill and friends.

* Buffer.cpp: 
	- increase format to 319
* lib/lyx2lyx/LyX.py:
* lib/lyx2lyx/lyx_1_6.py:
	- conversion/reversion routines
* development/FORMAT:
	- document file format change

* src/Makefile.am:
* src/frontends/qt4/Makefile.am:
* development/scons/scons_manifest.py:
	- deal with UI changes.

* src/LyXAction.cpp:
	- remove LFUN_HFILL_INSERT

* src/LyXFunc.cpp:
	- handle space dialog.

* src/factory.cpp:
* src/Paragraph.cpp (isHFill):
* src/Text.cpp:
* src/Text3.cpp:
* src/TextMetrics.cpp:
	- adapt to changes

* lib/ui/classic.ui:
* lib/ui/stdmenus.ui:
	- add HSpace dialog, remove HFill.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23787 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-17 09:23:43 +00:00