]> git.lyx.org Git - features.git/commitdiff
More clone safety.
authorRichard Heck <rgheck@comcast.net>
Fri, 29 Feb 2008 20:17:28 +0000 (20:17 +0000)
committerRichard Heck <rgheck@comcast.net>
Fri, 29 Feb 2008 20:17:28 +0000 (20:17 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23361 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetNewpage.h
src/insets/InsetNomencl.h

index d11f9fd2baeea7ac1563198fb318b31c7ddef844..57cbf57daa409b3b4ba646f6f125dd9aef453626 100644 (file)
@@ -50,7 +50,7 @@ public:
        virtual ColorCode ColorName() const { return Color_newpage; }
 
 private:
-       Inset * clone() const { return new InsetNewpage; }
+       Inset * clone() const { return new InsetNewpage(*this); }
 };
 
 
@@ -65,10 +65,7 @@ public:
        ColorCode ColorName() const { return Color_pagebreak; }
 
 private:
-       virtual Inset * clone() const
-       {
-               return new InsetPagebreak;
-       }
+       virtual Inset * clone() const { return new InsetPagebreak(*this); }
 };
 
 
@@ -81,10 +78,7 @@ public:
        std::string getCmdName() const { return "\\clearpage"; }
 
 private:
-       virtual Inset * clone() const
-       {
-               return new InsetClearPage;
-       }
+       virtual Inset * clone() const { return new InsetClearPage(*this); }
 };
 
 
@@ -97,10 +91,7 @@ public:
        std::string getCmdName() const { return "\\cleardoublepage"; }
 
 private:
-       virtual Inset * clone() const
-       {
-               return new InsetClearDoublePage;
-       }
+       virtual Inset * clone() const { return new InsetClearDoublePage(*this); }
 };
 
 } // namespace lyx
index 6727068ab089bf064d85000f0ddcdf2c85ef01ab..9fc64bcf11716bdc5df719604cd6ba6bfb67a9fd 100644 (file)
@@ -47,7 +47,7 @@ public:
        static bool isCompatibleCommand(std::string const & s) 
                { return s == "nomenclature"; }
 private:
-       Inset * clone() const { return new InsetNomencl(params()); }
+       Inset * clone() const { return new InsetNomencl(*this); }
        /// unique id for this nomenclature entry for docbook export
        docstring nomenclature_entry_id;
 };
@@ -81,7 +81,7 @@ public:
        static bool isCompatibleCommand(std::string const & s) 
                { return s == "printnomenclature"; }
 private:
-       Inset * clone() const { return new InsetPrintNomencl(params()); }
+       Inset * clone() const { return new InsetPrintNomencl(*this); }
 };