lyx_mirror/src/insets
Richard Heck d3003c1022 Polish the Toc and labels updating when loading a child document.
Fix Bug 3860: Toc crash when loading a child documents.

* BufferView::loadLyXFile(): simplify, transfer last part to
  LyXView::loadLyXFile().
  Change return value to Buffer created by load (or 0 if none).
  Ultimately, this should all be moved to buffer_funcs.cpp, as it is no
  longer needed here.

* Buffer::setParentName(): small fix to avoid recursive includes.

* LyXView:
- setBuffer(): properly update the labels and the Toc if this is [LOAD Child
  Document] command. Move buffer connection and disconnection, simplifying
  earlier code.
- loadLyXFile(): get some code from BufferView::loadLyXFile() and from
  LyXFunc::LFUN_BUFFER_CHILD_OPEN, properly handle the child document case.
  There's a lot of overlap with setBuffer() here. This needs cleaning.

* LyXFunc: add optional argument to LFUN_BUFFER_CHILD_OPEN to indicate if
  the document is being opened by LyX itself rather than the user (as on 
  View>DVI, for example).

* LyX: adapt to loadLyXFile() API changes.

* insets/InsetInclude: use LFUN_BUFFER_CHILD_OPEN rather than calling
  loadLyXFile() directly. Make use of new optional argument.

With this in place, the only thing missing for proper multipart document support is to automatically update the parent Buffer when switching from the parent Buffer. This would be very useful when you work with multiple document sharing the same child documents (as I often do).



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18825 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-19 14:56:52 +00:00
..
ChangeLog rename LCursor->Cursor 2007-04-26 14:56:30 +00:00
ExternalSupport.cpp Saves some compile time by diminishing Buffer.h header dependencies: 2007-06-15 13:13:49 +00:00
ExternalSupport.h Fix bug 3240 2007-02-15 21:22:40 +00:00
ExternalTemplate.cpp rename LyXLex into Lexer 2007-04-26 11:30:54 +00:00
ExternalTemplate.h rename LyXLex into Lexer 2007-04-26 11:30:54 +00:00
ExternalTransforms.cpp Rename three remaining .C files 2007-04-26 05:18:04 +00:00
ExternalTransforms.h rename/merge LyXLength related stuff 2007-04-28 12:58:49 +00:00
Inset.cpp Remove background_color_ in Insets: it takes a lot of unnecessary memory, 2007-06-12 13:45:49 +00:00
Inset.h * the old cursor is stored before dispatch and then used after moving 2007-06-14 20:32:28 +00:00
InsetBibitem.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetBibitem.h rename InsetBase to Inset 2007-04-29 13:39:47 +00:00
InsetBibtex.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetBibtex.h InsetListings: change the interface of diaplay function and allow AlignLeft. Applied to InsetListings. Fixes bug 3617, 3618 2007-05-18 14:32:29 +00:00
InsetBox.cpp header cleanup. 2007-06-15 13:47:13 +00:00
InsetBox.h InsetListings: change the interface of diaplay function and allow AlignLeft. Applied to InsetListings. Fixes bug 3617, 3618 2007-05-18 14:32:29 +00:00
InsetBranch.cpp header cleanup. 2007-06-15 13:47:13 +00:00
InsetBranch.h Remove background_color_ in Insets: it takes a lot of unnecessary memory, 2007-06-12 13:45:49 +00:00
InsetCaption.cpp addToToc, pass parent ParConstIterator, fix bug 3711 2007-06-05 17:24:11 +00:00
InsetCaption.h addToToc, pass parent ParConstIterator, fix bug 3711 2007-06-05 17:24:11 +00:00
InsetCharStyle.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetCharStyle.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetCitation.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetCitation.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetCollapsable.cpp header cleanup. 2007-06-15 13:47:13 +00:00
InsetCollapsable.h * Inset and derivatives: insetName() -> name() 2007-04-30 14:39:09 +00:00
InsetCommand.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetCommand.h rename InsetBase to Inset 2007-04-29 13:39:47 +00:00
InsetCommandParams.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetCommandParams.h Add support for listings package. Two listings command \lstinline, \lstinputlisting and an environment \lstlisting are supported, along with preamble \lstset. \lstinputlisting is implemented through Include dialog, and the other two are implemented with a new inset listings, along with its dialog. 2007-05-09 19:11:42 +00:00
InsetEnvironment.cpp header cleanup. 2007-06-15 13:47:13 +00:00
InsetEnvironment.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetERT.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetERT.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetExternal.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetExternal.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetFloat.cpp header cleanup. 2007-06-15 14:10:26 +00:00
InsetFloat.h addToToc, pass parent ParConstIterator, fix bug 3711 2007-06-05 17:24:11 +00:00
InsetFloatList.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetFloatList.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetFoot.cpp header cleanup. 2007-06-15 14:10:26 +00:00
InsetFoot.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetFootlike.cpp header cleanup. 2007-06-15 14:10:26 +00:00
InsetFootlike.h rename InsetBase to Inset 2007-04-29 13:39:47 +00:00
InsetGraphics.cpp Saves some compile time by diminishing Buffer.h header dependencies: 2007-06-15 13:13:49 +00:00
InsetGraphics.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetGraphicsParams.cpp rename/merge LyXLength related stuff 2007-04-28 12:58:49 +00:00
InsetGraphicsParams.h rename/merge LyXLength related stuff 2007-04-28 12:58:49 +00:00
InsetHFill.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetHFill.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetInclude.cpp Polish the Toc and labels updating when loading a child document. 2007-06-19 14:56:52 +00:00
InsetInclude.h addToToc, pass parent ParConstIterator, fix bug 3711 2007-06-05 17:24:11 +00:00
InsetIndex.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetIndex.h InsetListings: change the interface of diaplay function and allow AlignLeft. Applied to InsetListings. Fixes bug 3617, 3618 2007-05-18 14:32:29 +00:00
InsetLabel.cpp header cleanup. 2007-06-15 14:10:26 +00:00
InsetLabel.h rename InsetBase to Inset 2007-04-29 13:39:47 +00:00
InsetLine.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetLine.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetListings.cpp Revert rev18728, which is not a good idea 2007-06-09 18:06:11 +00:00
InsetListings.h * src/insets/InsetListings.{cpp,h}: 2007-05-20 05:53:49 +00:00
InsetListingsParams.cpp Add bypass validation checkboxes to listings related dialogs 2007-06-12 17:10:28 +00:00
InsetListingsParams.h Add bypass validation checkboxes to listings related dialogs 2007-06-12 17:10:28 +00:00
InsetMarginal.cpp header cleanup. 2007-06-15 14:17:20 +00:00
InsetMarginal.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetNewline.cpp header cleanup. 2007-06-15 14:52:15 +00:00
InsetNewline.h rename InsetBase to Inset 2007-04-29 13:39:47 +00:00
InsetNomencl.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetNomencl.h InsetListings: change the interface of diaplay function and allow AlignLeft. Applied to InsetListings. Fixes bug 3617, 3618 2007-05-18 14:32:29 +00:00
InsetNote.cpp header cleanup. 2007-06-15 14:17:20 +00:00
InsetNote.h Remove background_color_ in Insets: it takes a lot of unnecessary memory, 2007-06-12 13:45:49 +00:00
InsetOptArg.cpp header cleanup. 2007-06-15 14:17:20 +00:00
InsetOptArg.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetPagebreak.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetPagebreak.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetQuotes.cpp header cleanup. 2007-06-15 14:17:20 +00:00
InsetQuotes.h * Inset and derivatives: insetName() -> name() 2007-04-30 14:39:09 +00:00
InsetRef.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetRef.h InsetListings: change the interface of diaplay function and allow AlignLeft. Applied to InsetListings. Fixes bug 3617, 3618 2007-05-18 14:32:29 +00:00
InsetSpace.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetSpace.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetSpecialChar.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetSpecialChar.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetTabular.cpp Fix bug3782, crash with selection of table cells, joint work with JMarc 2007-06-07 21:55:55 +00:00
InsetTabular.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetText.cpp This patch transfer Inset::destroyed signal to InsetText and InsetMathNest thus freeing some memory as normal math chars and symbols won't have it. 2007-05-31 12:30:17 +00:00
InsetText.h Following revision 18723, Inset::destroyed() signal is not needed anymore. 2007-06-09 13:08:44 +00:00
InsetTheorem.cpp * Inset and derivatives: insetName() -> name() 2007-04-30 14:39:09 +00:00
InsetTheorem.h rename InsetBase to Inset 2007-04-29 13:39:47 +00:00
InsetTOC.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetTOC.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetUrl.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetUrl.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetVSpace.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetVSpace.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
InsetWrap.cpp header cleanup. 2007-06-15 13:47:13 +00:00
InsetWrap.h addToToc, pass parent ParConstIterator, fix bug 3711 2007-06-05 17:24:11 +00:00
MailInset.cpp Rename insets/insetxxx to insets/InsetXxx, part 2 2007-04-25 01:25:51 +00:00
MailInset.h rename InsetBase to Inset 2007-04-29 13:39:47 +00:00
Makefile.am Add support for listings package. Two listings command \lstinline, \lstinputlisting and an environment \lstlisting are supported, along with preamble \lstset. \lstinputlisting is implemented through Include dialog, and the other two are implemented with a new inset listings, along with its dialog. 2007-05-09 19:11:42 +00:00
pch.h rename InsetBase to Inset 2007-04-29 13:39:47 +00:00
RenderBase.h Whitespace cleanup 2007-05-28 22:27:45 +00:00
RenderButton.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
RenderButton.h rename InsetBase to Inset 2007-04-29 13:39:47 +00:00
RenderGraphic.cpp Whitespace cleanup 2007-05-28 22:27:45 +00:00
RenderGraphic.h rename InsetBase to Inset 2007-04-29 13:39:47 +00:00
RenderPreview.cpp rename LyXFont to Font except in tex2lyx 2007-04-29 18:17:15 +00:00
RenderPreview.h rename InsetBase to Inset 2007-04-29 13:39:47 +00:00