]> git.lyx.org Git - features.git/commitdiff
get rid of same_id from function signatures
authorLars Gullik Bjønnes <larsbj@gullik.org>
Mon, 26 May 2003 09:13:55 +0000 (09:13 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Mon, 26 May 2003 09:13:55 +0000 (09:13 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7044 a592a061-630c-0410-9148-cb99ea01b6c8

81 files changed:
src/ChangeLog
src/insets/ChangeLog
src/insets/inset.C
src/insets/inset.h
src/insets/insetbibitem.C
src/insets/insetbibitem.h
src/insets/insetbibtex.C
src/insets/insetbibtex.h
src/insets/insetcite.C
src/insets/insetcite.h
src/insets/insetcollapsable.C
src/insets/insetcollapsable.h
src/insets/insetcommand.C
src/insets/insetcommand.h
src/insets/insetenv.C
src/insets/insetenv.h
src/insets/inseterror.C
src/insets/inseterror.h
src/insets/insetert.C
src/insets/insetert.h
src/insets/insetexternal.C
src/insets/insetexternal.h
src/insets/insetfloat.C
src/insets/insetfloat.h
src/insets/insetfloatlist.h
src/insets/insetfoot.C
src/insets/insetfoot.h
src/insets/insetfootlike.C
src/insets/insetfootlike.h
src/insets/insetgraphics.C
src/insets/insetgraphics.h
src/insets/insethfill.h
src/insets/insetinclude.C
src/insets/insetinclude.h
src/insets/insetindex.C
src/insets/insetindex.h
src/insets/insetlabel.C
src/insets/insetlabel.h
src/insets/insetlatexaccent.C
src/insets/insetlatexaccent.h
src/insets/insetmarginal.C
src/insets/insetmarginal.h
src/insets/insetminipage.C
src/insets/insetminipage.h
src/insets/insetnewline.h
src/insets/insetnote.C
src/insets/insetnote.h
src/insets/insetoptarg.C
src/insets/insetoptarg.h
src/insets/insetparent.C
src/insets/insetparent.h
src/insets/insetquotes.C
src/insets/insetquotes.h
src/insets/insetref.C
src/insets/insetref.h
src/insets/insetspace.C
src/insets/insetspace.h
src/insets/insetspecialchar.C
src/insets/insetspecialchar.h
src/insets/insettabular.C
src/insets/insettabular.h
src/insets/insettext.C
src/insets/insettext.h
src/insets/insettheorem.h
src/insets/insettoc.C
src/insets/insettoc.h
src/insets/inseturl.C
src/insets/inseturl.h
src/insets/insetwrap.C
src/insets/insetwrap.h
src/insets/updatableinset.C
src/insets/updatableinset.h
src/mathed/ChangeLog
src/mathed/formula.C
src/mathed/formula.h
src/mathed/formulabase.h
src/mathed/formulamacro.C
src/mathed/formulamacro.h
src/paragraph.C
src/tabular.C
src/tabular.h

index 48cb9638b2cb244338d021b23412b9d7d946661c..5ba2bdff58a7f6fd1dd47db608b833af7e202a83 100644 (file)
@@ -1,3 +1,7 @@
+2003-05-26  Lars Gullik Bjønnes  <larsbj@gullik.net>
+
+       * remove same_id from function signatures, adjust.
+
 2003-05-25  Lars Gullik Bjønnes  <larsbj@gullik.net>
 
        * undo_funcs.C (createUndo): use the id functions directly, adjust.
index dbc0cbb056bfad6d20ef18d14fbfe094139fdd73..7a189d69ca1cdd1f714a93a75498fa79946ab19e 100644 (file)
@@ -1,3 +1,7 @@
+2003-05-26  Lars Gullik Bjønnes  <larsbj@gullik.net>
+
+       * remove same_id from function signatures, adjust
+
 2003-05-24  Lars Gullik Bjønnes  <larsbj@gullik.net>
 
        * insettext.C (InsetText): adjust
index 51f655cf47a02b39e07583a65d34699a30c8374a..501c766d863f92a9814639f0527006ce8469592c 100644 (file)
@@ -40,18 +40,27 @@ Inset::Inset()
 {}
 
 
-Inset::Inset(Inset const & in, bool same_id)
+Inset::Inset(Inset const & in)
        : InsetBase(),
        top_x(0), top_baseline(0), scx(0), owner_(0),
        name_(in.name_), background_color_(in.background_color_)
 {
-       if (same_id)
-               id_ = in.id();
-       else
-               id_ = inset_id++;
+       id_ = inset_id++;
 }
 
 
+// Inset::Inset(Inset const & in, bool same_id)
+//     : InsetBase(),
+//     top_x(0), top_baseline(0), scx(0), owner_(0),
+//     name_(in.name_), background_color_(in.background_color_)
+// {
+//     if (same_id)
+//             id_ = in.id();
+//     else
+//             id_ = inset_id++;
+// }
+
+
 bool Inset::directWrite() const
 {
        return false;
@@ -170,4 +179,3 @@ int Inset::width(BufferView * bv, LyXFont const & font) const
        dimension(bv, font, dim);
        return dim.width();
 }
-
index 3e86cc5114c272d004c22d44aa06e40db79cea63..1b15c9ed841da2e31f6b1cf77824e26271160108 100644 (file)
@@ -158,7 +158,9 @@ public:
        ///
        Inset();
        ///
-       Inset(Inset const & in, bool same_id = false);
+       Inset(Inset const & in);
+       ///
+       //Inset(Inset const & in, bool same_id);
        ///
        virtual void dimension(BufferView *, LyXFont const &, Dimension &) const = 0;
        ///
@@ -209,7 +211,9 @@ public:
        }
 
        ///
-       virtual Inset * clone(Buffer const &, bool same_ids = false) const = 0;
+       virtual Inset * clone(Buffer const &) const = 0;
+       ///
+       //virtual Inset * clone(Buffer const &, bool same_ids) const = 0;
 
        /// returns true to override begin and end inset in file
        virtual bool directWrite() const;
index 37372d16769fb8174b855eba6119f6a1bf2afc14..eb22763941cbd5f033c84d2ce3b3a08cac9af448 100644 (file)
@@ -43,7 +43,7 @@ InsetBibitem::~InsetBibitem()
 }
 
 
-Inset * InsetBibitem::clone(Buffer const &, bool) const
+Inset * InsetBibitem::clone(Buffer const &) const
 {
        InsetBibitem * b = new InsetBibitem(params());
        b->setCounter(counter);
@@ -51,6 +51,14 @@ Inset * InsetBibitem::clone(Buffer const &, bool) const
 }
 
 
+// Inset * InsetBibitem::clone(Buffer const &, bool) const
+// {
+//     InsetBibitem * b = new InsetBibitem(params());
+//     b->setCounter(counter);
+//     return b;
+// }
+
+
 dispatch_result InsetBibitem::localDispatch(FuncRequest const & cmd)
 {
        switch (cmd.action) {
index b1f15eae6ff6928865d88b38474132e15c37f506..d37c9a07b852d2dea9343babd85488b56fe7aae1 100644 (file)
@@ -29,7 +29,9 @@ public:
        ///
        ~InsetBibitem();
        ///
-       Inset * clone(Buffer const &, bool same_id = false) const;
+       Inset * clone(Buffer const &) const;
+       ///
+       //Inset * clone(Buffer const &, bool same_id) const;
        ///
        virtual dispatch_result localDispatch(FuncRequest const & cmd);
        /** Currently \bibitem is used as a LyX2.x command,
index 68dbbf29aa8cc26c4240b28b6038162b88b5780c..dc35dcc2361e75932a48dbfe8acf83f528aa150f 100644 (file)
@@ -35,11 +35,16 @@ using std::vector;
 using std::pair;
 
 
-InsetBibtex::InsetBibtex(InsetCommandParams const & p, bool)
+InsetBibtex::InsetBibtex(InsetCommandParams const & p)
        : InsetCommand(p)
 {}
 
 
+// InsetBibtex::InsetBibtex(InsetCommandParams const & p, bool)
+//     : InsetCommand(p, false)
+// {}
+
+
 InsetBibtex::~InsetBibtex()
 {
        InsetCommandMailer mailer("bibtex", *this);
index ee2b05774bf9b08bf02c02127a3d435ee4513828..f14428fc2dababced0cf864db711829a4b4f0f2e 100644 (file)
@@ -23,13 +23,19 @@ class Buffer;
 class InsetBibtex : public InsetCommand {
 public:
        ///
-       InsetBibtex(InsetCommandParams const &, bool same_id = false);
+       InsetBibtex(InsetCommandParams const &);
+       ///
+       //InsetBibtex(InsetCommandParams const &, bool same_id);
        ///
        ~InsetBibtex();
        ///
-       Inset * clone(Buffer const &, bool same_id = false) const {
-               return new InsetBibtex(params(), same_id);
+       Inset * clone(Buffer const &) const {
+               return new InsetBibtex(params());
        }
+       ///
+       //Inset * clone(Buffer const &, bool same_id) const {
+       //      return new InsetBibtex(params(), same_id);
+       //}
        /// small wrapper for the time being
        virtual dispatch_result localDispatch(FuncRequest const & cmd);
        ///
index 9f153708487d5f5c54026dc96e0562417f7e0857..429beca5caf0a8ea631041ace06fe000f8a91cfb 100644 (file)
@@ -221,11 +221,16 @@ string const getBasicLabel(string const & keyList, string const & after)
 } // anon namespace
 
 
-InsetCitation::InsetCitation(InsetCommandParams const & p, bool)
+InsetCitation::InsetCitation(InsetCommandParams const & p)
        : InsetCommand(p)
 {}
 
 
+// InsetCitation::InsetCitation(InsetCommandParams const & p, bool)
+//     : InsetCommand(p, false)
+// {}
+
+
 InsetCitation::~InsetCitation()
 {
        InsetCommandMailer mailer("citation", *this);
index 76f0b3628bc736e289f37965cd77e71aa42b33d5..b9c47ac4a0df63ecc30aaa7bf4f0709a45b7a31e 100644 (file)
 class InsetCitation : public InsetCommand {
 public:
        ///
-       InsetCitation(InsetCommandParams const &, bool same_id = false);
+       InsetCitation(InsetCommandParams const &);
+       ///
+       //InsetCitation(InsetCommandParams const &, bool same_id);
        ///
        ~InsetCitation();
        ///
-       Inset * clone(Buffer const &, bool same_id = false) const {
-               return new InsetCitation(params(), same_id);
+       Inset * clone(Buffer const &) const {
+               return new InsetCitation(params());
        }
        ///
+       //Inset * clone(Buffer const &, bool same_id) const {
+       //      return new InsetCitation(params(), same_id);
+       //}
+       ///
        string const getScreenLabel(Buffer const *) const;
        ///
        EDITABLE editable() const { return IS_EDITABLE; }
index 92e80458e69effd11a1b178f1e198e0b49da4426..811c1317ebddc225e4ac7e26d8ed9ff338aa34b4 100644 (file)
@@ -56,8 +56,8 @@ InsetCollapsable::InsetCollapsable(BufferParams const & bp, bool collapsed)
 }
 
 
-InsetCollapsable::InsetCollapsable(InsetCollapsable const & in, bool same_id)
-       : UpdatableInset(in, same_id), collapsed_(in.collapsed_),
+InsetCollapsable::InsetCollapsable(InsetCollapsable const & in)
+       : UpdatableInset(in), collapsed_(in.collapsed_),
          framecolor(in.framecolor), labelfont(in.labelfont), inset(in.inset),
          button_length(0), button_top_y(0), button_bottom_y(0),
          label(in.label),
@@ -66,11 +66,26 @@ InsetCollapsable::InsetCollapsable(InsetCollapsable const & in, bool same_id)
 #endif
          oldWidth(0), in_update(false), first_after_edit(false)
 {
-       inset.init(&(in.inset), same_id);
+       inset.init(&(in.inset));
        inset.setOwner(this);
 }
 
 
+// InsetCollapsable::InsetCollapsable(InsetCollapsable const & in, bool same_id)
+//     : UpdatableInset(in, same_id), collapsed_(in.collapsed_),
+//       framecolor(in.framecolor), labelfont(in.labelfont), inset(in.inset),
+//       button_length(0), button_top_y(0), button_bottom_y(0),
+//       label(in.label),
+// #if 0
+//       autocollapse(in.autocollapse),
+// #endif
+//       oldWidth(0), in_update(false), first_after_edit(false)
+// {
+//     inset.init(&(in.inset), same_id);
+//     inset.setOwner(this);
+// }
+
+
 bool InsetCollapsable::insertInset(BufferView * bv, Inset * in)
 {
        if (!insetAllowed(in->lyxCode())) {
index 2b33a90c956abc508e02aa407bbd794dbdccd9df..7691845910b2d7054d7e7be5f8d6d08903e4ed1f 100644 (file)
@@ -37,9 +37,11 @@ public:
        ///
        static int const TEXT_TO_BOTTOM_OFFSET = 2;
        /// inset is initially collapsed if bool = true
-       InsetCollapsable(BufferParams const &, bool = false);
+       InsetCollapsable(BufferParams const &, bool collapsed = false);
        ///
-       InsetCollapsable(InsetCollapsable const & in, bool same_id = false);
+       InsetCollapsable(InsetCollapsable const & in);
+       ///
+       //InsetCollapsable(InsetCollapsable const & in, bool same_id);
        ///
        void read(Buffer const *, LyXLex &);
        ///
@@ -156,9 +158,9 @@ public:
        void toggleSelection(BufferView * bv, bool kill_selection) {
                inset.toggleSelection(bv, kill_selection);
        }
+
        void markErased();
+
        bool nextChange(BufferView * bv, lyx::pos_type & length);
 
        ///
index f1235c1abc7ee2c2e65aaa710ef0934226499ac5..beb3ce9af39478e314c20803a894350b809a18a4 100644 (file)
 using std::ostream;
 
 
-InsetCommand::InsetCommand(InsetCommandParams const & p, bool)
+InsetCommand::InsetCommand(InsetCommandParams const & p)
        : p_(p.getCmdName(), p.getContents(), p.getOptions())
 {}
 
 
+// InsetCommand::InsetCommand(InsetCommandParams const & p, bool)
+//     : p_(p.getCmdName(), p.getContents(), p.getOptions())
+// {}
+
+
 void InsetCommand::setParams(InsetCommandParams const & p)
 {
        p_.setCmdName(p.getCmdName());
@@ -115,7 +120,7 @@ void InsetCommandMailer::string2params(string const & in,
 
        if (in.empty())
                return;
-       
+
        istringstream data(STRCONV(in));
        LyXLex lex(0,0);
        lex.setStream(data);
index 6b734eebe1b47d352a9c6e01eec4962ed292587f..286cd9736d02df0ff83bf936f3e684578e2d507e 100644 (file)
@@ -31,7 +31,10 @@ class InsetCommand : public InsetButton, boost::noncopyable {
 public:
        ///
        explicit
-       InsetCommand(InsetCommandParams const &, bool same_id = false);
+       InsetCommand(InsetCommandParams const &);
+       ///
+       //explicit
+       //InsetCommand(InsetCommandParams const &, bool same_id);
        ///
        void write(Buffer const *, std::ostream & os) const
                { p_.write(os); }
index 15c239b44925b243c7806c8efd64a3d1867dfe0a..aeeb5f07c5b7362cf48521aefa2f1a3e38aaf26b 100644 (file)
@@ -35,17 +35,28 @@ InsetEnvironment::InsetEnvironment
 }
 
 
-InsetEnvironment::InsetEnvironment(InsetEnvironment const & in, bool same_id)
-       : InsetText(in, same_id), layout_(in.layout_)
+InsetEnvironment::InsetEnvironment(InsetEnvironment const & in)
+       : InsetText(in), layout_(in.layout_)
 {}
 
 
-Inset * InsetEnvironment::clone(Buffer const &, bool same_id) const
+// InsetEnvironment::InsetEnvironment(InsetEnvironment const & in, bool same_id)
+//     : InsetText(in, same_id), layout_(in.layout_)
+// {}
+
+
+Inset * InsetEnvironment::clone(Buffer const &) const
 {
-       return new InsetEnvironment(*this, same_id);
+       return new InsetEnvironment(*this);
 }
 
 
+// Inset * InsetEnvironment::clone(Buffer const &, bool same_id) const
+// {
+//     return new InsetEnvironment(*this, same_id);
+// }
+
+
 void InsetEnvironment::write(Buffer const * buf, ostream & os) const
 {
        os << "Environment " << getInsetName() << "\n";
index ed8e0665b9cebbc66e267fe8e48af960f3cf1ba3..b8d55a9d4fed0d4cf7181b6fa19046d86e275cea 100644 (file)
@@ -20,13 +20,17 @@ public:
        ///
        InsetEnvironment(BufferParams const &, string const & name);
        ///
-       InsetEnvironment(InsetEnvironment const &, bool same_id = false);
+       InsetEnvironment(InsetEnvironment const &);
+       ///
+       //InsetEnvironment(InsetEnvironment const &, bool same_id);
        ///
        void write(Buffer const * buf, std::ostream & os) const;
        ///
        void read(Buffer const * buf, LyXLex & lex);
        ///
-       Inset * clone(Buffer const &, bool same_id = false) const;
+       Inset * clone(Buffer const &) const;
+       ///
+       //Inset * clone(Buffer const &, bool same_id) const;
        ///
        Inset::Code lyxCode() const { return Inset::ENVIRONMENT_CODE; }
        ///
index b32c8880584f76273a2a466cc94df5f8c878ce2c..27147233ce69247e1176de2d6d6c3048d0a4c58e 100644 (file)
 using std::ostream;
 
 
-InsetError::InsetError(string const & str, bool)
+InsetError::InsetError(string const & str)
        : contents(str)
 {}
 
 
+// InsetError::InsetError(string const & str, bool)
+//     : contents(str)
+// {}
+
+
 InsetError::~InsetError()
 {
        Dialogs::hide("error", this);
index b490f2dba06d206b09102e6d93f0d27e1678d12e..4576837bb6819c5c6aff430f6f500b95568b3da8 100644 (file)
@@ -24,7 +24,10 @@ class InsetError : public Inset {
 public:
        ///
        explicit
-       InsetError(string const &, bool same_id = false);
+       InsetError(string const &);
+       ///
+       //explicit
+       //InsetError(string const &, bool same_id);
        ///
        ~InsetError();
        ///
@@ -53,10 +56,14 @@ public:
        ///
        EDITABLE editable() const { return IS_EDITABLE; }
        ///
-       Inset * clone(Buffer const &, bool same_id = false) const {
-               return new InsetError(contents, same_id);
+       Inset * clone(Buffer const &) const {
+               return new InsetError(contents);
        }
        ///
+       //Inset * clone(Buffer const &, bool same_id) const {
+       //      return new InsetError(contents, same_id);
+       //}
+       ///
        Inset::Code lyxCode() const { return Inset::ERROR_CODE; }
        /// We don't want "begin" and "end inset" in lyx-file
        bool directWrite() const { return true; };
index aae3d97142c108431c3ada9752ba2b5c2ee4169e..f5abcc230ffd96b5228096b5e5b44950359a9174 100644 (file)
@@ -63,19 +63,32 @@ InsetERT::InsetERT(BufferParams const & bp, bool collapsed)
 }
 
 
-InsetERT::InsetERT(InsetERT const & in, bool same_id)
-       : InsetCollapsable(in, same_id), status_(in.status_)
+InsetERT::InsetERT(InsetERT const & in)
+       : InsetCollapsable(in), status_(in.status_)
 {
        init();
 }
 
 
-Inset * InsetERT::clone(Buffer const &, bool same_id) const
+// InsetERT::InsetERT(InsetERT const & in, bool same_id)
+//     : InsetCollapsable(in, same_id), status_(in.status_)
+// {
+//     init();
+// }
+
+
+Inset * InsetERT::clone(Buffer const &) const
 {
-       return new InsetERT(*const_cast<InsetERT *>(this), same_id);
+       return new InsetERT(*const_cast<InsetERT *>(this));
 }
 
 
+// Inset * InsetERT::clone(Buffer const &, bool same_id) const
+// {
+//     return new InsetERT(*const_cast<InsetERT *>(this), same_id);
+// }
+
+
 InsetERT::InsetERT(BufferParams const & bp,
                   Language const * l, string const & contents, bool collapsed)
        : InsetCollapsable(bp, collapsed)
index 8a9d2a98a2c52adc2635bda3bebb1f0aef8af28f..89f211c137d6842a4c80231fe3a7a39c6111aaeb 100644 (file)
@@ -38,9 +38,13 @@ public:
        ///
        InsetERT(BufferParams const &, bool collapsed = false);
        ///
-       InsetERT(InsetERT const &, bool same_id = false);
+       InsetERT(InsetERT const &);
        ///
-       Inset * clone(Buffer const &, bool same_id = false) const;
+       //InsetERT(InsetERT const &, bool same_id);
+       ///
+       Inset * clone(Buffer const &) const;
+       ///
+       //Inset * clone(Buffer const &, bool same_id) const;
        ///
        InsetERT(BufferParams const &,
                 Language const *, string const & contents, bool collapsed);
index 872bc63a87ac3a21b6d47df3b745222cc04470d2..0bfbc90c1f87762bfde86d7205ed5de47400a251 100644 (file)
@@ -223,17 +223,26 @@ void InsetExternal::validate(LaTeXFeatures & features) const
 }
 
 
-Inset * InsetExternal::clone(Buffer const &, bool same_id) const
+Inset * InsetExternal::clone(Buffer const &) const
 {
        InsetExternal * inset = new InsetExternal;
        inset->params_ = params_;
        inset->view_ = view_;
-       if (same_id)
-               inset->id_ = id_;
        return inset;
 }
 
 
+// Inset * InsetExternal::clone(Buffer const &, bool same_id) const
+// {
+//     InsetExternal * inset = new InsetExternal;
+//     inset->params_ = params_;
+//     inset->view_ = view_;
+//     if (same_id)
+//             inset->id_ = id_;
+//     return inset;
+// }
+
+
 string const InsetExternal::getScreenLabel(Buffer const *) const
 {
        ExternalTemplate const & et = params_.templ;
index 0806794fdf01afa75f7237691dc072ca7a0dd4a9..e200b5f1d5672f1eed63de0bc3e9cdfbceecb629 100644 (file)
@@ -37,7 +37,7 @@ public:
        ///
        virtual ~InsetExternal();
        ///
-       virtual dispatch_result localDispatch(FuncRequest const & cmd); 
+       virtual dispatch_result localDispatch(FuncRequest const & cmd);
        /// what appears in the minibuffer when opening
        virtual string const editMessage() const;
        ///
@@ -69,7 +69,9 @@ public:
        virtual Inset::Code lyxCode() const { return EXTERNAL_CODE; }
 
        ///
-       virtual Inset * clone(Buffer const &, bool same_id = false) const;
+       virtual Inset * clone(Buffer const &) const;
+       ///
+       //virtual Inset * clone(Buffer const &, bool same_id) const;
 
        /// returns the text of the button
        virtual string const getScreenLabel(Buffer const *) const;
index d04f2e04283f1f8756f1d500662a7473d809a70c..1512660714258283e9fb0633d172f3ac1f9d3bae 100644 (file)
@@ -145,11 +145,16 @@ InsetFloat::InsetFloat(BufferParams const & bp, string const & type)
 }
 
 
-InsetFloat::InsetFloat(InsetFloat const & in, bool same_id)
-       : InsetCollapsable(in, same_id), params_(in.params_)
+InsetFloat::InsetFloat(InsetFloat const & in)
+       : InsetCollapsable(in), params_(in.params_)
 {}
 
 
+// InsetFloat::InsetFloat(InsetFloat const & in, bool same_id)
+//     : InsetCollapsable(in, same_id), params_(in.params_)
+// {}
+
+
 InsetFloat::~InsetFloat()
 {
        InsetFloatMailer mailer(*this);
@@ -259,12 +264,18 @@ void InsetFloat::validate(LaTeXFeatures & features) const
 }
 
 
-Inset * InsetFloat::clone(Buffer const &, bool same_id) const
+Inset * InsetFloat::clone(Buffer const &) const
 {
-       return new InsetFloat(*const_cast<InsetFloat *>(this), same_id);
+       return new InsetFloat(*const_cast<InsetFloat *>(this));
 }
 
 
+// Inset * InsetFloat::clone(Buffer const &, bool same_id) const
+// {
+//     return new InsetFloat(*const_cast<InsetFloat *>(this), same_id);
+// }
+
+
 string const InsetFloat::editMessage() const
 {
        return _("Opened Float Inset");
index 4e74486d40025a547e31bea3d7766155df4dd687..8b02904acdc07f20a3259d283191601fa99d1114 100644 (file)
@@ -41,11 +41,13 @@ public:
        ///
        InsetFloat(BufferParams const &, string const &);
        ///
-       InsetFloat(InsetFloat const &, bool same_id = false);
+       InsetFloat(InsetFloat const &);
+       ///
+       //InsetFloat(InsetFloat const &, bool same_id);
        ///
        ~InsetFloat();
        ///
-       virtual dispatch_result localDispatch(FuncRequest const & cmd); 
+       virtual dispatch_result localDispatch(FuncRequest const & cmd);
        ///
        void write(Buffer const * buf, std::ostream & os) const;
        ///
@@ -53,7 +55,9 @@ public:
        ///
        void validate(LaTeXFeatures & features) const;
        ///
-       Inset * clone(Buffer const &, bool same_id = false) const;
+       Inset * clone(Buffer const &) const;
+       ///
+       //Inset * clone(Buffer const &, bool same_id) const;
        ///
        Inset::Code lyxCode() const { return Inset::FLOAT_CODE; }
        ///
@@ -77,7 +81,7 @@ public:
        bool  showInsetDialog(BufferView *) const;
        ///
        InsetFloatParams const & params() const { return params_; }
-       
+
 private:
        ///
        InsetFloatParams params_;
index 2e1cfa18b6440de2ca8cf5d10315c20d21880c5c..52bedb6d29fe09b4a6b52bafae73305af6aeefb4 100644 (file)
@@ -26,10 +26,14 @@ public:
        ///
        ~InsetFloatList();
        ///
-       Inset * clone(Buffer const &, bool = false) const {
+       Inset * clone(Buffer const &) const {
                return new InsetFloatList(getCmdName());
        }
        ///
+       //Inset * clone(Buffer const &, bool = false) const {
+       //      return new InsetFloatList(getCmdName());
+       //}
+       ///
        dispatch_result localDispatch(FuncRequest const & cmd);
        ///
        string const getScreenLabel(Buffer const *) const;
index a1ca0bc16148acbdb88d2018fb6d451a6b84a52c..c020e5484596cc2b0d3711e16c24e722424705bf 100644 (file)
@@ -38,20 +38,34 @@ InsetFoot::InsetFoot(BufferParams const & bp)
 }
 
 
-InsetFoot::InsetFoot(InsetFoot const & in, bool same_id)
-       : InsetFootlike(in, same_id)
+InsetFoot::InsetFoot(InsetFoot const & in)
+       : InsetFootlike(in)
 {
        setLabel(_("foot"));
        setInsetName("Foot");
 }
 
 
-Inset * InsetFoot::clone(Buffer const &, bool same_id) const
+// InsetFoot::InsetFoot(InsetFoot const & in, bool same_id)
+//     : InsetFootlike(in, same_id)
+// {
+//     setLabel(_("foot"));
+//     setInsetName("Foot");
+// }
+
+
+Inset * InsetFoot::clone(Buffer const &) const
 {
-       return new InsetFoot(*const_cast<InsetFoot *>(this), same_id);
+       return new InsetFoot(*const_cast<InsetFoot *>(this));
 }
 
 
+// Inset * InsetFoot::clone(Buffer const &, bool same_id) const
+// {
+//     return new InsetFoot(*const_cast<InsetFoot *>(this), same_id);
+// }
+
+
 string const InsetFoot::editMessage() const
 {
        return _("Opened Footnote Inset");
index 14384cd411166d221cb34a07a9d22b0b8ae1ffac..81ff5117f9c111f1ba3b9e7ae849b457e7fde181 100644 (file)
@@ -25,9 +25,13 @@ public:
        ///
        InsetFoot(BufferParams const &);
        ///
-       InsetFoot(InsetFoot const &, bool same_id = false);
+       InsetFoot(InsetFoot const &);
        ///
-       Inset * clone(Buffer const &, bool same_id = false) const;
+       //InsetFoot(InsetFoot const &, bool same_id);
+       ///
+       Inset * clone(Buffer const &) const;
+       ///
+       //Inset * clone(Buffer const &, bool same_id) const;
        ///
        Inset::Code lyxCode() const { return Inset::FOOT_CODE; }
        ///
index 8254da3008498ef59c304211b70a660fdd3a94bb..604f8465b915438989a2ae15f4d7ec2eb3b64855 100644 (file)
@@ -32,8 +32,8 @@ InsetFootlike::InsetFootlike(BufferParams const & bp)
 }
 
 
-InsetFootlike::InsetFootlike(InsetFootlike const & in, bool same_id)
-       : InsetCollapsable(in, same_id)
+InsetFootlike::InsetFootlike(InsetFootlike const & in)
+       : InsetCollapsable(in)
 {
        LyXFont font(LyXFont::ALL_SANE);
        font.decSize();
@@ -43,6 +43,17 @@ InsetFootlike::InsetFootlike(InsetFootlike const & in, bool same_id)
 }
 
 
+// InsetFootlike::InsetFootlike(InsetFootlike const & in, bool same_id)
+//     : InsetCollapsable(in, same_id)
+// {
+//     LyXFont font(LyXFont::ALL_SANE);
+//     font.decSize();
+//     font.decSize();
+//     font.setColor(LColor::collapsable);
+//     setLabelFont(font);
+// }
+
+
 void InsetFootlike::write(Buffer const * buf, ostream & os) const
 {
        os << getInsetName() << "\n";
index a7989386b502ebc6181025aabdafd2691c05bb7c..284ab620abfaff7a7fea784e048fe4fbe7805e4f 100644 (file)
@@ -22,7 +22,9 @@ public:
        ///
        InsetFootlike(BufferParams const &);
        ///
-       InsetFootlike(InsetFootlike const &, bool same_id = false);
+       InsetFootlike(InsetFootlike const &);
+       ///
+       //InsetFootlike(InsetFootlike const &, bool same_id);
        ///
        void write(Buffer const * buf, std::ostream & os) const;
        ///
index 3517ec5b194e592b21469f17efe38dd2939f2449..63152f4e7d90ddd62dfc037df4a65a7d9b762195 100644 (file)
@@ -193,9 +193,8 @@ InsetGraphics::InsetGraphics()
 
 
 InsetGraphics::InsetGraphics(InsetGraphics const & ig,
-                            string const & filepath,
-                            bool same_id)
-       : Inset(ig, same_id),
+                            string const & filepath)
+       : Inset(ig),
          graphic_label(uniqueID()),
          cache_(new Cache(*this))
 {
@@ -203,12 +202,29 @@ InsetGraphics::InsetGraphics(InsetGraphics const & ig,
 }
 
 
-Inset * InsetGraphics::clone(Buffer const & buffer, bool same_id) const
+// InsetGraphics::InsetGraphics(InsetGraphics const & ig,
+//                          string const & filepath,
+//                          bool same_id)
+//     : Inset(ig, same_id),
+//       graphic_label(uniqueID()),
+//       cache_(new Cache(*this))
+// {
+//     setParams(ig.params(), filepath);
+// }
+
+
+Inset * InsetGraphics::clone(Buffer const & buffer) const
 {
-       return new InsetGraphics(*this, buffer.filePath(), same_id);
+       return new InsetGraphics(*this, buffer.filePath());
 }
 
 
+// Inset * InsetGraphics::clone(Buffer const & buffer, bool same_id) const
+// {
+//     return new InsetGraphics(*this, buffer.filePath(), same_id);
+// }
+
+
 InsetGraphics::~InsetGraphics()
 {
        InsetGraphicsMailer mailer(*this);
@@ -230,7 +246,7 @@ dispatch_result InsetGraphics::localDispatch(FuncRequest const & cmd)
                return DISPATCHED;
        }
 
-       case LFUN_INSET_DIALOG_UPDATE: 
+       case LFUN_INSET_DIALOG_UPDATE:
                InsetGraphicsMailer(*this).updateDialog(cmd.view());
                return DISPATCHED;
 
index 507dd08ccb373337d4fd198b039fe45e27a9e59c..940f4509a993bc2e95ae311bdc189b24ff355053 100644 (file)
@@ -28,8 +28,10 @@ public:
        ///
        InsetGraphics();
        ///
-       InsetGraphics(InsetGraphics const &, string const & filepath,
-                     bool same_id = false);
+       InsetGraphics(InsetGraphics const &, string const & filepath);
+       ///
+       //InsetGraphics(InsetGraphics const &, string const & filepath,
+       //            bool same_id);
        ///
        ~InsetGraphics();
        ///
@@ -67,7 +69,9 @@ public:
        Inset::Code lyxCode() const { return Inset::GRAPHICS_CODE; }
 
        ///
-       virtual Inset * clone(Buffer const &, bool same_id = false) const;
+       virtual Inset * clone(Buffer const &) const;
+       ///
+       //virtual Inset * clone(Buffer const &, bool same_id) const;
 
        /** Set the inset parameters, used by the GUIndependent dialog.
            Return true of new params are different from what was so far.
index 68d555f9236600c1fde0bdcedf4bb66832c63262..0db2fc10f0b4aa61bb0b325c2a414df7a449565c 100644 (file)
@@ -20,10 +20,14 @@ public:
        ///
        InsetHFill();
        ///
-       virtual Inset * clone(Buffer const &, bool = false) const {
+       virtual Inset * clone(Buffer const &) const {
                return new InsetHFill();
        }
        ///
+       //virtual Inset * clone(Buffer const &, bool /*same_id*/) const {
+       //      return new InsetHFill();
+       //}
+       ///
        string const getScreenLabel(Buffer const *) const { return getContents(); }
        ///
        Inset::Code lyxCode() const { return Inset::HFILL_CODE; }
index 5af3b2ccb7d4eb200c42001885ca3059d2effc6f..7aba887207cf94a6d6926bba881afcad3c52d488 100644 (file)
@@ -126,7 +126,7 @@ dispatch_result InsetInclude::localDispatch(FuncRequest const & cmd)
                return DISPATCHED;
        }
 
-       case LFUN_INSET_DIALOG_UPDATE: 
+       case LFUN_INSET_DIALOG_UPDATE:
                InsetIncludeMailer(*this).updateDialog(cmd.view());
                return DISPATCHED;
 
@@ -191,7 +191,7 @@ void InsetInclude::set(Params const & p)
 }
 
 
-Inset * InsetInclude::clone(Buffer const & buffer, bool) const
+Inset * InsetInclude::clone(Buffer const & buffer) const
 {
        Params p(params_);
        p.masterFilename_ = buffer.fileName();
@@ -200,6 +200,15 @@ Inset * InsetInclude::clone(Buffer const & buffer, bool) const
 }
 
 
+// Inset * InsetInclude::clone(Buffer const & buffer, bool) const
+// {
+//     Params p(params_);
+//     p.masterFilename_ = buffer.fileName();
+
+//     return new InsetInclude(p);
+// }
+
+
 void InsetInclude::write(Buffer const *, ostream & os) const
 {
        os << "Include " << params_.cparams.getCommand() << '\n'
@@ -618,7 +627,7 @@ void InsetIncludeMailer::string2params(string const & in,
 
        if (in.empty())
                return;
-       
+
        istringstream data(STRCONV(in));
        LyXLex lex(0,0);
        lex.setStream(data);
index 5263fdce43f5a538af88d1b6c78a06e9c5299ea0..4cde1408b657d5ca1b2904972ac43f4c47f7056d 100644 (file)
@@ -57,7 +57,7 @@ public:
        ~InsetInclude();
 
        ///
-       virtual dispatch_result localDispatch(FuncRequest const & cmd); 
+       virtual dispatch_result localDispatch(FuncRequest const & cmd);
 
        /// Override these InsetButton methods if Previewing
        int ascent(BufferView *, LyXFont const &) const;
@@ -74,7 +74,9 @@ public:
        void set(Params const & params);
 
        ///
-       virtual Inset * clone(Buffer const &, bool same_id = false) const;
+       virtual Inset * clone(Buffer const &) const;
+       ///
+       //virtual Inset * clone(Buffer const &, bool same_id) const;
        ///
        Inset::Code lyxCode() const { return Inset::INCLUDE_CODE; }
        /// This returns the list of labels on the child buffer
index cbd6dd8495bb21d48cd7bbfdf29d664921a5588a..bdfdea678673c11c6b6e790c778bd37f964b85cb 100644 (file)
 
 using std::ostream;
 
-InsetIndex::InsetIndex(InsetCommandParams const & p, bool)
+InsetIndex::InsetIndex(InsetCommandParams const & p)
        : InsetCommand(p)
 {}
 
 
+// InsetIndex::InsetIndex(InsetCommandParams const & p, bool)
+//     : InsetCommand(p, false)
+// {}
+
+
 InsetIndex::~InsetIndex()
 {
        InsetCommandMailer mailer("index", *this);
@@ -45,7 +50,7 @@ dispatch_result InsetIndex::localDispatch(FuncRequest const & cmd)
                case LFUN_INSET_EDIT:
                        InsetCommandMailer("index", *this).showDialog(cmd.view());
                        return DISPATCHED;
-               
+
                default:
                        return UNDISPATCHED;
        }
@@ -67,11 +72,16 @@ Inset::Code InsetIndex::lyxCode() const
 
 
 
-InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p, bool)
+InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p)
        : InsetCommand(p)
 {}
 
 
+// InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p, bool)
+//     : InsetCommand(p, false)
+// {}
+
+
 InsetPrintIndex::~InsetPrintIndex()
 {}
 
index 79ae38e58d3d2c74c5e8a1b225b45488e8cd6559..27bd984bb62f1998574e470f52fbf75c0ad9f208 100644 (file)
@@ -22,14 +22,20 @@ struct LaTeXFeatures;
 class InsetIndex : public InsetCommand {
 public:
        ///
-       InsetIndex(InsetCommandParams const &, bool same_id = false);
+       InsetIndex(InsetCommandParams const &);
+       ///
+       //InsetIndex(InsetCommandParams const &, bool same_id);
        ///
        ~InsetIndex();
        ///
-       virtual Inset * clone(Buffer const &, bool same_id = false) const {
-               return new InsetIndex(params(), same_id);
+       virtual Inset * clone(Buffer const &) const {
+               return new InsetIndex(params());
        }
        ///
+       //virtual Inset * clone(Buffer const &, bool same_id) const {
+       //      return new InsetIndex(params(), same_id);
+       //}
+       ///
        dispatch_result localDispatch(FuncRequest const & cmd);
        ///
        string const getScreenLabel(Buffer const *) const;
@@ -45,14 +51,20 @@ public:
 class InsetPrintIndex : public InsetCommand {
 public:
        ///
-       InsetPrintIndex(InsetCommandParams const &, bool same_id = false);
+       InsetPrintIndex(InsetCommandParams const &);
+       ///
+       //InsetPrintIndex(InsetCommandParams const &, bool same_id);
        ///
        ~InsetPrintIndex();
        ///
-       Inset * clone(Buffer const &, bool same_id = false) const {
-               return new InsetPrintIndex(params(), same_id);
+       Inset * clone(Buffer const &) const {
+               return new InsetPrintIndex(params());
        }
        ///
+       //Inset * clone(Buffer const &, bool same_id) const {
+       //      return new InsetPrintIndex(params(), same_id);
+       //}
+       ///
        //dispatch_result localDispatch(FuncRequest const & cmd);
        /// Updates needed features for this inset.
        void validate(LaTeXFeatures & features) const;
index 8f6887eed65b3bbc28f0bd36c1f1b3109fd0d0bd..fcab20f0258f40be57694eea103113bed21d03ab 100644 (file)
@@ -27,11 +27,16 @@ using std::vector;
 using std::pair;
 
 
-InsetLabel::InsetLabel(InsetCommandParams const & p, bool)
+InsetLabel::InsetLabel(InsetCommandParams const & p)
        : InsetCommand(p)
 {}
 
 
+// InsetLabel::InsetLabel(InsetCommandParams const & p, bool)
+//     : InsetCommand(p, false)
+// {}
+
+
 InsetLabel::~InsetLabel()
 {
        InsetCommandMailer mailer("label", *this);
index d0593b3b68d5266173874d182d4485150805c0da..a9eccd361302e8e4a658d2ddd409e69bf2f05e50 100644 (file)
 class InsetLabel : public InsetCommand {
 public:
        ///
-       InsetLabel(InsetCommandParams const &, bool same_id = false);
+       InsetLabel(InsetCommandParams const &);
+       ///
+       //InsetLabel(InsetCommandParams const &, bool same_id);
        ///
        ~InsetLabel();
        ///
-       virtual Inset * clone(Buffer const &, bool same_id = false) const {
-               return new InsetLabel(params(), same_id);
+       virtual Inset * clone(Buffer const &) const {
+               return new InsetLabel(params());
        }
        ///
+       //virtual Inset * clone(Buffer const &, bool same_id) const {
+       //      return new InsetLabel(params(), same_id);
+       //}
+       ///
        virtual dispatch_result localDispatch(FuncRequest const & cmd);
        ///
        string const getScreenLabel(Buffer const *) const { return getContents(); }
index 0ff4ce011cc8408d768925df578dcf1077bc1be0..d7027507e481ac71d4cd65b685571d7a397e1e43 100644 (file)
@@ -656,12 +656,18 @@ bool InsetLatexAccent::directWrite() const
 }
 
 
-Inset * InsetLatexAccent::clone(Buffer const &, bool) const
+Inset * InsetLatexAccent::clone(Buffer const &) const
 {
        return new InsetLatexAccent(contents);
 }
 
 
+// Inset * InsetLatexAccent::clone(Buffer const &, bool) const
+// {
+//     return new InsetLatexAccent(contents);
+// }
+
+
 Inset::Code InsetLatexAccent::lyxCode() const
 {
        return Inset::ACCENT_CODE;
index dfb139efb3a78d7003e10df71aaa09b15f2495e1..0e0ec4c47833e77703765dc6912bf7635ad6c718 100644 (file)
@@ -60,7 +60,9 @@ public:
        ///
        bool directWrite() const;
        ///
-       virtual Inset * clone(Buffer const &, bool same_id = false) const;
+       virtual Inset * clone(Buffer const &) const;
+       ///
+       //virtual Inset * clone(Buffer const &, bool same_id) const;
        ///
        Inset::Code lyxCode()const;
        ///
index 174d7db8439a8bac2ef1d6f09349e2d18620616e..76ca85581f9082ffb4df010086a8cfb92e845cb6 100644 (file)
@@ -33,20 +33,34 @@ InsetMarginal::InsetMarginal(BufferParams const & bp)
 }
 
 
-InsetMarginal::InsetMarginal(InsetMarginal const & in, bool same_id)
-       : InsetFootlike(in, same_id)
+InsetMarginal::InsetMarginal(InsetMarginal const & in)
+       : InsetFootlike(in)
 {
        setLabel(_("margin"));
        setInsetName("Marginal");
 }
 
 
-Inset * InsetMarginal::clone(Buffer const &, bool same_id) const
+// InsetMarginal::InsetMarginal(InsetMarginal const & in, bool same_id)
+//     : InsetFootlike(in, same_id)
+// {
+//     setLabel(_("margin"));
+//     setInsetName("Marginal");
+// }
+
+
+Inset * InsetMarginal::clone(Buffer const &) const
 {
-       return new InsetMarginal(*const_cast<InsetMarginal *>(this), same_id);
+       return new InsetMarginal(*const_cast<InsetMarginal *>(this));
 }
 
 
+// Inset * InsetMarginal::clone(Buffer const &, bool same_id) const
+// {
+//     return new InsetMarginal(*const_cast<InsetMarginal *>(this), same_id);
+// }
+
+
 string const InsetMarginal::editMessage() const
 {
        return _("Opened Marginal Note Inset");
index a0c089f53d2565104d139a2b547a1d69c81ab71b..1ee63aa9016a303a923d636fd468c075511d63b7 100644 (file)
@@ -24,9 +24,13 @@ public:
        ///
        InsetMarginal(BufferParams const &);
        ///
-       InsetMarginal(InsetMarginal const &, bool same_id = false);
+       InsetMarginal(InsetMarginal const &);
        ///
-       Inset * clone(Buffer const &, bool same_id = false) const;
+       //InsetMarginal(InsetMarginal const &, bool same_id);
+       ///
+       Inset * clone(Buffer const &) const;
+       ///
+       //Inset * clone(Buffer const &, bool same_id) const;
        ///
        Inset::Code lyxCode() const { return Inset::MARGIN_CODE; }
        ///
index e12cb7fdeb1e8f3f3846a7cfbffe26b7651fee4e..d6ea2a3bfc94fba89c3da840f7ce1c30efed0339 100644 (file)
@@ -88,17 +88,28 @@ InsetMinipage::InsetMinipage(BufferParams const & bp)
 }
 
 
-InsetMinipage::InsetMinipage(InsetMinipage const & in, bool same_id)
-       : InsetCollapsable(in, same_id), params_(in.params_)
+InsetMinipage::InsetMinipage(InsetMinipage const & in)
+       : InsetCollapsable(in), params_(in.params_)
 {}
 
 
-Inset * InsetMinipage::clone(Buffer const &, bool same_id) const
+// InsetMinipage::InsetMinipage(InsetMinipage const & in, bool same_id)
+//     : InsetCollapsable(in, same_id), params_(in.params_)
+// {}
+
+
+Inset * InsetMinipage::clone(Buffer const &) const
 {
-       return new InsetMinipage(*const_cast<InsetMinipage *>(this), same_id);
+       return new InsetMinipage(*const_cast<InsetMinipage *>(this));
 }
 
 
+// Inset * InsetMinipage::clone(Buffer const &, bool same_id) const
+// {
+//     return new InsetMinipage(*const_cast<InsetMinipage *>(this), same_id);
+// }
+
+
 InsetMinipage::~InsetMinipage()
 {
        InsetMinipageMailer mailer(*this);
@@ -127,7 +138,7 @@ dispatch_result InsetMinipage::localDispatch(FuncRequest const & cmd)
                return DISPATCHED;
        }
 
-       case LFUN_INSET_DIALOG_UPDATE: 
+       case LFUN_INSET_DIALOG_UPDATE:
                InsetMinipageMailer(*this).updateDialog(cmd.view());
                return DISPATCHED;
 
@@ -349,7 +360,7 @@ void InsetMinipageMailer::string2params(string const & in,
 
        if (in.empty())
                return;
-       
+
        istringstream data(STRCONV(in));
        LyXLex lex(0,0);
        lex.setStream(data);
index 6be1f4f929d821ef1d57d498be8db0e852cff7a8..c78c769d4eb6ffcd1ced1979961b005853b248d6 100644 (file)
@@ -56,17 +56,21 @@ public:
        ///
        InsetMinipage(BufferParams const &);
        ///
-       InsetMinipage(InsetMinipage const &, bool same_id = false);
+       InsetMinipage(InsetMinipage const &);
+       ///
+       //InsetMinipage(InsetMinipage const &, bool same_id);
        ///
        ~InsetMinipage();
        ///
-       virtual dispatch_result localDispatch(FuncRequest const & cmd); 
+       virtual dispatch_result localDispatch(FuncRequest const & cmd);
        ///
        void write(Buffer const * buf, std::ostream & os) const;
        ///
        void read(Buffer const * buf, LyXLex & lex);
        ///
-       Inset * clone(Buffer const &, bool same_id = false) const;
+       Inset * clone(Buffer const &) const;
+       ///
+       //Inset * clone(Buffer const &, bool same_id) const;
        ///
        void dimension(BufferView *, LyXFont const &, Dimension &) const;
        ///
index 5cebf1d21a0481eeabf5105bc0732cc8dd158ed4..b6f20af1eeaa608abd249e8428dc36a2c044a7e0 100644 (file)
@@ -20,10 +20,15 @@ public:
 
        InsetNewline() {}
 
-       virtual Inset * clone(Buffer const &, bool = false) const {
+       virtual Inset * clone(Buffer const &) const {
                return new InsetNewline;
        }
 
+
+       //virtual Inset * clone(Buffer const &, bool same_id) const {
+       //      return new InsetNewline;
+       //}
+
        Inset::Code lyxCode() const { return Inset::NEWLINE_CODE; }
 
        void dimension(BufferView *, LyXFont const &, Dimension &) const;
index 1a4253d5c846a07c07017019ee670c16469f89cd..c09db364ae5616888d03806bd6a7f39eefe2d8a6 100644 (file)
@@ -46,19 +46,32 @@ InsetNote::InsetNote(BufferParams const & bp)
 }
 
 
-InsetNote::InsetNote(InsetNote const & in, bool same_id)
-       : InsetCollapsable(in, same_id)
+InsetNote::InsetNote(InsetNote const & in)
+       : InsetCollapsable(in)
 {
        init();
 }
 
 
-Inset * InsetNote::clone(Buffer const &, bool same_id) const
+// InsetNote::InsetNote(InsetNote const & in, bool same_id)
+//     : InsetCollapsable(in, same_id)
+// {
+//     init();
+// }
+
+
+Inset * InsetNote::clone(Buffer const &) const
 {
-       return new InsetNote(*const_cast<InsetNote *>(this), same_id);
+       return new InsetNote(*const_cast<InsetNote *>(this));
 }
 
 
+// Inset * InsetNote::clone(Buffer const &, bool same_id) const
+// {
+//     return new InsetNote(*const_cast<InsetNote *>(this), same_id);
+// }
+
+
 string const InsetNote::editMessage() const
 {
        return _("Opened Note Inset");
index 6b340ac83c4727c3f301999a80115368f1194b23..ca173ab6d54794b02a34adad791857c2c317a8c0 100644 (file)
@@ -23,9 +23,13 @@ public:
        ///
        InsetNote(BufferParams const &);
        ///
-       InsetNote(InsetNote const &, bool same_id = false);
+       InsetNote(InsetNote const &);
        ///
-       Inset * clone(Buffer const &, bool same_id = false) const;
+       //InsetNote(InsetNote const &, bool same_id);
+       ///
+       Inset * clone(Buffer const &) const;
+       ///
+       //Inset * clone(Buffer const &, bool same_id) const;
        ///
        string const editMessage() const;
        ///
index c25923bad17cc078f7a2c238665e318012ef688c..03f000d92049e615c52228305e1e2ff6a714b265 100644 (file)
@@ -37,8 +37,8 @@ InsetOptArg::InsetOptArg(BufferParams const & ins)
 }
 
 
-InsetOptArg::InsetOptArg(InsetOptArg const & in, bool same_id)
-       : InsetCollapsable(in, same_id)
+InsetOptArg::InsetOptArg(InsetOptArg const & in)
+       : InsetCollapsable(in)
 {
        LyXFont font(LyXFont::ALL_SANE);
        font.setColor(LColor::collapsable);
@@ -47,12 +47,28 @@ InsetOptArg::InsetOptArg(InsetOptArg const & in, bool same_id)
 }
 
 
-Inset * InsetOptArg::clone(Buffer const &, bool same_id) const
+// InsetOptArg::InsetOptArg(InsetOptArg const & in, bool same_id)
+//     : InsetCollapsable(in, same_id)
+// {
+//     LyXFont font(LyXFont::ALL_SANE);
+//     font.setColor(LColor::collapsable);
+//     setLabelFont(font);
+//     setLabel(_("opt"));
+// }
+
+
+Inset * InsetOptArg::clone(Buffer const &) const
 {
-       return new InsetOptArg(*this, same_id);
+       return new InsetOptArg(*this);
 }
 
 
+// Inset * InsetOptArg::clone(Buffer const &, bool same_id) const
+// {
+//     return new InsetOptArg(*this, same_id);
+// }
+
+
 string const InsetOptArg::editMessage() const
 {
        return _("Opened Optional Argument Inset");
index 23249681866c4b60ea933aaa8c7dfcc43e00d5a1..50ff61cb9eb88b95db371003eb88199de091a2d3 100644 (file)
@@ -25,10 +25,13 @@ class InsetOptArg : public InsetCollapsable {
 public:
        InsetOptArg(BufferParams const &);
 
-       InsetOptArg(InsetOptArg const &, bool same_id = false);
+       InsetOptArg(InsetOptArg const &);
+       //InsetOptArg(InsetOptArg const &, bool same_id);
 
        /// make a duplicate of this inset
-       Inset * clone(Buffer const &, bool same_id = false) const;
+       Inset * clone(Buffer const &) const;
+       /// make a duplicate of this inset
+       //Inset * clone(Buffer const &, bool same_id) const;
 
        /// this inset is editable
        EDITABLE editable() const { return IS_EDITABLE; }
index 9ded7ca7c3af5884d9749e10931925f9d6d73fd3..9c87064fa4d38cfe8035c471986d3512ac8c2b9e 100644 (file)
@@ -27,7 +27,7 @@
 using std::ostream;
 
 
-InsetParent::InsetParent(InsetCommandParams const & p, Buffer const & bf, bool)
+InsetParent::InsetParent(InsetCommandParams const & p, Buffer const & bf)
        : InsetCommand(p)
 {
        string const fn = p.getContents();
@@ -35,6 +35,14 @@ InsetParent::InsetParent(InsetCommandParams const & p, Buffer const & bf, bool)
 }
 
 
+// InsetParent::InsetParent(InsetCommandParams const & p, Buffer const & bf, bool)
+//     : InsetCommand(p, false)
+// {
+//     string const fn = p.getContents();
+//     setContents(MakeAbsPath(fn, bf.filePath()));
+// }
+
+
 string const InsetParent::getScreenLabel(Buffer const *) const
 {
        return bformat(_("Parent: %1$s"), getContents());
index ec2be9c618b6854ef9d24b4c5463f55aca8b2959..8fd4691d347de6ab954388ee0baeb92a97aa5726 100644 (file)
@@ -25,12 +25,18 @@ class Buffer;
 class InsetParent : public InsetCommand {
 public:
        ///
-       InsetParent(InsetCommandParams const &, Buffer const &, bool same_id = false);
+       InsetParent(InsetCommandParams const &, Buffer const &);
        ///
-       virtual Inset * clone(Buffer const & buffer, bool same_id = false) const {
-               return new InsetParent(params(), buffer, same_id);
+       //InsetParent(InsetCommandParams const &, Buffer const &, bool same_id);
+       ///
+       virtual Inset * clone(Buffer const & buffer) const {
+               return new InsetParent(params(), buffer);
        }
        ///
+       //virtual Inset * clone(Buffer const & buffer, bool same_id) const {
+       //      return new InsetParent(params(), buffer, same_id);
+       //}
+       ///
        dispatch_result localDispatch(FuncRequest const & cmd);
        ///
        string const getScreenLabel(Buffer const *) const;
index d438de51bfbe0f3c4dec13e180e1aae845bea810..5f0b6491e20f53ca65a792f8281c6f607b833e5f 100644 (file)
@@ -335,7 +335,7 @@ void InsetQuotes::validate(LaTeXFeatures & features) const
            && lyxrc.fontenc != "T1") {
                if (times_ == SingleQ)
                        switch (type) {
-                       case ',': features.require("quotesinglbase");  break;
+                               case ',': features.require("quotesinglbase");  break;
                        case '<': features.require("guilsinglleft");  break;
                        case '>': features.require("guilsinglright"); break;
                        default: break;
@@ -351,12 +351,18 @@ void InsetQuotes::validate(LaTeXFeatures & features) const
 }
 
 
-Inset * InsetQuotes::clone(Buffer const &, bool) const
+Inset * InsetQuotes::clone(Buffer const &) const
 {
-  return new InsetQuotes(language_, side_, times_);
+       return new InsetQuotes(language_, side_, times_);
 }
 
 
+// Inset * InsetQuotes::clone(Buffer const &, bool) const
+// {
+//   return new InsetQuotes(language_, side_, times_);
+// }
+
+
 Inset::Code InsetQuotes::lyxCode() const
 {
   return Inset::QUOTE_CODE;
index f6e94e4b711300a9199ca35d816b99604ba614b5..12e5e14da2d3bd9fb6cbd29582be1eac3f2c7c3c 100644 (file)
@@ -68,7 +68,9 @@ public:
        /// Create the right quote inset after character c
        InsetQuotes(char c, BufferParams const & params);
        ///
-       Inset * clone(Buffer const &, bool same_id = false) const;
+       Inset * clone(Buffer const &) const;
+       ///
+       //Inset * clone(Buffer const &, bool same_id) const;
 
        ///
        void dimension(BufferView *, LyXFont const &, Dimension &) const;
index 72cb13da36882dc05957a1bc76496c565ac74640..f2d2c0dde203ee3258b7ca2ce56ebf6f53ac59a4 100644 (file)
 
 using std::ostream;
 
-InsetRef::InsetRef(InsetCommandParams const & p, Buffer const & buf, bool)
+InsetRef::InsetRef(InsetCommandParams const & p, Buffer const & buf)
        : InsetCommand(p), isLatex(buf.isLatex())
 {}
 
 
+// InsetRef::InsetRef(InsetCommandParams const & p, Buffer const & buf, bool)
+//     : InsetCommand(p, false), isLatex(buf.isLatex())
+// {}
+
+
 InsetRef::~InsetRef()
 {
        InsetCommandMailer("ref", *this).hideDialog();
@@ -37,7 +42,7 @@ InsetRef::~InsetRef()
 dispatch_result InsetRef::localDispatch(FuncRequest const & cmd)
 {
        switch (cmd.action) {
-       case LFUN_INSET_EDIT:   
+       case LFUN_INSET_EDIT:
                // Eventually trigger dialog with button 3 not 1
                if (cmd.button() == mouse_button::button3)
                        cmd.view()->owner()->
@@ -45,7 +50,7 @@ dispatch_result InsetRef::localDispatch(FuncRequest const & cmd)
                if (cmd.button() == mouse_button::button1)
                        InsetCommandMailer("ref", *this).showDialog(cmd.view());
                return DISPATCHED;
-       
+
        default:
                return UNDISPATCHED;
        }
index 532c7eaa2a60a1dc4e634a12e3209b776436df85..9e1aa204aeda37f9b7d33b2404d232a058e4e38c 100644 (file)
@@ -36,14 +36,20 @@ public:
        static string const & getName(int type);
 
        ///
-       InsetRef(InsetCommandParams const &, Buffer const &, bool same_id = false);
+       InsetRef(InsetCommandParams const &, Buffer const &);
+       ///
+       //InsetRef(InsetCommandParams const &, Buffer const &, bool same_id);
        ///
        ~InsetRef();
        ///
-       virtual Inset * clone(Buffer const & buffer, bool same_id = false) const {
-               return new InsetRef(params(), buffer, same_id);
+       virtual Inset * clone(Buffer const & buffer) const {
+               return new InsetRef(params(), buffer);
        }
        ///
+       //virtual Inset * clone(Buffer const & buffer, bool same_id) const {
+       //      return new InsetRef(params(), buffer, same_id);
+       //}
+       ///
        dispatch_result localDispatch(FuncRequest const & cmd);
        ///
        string const getScreenLabel(Buffer const *) const;
index 0799bad7ffab7d1368524c12347085e24228f8b4..d0b15c8903002795d369a60e6915f717c8a8d3cc 100644 (file)
@@ -250,12 +250,18 @@ int InsetSpace::docbook(Buffer const *, ostream & os, bool) const
 }
 
 
-Inset * InsetSpace::clone(Buffer const &, bool) const
+Inset * InsetSpace::clone(Buffer const &) const
 {
        return new InsetSpace(kind_);
 }
 
 
+// Inset * InsetSpace::clone(Buffer const &, bool) const
+// {
+//     return new InsetSpace(kind_);
+// }
+
+
 bool InsetSpace::isChar() const
 {
        return true;
index 606996f4a5356670541a5de2b990b1af0eff27b1..1081797ed8b582abd2d344ee0e6df89be75726b0 100644 (file)
@@ -70,7 +70,9 @@ public:
        ///
        int docbook(Buffer const *, std::ostream &, bool mixcont) const;
        ///
-       virtual Inset * clone(Buffer const &, bool same_id = false) const;
+       virtual Inset * clone(Buffer const &) const;
+       ///
+       //virtual Inset * clone(Buffer const &, bool same_id) const;
        ///
        Inset::Code lyxCode() const { return Inset::SPACE_CODE; }
        /// We don't need \begin_inset and \end_inset
index 15519f374e60ee51dc29b13be36b393b07544702..b43100020ff99a182c97cf98bab897ac1d614633 100644 (file)
@@ -244,12 +244,18 @@ int InsetSpecialChar::docbook(Buffer const *, ostream & os, bool) const
 }
 
 
-Inset * InsetSpecialChar::clone(Buffer const &, bool) const
+Inset * InsetSpecialChar::clone(Buffer const &) const
 {
        return new InsetSpecialChar(kind_);
 }
 
 
+// Inset * InsetSpecialChar::clone(Buffer const &, bool) const
+// {
+//     return new InsetSpecialChar(kind_);
+// }
+
+
 void InsetSpecialChar::validate(LaTeXFeatures & features) const
 {
        if (kind_ == MENU_SEPARATOR) {
index d8ec503700e640e19cbb4a2dfad97d7d790151a7..2bc1cb9b1630ab22792832176d44749e5c4275c3 100644 (file)
@@ -63,7 +63,9 @@ public:
        ///
        int docbook(Buffer const *, std::ostream &, bool mixcont) const;
        ///
-       virtual Inset * clone(Buffer const &, bool same_id = false) const;
+       virtual Inset * clone(Buffer const &) const;
+       ///
+       //virtual Inset * clone(Buffer const &, bool same_id) const;
        ///
        Inset::Code lyxCode() const { return Inset::SPECIALCHAR_CODE; }
        /// We don't need \begin_inset and \end_inset
index b92763c79f8262c48d6c2ffe137ffa3c9128d46a..56c204c94beb240515c80983568b7cdd835c8229 100644 (file)
@@ -174,12 +174,11 @@ InsetTabular::InsetTabular(Buffer const & buf, int rows, int columns)
 }
 
 
-InsetTabular::InsetTabular(InsetTabular const & tab, Buffer const & buf,
-                                                  bool same_id)
-       : UpdatableInset(tab, same_id), buffer(&buf)
+InsetTabular::InsetTabular(InsetTabular const & tab, Buffer const & buf)
+       : UpdatableInset(tab), buffer(&buf)
 {
        tabular.reset(new LyXTabular(buf.params,
-                                    this, *(tab.tabular), same_id));
+                                    this, *(tab.tabular)));
        the_locking_inset = 0;
        old_locking_inset = 0;
        locked = false;
@@ -194,6 +193,26 @@ InsetTabular::InsetTabular(InsetTabular const & tab, Buffer const & buf,
 }
 
 
+// InsetTabular::InsetTabular(InsetTabular const & tab, Buffer const & buf,
+//                                                bool same_id)
+//     : UpdatableInset(tab, same_id), buffer(&buf)
+// {
+//     tabular.reset(new LyXTabular(buf.params,
+//                                  this, *(tab.tabular), same_id));
+//     the_locking_inset = 0;
+//     old_locking_inset = 0;
+//     locked = false;
+//     oldcell = -1;
+//     actrow = actcell = 0;
+//     clearSelection();
+//     need_update = INIT;
+//     in_update = false;
+//     in_reset_pos = 0;
+//     inset_x = 0;
+//     inset_y = 0;
+// }
+
+
 InsetTabular::~InsetTabular()
 {
        InsetTabularMailer mailer(*this);
@@ -201,12 +220,18 @@ InsetTabular::~InsetTabular()
 }
 
 
-Inset * InsetTabular::clone(Buffer const & buf, bool same_id) const
+Inset * InsetTabular::clone(Buffer const & buf) const
 {
-       return new InsetTabular(*this, buf, same_id);
+       return new InsetTabular(*this, buf);
 }
 
 
+// Inset * InsetTabular::clone(Buffer const & buf, bool same_id) const
+// {
+//     return new InsetTabular(*this, buf, same_id);
+// }
+
+
 BufferView * InsetTabular::view() const
 {
        return buffer->getUser();
index 3a3199c8a835993645444601f0cbec99f8cbf84e..05063aa53ababd945a09de84fe1a53e24e63cb36 100644 (file)
@@ -76,11 +76,15 @@ public:
        ///
        InsetTabular(Buffer const &, int rows = 1, int columns = 1);
        ///
-       InsetTabular(InsetTabular const &, Buffer const &, bool same_id = false);
+       InsetTabular(InsetTabular const &, Buffer const &);
+       ///
+       //InsetTabular(InsetTabular const &, Buffer const &, bool same_id);
        ///
        ~InsetTabular();
        ///
-       Inset * clone(Buffer const &, bool same_id = false) const;
+       Inset * clone(Buffer const &) const;
+       ///
+       //Inset * clone(Buffer const &, bool same_id) const;
        ///
        void read(Buffer const *, LyXLex &);
        ///
index 20599f503e850b2c3971eb9fb95297918423761c..57dc7ccbba2145c2de60fa861be876dbbbe9998d 100644 (file)
@@ -143,18 +143,26 @@ InsetText::InsetText(BufferParams const & bp)
        paragraphs.begin()->layout(bp.getLyXTextClass().defaultLayout());
        if (bp.tracking_changes)
                paragraphs.begin()->trackChanges();
-       init();
+       init(0);
 }
 
 
-InsetText::InsetText(InsetText const & in, bool same_id)
-       : UpdatableInset(in, same_id), lt(0), in_update(false), do_resize(0),
+InsetText::InsetText(InsetText const & in)
+       : UpdatableInset(in), lt(0), in_update(false), do_resize(0),
          do_reinit(false)
 {
-       init(&in, same_id);
+       init(&in);
 }
 
 
+// InsetText::InsetText(InsetText const & in, bool same_id)
+//     : UpdatableInset(in, same_id), lt(0), in_update(false), do_resize(0),
+//       do_reinit(false)
+// {
+//     init(&in, same_id);
+// }
+
+
 InsetText & InsetText::operator=(InsetText const & it)
 {
        init(&it);
@@ -162,15 +170,13 @@ InsetText & InsetText::operator=(InsetText const & it)
 }
 
 
-void InsetText::init(InsetText const * ins, bool same_id)
+void InsetText::init(InsetText const * ins)
 {
        if (ins) {
-               setParagraphData(ins->paragraphs, same_id);
+               setParagraphData(ins->paragraphs);
                autoBreakRows = ins->autoBreakRows;
                drawFrame_ = ins->drawFrame_;
                frame_color = ins->frame_color;
-               if (same_id)
-                       id_ = ins->id_;
        } else {
                for_each(paragraphs.begin(), paragraphs.end(),
                         boost::bind(&Paragraph::setInsetOwner, _1, this));
@@ -195,6 +201,39 @@ void InsetText::init(InsetText const * ins, bool same_id)
 }
 
 
+// void InsetText::init(InsetText const * ins, bool same_id)
+// {
+//     if (ins) {
+//             setParagraphData(ins->paragraphs, same_id);
+//             autoBreakRows = ins->autoBreakRows;
+//             drawFrame_ = ins->drawFrame_;
+//             frame_color = ins->frame_color;
+//             if (same_id)
+//                     id_ = ins->id_;
+//     } else {
+//             for_each(paragraphs.begin(), paragraphs.end(),
+//                      boost::bind(&Paragraph::setInsetOwner, _1, this));
+
+//             the_locking_inset = 0;
+//             drawFrame_ = NEVER;
+//             frame_color = LColor::insetframe;
+//             autoBreakRows = false;
+//     }
+//     top_y = 0;
+//     old_max_width = 0;
+//     no_selection = true;
+//     need_update = FULL;
+//     drawTextXOffset = 0;
+//     drawTextYOffset = 0;
+//     locked = false;
+//     old_par = 0;
+//     last_drawn_width = -1;
+//     cached_bview = 0;
+//     sstate.lpar = 0;
+//     in_insetAllowed = false;
+// }
+
+
 InsetText::~InsetText()
 {
        paragraphs.clear();
@@ -226,12 +265,18 @@ void InsetText::clear(bool just_mark_erased)
 }
 
 
-Inset * InsetText::clone(Buffer const &, bool same_id) const
+Inset * InsetText::clone(Buffer const &) const
 {
-       return new InsetText(*this, same_id);
+       return new InsetText(*this);
 }
 
 
+// Inset * InsetText::clone(Buffer const &, bool same_id) const
+// {
+//     return new InsetText(*this, same_id);
+// }
+
+
 void InsetText::write(Buffer const * buf, ostream & os) const
 {
        os << "Text\n";
@@ -1940,39 +1985,22 @@ int InsetText::getMaxWidth(BufferView * bv, UpdatableInset const * inset) const
 }
 
 
-void InsetText::setParagraphData(ParagraphList const & plist, bool same_id)
+void InsetText::setParagraphData(ParagraphList const & plist)
 {
        // we have to unlock any locked inset otherwise we're in troubles
        the_locking_inset = 0;
 
-       #warning CHECK not adhering to same_id here might wreck havoc (Lgb)
        // But it it makes no difference that is a lot better.
-       if (same_id) {
-               lyxerr << "Same_id called with 'true'" << endl;
-               lyxerr << "Please report this to the list." << endl;
-
-               paragraphs.clear();
-               ParagraphList::iterator it = plist.begin();
-               ParagraphList::iterator end = plist.end();
-               for (; it != end; ++it) {
-                       int const id = it->id();
-                       paragraphs.push_back(*it);
-                       Paragraph & tmp = paragraphs.back();
-                       tmp.setInsetOwner(this);
-                       tmp.id(id);
-               }
-       } else {
 #warning FIXME.
-               // See if this can be simplified when std::list is in effect.
-               paragraphs.clear();
+       // See if this can be simplified when std::list is in effect.
+       paragraphs.clear();
 
-               ParagraphList::iterator it = plist.begin();
-               ParagraphList::iterator end = plist.end();
-               for (; it != end; ++it) {
-                       paragraphs.push_back(*it);
-                       Paragraph & tmp = paragraphs.back();
-                       tmp.setInsetOwner(this);
-               }
+       ParagraphList::iterator it = plist.begin();
+       ParagraphList::iterator end = plist.end();
+       for (; it != end; ++it) {
+               paragraphs.push_back(*it);
+               Paragraph & tmp = paragraphs.back();
+               tmp.setInsetOwner(this);
        }
 
        reinitLyXText();
@@ -1980,6 +2008,46 @@ void InsetText::setParagraphData(ParagraphList const & plist, bool same_id)
 }
 
 
+// void InsetText::setParagraphData(ParagraphList const & plist, bool same_id)
+// {
+//     // we have to unlock any locked inset otherwise we're in troubles
+//     the_locking_inset = 0;
+
+//     #warning CHECK not adhering to same_id here might wreck havoc (Lgb)
+//     // But it it makes no difference that is a lot better.
+//     if (same_id) {
+//             lyxerr << "Same_id called with 'true'" << endl;
+//             lyxerr << "Please report this to the list." << endl;
+
+//             paragraphs.clear();
+//             ParagraphList::iterator it = plist.begin();
+//             ParagraphList::iterator end = plist.end();
+//             for (; it != end; ++it) {
+//                     int const id = it->id();
+//                     paragraphs.push_back(*it);
+//                     Paragraph & tmp = paragraphs.back();
+//                     tmp.setInsetOwner(this);
+//                     tmp.id(id);
+//             }
+//     } else {
+// #warning FIXME.
+//             // See if this can be simplified when std::list is in effect.
+//             paragraphs.clear();
+
+//             ParagraphList::iterator it = plist.begin();
+//             ParagraphList::iterator end = plist.end();
+//             for (; it != end; ++it) {
+//                     paragraphs.push_back(*it);
+//                     Paragraph & tmp = paragraphs.back();
+//                     tmp.setInsetOwner(this);
+//             }
+//     }
+
+//     reinitLyXText();
+//     need_update = INIT;
+// }
+
+
 void InsetText::markNew(bool track_changes)
 {
        ParagraphList::iterator pit = paragraphs.begin();
index c42a2d0bae9387b7fa4ac337290d29861aa0bb8e..2f2c2886df6847beef7c712dc4dff0f7821f353d 100644 (file)
@@ -73,11 +73,16 @@ public:
        InsetText(BufferParams const &);
        ///
        explicit
-       InsetText(InsetText const &, bool same_id = false);
+       InsetText(InsetText const &);
+       ///
+       //explicit
+       //InsetText(InsetText const &, bool same_id);
        ///
        ~InsetText();
        ///
-       Inset * clone(Buffer const &, bool same_id = false) const;
+       Inset * clone(Buffer const &) const;
+       ///
+       //Inset * clone(Buffer const &, bool same_id) const;
        ///
        InsetText & operator=(InsetText const & it);
        /// empty inset to empty par, or just mark as erased
@@ -147,11 +152,15 @@ public:
        ///
        int getMaxWidth(BufferView *, UpdatableInset const *) const;
        ///
-       void init(InsetText const * ins = 0, bool same_id = false);
+       void init(InsetText const * ins);
+       ///
+       //void init(InsetText const * ins, bool same_id);
        ///
        void writeParagraphData(Buffer const *, std::ostream &) const;
        ///
-       void setParagraphData(ParagraphList const &, bool same_id = false);
+       void setParagraphData(ParagraphList const &);
+       ///
+       //void setParagraphData(ParagraphList const &, bool same_id);
        ///
        void setText(string const &, LyXFont const &);
        ///
index bbb09b7920530b6a2c6f13488bf9dc447cd68f9a..e7e457d102304da347acce5878158a6c22cd9371 100644 (file)
@@ -25,7 +25,9 @@ public:
        ///
        void write(Buffer const * buf, std::ostream & os) const;
        ///
-       virtual Inset * clone(Buffer const &, bool same_id = false) const;
+       virtual Inset * clone(Buffer const &) const;
+       ///
+       //virtual Inset * clone(Buffer const &, bool same_id) const;
        ///
        Inset::Code lyxCode() const { return Inset::THEOREM_CODE; }
        ///
index 46137a94c78fad93855924e60c05a21dbe21e4bb..ae53a76ee9cea0c303ff4164c029cbe686399a3c 100644 (file)
@@ -23,11 +23,16 @@ using std::vector;
 using std::ostream;
 
 
-InsetTOC::InsetTOC(InsetCommandParams const & p, bool same_id)
-       : InsetCommand(p, same_id)
+InsetTOC::InsetTOC(InsetCommandParams const & p)
+       : InsetCommand(p)
 {}
 
 
+// InsetTOC::InsetTOC(InsetCommandParams const & p, bool same_id)
+//     : InsetCommand(p, same_id)
+// {}
+
+
 InsetTOC::~InsetTOC()
 {
        InsetCommandMailer mailer("toc", *this);
index 22edad4b776fbe4ebef398c521e426a0ed4792ee..bc4c696cf88ef1ac9179c322285e32905684246f 100644 (file)
 class InsetTOC : public InsetCommand {
 public:
        ///
-       InsetTOC(InsetCommandParams const &, bool same_id = false);
+       InsetTOC(InsetCommandParams const &);
+       ///
+       //InsetTOC(InsetCommandParams const &, bool same_id);
        ///
        ~InsetTOC();
        ///
-       virtual Inset * clone(Buffer const &, bool same_id = false) const {
-               return new InsetTOC(params(), same_id);
+       virtual Inset * clone(Buffer const &) const {
+               return new InsetTOC(params());
        }
        ///
+       //virtual Inset * clone(Buffer const &, bool same_id) const {
+       //      return new InsetTOC(params(), same_id);
+       //}
+       ///
        dispatch_result localDispatch(FuncRequest const & cmd);
        ///
        string const getScreenLabel(Buffer const *) const;
index cff4ab9a80d5727c2ee35d7603d4d6d4e4e446c9..16eaf04797d984fbd105cf369083590f0ec0a681 100644 (file)
 using std::ostream;
 
 
-InsetUrl::InsetUrl(InsetCommandParams const & p, bool)
+InsetUrl::InsetUrl(InsetCommandParams const & p)
                : InsetCommand(p)
 {}
 
 
+// InsetUrl::InsetUrl(InsetCommandParams const & p, bool)
+//             : InsetCommand(p, false)
+// {}
+
+
 InsetUrl::~InsetUrl()
 {
        InsetCommandMailer("url", *this).hideDialog();
index dd93b7bc84751ea54ce2bea53da9d380e00ce34e..756ec2402a825c7d438d2379250030b383255a59 100644 (file)
@@ -23,14 +23,21 @@ class InsetUrl : public InsetCommand {
 public:
        ///
        explicit
-       InsetUrl(InsetCommandParams const &, bool same_id = false);
+       InsetUrl(InsetCommandParams const &);
+       ///
+       //explicit
+       //InsetUrl(InsetCommandParams const &, bool same_id);
        ///
        ~InsetUrl();
        ///
-       virtual Inset * clone(Buffer const &, bool same_id = false) const {
-               return new InsetUrl(params(), same_id);
+       virtual Inset * clone(Buffer const &) const {
+               return new InsetUrl(params());
        }
        ///
+       //virtual Inset * clone(Buffer const &, bool same_id) const {
+       //      return new InsetUrl(params(), same_id);
+       //}
+       ///
        dispatch_result localDispatch(FuncRequest const & cmd);
        ///
        Inset::Code lyxCode() const { return Inset::URL_CODE; }
index 97cd8d3b05a1c9da97df24d453318aab11e5c9ff..f1249091e1700a9bed6eb1c0fdc74058a666faa0 100644 (file)
@@ -75,11 +75,16 @@ InsetWrap::InsetWrap(BufferParams const & bp, string const & type)
 }
 
 
-InsetWrap::InsetWrap(InsetWrap const & in, bool same_id)
-       : InsetCollapsable(in, same_id), params_(in.params_)
+InsetWrap::InsetWrap(InsetWrap const & in)
+       : InsetCollapsable(in), params_(in.params_)
 {}
 
 
+// InsetWrap::InsetWrap(InsetWrap const & in, bool same_id)
+//     : InsetCollapsable(in, same_id), params_(in.params_)
+// {}
+
+
 InsetWrap::~InsetWrap()
 {
        InsetWrapMailer mailer(*this);
@@ -180,12 +185,18 @@ void InsetWrap::validate(LaTeXFeatures & features) const
 }
 
 
-Inset * InsetWrap::clone(Buffer const &, bool same_id) const
+Inset * InsetWrap::clone(Buffer const &) const
 {
-       return new InsetWrap(*const_cast<InsetWrap *>(this), same_id);
+       return new InsetWrap(*const_cast<InsetWrap *>(this));
 }
 
 
+// Inset * InsetWrap::clone(Buffer const &, bool same_id) const
+// {
+//     return new InsetWrap(*const_cast<InsetWrap *>(this), same_id);
+// }
+
+
 string const InsetWrap::editMessage() const
 {
        return _("Opened Wrap Inset");
@@ -307,7 +318,7 @@ void InsetWrapMailer::string2params(string const & in,
 
        if (in.empty())
                return;
-       
+
        istringstream data(STRCONV(in));
        LyXLex lex(0,0);
        lex.setStream(data);
index a6c029190ff4fb0191067629323a8fc3b7ddd790..bc5b9896e15f4b668fda1fc5ec7b2e15fcc6d22f 100644 (file)
@@ -22,7 +22,7 @@ struct InsetWrapParams {
        void write(std::ostream &) const;
        ///
        void read(LyXLex &);
-    
+
        ///
        string type;
        ///
@@ -39,11 +39,13 @@ public:
        ///
        InsetWrap(BufferParams const &, string const &);
        ///
-       InsetWrap(InsetWrap const &, bool same_id = false);
+       InsetWrap(InsetWrap const &);
+       ///
+       //InsetWrap(InsetWrap const &, bool same_id);
        ///
        ~InsetWrap();
        ///
-       virtual dispatch_result localDispatch(FuncRequest const & cmd); 
+       virtual dispatch_result localDispatch(FuncRequest const & cmd);
        ///
        void write(Buffer const * buf, std::ostream & os) const;
        ///
@@ -51,7 +53,9 @@ public:
        ///
        void validate(LaTeXFeatures & features) const;
        ///
-       Inset * clone(Buffer const &, bool same_id = false) const;
+       Inset * clone(Buffer const &) const;
+       ///
+       //Inset * clone(Buffer const &, bool same_id) const;
        ///
        Inset::Code lyxCode() const { return Inset::WRAP_CODE; }
        ///
index eef6a357aa7830d0cd4dce7c30ec50b1c3a1f2f9..d03c3f46772ab26b62dd6d3697ada49f3f16c5cc 100644 (file)
@@ -30,11 +30,16 @@ UpdatableInset::UpdatableInset()
 {}
 
 
-UpdatableInset::UpdatableInset(UpdatableInset const & in, bool same_id)
-       : Inset(in, same_id), block_drawing_(false)
+UpdatableInset::UpdatableInset(UpdatableInset const & in)
+       : Inset(in), block_drawing_(false)
 {}
 
 
+// UpdatableInset::UpdatableInset(UpdatableInset const & in, bool same_id)
+//     : Inset(in, same_id), block_drawing_(false)
+// {}
+
+
 void UpdatableInset::insetUnlock(BufferView *)
 {
        lyxerr[Debug::INFO] << "Inset Unlock" << std::endl;
index a3ddeaaaa1e43473391319f4ffadd48242b42261..6672ab38e2720de5ed9393f77d62cf47deb8dbdd 100644 (file)
@@ -49,7 +49,9 @@ public:
        ///
        UpdatableInset();
        ///
-       UpdatableInset(UpdatableInset const & in, bool same_id = false);
+       UpdatableInset(UpdatableInset const & in);
+       ///
+       //UpdatableInset(UpdatableInset const & in, bool same_id);
 
        /// check if the font of the char we want inserting is correct
        /// and modify it if it is not.
@@ -122,7 +124,7 @@ public:
 
        /// find the next change in the inset
        virtual bool nextChange(BufferView * bv, lyx::pos_type & length);
+
        ///
        // needed for search/replace functionality
        ///
index 6365686d85ce34bcacd5b43f3f268eedbce9cb2e..e4e6c52362f33d269b1369c45b7acf55e0023ef2 100644 (file)
@@ -1,3 +1,6 @@
+2003-05-26  Lars Gullik Bjønnes  <larsbj@gullik.net>
+
+       * remove same_id from function signatures, adjust
 
 2003-05-19  André Pönitz  <poenitz@gmx.net>
 
        * math_cursor.C: boost::format -> bformat  all over the place
 
 2003-05-06  Ling Li  <ling@caltech.edu>
-       * Makefile, math_makeboxinset.[Ch]:
-       * math_factory.C (createMathInset):
-       * math_parser.C (parse1): New support for \makebox.
-       * math_nestinset.C (drawMarkers, drawMarkers2):
-       * math_boxinset.C, math_frameboxinset.C (draw):
-       Fix spacing and marker length.
+
+       * Makefile, math_makeboxinset.[Ch]:
+       * math_factory.C (createMathInset):
+       * math_parser.C (parse1): New support for \makebox.
+
+       * math_nestinset.C (drawMarkers, drawMarkers2):
+       * math_boxinset.C, math_frameboxinset.C (draw):
+       Fix spacing and marker length.
+
 2003-05-03  John Levon  <levon@movementarian.org>
 
        * formula.C:
 2003-03-05  Ling Li <ling@caltech.edu>
 
        * math_casesinset.[Ch] (validate): request feature "amsmath"
-       
+
 2003-03-04  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
-  
-       * math_braceinset.C (metrics): fix computation of descent
+
+       * math_braceinset.C (metrics): fix computation of descent
 
 2003-03-04  Angus Leeming  <leeming@lyx.org>
 
index 79ff1b1666cc61cf18d32e4c192016108d419d46..2a6575b9b333b8b3d29e8431848a6a48a230e73e 100644 (file)
@@ -114,12 +114,18 @@ InsetFormula::~InsetFormula()
 {}
 
 
-Inset * InsetFormula::clone(Buffer const &, bool) const
+Inset * InsetFormula::clone(Buffer const &) const
 {
        return new InsetFormula(*this);
 }
 
 
+// Inset * InsetFormula::clone(Buffer const &, bool) const
+// {
+//     return new InsetFormula(*this);
+// }
+
+
 void InsetFormula::write(Buffer const *, ostream & os) const
 {
        WriteStream wi(os, false, false);
@@ -190,7 +196,7 @@ void InsetFormula::read(Buffer const *, LyXLex & lex)
                        lyxerr << "this is size 1\n";
            if (par_->cell(0)[0]->asFontInset()) {
                                lyxerr << "this is a font inset \n";
-                               lyxerr << "replacing " << par_.nucleus()->cell(0) << 
+                               lyxerr << "replacing " << par_.nucleus()->cell(0) <<
                                        " with " << par_->cell(0)[0]->cell(0) << "\n";
                        }
                }
@@ -331,4 +337,3 @@ string const InsetFormula::PreviewImpl::latexString() const
        parent().par_->write(wi);
        return STRCONV(ls.str());
 }
-
index fc3b49fbabfbd46b4f63d81b81d6785c1203599f..8074c37f86cea37b9c99c532a6fb3ccf41a667a4 100644 (file)
@@ -54,7 +54,9 @@ public:
        int docbook(Buffer const *, std::ostream &, bool mixcont) const;
 
        ///
-       Inset * clone(Buffer const &, bool same_id = false) const;
+       Inset * clone(Buffer const &) const;
+       ///
+       //Inset * clone(Buffer const &, bool same_id) const;
        ///
        void validate(LaTeXFeatures & features) const;
        ///
index e33559d6bc510a805db29806aaab391cf7eaa05f..399811b963bb6deeb61b03f77eca9c1c11466e1a 100644 (file)
@@ -30,7 +30,9 @@ public:
        ///
        InsetFormulaBase();
        ///
-       Inset * clone(Buffer const &, bool same_id = false) const = 0;
+       Inset * clone(Buffer const &) const = 0;
+       ///
+       //Inset * clone(Buffer const &, bool same_id) const = 0;
        ///
        virtual void draw(BufferView *,LyXFont const &, int, float &) const = 0;
        /// lowest x coordinate
index d64825aa634c09cbb1728bf03cb140ec78f03f83..0358a4a3283722c5ba4d3b8aeca521f1afe65dd1 100644 (file)
@@ -66,12 +66,18 @@ InsetFormulaMacro::InsetFormulaMacro(string const & s)
 }
 
 
-Inset * InsetFormulaMacro::clone(Buffer const &, bool) const
+Inset * InsetFormulaMacro::clone(Buffer const &) const
 {
        return new InsetFormulaMacro(*this);
 }
 
 
+// Inset * InsetFormulaMacro::clone(Buffer const &, bool) const
+// {
+//     return new InsetFormulaMacro(*this);
+// }
+
+
 void InsetFormulaMacro::write(Buffer const *, ostream & os) const
 {
        os << "FormulaMacro ";
index 0b73fb94aec71bede60970fe74c9d85ba1e53044..a9545decaa7e9492f023f5138bc15682a4623ead 100644 (file)
@@ -52,7 +52,9 @@ public:
        int docbook(Buffer const *, std::ostream &, bool mixcont) const;
 
        ///
-       Inset * clone(Buffer const &, bool same_id = false) const;
+       Inset * clone(Buffer const &) const;
+       ///
+       //Inset * clone(Buffer const &, bool same_id) const;
        ///
        Inset::Code lyxCode() const;
        ///
index 4034a5624cbdeb836cdc1c2cfcda8a749dd963b2..d3076b71ecb5a6c46f83af24044aac93278da684 100644 (file)
@@ -99,7 +99,7 @@ Paragraph::Paragraph(Paragraph const & lp)
        InsetList::iterator it = insetlist.begin();
        InsetList::iterator end = insetlist.end();
        for (; it != end; ++it) {
-               it.setInset(it.getInset()->clone(**buffer_, false));
+               it.setInset(it.getInset()->clone(**buffer_));
                // tell the new inset who is the boss now
                it.getInset()->parOwner(this);
        }
index 51330930dc0c0469f88b5c34a4f404cc3c02680c..295aaa3417065bf3aae5546879c6564642319896 100644 (file)
@@ -117,23 +117,11 @@ LyXTabular::LyXTabular(BufferParams const & bp,
 
 
 LyXTabular::LyXTabular(BufferParams const & bp,
-                      InsetTabular * inset, LyXTabular const & lt,
-                      bool same_id)
+                      InsetTabular * inset, LyXTabular const & lt)
 {
        owner_ = inset;
        cur_cell = -1;
        Init(bp, lt.rows_, lt.columns_, &lt);
-       // we really should change again to have InsetText as a pointer
-       // and allocate it then we would not have to do this stuff all
-       // double!
-       if (same_id) {
-               for (int i = 0; i < rows_; ++i) {
-                       for (int j = 0; j < columns_; ++j) {
-                               cell_info[i][j].inset.id(lt.cell_info[i][j].inset.id());
-                               cell_info[i][j].inset.setParagraphData(lt.cell_info[i][j].inset.paragraphs, true);
-                       }
-               }
-       }
 #if 0
 #ifdef WITH_WARNINGS
 #warning Jürgen, can you make it the other way round. So that copy assignment depends on the copy constructor and not the other way. (Lgb)
@@ -143,6 +131,33 @@ LyXTabular::LyXTabular(BufferParams const & bp,
 }
 
 
+// LyXTabular::LyXTabular(BufferParams const & bp,
+//                    InsetTabular * inset, LyXTabular const & lt,
+//                    bool same_id)
+// {
+//     owner_ = inset;
+//     cur_cell = -1;
+//     Init(bp, lt.rows_, lt.columns_, &lt);
+//     // we really should change again to have InsetText as a pointer
+//     // and allocate it then we would not have to do this stuff all
+//     // double!
+//     if (same_id) {
+//             for (int i = 0; i < rows_; ++i) {
+//                     for (int j = 0; j < columns_; ++j) {
+//                             cell_info[i][j].inset.id(lt.cell_info[i][j].inset.id());
+//                             cell_info[i][j].inset.setParagraphData(lt.cell_info[i][j].inset.paragraphs, true);
+//                     }
+//             }
+//     }
+// #if 0
+// #ifdef WITH_WARNINGS
+// #warning Jürgen, can you make it the other way round. So that copy assignment depends on the copy constructor and not the other way. (Lgb)
+// #endif
+//     operator=(lt);
+// #endif
+// }
+
+
 LyXTabular::LyXTabular(Buffer const * buf, InsetTabular * inset, LyXLex & lex)
 {
        owner_ = inset;
@@ -177,9 +192,9 @@ LyXTabular & LyXTabular::operator=(LyXTabular const & lt)
 
 
 LyXTabular * LyXTabular::clone(BufferParams const & bp,
-                              InsetTabular * inset, bool same_id)
+                              InsetTabular * inset)
 {
-       LyXTabular * result = new LyXTabular(bp, inset, *this, same_id);
+       LyXTabular * result = new LyXTabular(bp, inset, *this);
 #if 0
        // don't know if this is good but I need to Clone also
        // the text-insets here, this is for the Undo-facility!
@@ -194,6 +209,24 @@ LyXTabular * LyXTabular::clone(BufferParams const & bp,
 }
 
 
+// LyXTabular * LyXTabular::clone(BufferParams const & bp,
+//                            InsetTabular * inset, bool same_id)
+// {
+//     LyXTabular * result = new LyXTabular(bp, inset, *this, same_id);
+// #if 0
+//     // don't know if this is good but I need to Clone also
+//     // the text-insets here, this is for the Undo-facility!
+//     for (int i = 0; i < rows_; ++i) {
+//             for (int j = 0; j < columns_; ++j) {
+//                     result->cell_info[i][j].inset = cell_info[i][j].inset;
+//                     result->cell_info[i][j].inset.setOwner(inset);
+//             }
+//     }
+// #endif
+//     return result;
+// }
+
+
 /* activates all lines and sets all widths to 0 */
 void LyXTabular::Init(BufferParams const & bp,
                      int rows_arg, int columns_arg, LyXTabular const * lt)
index dd18d9dbd47731bd8a57ab0772ee24382d0c3924..92916cd7a80b8278bd9be3032c30762479ec7e05 100644 (file)
@@ -180,15 +180,20 @@ public:
                   InsetTabular *, int columns_arg, int rows_arg);
        ///
        LyXTabular(BufferParams const &,
-                  InsetTabular *, LyXTabular const &, bool same_id = false);
+                  InsetTabular *, LyXTabular const &);
+       ///
+       //LyXTabular(BufferParams const &,
+       //         InsetTabular *, LyXTabular const &, bool same_id = false);
        ///
        explicit
        LyXTabular(Buffer const *, InsetTabular *, LyXLex & lex);
        ///
        LyXTabular & operator=(LyXTabular const &);
        ///
-       LyXTabular * clone(BufferParams const &,
-                          InsetTabular *, bool same_id = false);
+       LyXTabular * clone(BufferParams const &, InsetTabular *);
+       ///
+       //LyXTabular * clone(BufferParams const &,
+       //                 InsetTabular *, bool same_id = false);
 
        /// Returns true if there is a topline, returns false if not
        bool TopLine(int cell, bool onlycolumn = false) const;