]> git.lyx.org Git - lyx.git/blobdiff - src/insets/Inset.cpp
Allow row-breaking after some insets
[lyx.git] / src / insets / Inset.cpp
index f2e2d4bcb88e5d197730d29f39f08cfdd5ea3fb2..904ac81686c2708bf4f088a39291e86e0e0dcf71 100644 (file)
@@ -62,7 +62,7 @@ static InsetName insetnames[INSET_CODE_SIZE];
 
 
 // This list should be kept in sync with the list of dialogs in
-// src/frontends/qt4/GuiView.cpp, I.e., if a dialog goes with an
+// src/frontends/qt/GuiView.cpp, I.e., if a dialog goes with an
 // inset, the dialog should have the same name as the inset.
 // Changes should be also recorded in LFUN_DIALOG_SHOW doxygen
 // docs in LyXAction.cpp.
@@ -74,6 +74,7 @@ static void build_translator()
        insetnames[TOC_CODE] = InsetName("toc");
        insetnames[QUOTE_CODE] = InsetName("quote");
        insetnames[REF_CODE] = InsetName("ref");
+       insetnames[COUNTER_CODE] = InsetName("counter");
        insetnames[HYPERLINK_CODE] = InsetName("href");
        insetnames[SEPARATOR_CODE] = InsetName("separator");
        insetnames[ENDING_CODE] = InsetName("ending");
@@ -224,7 +225,7 @@ bool Inset::isBufferLoaded() const
 bool Inset::isBufferValid() const
 {
        return buffer_
-               && (isBufferLoaded() || buffer_->isClone());
+               && (isBufferLoaded() || buffer_->isInternal() || buffer_->isClone());
 }
 
 
@@ -246,7 +247,7 @@ bool Inset::allowEmpty() const
 }
 
 
-bool Inset::forceLTR() const
+bool Inset::forceLTR(OutputParams const &) const
 {
        return getLayout().forceLTR();
 }
@@ -471,7 +472,7 @@ int Inset::docbook(odocstream &, OutputParams const &) const
 }
 
 
-docstring Inset::xhtml(XHTMLStream & xs, OutputParams const &) const
+docstring Inset::xhtml(XMLStream & xs, OutputParams const &) const
 {
        xs << "[[Inset: " << from_ascii(insetName(lyxCode())) << "]]";
        return docstring();
@@ -553,22 +554,6 @@ void Inset::drawMarkers(PainterInfo & pi, int x, int y) const
 }
 
 
-void Inset::drawMarkers2(PainterInfo & pi, int x, int y) const
-{
-       ColorCode pen_color = mouseHovered(pi.base.bv) || editing(pi.base.bv)?
-               Color_mathframe : Color_mathcorners;
-
-       drawMarkers(pi, x, y);
-       Dimension const dim = dimension(*pi.base.bv);
-       int const t = x + dim.width() - 1;
-       int const a = y - dim.ascent();
-       pi.pain.line(x, a + 3, x, a, pen_color);
-       pi.pain.line(t, a + 3, t, a, pen_color);
-       pi.pain.line(x, a, x + 3, a, pen_color);
-       pi.pain.line(t - 3, a, t, a, pen_color);
-}
-
-
 bool Inset::editing(BufferView const * bv) const
 {
        return bv->cursor().isInside(this);