]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetPagebreak.h
Fix Bug 3947: BibTeX allows parentheses in the key (even if the whole entry is delimi...
[lyx.git] / src / insets / InsetPagebreak.h
index 341014f2d63b3199cf5949ca2549da4f98491d28..83515a180a5ca18ef49c5d461ed045216fef86c1 100644 (file)
 
 namespace lyx {
 
-class InsetPagebreak : public InsetOld {
+class InsetPagebreak : public Inset {
 public:
        InsetPagebreak() {}
 
-       InsetBase::Code lyxCode() const { return InsetBase::PAGEBREAK_CODE; }
+       Inset::Code lyxCode() const { return Inset::PAGEBREAK_CODE; }
 
        bool metrics(MetricsInfo &, Dimension &) const;
 
        void draw(PainterInfo & pi, int x, int y) const;
 
        int latex(Buffer const &, odocstream &,
-                 OutputParams const &) const;
+                 OutputParams const &) const;
 
        int plaintext(Buffer const &, odocstream &,
-                     OutputParams const &) const;
+                     OutputParams const &) const;
 
        int docbook(Buffer const &, odocstream &,
-                   OutputParams const &) const;
+                   OutputParams const &) const;
 
        void read(Buffer const &, Lexer & lex);
 
@@ -44,16 +44,16 @@ public:
        /// We don't need \begin_inset and \end_inset
        bool directWrite() const { return true; }
 
-       bool display() const { return true; }
+       DisplayType display() const { return AlignCenter; }
 
        virtual docstring insetLabel() const { return _("Page Break"); }
 
        virtual std::string getCmdName() const { return "\\newpage"; }
 
 private:
-       virtual std::auto_ptr<InsetBase> doClone() const
+       virtual std::auto_ptr<Inset> doClone() const
        {
-               return std::auto_ptr<InsetBase>(new InsetPagebreak);
+               return std::auto_ptr<Inset>(new InsetPagebreak);
        }
 };
 
@@ -63,13 +63,13 @@ public:
        InsetClearPage() {}
 
        docstring insetLabel() const { return _("Clear Page"); }
-       
+
        std::string getCmdName() const { return "\\clearpage"; }
 
 private:
-       virtual std::auto_ptr<InsetBase> doClone() const
+       virtual std::auto_ptr<Inset> doClone() const
        {
-               return std::auto_ptr<InsetBase>(new InsetClearPage);
+               return std::auto_ptr<Inset>(new InsetClearPage);
        }
 };
 
@@ -79,13 +79,13 @@ public:
        InsetClearDoublePage() {}
 
        docstring insetLabel() const { return _("Clear Double Page"); }
-       
+
        std::string getCmdName() const { return "\\cleardoublepage"; }
 
 private:
-       virtual std::auto_ptr<InsetBase> doClone() const
+       virtual std::auto_ptr<Inset> doClone() const
        {
-               return std::auto_ptr<InsetBase>(new InsetClearDoublePage);
+               return std::auto_ptr<Inset>(new InsetClearDoublePage);
        }
 };