diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 5c0a4d4..d061782 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -7213,6 +7213,14 @@ od_style_prop_chart (GsfXMLIn *xin, xmlChar const **attrs)
 			style->other_props = g_slist_prepend
 				(style->other_props,
 				 oo_prop_new_int ("dims", tmp));
+#if HAVE_OO_NS_LOCALC_EXT
+		else if (oo_attr_int_range (xin, attrs, OO_NS_LOCALC_EXT,
+					      "regression-max-degree", &tmp,
+					      1, 100))
+			style->other_props = g_slist_prepend
+				(style->other_props,
+				 oo_prop_new_int ("dims", tmp));
+#endif
 		else if (oo_attr_bool (xin, attrs, OO_GNUM_NS_EXT, "regression-affine",
 				       &btmp))
 			style->other_props = g_slist_prepend (style->other_props,
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 750225e..fde2f19 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -8129,6 +8129,8 @@ odf_write_lin_reg (GnmOOExport *state, G_GNUC_UNUSED GOStyle const *style,
 					  "affine", GNMSTYLE "regression-affine");
 		odf_write_plot_style_uint (state->xml, obj,
 					  "dims", GNMSTYLE "regression-polynomial-dims");
+		odf_write_plot_style_uint (state->xml, obj,
+					  "dims", LOEXT "regression-max-degree");		
 	}
 	odf_write_reg_name (state, obj);
 }
@@ -8142,6 +8144,8 @@ odf_write_polynom_reg (GnmOOExport *state, G_GNUC_UNUSED GOStyle const *style,
 				      GNMSTYLE "polynomial");
 		odf_write_plot_style_uint (state->xml, obj,
 					  "dims", GNMSTYLE "regression-polynomial-dims");
+		odf_write_plot_style_uint (state->xml, obj,
+					  "dims", LOEXT "regression-max-degree");		
 		odf_write_plot_style_bool (state->xml, obj,
 					  "affine", GNMSTYLE "regression-affine");
 	}
