]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetspace.C
* src/LyXAction.C: mark goto-clear-bookmark as working without buffer
[lyx.git] / src / insets / insetspace.C
index e41017b33c01c085512ef98e494c6f3e65202c2f..e7fc211fe57e58039ea77110956403a6d02baea1 100644 (file)
@@ -25,7 +25,7 @@
 #include "frontends/Painter.h"
 
 
-using lyx::odocstream;
+namespace lyx {
 
 using std::string;
 using std::max;
@@ -48,9 +48,9 @@ InsetSpace::Kind InsetSpace::kind() const
 }
 
 
-void InsetSpace::metrics(MetricsInfo & mi, Dimension & dim) const
+bool InsetSpace::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       lyx::frontend::FontMetrics const & fm =
+       frontend::FontMetrics const & fm =
                theFontMetrics(mi.base.font);
        dim.asc = fm.maxAscent();
        dim.des = fm.maxDescent();
@@ -58,11 +58,11 @@ void InsetSpace::metrics(MetricsInfo & mi, Dimension & dim) const
        switch (kind_) {
                case THIN:
                case NEGTHIN:
-                    dim.wid = fm.width(lyx::char_type('x')) / 3;
+                    dim.wid = fm.width(char_type('x')) / 3;
                        break;
                case PROTECTED:
                case NORMAL:
-                    dim.wid = fm.width(lyx::char_type('x'));
+                    dim.wid = fm.width(char_type('x'));
                        break;
                case QUAD:
                        dim.wid = 20;
@@ -75,7 +75,9 @@ void InsetSpace::metrics(MetricsInfo & mi, Dimension & dim) const
                        dim.wid = 10;
                        break;
        }
+       bool const changed = dim_ != dim;
        dim_ = dim;
+       return changed;
 }
 
 
@@ -216,7 +218,7 @@ int InsetSpace::plaintext(Buffer const &, odocstream & os,
 }
 
 
-int InsetSpace::docbook(Buffer const &, ostream & os,
+int InsetSpace::docbook(Buffer const &, odocstream & os,
                        OutputParams const &) const
 {
        switch (kind_) {
@@ -264,3 +266,6 @@ bool InsetSpace::isSpace() const
 {
        return true;
 }
+
+
+} // namespace lyx