Commit Graph

346 Commits

Author SHA1 Message Date
Enrico Forestieri
7edf2691ae Fix bug #7310 (Greek symbols inside ERT cause unreported compile failure)
Note that View->Source now shows that a character cannot be encoded.
However, the error is still unreported due to bug #7324.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37791 a592a061-630c-0410-9148-cb99ea01b6c8
2011-02-27 12:16:17 +00:00
Georg Baum
f176a18434 Fix bug #6919 by splitting Inset::noFontChange() into inheritFont() and
resetFontEdit(). The former is used for on-screen and export formatting,
and the latter is used for interactive editing.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37761 a592a061-630c-0410-9148-cb99ea01b6c8
2011-02-22 19:41:04 +00:00
Tommaso Cucinotta
c31d6acf65 When exporting to latex with a length that does not include entirely
a special phrase, simply export the segment as normal text. For other
uses of these methods, end_pos is -1, so the original behavior is unaltered.
This allows for finding properly the LyX, LaTeX and other special phrases
with Advanced Find, when ignore format is off.
This complements the other changes made to latex export methods, for
exporting to latex with a given final end position.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37599 a592a061-630c-0410-9148-cb99ea01b6c8
2011-02-12 11:03:24 +00:00
Enrico Forestieri
d866717ef7 Integrate texrow with otexstream in order to perform automatic line
counting when exporting to latex. This is done for the code comprised
between \begin{document} and \end{document}, while the preamble code
still needs manual calls to TexRow::newline() for registering new lines.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37584 a592a061-630c-0410-9148-cb99ea01b6c8
2011-02-10 20:02:48 +00:00
Stephan Witt
e5f51200a3 isWordSeparator crashes when checking end-of-paragraph
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37369 a592a061-630c-0410-9148-cb99ea01b6c8
2011-01-30 07:17:48 +00:00
Stephan Witt
5eed97b56b restore the correct behavior of suppression of misspelled marker for word at cursor position - the change r37340 broke it
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37363 a592a061-630c-0410-9148-cb99ea01b6c8
2011-01-29 12:28:02 +00:00
Enrico Forestieri
1ef605f625 Introduce a wrapper class for odocstream to help ensuring that no
blank lines may be inadvertently output. This is achieved by using two
special iomanip-like variables (breakln and safebreakln) in the lyx::
namespace. When they are inserted in the stream, a newline is output
only if not already at the beginning of a line. The difference between
breakln and safebreakln is that, if needed, the former outputs '\n'
and the latter "%\n".
In future, the new class will also be used for counting the number of
newlines issued. Even if the infractrure for doing that is already in
place, the counting is essentially still done the old way.
There are still places in the code where the functionality of the
class could be used, most probably. ATM, it is used for InsetTabular,
InsetListings, InsetFloat, and InsetText.
The Comment and GreyedOut insets required a special treatment and a
new InsetLayout parameter (Display) has been introduced. The default
for Display is "true", meaning that the corresponding latex
environment is of "display" type, i.e., it stands on its own, whereas
"false" means that the contents appear inline with the text. The
latter is the case for both Comment and GreyedOut insets.
Mostly, the only visible effects on latex exports should be the
disappearing of some redundant % chars and the appearing/disappearing
of null {} latex groups after a comment or lyxgreyedout environments
(they are related to the presence or absence of a space immediately
after those environments), as well as the fact that math environments
are now started on their own lines.
As a last thing, only the latex code between \begin{document} and
\end{document} goes through the new class, the preamble being directly
output through odocstream, as usual.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37360 a592a061-630c-0410-9148-cb99ea01b6c8
2011-01-29 02:41:13 +00:00
Stephan Witt
5ee3c34096 save the correct last position of misspelled words in spell checker state (thanks JMarc)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37340 a592a061-630c-0410-9148-cb99ea01b6c8
2011-01-28 07:01:38 +00:00
Jean-Marc Lasgouttes
370044551c Unify handling of pass thru insets and paragraphs by introducing Paragraph::isPassThru. Many lfuns are now disabled in sweave chunks.
Also, fix #7175 (do not output \noindent in passthru pars)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37328 a592a061-630c-0410-9148-cb99ea01b6c8
2011-01-26 11:04:42 +00:00
Stephan Witt
64d9fed8c3 #7220 correct spell check state ranges for word splits
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37146 a592a061-630c-0410-9148-cb99ea01b6c8
2011-01-07 15:20:58 +00:00
Vincent van Ravesteijn
68fe13dfa1 Fix bug #7212: Paragraph::forToc has to include the labelString.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37123 a592a061-630c-0410-9148-cb99ea01b6c8
2011-01-06 01:12:38 +00:00
Stephan Witt
8d5acc2235 #7201 return "correct" wrong spelled word when before a dot - exclude the dot from spell checker result
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37062 a592a061-630c-0410-9148-cb99ea01b6c8
2011-01-02 11:31:28 +00:00
Stephan Witt
a5b960cdd2 cheaper empty range for getRange result on mismatch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36991 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-22 17:09:51 +00:00
Stephan Witt
fab1507221 fix for #7081: the painting of misspelled marker is suppressed for the word at cursor position
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36990 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-22 07:29:16 +00:00
Richard Heck
9e9c96035c Finish disentangling tocString(). We introduce a new method, forToc(),
that also makes sure it doesn't do more work than it needs to do, by
limiting the size to 40 characters. Previously, InsetBranch::addToToc()
would have added a string representing the entire contents of the
branch! It's hard to imagine that having to recalculate that sort of
thing doesn't cause some problems with speed, especially in documents
with lots of notes and branches and such.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36974 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-20 21:55:09 +00:00
Vincent van Ravesteijn
8adcffff0c Fix bug #7166: Insets that shouldn't appear in the TOC were included. From now on use AS_STR_INTOC as an option for Paragraph::asString() for insets that should not be included in the strings for the TOC, like IndexInset.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36969 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-20 19:18:56 +00:00
Stephan Witt
5179e2f4d8 remove superfluous semicolons at the end of namespaces
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36901 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-16 08:06:00 +00:00
Richard Heck
832d6cd7e1 Begin undoing the tocString() mess by renaming that routine.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36889 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-15 01:34:04 +00:00
Pavel Sanda
c420c81ec2 Replay r36748
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36757 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-07 00:13:19 +00:00
Pavel Sanda
c68d754a74 Revert commits from 36745
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36749 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-07 00:05:40 +00:00
Stephan Witt
430d03811e #7026 substitute isDigit() by isDigitASCII() and ditch isDigit(); introduce isNumber() and use it in spell checker; change isdigit() to isDigitASCII() otherwise
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36748 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-06 22:35:15 +00:00
Richard Heck
a61899ffe7 Allow InPreamble to be used with Paragraph-type environments. There is
no reason not to permit this, and using it with PassThru 1 allows for a
very simple Preamble layout-type that acts as ERT for the premable. Of
course, we do have the preamble in Document>Settings, but that allows
the embedding of preamble code in branches.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36562 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-28 22:08:11 +00:00
Georg Baum
e2309ca098 Fix bug #6853 (Short titles ignored when InPreamble is set to 1 in layout file)
The fix includes required arguments and LaTeXParam, too.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36552 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-28 12:27:52 +00:00
Richard Heck
ab7a5bc382 Comment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36522 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-26 18:09:03 +00:00
Richard Heck
a81bf77314 Change the escaping mechanism for XHTML output and so allow a fix for
bug #7061.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36455 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-24 15:27:36 +00:00
Jürgen Spitzmüller
fc9c1494ce further xetex disambiguation: use the flavor where the flavor is apt.
This introduces an isFullUnicode() function to OutputParams that currently only contains XETEX, but later can also contain other fully unicode-aware backends (LUATEX for instance).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36445 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-23 12:23:36 +00:00
Jürgen Spitzmüller
7cbeed2e40 * Introduce polyglossia support (bug 6576).
Please test this.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36433 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-22 12:10:16 +00:00
Tommaso Cucinotta
5e5122699d Ignore ligature breaks and hyphenations during simple search (fixes #1468).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36427 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-22 07:50:34 +00:00
Vincent van Ravesteijn
a7629d2bfc Squeeze warnings on msvc express 2010.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36344 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-17 16:15:01 +00:00
Vincent van Ravesteijn
07924ac300 Remove some unnecessary static_casts and add two FIXMEs about casts that don't look safe.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35856 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-26 16:45:21 +00:00
Vincent van Ravesteijn
8693ae474b Proper implementatiom of isInToc()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35846 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-26 01:10:19 +00:00
Stephan Witt
3167edeb48 #6945 correct refresh range maximum on char erase
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35616 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-12 19:05:47 +00:00
Stephan Witt
e32396ba76 add missing spell check request on early return for deletion of text in change tracking mode
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35543 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-29 19:32:41 +00:00
Stephan Witt
cc7db294e2 #6917 correct spell check for deleted text in change tracking mode
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35542 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-29 19:31:16 +00:00
Stephan Witt
f94e6274a9 more constness, thanks Abdel
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35463 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-20 06:54:34 +00:00
Stephan Witt
5671e2dc4d replace the map of the speller state with a vector
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35447 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-19 16:00:32 +00:00
Stephan Witt
9304b5eadc correct the second try for misspelled words to catch abbreviations
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35444 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-19 11:49:10 +00:00
Stephan Witt
78ded48a22 make a second try for misspelled words to catch abbreviations
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35427 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-17 17:39:18 +00:00
Stephan Witt
dcf5272d05 don't copy internal state of spell checker in copy constructor
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35408 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-16 07:42:08 +00:00
Abdelrazak Younes
47cf32b67e gcc compile fix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35372 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-14 14:01:44 +00:00
Abdelrazak Younes
504b893ec8 whitespace
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35371 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-14 14:00:29 +00:00
Stephan Witt
7b0c3c0daf reduce nesting levels in markMisspelledWords; simplify range check of fontspan
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35369 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-14 12:48:03 +00:00
Stephan Witt
dec437fbac add cache of spell checker results to speed up native speller engine on macosx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35362 a592a061-630c-0410-9148-cb99ea01b6c8
2010-09-14 05:24:04 +00:00
Stephan Witt
4887009e68 add setMisspelled() wrapper to check arguments and to hide the fontlist property implementation detail
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35206 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-26 11:47:27 +00:00
Jean-Marc Lasgouttes
1a18cdfb39 Clean-up the code with respect to PassThru insets and layouts.
The goal is first to remove explicit testing against ERT_CODE, 
and second to allow to define layouts with the same properties as ERT insets.

This commit does not change behaviour 
* rename OutputParams::verbatim to pass_thru
* disable encoding switch inside pass_thru layouts



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35091 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-07 22:07:49 +00:00
Jean-Marc Lasgouttes
e4f2484cb5 Implement LFUN_SPELLING_REMOVE (patch from switt)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35055 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-05 20:10:40 +00:00
Richard Heck
17166837d7 Revert last commit. I was confusing two things.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34890 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-13 14:13:47 +00:00
Richard Heck
e611cc2d4a Enhance LyX by fixing #6760. New preference to set minimum length of
automatically spellchecked words.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34889 a592a061-630c-0410-9148-cb99ea01b6c8
2010-07-13 14:08:44 +00:00
Richard Heck
84a4ec80ab Paragraph::latex() always returned false. So remove the return value.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34676 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-15 15:49:24 +00:00
Richard Heck
c952f9a7be Fix InPreamble. I must have committed an incomplete patch.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34675 a592a061-630c-0410-9148-cb99ea01b6c8
2010-06-15 15:37:39 +00:00