]> git.lyx.org Git - features.git/blobdiff - src/frontends/xforms/FormMathsMatrix.C
change "support/std_sstream.h" to <sstream>
[features.git] / src / frontends / xforms / FormMathsMatrix.C
index ad88e0c19423244a2a697a540174013f674cb1d2..6e02d401479151e61a84c46f7d848e89f116d105 100644 (file)
 
 #include "controllers/ButtonController.h"
 
-#include "support/LAssert.h"
 #include "support/lyxalgo.h" // lyx::count
 
 #include "lyx_forms.h"
 
-#include "support/std_sstream.h"
+#include <sstream>
 
-using namespace lyx::support;
+
+using std::ostringstream;
 
 #ifndef CXX_GLOBAL_CSTD
 using std::strlen;
 #endif
 
+namespace lyx {
+namespace frontend {
 
-static char h_align_str[80] = "c";
-static char v_align_c[] = "tcb";
-
+namespace {
 
-extern "C" {
+char h_align_str[80] = "c";
+char v_align_c[] = "tcb";
 
-       static
-       int C_FormMathsMatrixAlignFilter(FL_OBJECT * ob, char const *,
-                                        char const * cur, int c)
-       {
-               Assert(ob);
-               FormMathsMatrix * pre =
-                       static_cast<FormMathsMatrix *>(ob->u_vdata);
-               Assert(pre);
-               return pre->AlignFilter(cur, c);
-       }
 
+extern "C"
+int C_FormMathsMatrixAlignFilter(FL_OBJECT * ob, char const *,
+                                char const * cur, int c)
+{
+       BOOST_ASSERT(ob);
+       FormMathsMatrix * pre =
+               static_cast<FormMathsMatrix *>(ob->u_vdata);
+       BOOST_ASSERT(pre);
+       return pre->AlignFilter(cur, c);
 }
 
+} // namespace anon
+
 
 typedef FormController<ControlMath, FormView<FD_maths_matrix> > base_class;
 
@@ -95,7 +97,7 @@ void FormMathsMatrix::apply()
 
        ostringstream os;
        os << nx << ' ' << ny << ' ' << c << ' ' << sh;
-       controller().dispatchMatrix(STRCONV(os.str()));
+       controller().dispatchMatrix(os.str());
 }
 
 
@@ -128,7 +130,7 @@ int FormMathsMatrix::AlignFilter(char const * cur, int c)
 
        int const n = int(fl_get_slider_value(dialog_->slider_columns) + 0.5)
                - int(len)
-               + int(lyx::count(cur, cur + len, '|'));
+               + int(count(cur, cur + len, '|'));
        if (n < 0)
                return FL_INVALID;
 
@@ -137,3 +139,6 @@ int FormMathsMatrix::AlignFilter(char const * cur, int c)
 
        return FL_INVALID;
 }
+
+} // namespace frontend
+} // namespace lyx