Commit f8219950 authored by Kohei Yoshida's avatar Kohei Yoshida

We are supposed to use the foreground color for solid fill.

parent f7953a81
Pipeline #16914005 passed with stage
in 10 minutes and 7 seconds
......@@ -739,7 +739,8 @@ void styles_context::start_element(xmlns_id_t ns, xml_token_t name, const std::v
{
spreadsheet::color_elem_t red, green, blue;
func.get_background_color(red, green, blue);
mp_styles->set_fill_bg_color(255, red, green, blue);
mp_styles->set_fill_pattern_type(ORCUS_ASCII("solid"));
mp_styles->set_fill_fg_color(255, red, green, blue);
}
size_t fill_id = mp_styles->commit_fill();
......
......@@ -48,10 +48,11 @@ void test_odf_fill(orcus::spreadsheet::import_styles &styles)
std::cerr << std::hex << (int)fill;
const orcus::spreadsheet::fill_t* cell_fill = styles.get_fill(fill);
assert(cell_fill);
std::cerr << std::hex << (int)cell_fill->bg_color.red;
assert(cell_fill->bg_color.red == 0xfe);
assert(cell_fill->bg_color.green == 0xff);
assert(cell_fill->bg_color.blue == 0xcc);
std::cerr << std::hex << (int)cell_fill->fg_color.red;
assert(cell_fill->fg_color.red == 0xfe);
assert(cell_fill->fg_color.green == 0xff);
assert(cell_fill->fg_color.blue == 0xcc);
assert(cell_fill->pattern_type == "solid");
}
void test_odf_border(orcus::spreadsheet::import_styles &styles)
......
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