Commit Graph

291 Commits

Author SHA1 Message Date
Enrico Forestieri
898c621b84 Properly restore the file encoding after a LaTeX environment with local scope.
Fixes bug #5690: Hebrew file cannot be exported to dvi or pdf.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30848 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-03 18:31:20 +00:00
Abdelrazak Younes
c53d9099c1 Optimization: don't do suggestion if we only want to mark misspelled words.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30825 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-02 10:09:29 +00:00
Abdelrazak Younes
1f53de6592 SpellChecker work:
* Move suggestion searching out of check() and onto suggest().
* Cleanup a bit AspellChecker
* Begin Hunspell support (not tested and does not link yet)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30824 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-02 09:17:32 +00:00
Vincent van Ravesteijn
7e624928ef Add a pending space after math if it is not the last of the selection. This fixes problems like in bug #6094.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30821 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-01 21:54:13 +00:00
Vincent van Ravesteijn
504bc83a64 Fix bug #4473: Incorrect LaTeX output for inter-word spaces.
This is a hack necessary because \\textcolor is a bit buggy.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30773 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-25 10:44:36 +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
Jürgen Spitzmüller
a7721a236e * Paragraph.cpp: prevent null pointer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30658 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-18 07:19:38 +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
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
Jürgen Spitzmüller
87b701a06b * attempt to fix polytonic Greek (with mutli-accents) [bug 5976].
* add extended Greek chars to unicodesymbols [bug 4997].

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30619 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-16 06:19:25 +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
Jean-Marc Lasgouttes
680590dfa8 remove the now unused Paragraph::translateIfPossible
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30525 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-12 22:14:49 +00:00
Jean-Marc Lasgouttes
95e983c382 Remove Layout::labelstring_appendix method; add a bool parameter to Layout::labelstring instead.
Fix the rest of the code, whih implies fixing a few potential bugs where the appendix status was not taken in account.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30524 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-12 21:48:50 +00:00
Jean-Marc Lasgouttes
e9d19b82d4 Make sure that the new caching mechanism for flattened labels respects languages.
* Counters.cpp (flatLabelString): return a cache of the flattened strings for each used language
 * Counters.cpp (theCounter, counterLabel, flattenLabelString): add a lang parameter; in theCounter, populate the cache as needed.

 * insets/InsetCaption.cpp:
 * insets/InsetFoot.cpp:
 * insets/InsetBibitem.cpp:
 * insets/InsetCollapsable.cpp:
 * Paragraph.cpp:
 * Buffer.cpp: pass a language argument to counter methods.

 * Paragraph.cpp (translateIfPossible): use the function with same name in gettext.cpp.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30520 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-12 20:09:53 +00:00
Jean-Marc Lasgouttes
c355edfb6d revert r30515: too many files there
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30516 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-12 17:30:56 +00:00
Jean-Marc Lasgouttes
834bfe5e21 fix a couple warnings after the number localization patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30515 a592a061-630c-0410-9148-cb99ea01b6c8
2009-07-12 17:28:46 +00:00
Abdelrazak Younes
5d40a42f60 Paragraph::collectWords() and MenuDefinition::expandSpellingSuggestions(): reuse Paragraph::spellCheck().
Paragraph::collectWords() now also collects spellchecker suggested words for inline word completion.




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30240 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-23 08:54:21 +00:00
Abdelrazak Younes
2f4f246512 A word have a non zero size.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30230 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-22 21:27:51 +00:00
Abdelrazak Younes
76aaecb221 MSVC: Add safety checks.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30229 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-22 21:06:25 +00:00
Abdelrazak Younes
694399b16c Simplify Buffer::spellCheck() by using Paragraph::spellCheck().
Paragrah::isMisspelled() is split in two.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30222 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-22 16:38:11 +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
Abdelrazak Younes
7a4668b25e Paragraph::isLetter(): Fix word selection in ERT. The check had nothing to do with spellchecking. This method is misnamed, it should perhaps be renamed to 'canBePartOfWord()'.
NB: I am not sure this escape character preference is something useful to keep. If some language has some special escape characters beside the single quote one we should support that out of the box and not asking the user to define it or them in the preference dialog.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30210 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-21 13:43:34 +00:00
Jean-Marc Lasgouttes
2eaac90ca5 fix output of abnormally short lines in .lyx files
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30192 a592a061-630c-0410-9148-cb99ea01b6c8
2009-06-19 15:32:51 +00:00
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