Commit Graph

84 Commits

Author SHA1 Message Date
Jürgen Spitzmüller
a61eeb1fb2 Allow to switch buffer languages via the menu.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33366 a592a061-630c-0410-9148-cb99ea01b6c8
2010-02-08 17:15:00 +00:00
Richard Heck
f385f7a2b2 Remove it for real now.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33135 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-21 18:51:26 +00:00
Richard Heck
22efc89c79 Remove an unnecessary dependency.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33134 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-21 18:49:08 +00:00
Richard Heck
b18bfcf3cc Kill a (public) magic boolean.
The point of this will become clear shortly. I hope.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33133 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-21 18:46:20 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Richard Heck
9337d73f1f Comment.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23551 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-08 03:00:13 +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
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