Kaydet (Commit) bf8279d8 authored tarafından Markus Mohrhard's avatar Markus Mohrhard Kaydeden (comit) Markus Mohrhard

import font underline

Change-Id: I4857d9d49b9f6ef1b92a1d5f61f9f9e852620949
üst 0bd4408a
......@@ -14,6 +14,7 @@
#include "documentimport.hxx"
#include <tools/color.hxx>
#include <tools/fontenum.hxx>
#include "sharedformulagroups.hxx"
......@@ -170,6 +171,7 @@ private:
OUString maName;
double mnSize;
Color maColor;
FontUnderline meUnderline;
font();
......
......@@ -24,6 +24,7 @@
#include <editeng/postitem.hxx>
#include <editeng/wghtitem.hxx>
#include <editeng/colritem.hxx>
#include <editeng/udlnitem.hxx>
#include <formula/token.hxx>
#include <tools/datetime.hxx>
......@@ -485,7 +486,8 @@ ScOrcusStyles::ScOrcusStyles(ScDocument& rDoc):
ScOrcusStyles::font::font():
mbBold(false),
mbItalic(false),
mnSize(10)
mnSize(10),
meUnderline(UNDERLINE_NONE)
{
}
......@@ -498,6 +500,7 @@ void ScOrcusStyles::font::applyToItemSet(SfxItemSet& rSet) const
rSet.Put(SvxWeightItem(eWeight, ATTR_FONT_WEIGHT));
rSet.Put(SvxColorItem(maColor, ATTR_FONT_COLOR));
rSet.Put(SvxUnderlineItem(meUnderline, ATTR_FONT_UNDERLINE));
}
ScOrcusStyles::protection::protection():
......@@ -593,8 +596,22 @@ void ScOrcusStyles::set_font_size(double point)
maCurrentFont.mnSize = point;
}
void ScOrcusStyles::set_font_underline(orcus::spreadsheet::underline_t /*e*/)
void ScOrcusStyles::set_font_underline(orcus::spreadsheet::underline_t e)
{
switch(e)
{
case orcus::spreadsheet::underline_single:
case orcus::spreadsheet::underline_single_accounting:
maCurrentFont.meUnderline = UNDERLINE_SINGLE;
break;
case orcus::spreadsheet::underline_double:
case orcus::spreadsheet::underline_double_accounting:
maCurrentFont.meUnderline = UNDERLINE_DOUBLE;
break;
case orcus::spreadsheet::underline_none:
maCurrentFont.meUnderline = UNDERLINE_NONE;
break;
}
}
void ScOrcusStyles::set_font_color(orcus::spreadsheet::color_elem_t alpha,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment