]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetoptarg.C
Enable the external inset to handle unknown templates gracefully.
[lyx.git] / src / insets / insetoptarg.C
index 243b18ece08ba12f0475ebf6085646ccf1454270..eb3268b89f0953980719a47cead4c938f4e6696e 100644 (file)
@@ -3,16 +3,13 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Martin Vermeer  
+ * \author Martin Vermeer
  *
  * Full author contact details are available in file CREDITS
  */
 
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
 #include "debug.h"
 
@@ -40,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);
@@ -50,9 +47,9 @@ InsetOptArg::InsetOptArg(InsetOptArg const & in, bool same_id)
 }
 
 
-Inset * InsetOptArg::clone(Buffer const &, bool same_id) const
+Inset * InsetOptArg::clone() const
 {
-       return new InsetOptArg(*this, same_id);
+       return new InsetOptArg(*this);
 }
 
 
@@ -68,18 +65,19 @@ void InsetOptArg::write(Buffer const * buf, ostream & os) const
        InsetCollapsable::write(buf, os);
 }
 
-int InsetOptArg::latex(Buffer const *, ostream &, bool, bool) const
+
+int InsetOptArg::latex(Buffer const *, ostream &,
+                      LatexRunParams const &) const
 {
        return 0;
 }
 
+
 int InsetOptArg::latexOptional(Buffer const * buf, ostream & os,
-                               bool, bool fp) const
+                              LatexRunParams const & runparams) const
 {
        os << '[';
-       int const i = inset.latex(buf, os, false, fp);
+       int const i = inset.latex(buf, os, runparams);
        os << ']';
        return i + 2;
 }