[gnumeric] Fix color export to .xls [#637658] and sheet objects alignment [#367769]
- From: Jean Bréfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Fix color export to .xls [#637658] and sheet objects alignment [#367769]
- Date: Sun, 26 Dec 2010 14:48:39 +0000 (UTC)
commit e51431807c8387cb87eef0e3c4d0cc6606251cdd
Author: Jean Brefort <jean brefort normalesup org>
Date: Sun Dec 26 15:49:32 2010 +0100
Fix color export to .xls [#637658] and sheet objects alignment [#367769]
ChangeLog | 5 +++++
NEWS | 2 ++
plugins/excel/ChangeLog | 5 +++++
plugins/excel/ms-chart.c | 8 ++++++--
src/sheet-control-gui.c | 7 ++++++-
5 files changed, 24 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index cb395fa..5a09ad6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-12-26 Jean Brefort <jean brefort normalesup org>
+
+ * src/sheet-control-gui.c (scg_scale_changed): reposition sheet objects to
+ avoid rounding errors related to the rounding of cells limits. [#637739]
+
2010-12-17 Andreas J. Guelzow <aguelzow pyrshep ca>
* src/stf-export.c (gnm_stf_export): make cppcheck happy
diff --git a/NEWS b/NEWS
index bf8a888..a8de1af 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,8 @@ Jean:
* Only disable the formula bar when a chart sheet is selected. [#636031]
* Make sheet objects invisible outline from .xls files persistent. [#637393]
* Fixed arrows and line object position when zoomed. [#637453]
+ * Fixed series lines color export to .xls. [#637658]
+ * Fixed sheet objects position on zoomed sheets. [#637739]
Morten:
* Fix array intersection problem with IF. [#633433]
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index b835302..5efbbc6 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,8 @@
+2010-12-26 Jean Brefort <jean brefort normalesup org>
+
+ * ms-chart.c (areaformat), (chart_write_LINEFORMAT): enhance color support.
+ [#637658]
+
2010-12-17 Andreas J. Guelzow <aguelzow pyrshep ca>
* ms-excel-read.c (excel_read_FONT): try to make cppcheck happy
diff --git a/plugins/excel/ms-chart.c b/plugins/excel/ms-chart.c
index 3f56079..56039a7 100644
--- a/plugins/excel/ms-chart.c
+++ b/plugins/excel/ms-chart.c
@@ -464,7 +464,6 @@ BC_R(areaformat)(XLChartHandler const *handle,
BC_R(get_style) (s);
if (pattern > 0) {
s->style->fill.type = GO_STYLE_FILL_PATTERN;
- s->style->fill.auto_back = auto_format;
s->style->fill.invert_if_negative = invert_if_negative;
s->style->fill.pattern.pattern = pattern - 1;
s->style->fill.pattern.fore = BC_R(color) (q->data+0, "AreaFore");
@@ -473,6 +472,11 @@ BC_R(areaformat)(XLChartHandler const *handle,
GOColor tmp = s->style->fill.pattern.fore;
s->style->fill.pattern.fore = s->style->fill.pattern.back;
s->style->fill.pattern.back = tmp;
+ s->style->fill.auto_fore = auto_format;
+ s->style->fill.auto_back = FALSE;
+ } else {
+ s->style->fill.auto_fore = FALSE;
+ s->style->fill.auto_back = auto_format;
}
} else if (auto_format) {
s->style->fill.type = GO_STYLE_FILL_PATTERN;
@@ -4066,7 +4070,7 @@ chart_write_LINEFORMAT (XLChartWriteState *s, GOStyleLine const *lstyle,
w = 2; /* wide */
/* seems that excel understand auto as solid, so if pattern is not solid
do not set the auto flag, see #605043 */
- flags |= (lstyle->auto_color && pat > 0)? 9: 8; /* docs only mention 1, but there is an 8 in there too */
+ flags |= (lstyle->auto_color && pat > 0)? 1: 0;
} else {
color_index = chart_write_color (s, data, 0);
if (clear_lines_for_null) {
diff --git a/src/sheet-control-gui.c b/src/sheet-control-gui.c
index a61044e..046936e 100644
--- a/src/sheet-control-gui.c
+++ b/src/sheet-control-gui.c
@@ -3492,11 +3492,13 @@ static void
scg_scale_changed (SheetControl *sc)
{
SheetControlGUI *scg = (SheetControlGUI *)sc;
+ Sheet *sheet = scg_sheet (scg);
double z;
+ GSList *ptr;
g_return_if_fail (IS_SHEET_CONTROL_GUI (scg));
- z = scg_sheet (scg)->last_zoom_factor_used;
+ z = sheet->last_zoom_factor_used;
SCG_FOREACH_PANE (scg, pane, {
if (pane->col.canvas != NULL)
@@ -3509,6 +3511,9 @@ scg_scale_changed (SheetControl *sc)
scg_resize (scg, TRUE);
set_resize_pane_pos (scg, scg->vpane);
set_resize_pane_pos (scg, scg->hpane);
+ /* now, update sheet objects positions and sizes */
+ for (ptr = sheet->sheet_objects; ptr; ptr = ptr->next)
+ sheet_object_update_bounds (SHEET_OBJECT (ptr->data), NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]