]> git.lyx.org Git - features.git/blobdiff - src/ParagraphParameters.C
Replace LString.h with support/std_string.h,
[features.git] / src / ParagraphParameters.C
index aca07b6b949e82f6cd67c0eeb0a44fe6801e52c3..a3ef977cb497a1902d61cced413fefa708ad5d7f 100644 (file)
@@ -1,20 +1,35 @@
+/**
+ * \file ParagraphParameters.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Lars Gullik Bjønnes
+ * \author Angus Leeming
+ * \author John Levon
+ * \author André Pönitz
+ * \author Jürgen Vigna
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
 #include <config.h>
 
 #include "ParagraphParameters.h"
-#include "ParameterStruct.h"
 #include "tex-strings.h"
 #include "lyxlex.h"
 
 #include "buffer.h"
 #include "BufferView.h"
+#include "support/std_sstream.h"
 #include "gettext.h"
-#include "paragraph.h"
 #include "lyxtext.h"
+
 #include "frontends/LyXView.h"
 
 #include "support/lstrings.h"
 
-#include <iostream>
+
+using namespace lyx::support;
 
 using std::ostream;
 
@@ -416,9 +431,10 @@ void ParagraphParameters::write(ostream & os) const
 }
 
 
+
 void setParagraphParams(BufferView & bv, string const & data)
 {
-       istringstream is(data);
+       istringstream is(STRCONV(data));
        LyXLex lex(0,0);
        lex.setStream(is);
 
@@ -437,9 +453,7 @@ void setParagraphParams(BufferView & bv, string const & data)
                           params.labelWidthString(),
                           params.noindent());
 
-       // Actually apply these settings
-       bv.update(text, BufferView::SELECT);
-
+       bv.update();
        bv.owner()->message(_("Paragraph layout set"));
 }
 
@@ -467,7 +481,7 @@ void params2string(Paragraph const & par, string & data)
        os << "\\aligndefault " << layout->align << '\n';
 
        /// is paragraph in inset
-       os << "\\ininset " << par.inInset() << '\n';
+       os << "\\ininset " << (par.inInset()?1:0) << '\n';
 
-       data = os.str();
+       data = STRCONV(os.str());
 }