]> git.lyx.org Git - lyx.git/blobdiff - src/ParagraphParameters.C
Point fix, earlier forgotten
[lyx.git] / src / ParagraphParameters.C
index 6319f670054b10a555737573a681a571e99298e8..2557a743fcddd789391d3e4748d9960be0fab422 100644 (file)
@@ -1,3 +1,17 @@
+/**
+ * \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"
@@ -7,6 +21,7 @@
 
 #include "buffer.h"
 #include "BufferView.h"
+#include "Lsstream.h"
 #include "gettext.h"
 #include "paragraph.h"
 #include "lyxtext.h"
@@ -18,6 +33,8 @@
 
 #include <iostream>
 
+using namespace lyx::support;
+
 using std::ostream;
 
 // Initialize static member var.
@@ -418,9 +435,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);
 
@@ -439,9 +457,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"));
 }
 
@@ -469,7 +485,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());
 }