+/**
+ * \file metricsinfo.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author André Pönitz
+ *
+ * Full author contact details are available in file CREDITS.
+ */
#include <config.h>
#include "metricsinfo.h"
#include "mathed/math_support.h"
#include "frontends/Painter.h"
-#include "debug.h"
#include "BufferView.h"
+#include "LColor.h"
+using std::string;
MetricsBase::MetricsBase()
{
save_ = mb;
mb.fontname = name;
+ mb.font = LyXFont();
augmentFont(mb.font, name);
}
+
FontSetChanger::~FontSetChanger()
{
orig_ = save_;
: Changer<MetricsBase>(mb)
{
save_ = mb;
- mb.textwidth = w;
+ mb.textwidth = w;
}
{
orig_ = save_;
}
+
+
+
+
+ColorChanger::ColorChanger(LyXFont & font, string const & color)
+ : Changer<LyXFont, string>(font)
+{
+ save_ = lcolor.getFromLyXName(color);
+ font.setColor(lcolor.getFromLyXName(color));
+}
+
+
+ColorChanger::~ColorChanger()
+{
+ orig_.setColor(lcolor.getFromLyXName(save_));
+}