diff --git a/src/ChangeLog b/src/ChangeLog index a1a5c6b664..8889978f4a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-04-13 Angus Leeming + + * lyx_main.[Ch] (updateInset): pass it an InsetBase pointer rather + than an InsetOld one. + 2004-04-12 Georg Baum * format.[Ch]: add editor to Format diff --git a/src/frontends/ChangeLog b/src/frontends/ChangeLog index 19b2374250..98f4c53d5a 100644 --- a/src/frontends/ChangeLog +++ b/src/frontends/ChangeLog @@ -1,3 +1,7 @@ +2004-04-13 Angus Leeming + + * LyXView.[Ch] (updateInset): pass it an InsetBase pointer rather + than an InsetOld one. 2004-04-07 Alfredo Braunstein @@ -10,7 +14,7 @@ 2004-04-05 Angus Leeming - * Dialogs.h: remove redundant header file. Clean up comments. + * Dialogs.h: remove #included header file. Clean up comments. 2004-03-31 Angus Leeming diff --git a/src/frontends/LyXView.C b/src/frontends/LyXView.C index 6a18ffc032..d4e5ee5723 100644 --- a/src/frontends/LyXView.C +++ b/src/frontends/LyXView.C @@ -193,7 +193,7 @@ void LyXView::dispatch(FuncRequest const & cmd) } -Buffer const * const LyXView::updateInset(InsetOld const * inset) const +Buffer const * const LyXView::updateInset(InsetBase const * inset) const { Buffer const * buffer_ptr = 0; if (inset) { diff --git a/src/frontends/LyXView.h b/src/frontends/LyXView.h index 96b1ebb71d..82d72e4bae 100644 --- a/src/frontends/LyXView.h +++ b/src/frontends/LyXView.h @@ -21,7 +21,7 @@ class Buffer; class Toolbar; -class InsetOld; +class InsetBase; class Intl; class Menubar; class ControlCommandBuffer; @@ -135,7 +135,7 @@ public: /** redraw \c inset in all the BufferViews in which it is currently * visible. If successful return a pointer to the owning Buffer. */ - Buffer const * const updateInset(InsetOld const *) const; + Buffer const * const updateInset(InsetBase const *) const; protected: /// view of a buffer. Eventually there will be several. diff --git a/src/graphics/ChangeLog b/src/graphics/ChangeLog index b4d02c4208..4932a2e328 100644 --- a/src/graphics/ChangeLog +++ b/src/graphics/ChangeLog @@ -1,3 +1,9 @@ +2004-04-13 Angus Leeming + + * PreviewLoader.C (dumpPreamble): + * Previews.C (generateBufferPreviews): re-enable iteration over all + insets. + 2004-02-21 Georg Baum * GraphicsCacheItem.C (convertToDisplayFormat): unzip zipped files diff --git a/src/graphics/PreviewLoader.C b/src/graphics/PreviewLoader.C index 130178f849..f0ad7291bb 100644 --- a/src/graphics/PreviewLoader.C +++ b/src/graphics/PreviewLoader.C @@ -600,7 +600,11 @@ void PreviewLoader::Impl::dumpPreamble(ostream & os) const << "\n"; // Loop over the insets in the buffer and dump all the math-macros. - for (InsetIterator it(buffer_.inset()); it; ++it) + InsetBase & inset = buffer_.inset(); + InsetIterator it = inset_iterator_begin(inset); + InsetIterator const end = inset_iterator_end(inset); + + for (; it != end; ++it) if (it->lyxCode() == InsetOld::MATHMACRO_CODE) it->latex(buffer_, os, runparams); diff --git a/src/graphics/Previews.C b/src/graphics/Previews.C index 0d012a38e4..29a0424e25 100644 --- a/src/graphics/Previews.C +++ b/src/graphics/Previews.C @@ -83,7 +83,11 @@ void Previews::generateBufferPreviews(Buffer const & buffer) const { PreviewLoader & ploader = loader(buffer); - for (InsetIterator it(buffer.inset()); it; ++it) + InsetBase & inset = buffer.inset(); + InsetIterator it = inset_iterator_begin(inset); + InsetIterator const end = inset_iterator_end(inset); + + for (; it != end; ++it) it->addPreview(ploader); ploader.startLoading(); diff --git a/src/lyx_main.C b/src/lyx_main.C index 51697e73c7..7b4b8ce795 100644 --- a/src/lyx_main.C +++ b/src/lyx_main.C @@ -163,7 +163,7 @@ void LyX::addLyXView(boost::shared_ptr const & lyxview) } -Buffer const * const LyX::updateInset(InsetOld const * inset) const +Buffer const * const LyX::updateInset(InsetBase const * inset) const { if (!inset) return 0; diff --git a/src/lyx_main.h b/src/lyx_main.h index 4929f141f1..908c60119f 100644 --- a/src/lyx_main.h +++ b/src/lyx_main.h @@ -23,7 +23,7 @@ class Buffer; class ErrorItem; -class InsetOld; +class InsetBase; class LastFiles; class LyXView; class kb_keymap; @@ -47,7 +47,7 @@ public: /** redraw \c inset in all the BufferViews in which it is currently * visible. If successful return a pointer to the owning Buffer. */ - Buffer const * const updateInset(InsetOld const *) const; + Buffer const * const updateInset(InsetBase const *) const; private: static boost::scoped_ptr singleton_;