-/* This file is part of
- * ======================================================
+/**
+ * \file insetnote.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
*
- * LyX, The Document Processor
+ * \author Angus Leeming
*
- * Copyright 1998 The LyX Team.
- *
- * ======================================================
+ * Full author contact details are available in file CREDITS
*/
#include <config.h>
-#ifdef __GNUG__
-#pragma implementation
-#endif
#include "insetnote.h"
#include "gettext.h"
{
LyXFont font(LyXFont::ALL_SANE);
font.decSize();
+ font.decSize();
font.setColor(LColor::note);
setLabelFont(font);
setBackgroundColor(LColor::notebg);
}
-// This constructor is used for reading old InsetInfo
-InsetNote::InsetNote(Buffer const * buf, string const & contents,
- bool collapsed)
- : InsetCollapsable(buf->params, collapsed)
-{
- init();
-
- Paragraph * par = inset.paragraph();
- LyXFont font(LyXFont::ALL_INHERIT, buf->params.language);
-
- // Since XForms doesn't support RTL, we can assume that old notes
- // in RTL documents are written in English.
- if (font.language()->RightToLeft())
- font.setLanguage(default_language);
-
- lyx::pos_type pos = 0;
- buf->insertStringAsLines(par, pos, font, strip(contents, "\n"));
-}
-
-
string const InsetNote::editMessage() const
{
return _("Opened Note Inset");
}
-void InsetNote::write(Buffer const *buf, ostream & os) const
+void InsetNote::write(Buffer const * buf, ostream & os) const
{
os << getInsetName() << "\n";
InsetCollapsable::write(buf, os);