Commit Graph

267 Commits

Author SHA1 Message Date
Jean-Marc Lasgouttes
889fdbd39b get rid of the \use_alt_language pref, which was not used. Instead, we test whether \alt_language is empty
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30159 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-18 15:31:43 +00:00
Jürgen Spitzmüller
a842957959 * Paragraph.cpp:
- we do not output alignment begin for the default alignment,
	  so we must not output the end tag (bug 5995)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30151 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-18 06:52:38 +00:00
Jürgen Spitzmüller
934308286d * Paragraph.cpp:
- do not embrace list items. According to the comment, 
	  this was only done to escape brackets, but brackets
	  are embraced anyway.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30112 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-15 15:57:54 +00:00
Richard Heck
67e70c6c02 Well, it turns out that we need a different return value for the xhtml
routines, one that allows us to "defer" certain material, e.g., a float
that ought to appear in a div but can't simply be put into the middle
of a paragraph.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30079 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-12 17:23:17 +00:00
Vincent van Ravesteijn
30a12853b8 Fix the output of a single dash in xhtml.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30004 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-06 16:32:51 +00:00
Richard Heck
a3915db54f Output cosmetics, mostly. Get the newlines better.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29962 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-05 18:57:33 +00:00
Richard Heck
92a69bb790 Basic output routines for HTML.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29950 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-05 17:44:35 +00:00
Jürgen Spitzmüller
322eb96219 * Allow manual setting of bibliography indendation
that overrides bibitemWidest (bug 5960).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29840 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-25 08:13:56 +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
Vincent van Ravesteijn
f05504f5ef Fix bug #5390. Copy from a deleted section with change tracking.
Do not accept the changes in the selection, if it is completely deleted.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29672 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-14 22:21:05 +00:00
Abdelrazak Younes
47aca38a5e SpellChecker context menu. Part of the continuous SpellChecker project.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29556 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-06 23:39:17 +00:00
Abdelrazak Younes
c18baee469 Move isLetter() logic to Paragraph::isLetter().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29468 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-01 10:54:32 +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
ea54380e13 Initial support for continuous spell-checking. This is far from working perfectly. I reused the word completion framework to achieve this. This doesn't seem to have sensible effect over edition speed.
You'll need to check the continuous spellcheck option in order to test this.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29465 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-01 09:43:40 +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
Jean-Marc Lasgouttes
8d0fcad676 Speedup the expandLabel by avoiding the recursive part. The labelstrings
are computed recursively to get rid of any \thexxx string by the method
flattenLabelString. The values are cached in Counter objects.

On my mac, the total time (updatelabels+redraw) goes down by 30%. YMMV.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29342 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-19 20:05:26 +00:00
Pavel Sanda
fd6679bd34 AdvSearch - next patch from Tommaso.
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg146966.html


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27938 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-20 16:00:47 +00:00
Jürgen Spitzmüller
04d1a65234 * Paragraph.cpp: embrace ']' (fix bug 5610)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27838 a592a061-630c-0410-9148-cb99ea01b6c8
2008-12-10 19:52:13 +00:00
Uwe Stöhr
9563341e84 Paragraph.cpp: revert r27719 because this broke every document that uses a note or comment
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27734 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-29 00:23:21 +00:00
Jean-Marc Lasgouttes
4d07d0b61c when validating a paragraph, skip insets that do not produce output
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27719 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-27 08:32:52 +00:00
Jürgen Spitzmüller
6b64fc8ca6 * src/Language{.cpp,h}:
- new member internalFontEncoding() that indicates if a language
	  switches the font encoding internally.

* src/Paragraph.cpp (latexSpecialChar):
	- don't call latexSpecialT1 if the internal font encoding isn't T1.

This fixes the output of straight quotation marks in Hebrew and Greek.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27660 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-21 14:58:26 +00:00
Enrico Forestieri
d0ce9e3984 Style
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27619 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-18 12:04:40 +00:00
Enrico Forestieri
07c0a6e496 Fix bug http://bugzilla.lyx.org/show_bug.cgi?id=5489 and at the same time
properly fix bugs 5216 and 5280. The best thing to do would be recognizing
at configure time a buggy iconv and #defining WORKAROUND_ICONV_BUG in
config.h, but I don't know how that could be done.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27618 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-18 10:40:22 +00:00
Stephan Witt
86618e2650 fix broken latex output range checking
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27571 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-16 18:14:14 +00:00
Stephan Witt
5981bea68d use correct type of variable in appendString change tracking loop
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27529 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-16 12:08:29 +00:00
Abdelrazak Younes
4209cbc631 Tommaso patch, part 5, lots of thing to cleanup still but I'll do that afterwards.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27521 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-16 00:12:21 +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
Jürgen Spitzmüller
233d7958a3 * Paragraph.cpp: typo.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27404 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-12 20:24:08 +00:00
Richard Heck
b83564d82c Inset::textString --> Inset::tocString
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27378 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-10 22:45:14 +00:00
Enrico Forestieri
0681cb4e60 Fixbug 5280
http://bugzilla.lyx.org/show_bug.cgi?id=5280


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27244 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-03 22:59:07 +00:00
Enrico Forestieri
33f0bb6ac3 Fix bug 5216
http://bugzilla.lyx.org/show_bug.cgi?id=5216


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27243 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-03 22:57:51 +00:00
Richard Heck
fa4801bdc9 This was the wrong check.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27213 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-31 14:58:53 +00:00
Richard Heck
262ca78599 A (very) little constness.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27212 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-31 14:53:49 +00:00
Richard Heck
f771d9a994 This is a conservative fix for the layout setting bug discussed in
this thread:
  http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg145547.html
The more dramatic fix suggested there can wait.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27164 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-28 14:11:24 +00:00
Enrico Forestieri
96007ce5ac Fix bug 5374
http://bugzilla.lyx.org/show_bug.cgi?id=5374


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26983 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-19 20:55:54 +00:00
Abdelrazak Younes
97e5041a4a some more small optimization.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26960 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-19 07:42:41 +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
93ae7c8c33 Oups...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26811 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-08 14:06:20 +00:00
Abdelrazak Younes
237c713046 Fix bug http://bugzilla.lyx.org/show_bug.cgi?id=5328
* Paragraph::insertInset(): check if inset insertion is allowed before insertion.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26810 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-08 14:03:15 +00:00
Jean-Marc Lasgouttes
f993482628 fix misleading debug message
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26773 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-06 10:14:41 +00:00
Uwe Stöhr
7382c55fd7 add support for TABs in Listings, fileformat change, fixes http://bugzilla.lyx.org/show_bug.cgi?id=3629 , patch by Vincent, lyx2lyx and UI stuff by me
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26647 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-30 18:00:02 +00:00
Abdelrazak Younes
5ce39aa8b5 Add a "List of Changes" in the Navigator. The list is updated only when the document structure is reset or when the update button is clicked. Some work is needed to track more finely individual changes as we do for sections.
Changes::addToToc(): New method to insert changes sorted by authors. The symbols 0x2702 and 0x270d are used to represent deletion and insertion.

TocBackend::item(): new method to lookup for a given item.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26639 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-30 11:06:34 +00:00
Jürgen Spitzmüller
81d02909cf Fix bug 448:
* src/OutputParams.{cpp,h}:
	- new param isLastPar, indicating if the current paragraph is the last in a given inset/buffer
* src/output_latex.cpp:
	- set isLastPar
* src/Paragraph.cpp:
	- noTrivlistCentering also in tabular cells
	- in the last par, use alignment switch instead of environment

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26443 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-18 14:51:16 +00:00
Abdelrazak Younes
1199f092d4 Graceful assertion in release mode.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26414 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-15 16:07:53 +00:00
Abdelrazak Younes
d88caf97cb exit(10) was a bit extreme... replace with a Buffer exception.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26386 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-13 17:12:01 +00:00
Abdelrazak Younes
f83a38b3de Paragraph::inInset() shall not be used if the owner inset was not initialized. Make this rule clear and unavoidable.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26385 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-13 17:01:54 +00:00
Abdelrazak Younes
0b18d24e56 Get rid of Paragraph::insetAllowed()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26372 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-12 13:57:15 +00:00
Jürgen Spitzmüller
26e3e050a4 * src/Paragraph.cpp:
- use \textquotedbl for straight quotes in T1 encoding (bug 5091).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26212 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-19 08:51:56 +00:00
Jean-Marc Lasgouttes
c52b80d6e0 fix warning
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26140 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-13 13:25:36 +00:00
Abdelrazak Younes
f5251b6bde Fix http://bugzilla.lyx.org/show_bug.cgi?id=5132
Brown paper bag: I forgot to copy the insetlist contents when I create the paragraph partial ctor.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26092 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-07 08:50:41 +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
236460445a Paragraph: Add a partial copy ctor that will get used in next commit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26000 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-30 09:07:32 +00:00
Abdelrazak Younes
396a90decb Ensure that the Buffer pointer is correctly set with Clipboard operations.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25844 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-23 12:49:22 +00:00
Enrico Forestieri
7372c4abbe Don't use the \textgreek macro when the latex encoding (iso-8859-7) is
already the right one.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25797 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-22 11:25:15 +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
Jürgen Spitzmüller
4573ae2261 * src/Paragraph.cpp: correct comment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25447 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-04 14:28:13 +00:00
Jürgen Spitzmüller
59390f9d08 * Paragraph.cpp:
- some cleanups and comments.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25438 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-04 06:44:37 +00:00
Jürgen Spitzmüller
05f7926109 * Paragraph.cpp:
- correct the kerning between two subsequent '<' or '>' characters.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25436 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-04 06:01:45 +00:00
Jürgen Spitzmüller
750b9b8fa6 * src/Paragraph.cpp (latexSpecialTypewriter):
- do not assume that typewriter can encode any character (bug 4727).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25433 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-03 14:29:37 +00:00
Jürgen Spitzmüller
5011d7c25f * Paragraph.cpp: fix typo.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25415 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-01 15:16:09 +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
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
Jürgen Spitzmüller
49e4763f6b * Paragraph.cpp (latexSurrogatePair):
- do not use braces for combinated characters that are natively output (as unicode glyphs)
	  (fixes part of bug 4946)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25347 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-21 07:12:56 +00:00
Richard Heck
8a64579d9c More cache fixing. Similar fix as for InsetBibtex, and I've renamed the key routine.
Unfortunately, we can't do a one-short fix for InsetCommand, requiring that it take
a Buffer & in the constructor, due to problems in mathed, specifically, here:
void InsetMathHull::label(row_type row, docstring const & label)
{
...
label_[row] = new InsetLabel(p);
if (buffer_)
label_[row]->setBuffer(buffer());
}
If InsetLabel has to have a Buffer, then buffer_ has to be set, which means InsetMathHull needs a Buffer. But then truckloads of these are created in Parser, where we don't really seem to have access to a Buffer.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25137 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-05 06:55:34 +00:00
Enrico Forestieri
a694de895e Fix bug 3938
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25028 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-31 20:54:50 +00:00
Abdelrazak Younes
0c6940f5ca Fix bug http://bugzilla.lyx.org/show_bug.cgi?id=4650
This bug dates back to my cleanup of the Paragraph class; amazing that nobody noticed it before.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24891 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-22 22:04:38 +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
Abdelrazak Younes
5398dce8ae forward port rev 24877. Even if trunk is not affected by 4857, it is safer to only display printable characters in the toc items and not go inside insets.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24878 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-22 10:14:20 +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
aac50f83e5 cosmetics, maily s/NULL/0/g as hinted by Joost
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24160 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-07 20:43:02 +00:00
André Pönitz
6b28f08ff2 cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23891 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-21 21:47:37 +00:00
Richard Heck
b922cfd3b3 Another attempt at 2178. This is a "minimal" patch designed to fix the bug with the minimum amount of new code. A better fix, suggested by Andre, would merge InsetTableCell and CellData into one class, in which case InsetTableCell::cell_data_ can be removed. A definite plus. I'll do that later if this works. But let's get it right first.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23879 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-21 17:45:14 +00:00
Richard Heck
f2cd36e8ad Change the signature of forceEmptyLayout(), so that we can pass a cell index with it. We'll need this to get tables right.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23829 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-19 16:21:33 +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
Richard Heck
0a5b3e9a36 More intelligible comment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23757 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-15 03:21:17 +00:00
Richard Heck
fc1dc6082e Still trying to fix bug 2178. Will this do it? I do hope so. (Problem reported by Dov.)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23756 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-15 03:19:45 +00:00
Richard Heck
7a5576c13b Try again to fix bug 2178.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23662 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-11 15:16:58 +00:00
Richard Heck
6edb3984bf BaseClassList --> LayoutFileList
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23532 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-07 03:53:21 +00:00
Richard Heck
2222b3f367 Did not need to change this.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23529 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-07 01:21:03 +00:00
Richard Heck
5166d49d2d Abdel is right.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23525 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-06 22:06:24 +00:00
Richard Heck
a01cb111a0 Change the interface to a paragraph's layout. We still store a LayoutPtr, but now privately, and make a Layout const & available to clients.
The need for a LayoutPtr arises from the fact that (a) we do not want to give our clients a Layout &, since we do not want them to be able to change our Layout; but (b) we also need to be able to change which layout is ours. So we cannot store a Layout const &. Or so it seems to the compiler.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23522 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-06 21:31:27 +00:00
Richard Heck
f401ce5d29 Changes LayoutList from a vector<LayoutPtr> to a vector<Layout>.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23519 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-06 20:01:30 +00:00
Stefan Schimanski
cd63c1380b * remove some garbage from the "buffer in inset" change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23453 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-04 14:58:10 +00:00
Richard Heck
77f2d2e7d2 Fix types.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23305 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-28 07:18:54 +00:00
Richard Heck
d8a6b5bfd0 Remove TextClassPtr without losing the type safety it provided.
See these threads:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg136112.html
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg136062.html
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg135997.html
for some background.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23299 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-28 01:42:02 +00:00
André Pönitz
db8c16d554 progress on buffer-reference-in-insets. beware of instabilities...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23289 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-27 20:43:16 +00:00
Stefan Schimanski
249e6b7ac0 * update the words of a paragraph when the cursor leaves.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23260 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-26 19:20:12 +00:00
Stefan Schimanski
cd5bad62e0 * paragraph support for the global word list. To make it buffer
dependent, we need the buffer pointer. In fact we already have a
  pointer to the text inset. So as soon as inset know their buffer we
  can easily switch to a buffer local word list.
* there might be missing some more places to update the words from a
  buffer, like for example after backspace or more important when the
  cursor leaves a paragraph.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23244 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-26 13:07:59 +00:00
Stefan Schimanski
f8d516c7af Revert "* compile fix"
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23234 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-25 22:02:48 +00:00
Stefan Schimanski
1669c17c0f * compile fix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23233 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-25 21:53:16 +00:00
Richard Heck
c7afa2d658 More cleanup from Andre.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23194 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 15:44:11 +00:00
Richard Heck
0362c6aae7 Andre's s/getTextClass/textClass/ cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23190 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 15:06:35 +00:00
Richard Heck
2e7d1199df Revert 23154.
Sorry, Andre, but this broke not only the modules stuff but the general handling of TextClasses. I'm not opposed to doing this sort of thing, but it's going to be a little more complicated. I'll do it when I get a bit of time, or I can explain what the issue is here if you want to do it.

I'll separately re-commit some of the cleanup here.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23189 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 14:59:23 +00:00
André Pönitz
0fb8f3fba1 mostly s/Paragraph::layout(...)/Paragraph::setLayout(...)/
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23159 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-23 16:45:38 +00:00
André Pönitz
b306e9a2e1 Replace the text class shared ptr by good old index-into-global-list.
Also a few cosmetical changes where I xould not resist.

Would be nice if the 'modules people' could verify that their baby 
is strill alive... 



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23154 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-23 11:36:15 +00:00
Abdelrazak Younes
860547ef1c cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23070 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-20 10:21:00 +00:00
Abdelrazak Younes
2bf1c09376 header cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23049 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-18 07:14:42 +00:00
Richard Heck
040f3431e7 Fix bug 4037 and related problems. The patch has been cleaned up a bit
from the one posted to the list.

The basic idea has two parts. First, we hard code an "empty layout"
(called PlainLayout, for want of a better name) in TextClass and read it
before doing anything else. It can therefore be customized by classes,
if they want---say, to make it left-aligned. Second, InsetText's are
divided into three types: (i) normal ones, that use the "default" layout
defined by the text class; (ii) highly restrictive ones, such as ERT and
(not quite an inset) table cells, which demand the empty layout; (iii)
middling ones, which default to an empty layout and use the empty layout
in place of the default. (This is so we don't get the same problem we
had with ERT in e.g. footnotes.) The type of inset is signaled by new
methods InsetText::forceEmptyLayout() and InsetText::useEmptyLayout().
(The latter might better be called: useEmptyLayoutInsteadOfDefault(),
but that's silly.) The old InsetText::forceDefaultParagraphs() has been
split into these, plus a new method InsetText::allowParagraphCustomization(). 
A lot of the changes just adapt to this change.

The other big change is in GuiToolbar: We want to show LyXDefault and
the "default" layout only when they're active.

There are a handful of places where I'm not entirely sure whether we
should be using forceEmptyLayout or !allowParagraphCustomization() or
both. The InsetCaption is one of these. These places, and some others,
are marked with FIXMEs, so I'd appreciate it if people would search
through the patch and let me know whether these need changing. If they
don't, the FIXMEs can be deleted.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22966 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-12 17:31:07 +00:00
Abdelrazak Younes
b546fff555 warning fix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22939 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-11 08:31:14 +00:00