]> git.lyx.org Git - lyx.git/blobdiff - src/ParagraphParameters.C
Point fix, earlier forgotten
[lyx.git] / src / ParagraphParameters.C
index 70b002cfe630b052c48feeaf17a06c76b439beaa..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"
 
 #include "buffer.h"
 #include "BufferView.h"
+#include "Lsstream.h"
 #include "gettext.h"
 #include "paragraph.h"
 #include "lyxtext.h"
+#include "Lsstream.h"
+
 #include "frontends/LyXView.h"
 
 #include "support/lstrings.h"
 
 #include <iostream>
 
+using namespace lyx::support;
+
 using std::ostream;
 
 // Initialize static member var.
@@ -416,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);
 
@@ -426,8 +446,7 @@ void setParagraphParams(BufferView & bv, string const & data)
        params.read(lex);
 
        LyXText * text = bv.getLyXText();
-       text->setParagraph(&bv,
-                          params.lineTop(),
+       text->setParagraph(params.lineTop(),
                           params.lineBottom(),
                           params.pagebreakTop(),
                           params.pagebreakBottom(),
@@ -438,14 +457,7 @@ void setParagraphParams(BufferView & bv, string const & data)
                           params.labelWidthString(),
                           params.noindent());
 
-       // Actually apply these settings
-       bv.update(text,
-                 BufferView::SELECT |
-                 BufferView::FITCUR |
-                 BufferView::CHANGE);
-
-       bv.buffer()->markDirty();
-
+       bv.update();
        bv.owner()->message(_("Paragraph layout set"));
 }
 
@@ -473,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());
 }