]> git.lyx.org Git - features.git/blobdiff - src/insets/Inset.h
DocBook: add a TODO for a newly discovered bug.
[features.git] / src / insets / Inset.h
index 0d6969832561914d05964bb5f49ee57c566e96ef..372b95a6dfb387099bd500100f310d4c2592ca53 100644 (file)
@@ -20,6 +20,7 @@
 #include "LayoutEnums.h"
 #include "OutputEnums.h"
 #include "OutputParams.h"
+#include "RowFlags.h"
 
 #include "support/docstring.h"
 #include "support/strfwd.h"
@@ -478,26 +479,8 @@ public:
 
        virtual CtObject getCtObject(OutputParams const &) const;
 
-       enum RowFlags {
-               Inline = 0,
-               // break row before this inset
-               BreakBefore = 1 << 0,
-               // break row after this inset
-               BreakAfter = 1 << 1,
-               // it is possible to break after this inset
-               CanBreakAfter = 1 << 2,
-               // force new (maybe empty) row after this inset
-               RowAfter = 1 << 3,
-               // specify an alignment (left, right) for a display inset
-               // (default is center)
-               AlignLeft = 1 << 4,
-               AlignRight = 1 << 5,
-               // A display inset breaks row at both ends
-               Display = BreakBefore | BreakAfter
-       };
-
-       /// How should this inset be displayed in its row?
-       virtual RowFlags rowFlags() const { return Inline; }
+       // properties with respect to row breaking (made of RowFLag enums)
+       virtual int rowFlags() const { return Inline; }
        /// indentation before this inset (only needed for displayed hull insets with fleqn option)
        virtual int indent(BufferView const &) const { return 0; }
        ///
@@ -631,8 +614,7 @@ public:
 protected:
        /// Constructors
        Inset(Buffer * buf) : buffer_(buf) {}
-       Inset(Inset const &) : buffer_(nullptr) {}
-       Inset(Inset const &&) : buffer_(nullptr) {}
+       Inset(Inset const &) : buffer_(0) {}
 
        /// replicate ourselves
        friend class InsetList;
@@ -656,20 +638,6 @@ protected:
 };
 
 
-inline Inset::RowFlags operator|(Inset::RowFlags const d1,
-                                    Inset::RowFlags const d2)
-{
-       return static_cast<Inset::RowFlags>(int(d1) | int(d2));
-}
-
-
-inline Inset::RowFlags operator&(Inset::RowFlags const d1,
-                                    Inset::RowFlags const d2)
-{
-       return static_cast<Inset::RowFlags>(int(d1) & int(d2));
-}
-
-
 } // namespace lyx
 
 #endif