[gnumeric] ods: fix last fix.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] ods: fix last fix.
- Date: Fri, 27 Feb 2015 15:44:43 +0000 (UTC)
commit ebe2b8fd336029c37a7c7c69aa4926b9ba44212b
Author: Morten Welinder <terra gnome org>
Date: Fri Feb 27 10:44:05 2015 -0500
ods: fix last fix.
Our sheet objects are not derived from GOStyleObject.
plugins/openoffice/openoffice-read.c | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 0959b9e..401690a 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -9966,14 +9966,14 @@ odf_so_filled (GsfXMLIn *xin, xmlChar const **attrs, gboolean is_oval)
{
OOParseState *state = (OOParseState *)xin->user_state;
char const *style_name = NULL;
- GOStyle *style;
+ GOStyle *style0;
od_draw_frame_start (xin, attrs);
state->chart.so = g_object_new (GNM_SO_FILLED_TYPE,
"is-oval", is_oval, NULL);
- style = go_styled_object_get_style (GO_STYLED_OBJECT (state->chart.so));
- if (style != NULL) {
- style = go_style_dup (style);
+ g_object_get (state->chart.so, "style", &style0, NULL);
+ if (style0 != NULL) {
+ GOStyle *style = go_style_dup (style0);
if (state->default_style.graphics)
odf_apply_style_props
(xin, state->default_style.graphics->style_props,
@@ -9990,8 +9990,9 @@ odf_so_filled (GsfXMLIn *xin, xmlChar const **attrs, gboolean is_oval)
odf_apply_style_props (xin, oostyle->style_props,
style, FALSE);
}
- go_styled_object_set_style (GO_STYLED_OBJECT (state->chart.so), style);
+ g_object_set (state->chart.so, "style", style, NULL);
g_object_unref (style);
+ g_object_unref (style0);
}
}
@@ -10560,18 +10561,19 @@ odf_line (GsfXMLIn *xin, xmlChar const **attrs)
OOChartStyle *oostyle = g_hash_table_lookup
(state->chart.graph_styles, style_name);
if (oostyle != NULL) {
- GOStyle *style;
+ GOStyle *style0;
char const *start_marker = NULL;
char const *end_marker = NULL;
GSList *l;
- style = go_styled_object_get_style (GO_STYLED_OBJECT (state->chart.so));
- if (style != NULL) {
- style = go_style_dup (style);
+ g_object_get (state->chart.so, "style", &style0, NULL);
+ if (style0 != NULL) {
+ GOStyle *style = go_style_dup (style0);
odf_apply_style_props (xin, oostyle->style_props,
style, FALSE);
- go_styled_object_set_style (GO_STYLED_OBJECT (state->chart.so), style);
+ g_object_set (state->chart.so, "style", style, NULL);
g_object_unref (style);
+ g_object_unref (style0);
}
for (l = oostyle->other_props; l != NULL; l = l->next) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]