]> git.lyx.org Git - features.git/commitdiff
Preview fiddling (preparing the way for mathed previews).
authorAngus Leeming <leeming@lyx.org>
Tue, 13 Apr 2004 13:10:33 +0000 (13:10 +0000)
committerAngus Leeming <leeming@lyx.org>
Tue, 13 Apr 2004 13:10:33 +0000 (13:10 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8647 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/frontends/ChangeLog
src/frontends/LyXView.C
src/frontends/LyXView.h
src/graphics/ChangeLog
src/graphics/PreviewLoader.C
src/graphics/Previews.C
src/lyx_main.C
src/lyx_main.h

index a1a5c6b66493fc89e0a4653c2724da2da4ce020b..8889978f4a9b9bf29d25d748fd3618ef7044b7c6 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-13  Angus Leeming  <leeming@lyx.org>
+
+       * lyx_main.[Ch] (updateInset): pass it an InsetBase pointer rather
+       than an InsetOld one.
+
 2004-04-12  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
 
        * format.[Ch]: add editor to Format
index 19b2374250d6989f950124c00fbdd9a9c1ebed26..98f4c53d5ae15a13a943cb844c8d3a4c0d57f17a 100644 (file)
@@ -1,3 +1,7 @@
+2004-04-13  Angus Leeming  <leeming@lyx.org>
+
+       * LyXView.[Ch] (updateInset): pass it an InsetBase pointer rather
+       than an InsetOld one.
 
 2004-04-07  Alfredo Braunstein  <abraunst@lyx.org>
 
@@ -10,7 +14,7 @@
 
 2004-04-05  Angus Leeming  <leeming@lyx.org>
 
-       * Dialogs.h: remove redundant header file. Clean up comments.
+       * Dialogs.h: remove #included header file. Clean up comments.
 
 2004-03-31  Angus Leeming  <leeming@lyx.org>
 
index 6a18ffc032792eb63f2a77f40d5f6b24b619e4e6..d4e5ee572367322b3f4d0acea2b9032ca33dd732 100644 (file)
@@ -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) {
index 96b1ebb71d0d7753379cf8d1b29db2f55be0d0fe..82d72e4baeb7a68b0aea6a6d7913768ec6b03813 100644 (file)
@@ -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.
index b4d02c42082102a11146c4a7ce37f9ce2039b546..4932a2e328cf1606efa9cc0d06d66c757ed069fe 100644 (file)
@@ -1,3 +1,9 @@
+2004-04-13  Angus Leeming  <leeming@lyx.org>
+
+       * PreviewLoader.C (dumpPreamble):
+       * Previews.C (generateBufferPreviews): re-enable iteration over all
+       insets.
+
 2004-02-21  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
 
        * GraphicsCacheItem.C (convertToDisplayFormat): unzip zipped files
index 130178f8497623318c730367aec08c82d832827c..f0ad7291bbfbb4b5557c80774b967ade2cfa3115 100644 (file)
@@ -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);
 
index 0d012a38e455c8da6d05f3195d1463439ea6a716..29a0424e25f34aaa237ab4bae13a9671dc43a2c1 100644 (file)
@@ -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();
index 51697e73c7f988e6aa78bfbf070af34f81299112..7b4b8ce795c6bcff9aa1f72a2aee920498bdfba6 100644 (file)
@@ -163,7 +163,7 @@ void LyX::addLyXView(boost::shared_ptr<LyXView> const & lyxview)
 }
 
 
-Buffer const * const LyX::updateInset(InsetOld const * inset) const
+Buffer const * const LyX::updateInset(InsetBase const * inset) const
 {
        if (!inset)
                return 0;
index 4929f141f1bf738d9b956124bc7813c4d843c1a3..908c60119f501ea23f827382f5d64c42f464479b 100644 (file)
@@ -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<LyX> singleton_;