]> git.lyx.org Git - lyx.git/blobdiff - src/counters.C
Change to use preffered calling of Boost.Function
[lyx.git] / src / counters.C
index b794679ffe6f1b5cd91cceffccb12c714a3bcab2..657c28e2251f87946798b47d8a61ec11d7e2f799 100644 (file)
 #include "debug.h"
 
 #include "support/lstrings.h"
-#include "support/std_sstream.h"
 #include "support/tostr.h"
 
 #include <boost/assert.hpp>
 
+#include <sstream>
+
 using std::endl;
 using std::ostringstream;
+using std::string;
 
 
 Counter::Counter()
@@ -198,7 +200,7 @@ namespace {
 
 char loweralphaCounter(int n)
 {
-       if (n < 1 || n > 26) 
+       if (n < 1 || n > 26)
                return '?';
        return 'a' + n - 1;
 }
@@ -288,6 +290,10 @@ string Counters::counterLabel(string const & format)
 {
        string label = format;
        while (true) {
+#ifdef WITH_WARNINGS
+#warning Using boost::regex would make this code a lot simpler... (Lgb)
+#endif
+
                size_t const i = label.find('\\', 0);
                if (i == string::npos)
                        break;
@@ -333,5 +339,5 @@ string Counters::enumLabel(string const & ctr, string const & langtype)
                        os << alphaCounter(value("enumiv")) << '.';
        }
 
-       return STRCONV(os.str());
+       return os.str();
 }