-// -*- C++ -*-
/**
* \file ControlParagraph.C
* This file is part of LyX, the document processor.
* \author Edwin Leuven
* \author Angus Leeming
*
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
*/
#include <config.h>
#include "ButtonController.h"
#include "funcrequest.h"
#include "lyxlex.h"
+#include "paragraph.h"
#include "ParagraphParameters.h"
-#include "support/LAssert.h"
-#include "Lsstream.h"
+#include <sstream>
+
+using std::istringstream;
+using std::ostringstream;
+using std::string;
+
+namespace lyx {
+namespace frontend {
ControlParagraph::ControlParagraph(Dialog & parent)
: Dialog::Controller(parent), ininset_(false)
lex.next();
bool const accept = lex.getBool();
action = accept ? 1 : 2;
- } else {
+ } else if (!token.empty()) {
// Unrecognised token
return false;
}
lex.next();
string const token = lex.getString();
+ if (token.empty())
+ continue;
+
int Int = 0;
if (token == "\\alignpossible" ||
token == "\\aligndefault" ||
ininset_ = Int;
}
}
- if (nset != 3)
+ if (nset != 3) {
return false;
+ }
// If "update", then set the activation status of the button controller
if (action > 0) {
ParagraphParameters & ControlParagraph::params()
{
- lyx::Assert(params_.get());
+ BOOST_ASSERT(params_.get());
return *params_;
}
ParagraphParameters const & ControlParagraph::params() const
{
- lyx::Assert(params_.get());
+ BOOST_ASSERT(params_.get());
return *params_;
}
{
return aligndefault_;
}
+
+} // namespace frontend
+} // namespace lyx