]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetIPAMacro.cpp
Move protectArgument function to lstrings
[lyx.git] / src / insets / InsetIPAMacro.cpp
index 21f2d114601cde4680031af70f4a932b9ebbe883..7852486b7d60ce7333f3a4c12a6d826706bdb3d0 100644 (file)
@@ -23,6 +23,7 @@
 #include "Lexer.h"
 #include "MetricsInfo.h"
 #include "output_xhtml.h"
+#include "texstream.h"
 
 #include "frontends/FontMetrics.h"
 #include "frontends/Painter.h"
@@ -145,7 +146,7 @@ docstring InsetIPADeco::layoutName() const
 void InsetIPADeco::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        InsetText::metrics(mi, dim);
-       
+
        if (params_.type == InsetIPADecoParams::Toptiebar) {
                // consider width of the inset label
                FontInfo font(getLayout().labelfont());
@@ -172,9 +173,6 @@ void InsetIPADeco::metrics(MetricsInfo & mi, Dimension & dim) const
                theFontMetrics(font).rectText(label, w, a, d);
                dim.des += int(d * 1.5);
        }
-
-       // cache the inset dimension
-       setDimCache(mi, dim);
 }
 
 
@@ -186,7 +184,7 @@ void InsetIPADeco::draw(PainterInfo & pi, int x, int y) const
        // draw the inset marker
        drawMarkers(pi, x, y);
 
-       Dimension const dim = Inset::dimension(*pi.base.bv);
+       Dimension const dim = dimension(*pi.base.bv);
 
        if (params_.type == InsetIPADecoParams::Toptiebar) {
                FontInfo font(getLayout().labelfont());
@@ -292,7 +290,7 @@ int InsetIPADeco::plaintext(odocstringstream & os,
        docstring result = ods.str();
        docstring const before = result.substr(0, h);
        docstring const after = result.substr(h, result.size());
-       
+
        if (params_.type == InsetIPADecoParams::Toptiebar) {
                os << before;
                os.put(0x0361);
@@ -412,7 +410,6 @@ void InsetIPAChar::metrics(MetricsInfo & mi, Dimension & dim) const
        }
        docstring ds(s.begin(), s.end());
        dim.wid = fm.width(ds);
-       setDimCache(mi, dim);
 }
 
 
@@ -596,7 +593,7 @@ void InsetIPAChar::toString(odocstream & os) const
 }
 
 
-void InsetIPAChar::forToc(docstring & os, size_t) const
+void InsetIPAChar::forOutliner(docstring & os, size_t const, bool const) const
 {
        odocstringstream ods;
        plaintext(ods, OutputParams(0));
@@ -620,16 +617,4 @@ void InsetIPAChar::validate(LaTeXFeatures & features) const
 }
 
 
-bool InsetIPAChar::isLetter() const
-{
-       return true;
-}
-
-
-bool InsetIPAChar::isLineSeparator() const
-{
-       return false;
-}
-
-
 } // namespace lyx