[gnumeric] Style: fix border problem.



commit fe7ba6ab22bb2bfbecce39a3b9d883d3c23dd003
Author: Morten Welinder <terra gnome org>
Date:   Mon Jul 15 23:04:29 2013 -0400

    Style: fix border problem.

 ChangeLog    |    3 +++
 NEWS         |    2 +-
 src/mstyle.c |    3 +++
 3 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index dc51e97..f85b8c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2013-07-15  Morten Welinder  <terra gnome org>
 
+       * src/mstyle.c (gnm_style_cmp): Borders can be NULL; deal with
+       that.  Fixes #704004.
+
        * src/expr.c (gnm_expr_new_range_ctor): Undo previous change.
 
        * src/dependent.c (link_range_dep, unlink_range_dep): Protect
diff --git a/NEWS b/NEWS
index d94e746..a01e313 100644
--- a/NEWS
+++ b/NEWS
@@ -5,7 +5,7 @@ Andreas:
 
 Morten:
        * Fix crazy parsing problem.  [#704109] [#704140]
-       * Fix crashes on corrupted files.  [#704102]
+       * Fix crashes on corrupted files.  [#704102] [#704004]
 
 --------------------------------------------------------------------------
 Gnumeric 1.12.4
diff --git a/src/mstyle.c b/src/mstyle.c
index cc929e2..540fcd5 100644
--- a/src/mstyle.c
+++ b/src/mstyle.c
@@ -1030,6 +1030,9 @@ gnm_style_cmp (GnmStyle const *a, GnmStyle const *b)
                        continue;
                ba = a->borders[e - MSTYLE_BORDER_TOP];
                bb = b->borders[e - MSTYLE_BORDER_TOP];
+               if (ba == bb)
+                       continue;  /* Handles both being NULL */
+               CMP_TRY_NUMBER_RAW(!!ba, !!bb);
                CMP_TRY_NUMBER_RAW(ba->line_type, bb->line_type);
                CMP_TRY_NUMBER_RAW(ba->color->go_color, bb->color->go_color);
                CMP_TRY_NUMBER_RAW(ba->begin_margin, bb->begin_margin);


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