Commit Graph

280 Commits

Author SHA1 Message Date
Richard Heck
3e654186d2 Move the StartTag, EndTag, and CompTag classes into the html namespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33099 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-19 22:08:04 +00:00
Richard Heck
1832a388c5 Collect the title for XHTML output, and use it.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33097 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-19 19:43:15 +00:00
Richard Heck
557c705cbb Fix listings XHTML output: No paragraphs in there.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33096 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-19 19:11:12 +00:00
Jürgen Spitzmüller
4506ec88ab * Add support for aspell language varieties.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33085 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-18 17:02:05 +00:00
Richard Heck
59c04f7096 The fortoc argument I introduced earlier should all along have gone into
OutputParams. So now it is there.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33044 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-14 22:24:43 +00:00
Richard Heck
dc4e9f102a Fix TOC output of math insets.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32998 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-12 20:24:53 +00:00
Abdelrazak Younes
5b70e2be8e Revert part of r32766. This was a stupid change as newer paragraph
weren't taken into account. So the paragraph id management is now going
back to Paragraph.cpp.

Sorry for the trouble.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32788 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-06 09:12:49 +00:00
Abdelrazak Younes
744ee152fa Cleanup a bit the pargraph ids generation in order to (trying to) fix
#6415
Enrico please verify that reverse dvi is fixed.

* Text and InsetText: create two private constructors and transfer some
initialisation code from InsetText.

* Paragraph: id generation is transfered to Text. May be transfered to
Buffer in the future, we'll see.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32766 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-05 13:16:55 +00:00
Vincent van Ravesteijn
3efb1572a2 Fix bug #6378: Word completion (in texted) should be language-sensitive.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32581 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-18 14:48:56 +00:00
Richard Heck
19bec6e8bc Generate the magic label always. We'll need it other times, when we do
the other TOCs, in particular.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32466 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-10 20:36:12 +00:00
Richard Heck
0d0a1c6457 Don't double-escape things.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32464 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-10 20:19:41 +00:00
Richard Heck
e5afe8db66 This really gets the TOC working now. We auto-generate labels for the
paragraphs the TOC targets, and link to them.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32461 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-10 20:03:35 +00:00
Richard Heck
ffe73b795b Initial work for InsetTOC. This does actually write a TOC, but without
any links. That is the next step.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32459 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-10 18:30:48 +00:00
Richard Heck
95fedfe642 Remove obsolete comment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32297 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-03 19:59:42 +00:00
Richard Heck
9929f89856 Fix bug 5842: Add InPreamble tag for layouts.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32277 a592a061-630c-0410-9148-cb99ea01b6c8
2009-12-01 14:34:05 +00:00
Richard Heck
84ccea777f Add a couple comments.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32267 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-30 23:31:21 +00:00
Richard Heck
4f51edea21 Remove obsolete comment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32265 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-30 23:25:39 +00:00
Richard Heck
55bfa587c6 Don't escape these.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32264 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-30 23:13:06 +00:00
Richard Heck
d305930f47 Forgot this. Now the insets at least show up again.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32090 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-19 20:25:40 +00:00
Richard Heck
0b317145d7 Comments.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32087 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-19 18:28:36 +00:00
Richard Heck
ad132e2e99 Restore basic paragraph output for XHTML. The insets are all disabled still.
Much of the point of this is to allow us properly to handle what LyX does as:
  <em>This is <strong>bold and italic</em> and now just bold.</strong>
We output:
  <em>This is <strong>bold and italic</strong></em><strong> and now just bold.</strong>
which is valid.

Note how much easier this would have been if emphasis and boldness were insets
rather than ranges. ;-)



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32086 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-19 18:24:19 +00:00
Richard Heck
ff61f41d5b Unnecessary argument.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32070 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-17 22:18:28 +00:00
Abdelrazak Younes
82c7e15e64 Uniformize Inset construction (passing Buffer * everywhere). Lots of cleanup to do still...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31901 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-08 15:53:21 +00:00
Richard Heck
5faa75408b Try to deal with one of the big problems here, namely, that we
can't just output Standard as <p>, or anything else, because we
have structures like:
  this is text <branch>and more text</branch> and more
which would then come out as:
  <p>this is text <p>and more text</p> and more</p>
So we use the OutputParam html_in_par to try to signal when we
are already in a paragraph. It is expected that we will need to
do some bug fixing here.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31753 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-26 20:53:46 +00:00
Jean-Marc Lasgouttes
b265203a84 Paragraph::write: buffer normal characters into a docstring, in order to reduce the number of calls to to_qstr().
THis leads to a big speedup of the buffer-write function (>60%). The goal is to make autosave less noticeable.

This patch should be safe as long as transforming a docstring to utf8 is equivalent to transforming the characters one by one.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31695 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-23 16:48:55 +00:00
Jürgen Spitzmüller
3b6931719a Assure the author is encoded correctly in the LaTeX output of change tracking markup (bug 6225).
Patch reviewed by Jean-Marc.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31602 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-12 16:22:05 +00:00
Enrico Forestieri
2245f82f96 Properly reset the stream encoding after an environment. Fixes bug #6216.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31392 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-16 20:50:40 +00:00
Tommaso Cucinotta
14c27bcea6 OutputParams.linelen now controls line-width also for LaTeX exports, additionally to plaintext ones.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31263 a592a061-630c-0410-9148-cb99ea01b6c8
2009-09-02 23:46:04 +00:00
Abdelrazak Younes
0cc197d3c1 Move the inline spellchecking code from collectWords() to the row drawing routine. The text row is spell checked only if changed!
Now inline SpellChecker is faster than ever. Now, I honestly think that we blow out all the competitors (thunderbird, OO, MSWord, etc) :-)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30970 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-10 20:54:22 +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
9e6c9ecbe4 gcc compilation and warning fixes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30952 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 17:00:26 +00:00
Abdelrazak Younes
1919580310 Get rid of Paragraph::forcePlainLayout().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30942 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 15:38:55 +00:00
Abdelrazak Younes
34fde774f8 Get rid of Paragraph::ownerCode().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30934 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-09 14:33:35 +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
Vincent van Ravesteijn
b86942b4f4 Uniform naming of functions.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30865 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-04 22:50:36 +00:00
Vincent van Ravesteijn
27a0ac410f Remove some unnecessary negated logic.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30864 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-04 22:44:23 +00:00
Vincent van Ravesteijn
6d8f1aa244 Hide some internals of Changes:
* no one has to know that the current author has by default id 0,
* avoid unnecessary use of the Type enum.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30862 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-04 22:15:17 +00:00
Enrico Forestieri
7771fedf9c White space.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30857 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-04 10:37:14 +00:00
Pavel Sanda
7c170d8fa8 Please Andre
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30856 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-04 09:26:46 +00:00
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