]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetVSpace.cpp
Change string
[lyx.git] / src / insets / InsetVSpace.cpp
index b35a46cfc054f072e6a674dc052d6abe96f88d38..42daae26750f32bfddb0eae6ca816beef3bd131f 100644 (file)
 
 #include "Buffer.h"
 #include "Cursor.h"
+#include "Dimension.h"
 #include "DispatchResult.h"
 #include "FuncRequest.h"
-#include "gettext.h"
+#include "support/gettext.h"
 #include "Lexer.h"
 #include "Text.h"
 #include "MetricsInfo.h"
 
 #include <sstream>
 
+using namespace std;
 
 namespace lyx {
 
-using std::istringstream;
-using std::ostream;
-using std::ostringstream;
-using std::string;
-using std::max;
-
-
 namespace {
 
 int const ADD_TO_VSPACE_WIDTH = 5;
@@ -56,12 +51,6 @@ InsetVSpace::~InsetVSpace()
 }
 
 
-Inset * InsetVSpace::clone() const
-{
-       return new InsetVSpace(*this);
-}
-
-
 void InsetVSpace::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
        switch (cmd.action) {
@@ -83,7 +72,7 @@ void InsetVSpace::doDispatch(Cursor & cur, FuncRequest & cmd)
 }
 
 
-void InsetVSpace::read(Buffer const &, Lexer & lex)
+void InsetVSpace::read(Lexer & lex)
 {
        BOOST_ASSERT(lex.isOK());
        string vsp;
@@ -99,7 +88,7 @@ void InsetVSpace::read(Buffer const &, Lexer & lex)
 }
 
 
-void InsetVSpace::write(Buffer const &, ostream & os) const
+void InsetVSpace::write(ostream & os) const
 {
        os << "VSpace " << space_.asLyXCommand();
 }
@@ -123,7 +112,7 @@ void InsetVSpace::metrics(MetricsInfo & mi, Dimension & dim) const
        if (space_.length().len().value() >= 0.0)
                height = max(height, space_.inPixels(*mi.base.bv));
 
-       Font font;
+       FontInfo font;
        font.decSize();
        font.decSize();
 
@@ -175,7 +164,7 @@ void InsetVSpace::draw(PainterInfo & pi, int x, int y) const
        int a = 0;
        int d = 0;
 
-       Font font;
+       FontInfo font;
        font.setColor(Color_added_space);
        font.decSize();
        font.decSize();
@@ -199,24 +188,21 @@ void InsetVSpace::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-int InsetVSpace::latex(Buffer const & buf, odocstream & os,
-                      OutputParams const &) const
+int InsetVSpace::latex(odocstream & os, OutputParams const &) const
 {
-       os << from_ascii(space_.asLatexCommand(buf.params())) << '\n';
+       os << from_ascii(space_.asLatexCommand(buffer().params())) << '\n';
        return 1;
 }
 
 
-int InsetVSpace::plaintext(Buffer const &, odocstream & os,
-                          OutputParams const &) const
+int InsetVSpace::plaintext(odocstream & os, OutputParams const &) const
 {
        os << "\n\n";
        return PLAINTEXT_NEWLINE;
 }
 
 
-int InsetVSpace::docbook(Buffer const &, odocstream & os,
-                        OutputParams const &) const
+int InsetVSpace::docbook(odocstream & os, OutputParams const &) const
 {
        os << '\n';
        return 1;