+/**
+ * \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 "Lsstream.h"
#include "frontends/LyXView.h"
#include "support/lstrings.h"
-#include <iostream>
+
+using namespace lyx::support;
using std::ostream;
}
+
void setParagraphParams(BufferView & bv, string const & data)
{
- istringstream is(data);
+ istringstream is(STRCONV(data));
LyXLex lex(0,0);
lex.setStream(is);
params.labelWidthString(),
params.noindent());
- // Actually apply these settings
- bv.update(text, BufferView::SELECT);
-
+ bv.update();
bv.owner()->message(_("Paragraph layout set"));
}
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());
}