]> git.lyx.org Git - lyx.git/blobdiff - src/counters.C
"Inter-word Space"
[lyx.git] / src / counters.C
index 8203a98ceaec6583467fdeae9b4404d1c6af576a..094dcd8bf7937e856de8730a8b1c33ab5186aaa9 100644 (file)
@@ -9,14 +9,11 @@
  *
  * ====================================================== */
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
 #include <config.h>
 
 #include "counters.h"
 #include "debug.h"
+#include "Lsstream.h"
 
 #include "support/lstrings.h"
 #include "support/LAssert.h"
@@ -261,11 +258,11 @@ string Counters::labelItem(string const & ctr,
        CounterList::iterator it = counterList.find(ctr);
        if (it == counterList.end()) {
                lyxerr << "Counter does not exist." << endl;
-               return "";
+               return string();
        }
 
        if (!first) {
-               s << "." << value(ctr);
+               s << '.' << value(ctr);
        } else {
                if (numbertype == "sectioning" || numbertype == "appendix") {
                        if (numbertype == "appendix") {
@@ -278,7 +275,8 @@ string Counters::labelItem(string const & ctr,
                }
                s << o.str();
        }
-       return s.str();
+
+       return STRCONV(s.str());
 }
 
 
@@ -287,7 +285,8 @@ string Counters::numberLabel(string const & ctr,
                             string const & langtype,
                             int head)
 {
-       ostringstream s, o;
+       ostringstream s;
+
        if (numbertype == "sectioning" || numbertype == "appendix") {
                if (ctr == "chapter" && head == 0) {
                        s << labelItem("chapter", numbertype, langtype, true);
@@ -340,5 +339,6 @@ string Counters::numberLabel(string const & ctr,
                        s << eiv.str();
                }
        }
-       return s.str();
+
+       return STRCONV(s.str());
 }