]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetPhantom.cpp
Fix use of std::regex_match
[lyx.git] / src / insets / InsetPhantom.cpp
index 19e05700230583c00abc817865004914091da473..37367add2ccafa0719b8c51ba57c10f983df3689 100644 (file)
@@ -16,7 +16,6 @@
 #include "BufferParams.h"
 #include "BufferView.h"
 #include "BufferParams.h"
-#include "Counters.h"
 #include "Cursor.h"
 #include "Dimension.h"
 #include "DispatchResult.h"
@@ -195,10 +194,10 @@ void InsetPhantom::draw(PainterInfo & pi, int x, int y) const
                //       |   |        |   |
                //      x1  x2       x3  x4
 
-               x = x + TEXT_TO_INSET_OFFSET;
+               x += leftOffset(pi.base.bv);
                int const x1 = x;
                int const x2 = x + arrow_size;
-               int const x4 = x + dim.wid - 2 * TEXT_TO_INSET_OFFSET;
+               int const x4 = x + dim.wid - leftOffset(pi.base.bv) - rightOffset(pi.base.bv);
                int const x3 = x4 - arrow_size;
 
                int const y2 = y + (dim.des - dim.asc) / 2;
@@ -349,26 +348,13 @@ int InsetPhantom::plaintext(odocstringstream & os,
 }
 
 
-int InsetPhantom::docbook(odocstream & os, OutputParams const & runparams) const
+void InsetPhantom::docbook(XMLStream &, OutputParams const &) const
 {
-       docstring cmdname;
-       switch (params_.type) {
-       case InsetPhantomParams::Phantom:
-       case InsetPhantomParams::HPhantom:
-       case InsetPhantomParams::VPhantom:
-       default:
-               cmdname = from_ascii("phantom");
-               break;
-       }
-       os << "<" + cmdname + ">";
-       int const i = InsetCollapsible::docbook(os, runparams);
-       os << "</" + cmdname + ">";
-
-       return i;
+       return;
 }
 
 
-docstring InsetPhantom::xhtml(XHTMLStream &, OutputParams const &) const
+docstring InsetPhantom::xhtml(XMLStream &, OutputParams const &) const
 {
        return docstring();
 }