[gnumeric] xlsx: improve pattern roundtrip.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] xlsx: improve pattern roundtrip.
- Date: Mon, 24 Feb 2014 20:49:49 +0000 (UTC)
commit b83d5d8b3994454dfa84a5a199965fd3a15df835
Author: Morten Welinder <terra gnome org>
Date: Mon Feb 24 15:49:10 2014 -0500
xlsx: improve pattern roundtrip.
Map non-Excel patterns consistent with what we do in xls.
plugins/excel/xlsx-write.c | 15 +++++++++++----
test/t6502-styles.pl | 3 +--
2 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/plugins/excel/xlsx-write.c b/plugins/excel/xlsx-write.c
index 8cf3744..b7a79b7 100644
--- a/plugins/excel/xlsx-write.c
+++ b/plugins/excel/xlsx-write.c
@@ -185,7 +185,7 @@ xlsx_add_pt (GsfXMLOut *xml, char const *id, double l)
#define N_PREDEFINED_FILLS (G_N_ELEMENTS (pre_def_fills) - 1)
-static char const *pats[] = {
+static char const * const pats[] = {
"solid", /* 1 */
"darkGray", /* 2 */
"mediumGray", /* 3 */
@@ -204,9 +204,16 @@ static char const *pats[] = {
"lightUp", /* 16 */
"lightGrid", /* 17 */
"lightTrellis", /* 18 */
+ /* Not in Excel */
+ "lightVertical", /* 19 */
+ "darkHorizontal", /* 20 */
+ "lightGray", /* 21 */
+ "lightGray", /* 22 */
+ "darkGray", /* 23 */
+ "solid", /* 24 */
};
-static char const *pre_def_fills[] = {
+static char const * const pre_def_fills[] = {
"none",
"gray125",
NULL
@@ -215,7 +222,7 @@ static char const *pre_def_fills[] = {
static void
xlsx_write_predefined_fills (GsfXMLOut *xml)
{
- char const **f = pre_def_fills;
+ char const * const *f = pre_def_fills;
while (*f != NULL) {
gsf_xml_out_start_element (xml, "fill");
@@ -534,7 +541,7 @@ xlsx_write_fonts (XLSXWriteState *state, GsfXMLOut *xml)
}
static gint
-xlsx_find_fill (GnmStyle const *style, GPtrArray *styles)
+xlsx_find_fill (GnmStyle const *style, GPtrArray *styles)
{
unsigned i;
int j;
diff --git a/test/t6502-styles.pl b/test/t6502-styles.pl
index 2475e7d..211cdd7 100755
--- a/test/t6502-styles.pl
+++ b/test/t6502-styles.pl
@@ -48,5 +48,4 @@ my $xls_pattern_filter = "$PERL -p -e 'use English; my \%m=(19,14,20,7,21,4,22,4
'format' => 'Gnumeric_Excel:xlsx',
'ext' => "xlsx",
'resize' => '1048576x16384',
- 'filter1' => $xls_pattern_filter,
- 'ignore_failure' => 1);
+ 'filter1' => $xls_pattern_filter);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]