Commit Graph

53 Commits

Author SHA1 Message Date
Jean-Marc Lasgouttes
84395acfb5 * insets/InsetText.cpp (addToToc):
* TocBackend.cpp (updateItem): pass option AS_STR_INSETS to asString,
	so that insets get a chance to be displayed in ToC.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27238 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-03 13:47:12 +00:00
Abdelrazak Younes
b54b51c694 gcc compile fix: vector::insert() requires an iterator, not a const_iterator.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26642 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-30 12:34:36 +00:00
Abdelrazak Younes
2d55770a29 stupid cut&paste error.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26640 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-30 11:18:16 +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
7236cfc31d revert faulty commit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26638 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-30 10:07:22 +00:00
Abdelrazak Younes
7bd33462a0 Avoid a complete Toc reset in case when only a toc item update is needed.
* Buffer: new updateTocItem() signal (with Delegates and GuiView associates).
* TocBackend: take care of the signal emission instead of the Cursor::checkBufferStructure()
* TocModel: new updateTocItem() method.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26636 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-30 09:50:54 +00:00
Abdelrazak Younes
5731e7faae Small cleanup in order to improve toc change detection within insets.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26574 a592a061-630c-0410-9148-cb99ea01b6c8
2008-09-26 10:37:24 +00:00
Abdelrazak Younes
6876ffa65b Simplify TocModel by using UserRole data.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25235 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-12 15:31:10 +00:00
Abdelrazak Younes
c99463ebfc Fix bug http://bugzilla.lyx.org/show_bug.cgi?id=4910 by creating InsetText::addToToc().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25096 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-03 11:12:45 +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
Abdelrazak Younes
d1bc775b06 Fix cursor positioning bug in TocBackend.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24815 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-18 13:50:49 +00:00
Abdelrazak Younes
4573abd0f1 * TocBackend::item(): fix toc navigation bug by using DocIterator instead of ParConstIterator.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24804 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-16 15:06:26 +00:00
Abdelrazak Younes
2dfc84a22c More accurate toc navigation (LFUN_PARAGRAPH_GOTO).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24798 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-16 12:48:13 +00:00
Abdelrazak Younes
1e51e87f68 Inset::addToToc(): change signature. Use DocIterator instead of ParConstIterator. The idea is to have more accurate navigation in the paragraph. But this doesn't work yet.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24747 a592a061-630c-0410-9148-cb99ea01b6c8
2008-05-13 08:23:44 +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
f2c9b56fb4 cosmetics/#include cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23747 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-15 00:22:54 +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
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
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
c3a8b3a566 * Inset: Prepare for an eventual merge of updateLabels() and addToToc()
* TocBackend: add non const toc() and tocs() access methods.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23018 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-15 10:13:32 +00:00
Abdelrazak Younes
00189c2ebd Fix crash when outline pane is launched while the cursor is within a math matrix within a section. The problem was that DocIterator::backwardPos() does not work inside a math matrix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22933 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-11 07:47:04 +00:00
André Pönitz
69d566afea cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22885 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-09 09:08:59 +00:00
Abdelrazak Younes
9abb7db468 getting rid of superfluous std:: statements.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22104 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 19:28:07 +00:00
Abdelrazak Younes
9383f4c3c6 'using namespace std' instead of 'using std::xxx'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22097 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 10:16:00 +00:00
André Pönitz
28afd72c65 compile fix / cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21862 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-29 18:29:57 +00:00
André Pönitz
5a646574ca potential compile fix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21860 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-29 17:51:58 +00:00
André Pönitz
9d0ea8aeff Move debug.{cpp,h}, Messages.{cpp,h} and gettext.{cpp,h} to support/.
Now support/* should have no dependencies on src/* anymore.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21851 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-29 07:04:28 +00:00
André Pönitz
150cf11651 hand-crafted LyXErr
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21849 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-28 22:12:03 +00:00
Abdelrazak Younes
cdf1378200 Introducing TextClassPtr.h to minimize header dependencies.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21506 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-07 23:25:08 +00:00
Abdelrazak Younes
6725b2db59 Reduce header dependencies in Paragraph.h
- Move Changes.h out of Paragraph.h
- pimpl the inset list.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21033 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-18 15:29:51 +00:00
Abdelrazak Younes
f7b1c86393 Move Inset::Code to InsetCode.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20936 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-13 09:04:52 +00:00
André Pönitz
cd72af583f cosmetics
(maily move layout related enums into a header of there own to remov
include dependencies, alos rename a few things)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20598 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-29 20:02:32 +00:00
Lars Gullik Bjønnes
26f336769a Remove warnings reported with gcc 4.3:
- Modifier on return type ignored
	- Ambigous else
	- Ambigous logical operators
	- Semi-colon instead of empty block
	- Missing header files
	- Missing using std::XX
	- Initialization out of order


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20304 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-16 10:36:57 +00:00
Abdelrazak Younes
37333444c0 Cosmetics.
* TocItem:
  - add a default constructor instead of default initialisation.
  - delete unneeded and not really used isValid() method.

* TocBackend:
  - updateItem(): re-add debug info erased previously.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18749 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-12 12:29:19 +00:00
Bo Peng
d3e30f8d9b addToToc, pass parent ParConstIterator, fix bug 3711
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18680 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-05 17:24:11 +00:00
Lars Gullik Bjønnes
897436efbb Whitespace cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18550 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-28 22:27:45 +00:00
Abdelrazak Younes
9092bffc32 This patch solves this crash (due to an assertion):
1) Open EmbeddedObject.lyx
2) Open Toc
3) Click on section 7.2.2 which is in the second child document
4) assertion.

This commit adds proper support for multi-part documents. With this each child document has access to the _full_ TOC tree (including LOT and LOF). This enables to switch between master and child document using the TOC.

* buffer_funcs.cpp:
  - updateLabels(): do not emit Buffer::structureChanged() signal for child document
  - checkBufferStructure(): update the structure of the master document.

* ControlToc.cpp: always use the TocBackend of the master document.

* LyXView::connectBuffer(): connect structureChanged() of master document.

* TocBackend:
  - TocItem: get rid of child_ member.
  - TocBackend::item(): only compare items from the same document.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18386 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-17 19:19:37 +00:00
Abdelrazak Younes
d2649159ca Toc navigation doesn't work well with child document. This is the first part of the fix: the Toc item selection is properly done before the location of the child document.
Use case solved by this patch:
1) open EmbeddedObject.lyx
2) open the TOC widget (Uwe says it crashes there but I can't reproduce)
3) try to select an item previous to 6.2.2: crash because of an assertion:

Assertion triggered in bool __cdecl lyx::operator <(const class lyx::CursorSlice
 &,const class lyx::CursorSlice &) by failing check "false" in file D:\LyXSVN\ly
x-devel\src\CursorSlice.cpp:106

I think this patch will also solve bug 3616:
http://bugzilla.lyx.org/show_bug.cgi?id=3616 

* TocItem::child_: new member for child document; default to false.
* TocBackend::item(): skip DocIterator comparison if item is in child docuemt.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18370 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-16 16:43:14 +00:00
Abdelrazak Younes
6277ba63ab Properly search for relevant TocItem. Now works fine with sections inside insets.
* DocIterator
  - new comparison operators: <, > and <= (Courtesy of JMarc)

* TocBackend::item() use above <= operator instead of crude pit() comparison.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18349 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-15 17:07:55 +00:00
Peter Kümmel
2c7396cc59 Add debug output, harmless
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18347 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-15 16:29:04 +00:00
Jürgen Spitzmüller
4944e64733 From Ozgur Ugras BARAN:
* src/TocBackend.cpp:
   	- Allow TOC entries with depth larger than bufferParams.tocdepth.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18346 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-15 15:09:19 +00:00
Peter Kümmel
950e4b2097 fix crash: change empty line to paragraph and press a key
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18259 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-10 17:55:07 +00:00
André Pönitz
6add1994c7 rename LyXTextClass* into TextClass*
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18097 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 19:53:54 +00:00