On Mon, Sep 22, 2003 at 06:13:52PM +0000, Angus Leeming spake thusly:

...

> > Attached.
> 
> Ahh. Then we need a destructor to Paragraph::Pimpl that is defined out of line 
> I think. No need for Paragraph itself to know anything about this. Try:
> 
> paragraph_pimpl.h:
> struct Paragraph::Pimpl {
>         ~Pimpl();
>       ...
> };
> 
> paragraph_pimpl.C
> #include "lyxfont.h"
> Paragraph::Pimpl::~Pimpl()
> {}
> 
> If it works, could I get you to just apply the patch?
> Angus

...but it doesn't work :-(

Attached my patch (did I get it right?) and the error output.

- Martin 

Index: paragraph.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph.C,v
retrieving revision 1.326
diff -u -p -r1.326 paragraph.C
--- paragraph.C 21 Sep 2003 23:00:46 -0000      1.326
+++ paragraph.C 22 Sep 2003 17:46:02 -0000
@@ -17,6 +17,7 @@
 
 #include <config.h>
 
+//#include "lyxfont.h"
 #include "paragraph.h"
 #include "paragraph_pimpl.h"
 
@@ -27,7 +28,6 @@
 #include "gettext.h"
 #include "language.h"
 #include "latexrunparams.h"
-#include "lyxfont.h"
 #include "lyxrc.h"
 #include "lyxrow.h"
 #include "texrow.h"
Index: paragraph_pimpl.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph_pimpl.C,v
retrieving revision 1.84
diff -u -p -r1.84 paragraph_pimpl.C
--- paragraph_pimpl.C   16 Sep 2003 14:08:05 -0000      1.84
+++ paragraph_pimpl.C   22 Sep 2003 17:46:02 -0000
@@ -13,6 +13,7 @@
 
 #include <config.h>
 
+#include "lyxfont.h"
 #include "paragraph_pimpl.h"
 
 #include "bufferparams.h"
@@ -20,6 +21,7 @@
 #include "encoding.h"
 #include "language.h"
 #include "LaTeXFeatures.h"
+
 #include "latexrunparams.h"
 #include "LColor.h"
 #include "lyxlength.h"
@@ -78,6 +80,10 @@ Paragraph::Pimpl::Pimpl(Pimpl const & p,
        if (p.tracking())
                changes_.reset(new Changes(*p.changes_.get()));
 }
+
+
+Paragraph::Pimpl::~Pimpl()
+{}
 
 
 void Paragraph::Pimpl::setContentsFromPar(Paragraph const & par)
Index: paragraph_pimpl.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph_pimpl.h,v
retrieving revision 1.38
diff -u -p -r1.38 paragraph_pimpl.h
--- paragraph_pimpl.h   16 Sep 2003 14:08:05 -0000      1.38
+++ paragraph_pimpl.h   22 Sep 2003 17:46:02 -0000
@@ -30,6 +30,8 @@ struct Paragraph::Pimpl {
        /// Copy constructor
        Pimpl(Pimpl const &, Paragraph * owner);
        ///
+       ~Pimpl();
+       ///
        void setContentsFromPar(Paragraph const & par);
        /// set tracking mode
        void trackChanges(Change::Type type = Change::UNCHANGED);
paragraph.C:1144: warning: #warning FIXME we should check the prev par as well (Lgb)
In file included from paragraph.C:22:
../boost/boost/checked_delete.hpp: In function `void 
boost::checked_delete<LyXFont>(LyXFont *)':
../boost/boost/checked_delete.hpp:52:   instantiated from 
`boost::checked_deleter<LyXFont>::operator ()(LyXFont *) const'
../boost/boost/detail/shared_count.hpp:342:   instantiated from 
`boost::detail::shared_count::shared_count<LyXFont *, boost::checked_deleter<LyXFont> 
>(LyXFont *, boost::checked_deleter<LyXFont>)'
../boost/boost/shared_ptr.hpp:114:   instantiated from 
`boost::shared_ptr<LyXFont>::shared_ptr<LyXFont>(LyXFont *)'
../boost/boost/shared_ptr.hpp:222:   instantiated from 
`boost::shared_ptr<LyXFont>::reset<LyXFont>(LyXFont *)'
ShareContainer.h:47:   instantiated from `ShareContainer<LyXFont>::get(const LyXFont 
&) const'
paragraph_pimpl.h:101:   instantiated from here
../boost/boost/checked_delete.hpp:32: `sizeof' applied to incomplete type `LyXFont'
../boost/boost/checked_delete.hpp:32: size of array `type_must_be_complete' is negative
../boost/boost/checked_delete.hpp:33: `sizeof' applied to incomplete type `LyXFont'
../boost/boost/checked_delete.hpp:33: creating array with size `-1'
../boost/boost/checked_delete.hpp:34: invalid use of undefined type `class LyXFont'
paragraph.h:37: forward declaration of `class LyXFont'
../boost/boost/checked_delete.hpp:30: incomplete `x' defined here
ShareContainer.h: In method `class boost::shared_ptr<LyXFont> 
ShareContainer<LyXFont>::get(const LyXFont &) const':
paragraph_pimpl.h:101:   instantiated from here
ShareContainer.h:47: invalid use of undefined type `class LyXFont'
paragraph.h:37: forward declaration of `class LyXFont'
make: *** [paragraph.o] Error 1

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to