[gnumeric] Fix diagonal borders in ODF export/import



commit 548d974351ed116d903e1f15c93da69b83429da4
Author: Andreas J. Guelzow <aguelzow opteron2 lab math concordia ab ca>
Date:   Thu Sep 24 13:08:59 2009 -0600

    Fix diagonal borders in ODF export/import
    
    2009-09-24  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* openoffice-read.c (oo_style_prop_cell): fix diagonal borders
    	* openoffice-write.c (odf_write_style_cell_properties): ditto

 NEWS                                  |    1 +
 plugins/openoffice/ChangeLog          |    5 +++++
 plugins/openoffice/openoffice-read.c  |    8 ++++----
 plugins/openoffice/openoffice-write.c |    4 ++--
 4 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/NEWS b/NEWS
index dbc84fd..257c2fa 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ Albert Gräf:
 Andreas:
 	* Add more ODF elements on ODF read. [#595750]
 	* Fix 2-factor ANOVA with replication
+	* Fix diagonal borders in ODF export/import
 
 Jean:
 	* Make plugins GUI labels translatable. [#159806]
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index f400c69..b6212c1 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,8 @@
+2009-09-24  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* openoffice-read.c (oo_style_prop_cell): fix diagonal borders
+	* openoffice-write.c (odf_write_style_cell_properties): ditto
+
 2009-09-22  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* openoffice-read.c (opendoc_content_dtd): add element stubs
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 545c186..2c8687c 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -2508,9 +2508,9 @@ oo_style_prop_cell (GsfXMLIn *xin, xmlChar const **attrs)
 			oo_parse_border (xin, style, attrs[1], MSTYLE_BORDER_RIGHT);
 			oo_parse_border (xin, style, attrs[1], MSTYLE_BORDER_TOP);
 		} else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_STYLE, "diagonal-bl-tr"))
-			oo_parse_border (xin, style, attrs[1], MSTYLE_BORDER_REV_DIAGONAL);
-		else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_STYLE, "diagonal-tl-br"))
 			oo_parse_border (xin, style, attrs[1], MSTYLE_BORDER_DIAGONAL);
+		else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_STYLE, "diagonal-tl-br"))
+			oo_parse_border (xin, style, attrs[1], MSTYLE_BORDER_REV_DIAGONAL);
 		else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_GNUM_NS_EXT, "border-line-style-bottom"))
 			oo_set_gnm_border (xin, style, attrs[1], MSTYLE_BORDER_BOTTOM);
 		else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_GNUM_NS_EXT, "border-line-style-top"))
@@ -2520,9 +2520,9 @@ oo_style_prop_cell (GsfXMLIn *xin, xmlChar const **attrs)
 		else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_GNUM_NS_EXT, "border-line-style-right"))
 			oo_set_gnm_border (xin, style, attrs[1], MSTYLE_BORDER_RIGHT);
 		else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_GNUM_NS_EXT, "diagonal-bl-tr-line-style"))
-			oo_set_gnm_border (xin, style, attrs[1], MSTYLE_BORDER_REV_DIAGONAL);
-		else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_GNUM_NS_EXT, "diagonal-tl-br-line-style"))
 			oo_set_gnm_border (xin, style, attrs[1], MSTYLE_BORDER_DIAGONAL);
+		else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_GNUM_NS_EXT, "diagonal-tl-br-line-style"))
+			oo_set_gnm_border (xin, style, attrs[1], MSTYLE_BORDER_REV_DIAGONAL);
 		else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_STYLE, "font-name"))
 			gnm_style_set_font_name (style, CXML2C (attrs[1]));
 		else if (oo_attr_bool (xin, attrs, OO_NS_STYLE, "shrink-to-fit", &btmp))
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 07d24de..b6a5a8f 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -677,8 +677,8 @@ odf_write_style_cell_properties (GnmOOExport *state, GnmStyle const *style)
 	BORDERSTYLE(MSTYLE_BORDER_BOTTOM,FOSTYLE "border-bottom", STYLE "border-line-width-bottom", GNMSTYLE "border-line-style-bottom");
 	BORDERSTYLE(MSTYLE_BORDER_LEFT,FOSTYLE "border-left", STYLE "border-line-width-left", GNMSTYLE "border-line-style-left");
 	BORDERSTYLE(MSTYLE_BORDER_RIGHT,FOSTYLE "border-right", STYLE "border-line-width-right", GNMSTYLE "border-line-style-right");
-	BORDERSTYLE(MSTYLE_BORDER_REV_DIAGONAL,STYLE "diagonal-bl-tr", STYLE "diagonal-bl-tr-widths", GNMSTYLE "diagonal-bl-tr-line-style");
-	BORDERSTYLE(MSTYLE_BORDER_DIAGONAL,STYLE "diagonal-tl-br",  STYLE "diagonal-tl-br-widths", GNMSTYLE "diagonal-tl-br-line-style");
+	BORDERSTYLE(MSTYLE_BORDER_DIAGONAL,STYLE "diagonal-bl-tr", STYLE "diagonal-bl-tr-widths", GNMSTYLE "diagonal-bl-tr-line-style");
+	BORDERSTYLE(MSTYLE_BORDER_REV_DIAGONAL,STYLE "diagonal-tl-br",  STYLE "diagonal-tl-br-widths", GNMSTYLE "diagonal-tl-br-line-style");
 	/* note that we are at this time not setting any of:
 	   fo:padding 18.209,
 	   fo:padding-bottom 18.210,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]