/**
* \file ControlPreamble.C
- * See the file COPYING.
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
*
* \author Edwin Leuven
*
#include <config.h>
-#ifdef __GNUG__
-#pragma implementation
-#endif
#include "ControlPreamble.h"
#include "buffer.h"
#include "gettext.h"
-#include "frontends/Liason.h"
+#include "frontends/LyXView.h"
ControlPreamble::ControlPreamble(LyXView & lv, Dialogs & d)
- : ControlDialogBD(lv, d),
- params_(0)
+ : ControlDialogBD(lv, d)
{}
buffer()->params.preamble = params();
buffer()->markDirty();
- Liason::setMinibuffer(&lv_, _("LaTeX preamble set"));
+ lv_.message(_("LaTeX preamble set"));
}
-string & ControlPreamble::params() const
+string const & ControlPreamble::params() const
{
- lyx::Assert(params_);
- return *params_;
+ return params_;
+}
+
+
+void ControlPreamble::params(string const & newparams)
+{
+ params_ = newparams;
}
void ControlPreamble::setParams()
{
- delete params_;
- params_ = new string(buffer()->params.preamble);
+ params_ = buffer()->params.preamble;
}
void ControlPreamble::clearParams()
{
- delete params_;
- params_ = 0;
+ params_.erase();
}