]> git.lyx.org Git - lyx.git/blobdiff - src/ParagraphParameters.C
get rid of MSVC warning (signed/unsigned comparison)
[lyx.git] / src / ParagraphParameters.C
index b9eaca3712199b12c8d460e4563e20f61bb6b92a..0ac99a7850f501428d2a71d8ce868acc8155b094 100644 (file)
@@ -17,7 +17,6 @@
 #include "ParagraphParameters.h"
 
 #include "buffer.h"
-#include "BufferView.h"
 #include "gettext.h"
 #include "lyxlayout.h"
 #include "lyxlex.h"
 
 #include <sstream>
 
-using lyx::support::rtrim;
+namespace lyx {
+
+using support::rtrim;
 
 using std::istringstream;
 using std::ostream;
 using std::ostringstream;
 using std::string;
 
-// anonym namespace
-namespace {
-int findToken(char const * const str[], string const & search_token)
+
+static int findToken(char const * const str[], string const & search_token)
 {
        return search_token == "default" ?
                0 :
-               lyx::support::findToken(str, search_token);
-}
-
+               support::findToken(str, search_token);
 }
 
 
@@ -61,7 +59,7 @@ void ParagraphParameters::clear()
 }
 
 
-ParagraphParameters::depth_type ParagraphParameters::depth() const
+depth_type ParagraphParameters::depth() const
 {
        return depth_;
 }
@@ -142,25 +140,25 @@ void ParagraphParameters::appendix(bool a)
 }
 
 
-string const & ParagraphParameters::labelString() const
+docstring const & ParagraphParameters::labelString() const
 {
        return labelstring_;
 }
 
 
-void ParagraphParameters::labelString(string const & ls)
+void ParagraphParameters::labelString(docstring const & ls)
 {
        labelstring_ = ls;
 }
 
 
-string const & ParagraphParameters::labelWidthString() const
+docstring const & ParagraphParameters::labelWidthString() const
 {
        return labelwidthstring_;
 }
 
 
-void ParagraphParameters::labelWidthString(string const & lws)
+void ParagraphParameters::labelWidthString(docstring const & lws)
 {
        labelwidthstring_ = lws;
 }
@@ -224,7 +222,7 @@ void ParagraphParameters::read(LyXLex & lex)
                        align(LyXAlignment(1 << tmpret));
                } else if (token == "\\labelwidthstring") {
                        lex.eatLine();
-                       labelWidthString(lex.getString());
+                       labelWidthString(lex.getDocString());
                } else {
                        lex.pushToken(token);
                        break;
@@ -241,7 +239,7 @@ void ParagraphParameters::write(ostream & os) const
        // The labelwidth string used in lists.
        if (!labelWidthString().empty())
                os << "\\labelwidthstring "
-                  << labelWidthString() << '\n';
+                  << to_utf8(labelWidthString()) << '\n';
 
        // Start of appendix?
        if (startOfAppendix())
@@ -314,3 +312,6 @@ bool operator==(ParagraphParameeters const & ps1,
                && ps1.leftindent == ps2.leftindent;
 }
 */
+
+
+} // namespace lyx