]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetListings.cpp
pimpl not needed here
[lyx.git] / src / insets / InsetListings.cpp
index b52e9fb9afa9b09b51ea23e7976bc20a88d4c060..268644a615b25eed27e6fdc0b0f01f0655c94621 100644 (file)
 #include "Language.h"
 #include "MetricsInfo.h"
 
+#include "support/docstream.h"
 #include "support/lstrings.h"
 
 #include <sstream>
 
+using std::istringstream;
+using std::ostream;
+using std::ostringstream;
+using std::string;
+
 namespace lyx {
 
 using support::token;
 using support::contains;
 using support::subst;
 
-using std::istringstream;
-using std::ostream;
-using std::ostringstream;
-using std::string;
-
 char const lstinline_delimiters[] =
        "!*()-=+|;:'\"`,<.>/?QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm";
 
-void InsetListings::init()
-{
-       setButtonLabel();
-       FontInfo font = sane_font;
-       font.decSize();
-       font.decSize();
-       font.setColor(Color_none);
-       setLabelFont(font);
-       // FIXME: what to do with those?
-       //text_.current_font.setLanguage(latex_language);
-       //text_.real_current_font.setLanguage(latex_language);
-}
-
-
 InsetListings::InsetListings(BufferParams const & bp, InsetListingsParams const & par)
        : InsetCollapsable(bp, par.status())
-{
-       setLayout(bp);
-       init();
-}
+{}
 
 
 InsetListings::InsetListings(InsetListings const & in)
        : InsetCollapsable(in), params_(in.params_)
-{
-       init();
-}
+{}
 
 
 Inset * InsetListings::clone() const
@@ -220,8 +202,7 @@ int InsetListings::latex(Buffer const & buf, odocstream & os,
                        os << from_utf8(param_string) << "]\n";
                }
                lines += 4;
-                os << code
-                   << "\n\\end{lstlisting}\n\\endgroup\n";
+               os << code << "\n\\end{lstlisting}\n\\endgroup\n";
                lines += 3;
        }
 
@@ -296,7 +277,7 @@ bool InsetListings::showInsetDialog(BufferView * bv) const
 
 
 docstring InsetListings::getCaption(Buffer const & buf,
-                   OutputParams const & runparams) const
+       OutputParams const & runparams) const
 {
        if (paragraphs().empty())
                return docstring();