]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathMacroArgument.cpp
Do some caching of window title and related UI
[lyx.git] / src / mathed / MathMacroArgument.cpp
index ebf2ee615e969a08b80ccc56f23ee144fb388e22..2e6b0e2275e46bd49a531c99528335790a55be79 100644 (file)
@@ -4,7 +4,7 @@
  * Licence details can be found in the file COPYING.
  *
  * \author Alejandro Aguilar Sierra
- * \author André Pönitz
+ * \author André Pönitz
  *
  * Full author contact details are available in file CREDITS.
  */
 #include "MathStream.h"
 #include "MathSupport.h"
 
-#include "debug.h"
+#include "support/debug.h"
 
 
 namespace lyx {
 
-using std::endl;
-using std::size_t;
-
-
-MathMacroArgument::MathMacroArgument(size_t n)
+MathMacroArgument::MathMacroArgument(int n)
        : number_(n)
 {
        if (n < 1 || n > 9) {
-               lyxerr << "MathMacroArgument::MathMacroArgument: wrong Argument id: "
-                       << n << endl;
+               LYXERR0("MathMacroArgument::MathMacroArgument: wrong Argument id: " << n);
        }
 
        // The profiler tells us not to use
@@ -48,11 +43,10 @@ Inset * MathMacroArgument::clone() const
 }
 
 
-void MathMacroArgument::setNumber(std::size_t n)
+void MathMacroArgument::setNumber(int n)
 {
        if (n < 1 || n > 9) {
-               lyxerr << "MathMacroArgument::setNumber: wrong Argument id: "
-               << n << endl;
+               LYXERR0("MathMacroArgument::setNumber: wrong Argument id: " << n);
        }
 
        number_ = n;
@@ -68,7 +62,7 @@ void MathMacroArgument::write(WriteStream & os) const
 
 void MathMacroArgument::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       mathed_string_dim(mi.base.font, str_, dim);
+       metricsStrRedBlack(mi, dim, str_);
 }