~ubuntu-branches/ubuntu/feisty/gnumeric/feisty

« back to all changes in this revision

Viewing changes to src/dialogs/dialog-cell-format.c

  • Committer: Bazaar Package Importer
  • Author(s): Gauvain Pocentek
  • Date: 2006-12-06 13:55:23 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20061206135523-6bh02cebuk0hduva
Tags: 1.7.5-1ubuntu1
* Merge with debian experimental:
  - debian/control, debian/*-gtk-*, debian/rules,
    debian/shlibs.local: Xubuntu changes for
    gtk/gnome multibuild.
  - run intltool-update in po*
  - Build Depend on intltool

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
typedef struct {
124
124
        struct _FormatState *state;
125
125
        GtkToggleButton  *button;
126
 
        StyleBorderType   pattern_index;
 
126
        GnmStyleBorderType        pattern_index;
127
127
        gboolean          is_selected;  /* Is it selected */
128
 
        StyleBorderLocation   index;
 
128
        GnmStyleBorderLocation   index;
129
129
        guint             rgba;
130
130
        gboolean          is_auto_color;
131
131
        gboolean          is_set;       /* Has the element been changed */
149
149
        GnmValue        *value;
150
150
        unsigned int     conflicts;
151
151
        GnmStyle        *style, *result;
152
 
        GnmBorder *borders[STYLE_BORDER_EDGE_MAX];
 
152
        GnmBorder *borders[GNM_STYLE_BORDER_EDGE_MAX];
153
153
 
154
154
        int              selection_mask;
155
155
        gboolean         enable_edit;
174
174
                FooCanvasItem   *back;
175
175
                FooCanvasItem *lines[20];
176
176
 
177
 
                BorderPicker     edge[STYLE_BORDER_EDGE_MAX];
 
177
                BorderPicker     edge[GNM_STYLE_BORDER_EDGE_MAX];
178
178
                ColorPicker      color;
179
179
                guint            rgba;
180
180
                gboolean         is_auto_color;
999
999
{
1000
1000
        double const                    points[4];
1001
1001
        int const                       states;
1002
 
        StyleBorderLocation     const   location;
 
1002
        GnmStyleBorderLocation  const   location;
1003
1003
} const line_info[] =
1004
1004
{
1005
1005
        /*
1010
1010
        */
1011
1011
 
1012
1012
        /* 1, 2, 3, 4 */
1013
 
        { { L, T, R, T }, 0xf, STYLE_BORDER_TOP },
1014
 
        { { L, B, R, B }, 0xf, STYLE_BORDER_BOTTOM },
1015
 
        { { L, T, L, B }, 0xf, STYLE_BORDER_LEFT },
1016
 
        { { R, T, R, B }, 0xf, STYLE_BORDER_RIGHT },
 
1013
        { { L, T, R, T }, 0xf, GNM_STYLE_BORDER_TOP },
 
1014
        { { L, B, R, B }, 0xf, GNM_STYLE_BORDER_BOTTOM },
 
1015
        { { L, T, L, B }, 0xf, GNM_STYLE_BORDER_LEFT },
 
1016
        { { R, T, R, B }, 0xf, GNM_STYLE_BORDER_RIGHT },
1017
1017
 
1018
1018
        /* Only for state 2 & 4 */
1019
 
        { { L, H, R, H }, 0xa, STYLE_BORDER_HORIZ },
 
1019
        { { L, H, R, H }, 0xa, GNM_STYLE_BORDER_HORIZ },
1020
1020
 
1021
1021
        /* Only for state 3 & 4 */
1022
 
        { { V, T, V, B }, 0xc, STYLE_BORDER_VERT },
 
1022
        { { V, T, V, B }, 0xc, GNM_STYLE_BORDER_VERT },
1023
1023
 
1024
1024
        /* Only for state 1 & 4 */
1025
 
        { { L, T, R, B }, 0x9, STYLE_BORDER_REV_DIAG },
1026
 
        { { L, B, R, T }, 0x9, STYLE_BORDER_DIAG},
 
1025
        { { L, T, R, B }, 0x9, GNM_STYLE_BORDER_REV_DIAG },
 
1026
        { { L, B, R, T }, 0x9, GNM_STYLE_BORDER_DIAG},
1027
1027
 
1028
1028
        /* Only for state 2 */
1029
 
        { { L, T, R, H }, 0x2, STYLE_BORDER_REV_DIAG },
1030
 
        { { L, H, R, B }, 0x2, STYLE_BORDER_REV_DIAG },
1031
 
        { { L, H, R, T }, 0x2, STYLE_BORDER_DIAG },
1032
 
        { { L, B, R, H }, 0x2, STYLE_BORDER_DIAG },
 
1029
        { { L, T, R, H }, 0x2, GNM_STYLE_BORDER_REV_DIAG },
 
1030
        { { L, H, R, B }, 0x2, GNM_STYLE_BORDER_REV_DIAG },
 
1031
        { { L, H, R, T }, 0x2, GNM_STYLE_BORDER_DIAG },
 
1032
        { { L, B, R, H }, 0x2, GNM_STYLE_BORDER_DIAG },
1033
1033
 
1034
1034
        /* Only for state 3 */
1035
 
        { { L, T, V, B }, 0x4, STYLE_BORDER_REV_DIAG },
1036
 
        { { V, T, R, B }, 0x4, STYLE_BORDER_REV_DIAG },
1037
 
        { { L, B, V, T }, 0x4, STYLE_BORDER_DIAG },
1038
 
        { { V, B, R, T }, 0x4, STYLE_BORDER_DIAG },
 
1035
        { { L, T, V, B }, 0x4, GNM_STYLE_BORDER_REV_DIAG },
 
1036
        { { V, T, R, B }, 0x4, GNM_STYLE_BORDER_REV_DIAG },
 
1037
        { { L, B, V, T }, 0x4, GNM_STYLE_BORDER_DIAG },
 
1038
        { { V, B, R, T }, 0x4, GNM_STYLE_BORDER_DIAG },
1039
1039
 
1040
1040
        /* Only for state 4 */
1041
 
        { { L, H, V, B }, 0x8, STYLE_BORDER_REV_DIAG },
1042
 
        { { V, T, R, H }, 0x8, STYLE_BORDER_REV_DIAG },
1043
 
        { { L, H, V, T }, 0x8, STYLE_BORDER_DIAG },
1044
 
        { { V, B, R, H }, 0x8, STYLE_BORDER_DIAG },
 
1041
        { { L, H, V, B }, 0x8, GNM_STYLE_BORDER_REV_DIAG },
 
1042
        { { V, T, R, H }, 0x8, GNM_STYLE_BORDER_REV_DIAG },
 
1043
        { { L, H, V, T }, 0x8, GNM_STYLE_BORDER_DIAG },
 
1044
        { { V, B, R, H }, 0x8, GNM_STYLE_BORDER_DIAG },
1045
1045
 
1046
1046
        { { 0., 0., 0., 0. }, 0, 0 }
1047
1047
};
1048
1048
 
1049
1049
static GnmBorder *
1050
 
border_get_mstyle (FormatState const *state, StyleBorderLocation const loc)
 
1050
border_get_mstyle (FormatState const *state, GnmStyleBorderLocation const loc)
1051
1051
{
1052
1052
        BorderPicker const *edge = & state->border.edge[loc];
1053
1053
        GnmColor *color;
1056
1056
                return NULL;
1057
1057
 
1058
1058
        if (!edge->is_selected)
1059
 
                return style_border_ref (style_border_none ());
 
1059
                return gnm_style_border_ref (gnm_style_border_none ());
1060
1060
 
1061
1061
        if (edge->is_auto_color) {
1062
1062
                color = sheet_style_get_auto_pattern_color (state->sheet);
1066
1066
                guint8 const b = (guint8) (edge->rgba >>  8);
1067
1067
                color = style_color_new_i8 (r, g, b);
1068
1068
        }
1069
 
        return style_border_fetch
 
1069
        return gnm_style_border_fetch
1070
1070
                (state->border.edge[loc].pattern_index, color,
1071
 
                 style_border_get_orientation (loc));
 
1071
                 gnm_style_border_get_orientation (loc));
1072
1072
}
1073
1073
 
1074
1074
/* See if either the color or pattern for any segment has changed and
1132
1132
         * However, the compiler is confused and thinks it is not
1133
1133
         * so we are forced to pick a random irrelevant value.
1134
1134
         */
1135
 
        StyleBorderLocation      which = STYLE_BORDER_LEFT;
 
1135
        GnmStyleBorderLocation   which = GNM_STYLE_BORDER_LEFT;
1136
1136
 
1137
1137
        if (event->button != 1)
1138
1138
                return FALSE;
1148
1148
        }
1149
1149
 
1150
1150
        /* The edges are always there */
1151
 
        if (x <= L+5.)          which = STYLE_BORDER_LEFT;
1152
 
        else if (y <= T+5.)     which = STYLE_BORDER_TOP;
1153
 
        else if (y >= B-5.)     which = STYLE_BORDER_BOTTOM;
1154
 
        else if (x >= R-5.)     which = STYLE_BORDER_RIGHT;
 
1151
        if (x <= L+5.)          which = GNM_STYLE_BORDER_LEFT;
 
1152
        else if (y <= T+5.)     which = GNM_STYLE_BORDER_TOP;
 
1153
        else if (y >= B-5.)     which = GNM_STYLE_BORDER_BOTTOM;
 
1154
        else if (x >= R-5.)     which = GNM_STYLE_BORDER_RIGHT;
1155
1155
        else switch (state->selection_mask) {
1156
1156
        case 1:
1157
1157
                if ((x < V) == (y < H))
1158
 
                        which = STYLE_BORDER_REV_DIAG;
 
1158
                        which = GNM_STYLE_BORDER_REV_DIAG;
1159
1159
                else
1160
 
                        which = STYLE_BORDER_DIAG;
 
1160
                        which = GNM_STYLE_BORDER_DIAG;
1161
1161
                break;
1162
1162
        case 2:
1163
1163
                if (H-5. < y  && y < H+5.)
1164
 
                        which = STYLE_BORDER_HORIZ;
 
1164
                        which = GNM_STYLE_BORDER_HORIZ;
1165
1165
                else {
1166
1166
                        /* Map everything back to the top */
1167
1167
                        if (y > H) y -= H-10.;
1168
1168
 
1169
1169
                        if ((x < V) == (y < H/2.))
1170
 
                                which = STYLE_BORDER_REV_DIAG;
 
1170
                                which = GNM_STYLE_BORDER_REV_DIAG;
1171
1171
                        else
1172
 
                                which = STYLE_BORDER_DIAG;
 
1172
                                which = GNM_STYLE_BORDER_DIAG;
1173
1173
                }
1174
1174
                break;
1175
1175
        case 4:
1176
1176
                if (V-5. < x  && x < V+5.)
1177
 
                        which = STYLE_BORDER_VERT;
 
1177
                        which = GNM_STYLE_BORDER_VERT;
1178
1178
                else {
1179
1179
                        /* Map everything back to the left */
1180
1180
                        if (x > V) x -= V-10.;
1181
1181
 
1182
1182
                        if ((x < V/2.) == (y < H))
1183
 
                                which = STYLE_BORDER_REV_DIAG;
 
1183
                                which = GNM_STYLE_BORDER_REV_DIAG;
1184
1184
                        else
1185
 
                                which = STYLE_BORDER_DIAG;
 
1185
                                which = GNM_STYLE_BORDER_DIAG;
1186
1186
                }
1187
1187
                break;
1188
1188
        case 8:
1189
1189
                if (V-5. < x  && x < V+5.)
1190
 
                        which = STYLE_BORDER_VERT;
 
1190
                        which = GNM_STYLE_BORDER_VERT;
1191
1191
                else if (H-5. < y  && y < H+5.)
1192
 
                        which = STYLE_BORDER_HORIZ;
 
1192
                        which = GNM_STYLE_BORDER_HORIZ;
1193
1193
                else {
1194
1194
                        /* Map everything back to the 1st quadrant */
1195
1195
                        if (x > V) x -= V-10.;
1196
1196
                        if (y > H) y -= H-10.;
1197
1197
 
1198
1198
                        if ((x < V/2.) == (y < H/2.))
1199
 
                                which = STYLE_BORDER_REV_DIAG;
 
1199
                                which = GNM_STYLE_BORDER_REV_DIAG;
1200
1200
                        else
1201
 
                                which = STYLE_BORDER_DIAG;
 
1201
                                which = GNM_STYLE_BORDER_DIAG;
1202
1202
                }
1203
1203
                break;
1204
1204
 
1311
1311
                foo_canvas_points_free (points);
1312
1312
        }
1313
1313
 
1314
 
        for (i = 0; i < STYLE_BORDER_EDGE_MAX; ++i) {
 
1314
        for (i = 0; i < GNM_STYLE_BORDER_EDGE_MAX; ++i) {
1315
1315
                BorderPicker *border = &state->border.edge[i];
1316
1316
                void (*func)(FooCanvasItem *item) = border->is_selected
1317
1317
                        ? &foo_canvas_item_show : &foo_canvas_item_hide;
1330
1330
cb_border_preset_clicked (GtkButton *btn, FormatState *state)
1331
1331
{
1332
1332
        gboolean target_state;
1333
 
        StyleBorderLocation i, last;
 
1333
        GnmStyleBorderLocation i, last;
1334
1334
 
1335
1335
        if (state->border.preset[BORDER_PRESET_NONE] == btn) {
1336
 
                i = STYLE_BORDER_TOP;
1337
 
                last = STYLE_BORDER_VERT;
 
1336
                i = GNM_STYLE_BORDER_TOP;
 
1337
                last = GNM_STYLE_BORDER_VERT;
1338
1338
                target_state = FALSE;
1339
1339
        } else if (state->border.preset[BORDER_PRESET_OUTLINE] == btn) {
1340
 
                i = STYLE_BORDER_TOP;
1341
 
                last = STYLE_BORDER_RIGHT;
 
1340
                i = GNM_STYLE_BORDER_TOP;
 
1341
                last = GNM_STYLE_BORDER_RIGHT;
1342
1342
                target_state = TRUE;
1343
1343
        } else if (state->border.preset[BORDER_PRESET_INSIDE] == btn) {
1344
 
                i = STYLE_BORDER_HORIZ;
1345
 
                last = STYLE_BORDER_VERT;
 
1344
                i = GNM_STYLE_BORDER_HORIZ;
 
1345
                last = GNM_STYLE_BORDER_VERT;
1346
1346
                target_state = TRUE;
1347
1347
        } else {
1348
1348
                g_warning ("Unknown border preset button");
1411
1411
 
1412
1412
typedef struct
1413
1413
{
1414
 
        StyleBorderLocation     t;
 
1414
        GnmStyleBorderLocation     t;
1415
1415
        GnmBorder const *res;
1416
1416
} check_border_closure_t;
1417
1417
 
1420
1420
 * hide if needed.
1421
1421
 */
1422
1422
static void
1423
 
init_border_button (FormatState *state, StyleBorderLocation const i,
 
1423
init_border_button (FormatState *state, GnmStyleBorderLocation const i,
1424
1424
                    GtkWidget *button,
1425
1425
                    GnmBorder const * const border)
1426
1426
{
1427
1427
        if (border == NULL) {
1428
1428
                state->border.edge[i].rgba = 0;
1429
1429
                state->border.edge[i].is_auto_color = TRUE;
1430
 
                state->border.edge[i].pattern_index = STYLE_BORDER_INCONSISTENT;
 
1430
                state->border.edge[i].pattern_index = GNM_STYLE_BORDER_INCONSISTENT;
1431
1431
                state->border.edge[i].is_selected = TRUE;
1432
1432
        } else {
1433
1433
                GnmColor const *c = border->color;
1437
1437
                        c->gdk_color.blue >> 8);
1438
1438
                state->border.edge[i].is_auto_color = c->is_auto;
1439
1439
                state->border.edge[i].pattern_index = border->line_type;
1440
 
                state->border.edge[i].is_selected = (border->line_type != STYLE_BORDER_NONE);
 
1440
                state->border.edge[i].is_selected = (border->line_type != GNM_STYLE_BORDER_NONE);
1441
1441
        }
1442
1442
 
1443
1443
        state->border.edge[i].state = state;
1454
1454
                "toggled",
1455
1455
                G_CALLBACK (cb_border_toggle), &state->border.edge[i]);
1456
1456
 
1457
 
        if ((i == STYLE_BORDER_HORIZ && !(state->selection_mask & 0xa)) ||
1458
 
            (i == STYLE_BORDER_VERT  && !(state->selection_mask & 0xc)))
 
1457
        if ((i == GNM_STYLE_BORDER_HORIZ && !(state->selection_mask & 0xa)) ||
 
1458
            (i == GNM_STYLE_BORDER_VERT  && !(state->selection_mask & 0xc)))
1459
1459
                gtk_widget_hide (button);
1460
1460
}
1461
1461
 
1943
1943
cb_fmt_dialog_dialog_buttons (GtkWidget *btn, FormatState *state)
1944
1944
{
1945
1945
#if 0
1946
 
        static StyleBorderLocation const bmap_ltr[] = {
1947
 
                STYLE_BORDER_TOP,       STYLE_BORDER_BOTTOM,
1948
 
                STYLE_BORDER_LEFT,      STYLE_BORDER_RIGHT,
1949
 
                STYLE_BORDER_REV_DIAG,  STYLE_BORDER_DIAG,
1950
 
                STYLE_BORDER_HORIZ,     STYLE_BORDER_VERT
1951
 
        };
1952
 
        static StyleBorderLocation const bmap_rtl[] = {
1953
 
                STYLE_BORDER_TOP,       STYLE_BORDER_BOTTOM,
1954
 
                /* reverse */
1955
 
                STYLE_BORDER_RIGHT,     STYLE_BORDER_LEFT,
1956
 
                /* reverse */
1957
 
                STYLE_BORDER_DIAG,      STYLE_BORDER_REV_DIAG,
1958
 
                STYLE_BORDER_HORIZ,     STYLE_BORDER_VERT
1959
 
        };
1960
 
        StyleBorderLocation const *bmap = bmap_ltr;
 
1946
        static GnmStyleBorderLocation const bmap_ltr[] = {
 
1947
                GNM_STYLE_BORDER_TOP,   GNM_STYLE_BORDER_BOTTOM,
 
1948
                GNM_STYLE_BORDER_LEFT,  GNM_STYLE_BORDER_RIGHT,
 
1949
                GNM_STYLE_BORDER_REV_DIAG,      GNM_STYLE_BORDER_DIAG,
 
1950
                GNM_STYLE_BORDER_HORIZ, GNM_STYLE_BORDER_VERT
 
1951
        };
 
1952
        static GnmStyleBorderLocation const bmap_rtl[] = {
 
1953
                GNM_STYLE_BORDER_TOP,   GNM_STYLE_BORDER_BOTTOM,
 
1954
                /* reverse */
 
1955
                GNM_STYLE_BORDER_RIGHT, GNM_STYLE_BORDER_LEFT,
 
1956
                /* reverse */
 
1957
                GNM_STYLE_BORDER_DIAG,  GNM_STYLE_BORDER_REV_DIAG,
 
1958
                GNM_STYLE_BORDER_HORIZ, GNM_STYLE_BORDER_VERT
 
1959
        };
 
1960
        GnmStyleBorderLocation const *bmap = bmap_ltr;
1961
1961
 
1962
1962
        if (NULL != state->sheet && state->sheet->text_is_rtl)
1963
1963
                bmap = bmap_rtl;
1964
1964
#endif
1965
1965
 
1966
1966
        if (btn == state->apply_button || btn == state->ok_button) {
1967
 
                GnmBorder *borders[STYLE_BORDER_EDGE_MAX];
 
1967
                GnmBorder *borders[GNM_STYLE_BORDER_EDGE_MAX];
1968
1968
                int i;
1969
1969
 
1970
1970
                if (state->validation.changed)
1994
1994
                        state->protection.sheet_protected_changed = FALSE;
1995
1995
                }
1996
1996
 
1997
 
                for (i = STYLE_BORDER_TOP; i < STYLE_BORDER_EDGE_MAX; i++)
 
1997
                for (i = GNM_STYLE_BORDER_TOP; i < GNM_STYLE_BORDER_EDGE_MAX; i++)
1998
1998
                        borders[i] = border_get_mstyle (state, i);
1999
1999
 
2000
2000
                cmd_selection_format (WORKBOOK_CONTROL (state->wbcg),
2075
2075
{
2076
2076
        static struct {
2077
2077
                char const *const name;
2078
 
                StyleBorderType const pattern;
 
2078
                GnmStyleBorderType const pattern;
2079
2079
        } const line_pattern_buttons[] = {
2080
 
                { "line_pattern_none", STYLE_BORDER_NONE },
2081
 
                { "line_pattern_medium_dash_dot_dot", STYLE_BORDER_MEDIUM_DASH_DOT_DOT },
2082
 
 
2083
 
                { "line_pattern_hair", STYLE_BORDER_HAIR },
2084
 
                { "line_pattern_slant", STYLE_BORDER_SLANTED_DASH_DOT },
2085
 
 
2086
 
                { "line_pattern_dotted", STYLE_BORDER_DOTTED },
2087
 
                { "line_pattern_medium_dash_dot", STYLE_BORDER_MEDIUM_DASH_DOT },
2088
 
 
2089
 
                { "line_pattern_dash_dot_dot", STYLE_BORDER_DASH_DOT_DOT },
2090
 
                { "line_pattern_medium_dash", STYLE_BORDER_MEDIUM_DASH },
2091
 
 
2092
 
                { "line_pattern_dash_dot", STYLE_BORDER_DASH_DOT },
2093
 
                { "line_pattern_medium", STYLE_BORDER_MEDIUM },
2094
 
 
2095
 
                { "line_pattern_dashed", STYLE_BORDER_DASHED },
2096
 
                { "line_pattern_thick", STYLE_BORDER_THICK },
2097
 
 
2098
 
                { "line_pattern_thin", STYLE_BORDER_THIN },
2099
 
                { "line_pattern_double", STYLE_BORDER_DOUBLE },
 
2080
                { "line_pattern_none", GNM_STYLE_BORDER_NONE },
 
2081
                { "line_pattern_medium_dash_dot_dot", GNM_STYLE_BORDER_MEDIUM_DASH_DOT_DOT },
 
2082
 
 
2083
                { "line_pattern_hair", GNM_STYLE_BORDER_HAIR },
 
2084
                { "line_pattern_slant", GNM_STYLE_BORDER_SLANTED_DASH_DOT },
 
2085
 
 
2086
                { "line_pattern_dotted", GNM_STYLE_BORDER_DOTTED },
 
2087
                { "line_pattern_medium_dash_dot", GNM_STYLE_BORDER_MEDIUM_DASH_DOT },
 
2088
 
 
2089
                { "line_pattern_dash_dot_dot", GNM_STYLE_BORDER_DASH_DOT_DOT },
 
2090
                { "line_pattern_medium_dash", GNM_STYLE_BORDER_MEDIUM_DASH },
 
2091
 
 
2092
                { "line_pattern_dash_dot", GNM_STYLE_BORDER_DASH_DOT },
 
2093
                { "line_pattern_medium", GNM_STYLE_BORDER_MEDIUM },
 
2094
 
 
2095
                { "line_pattern_dashed", GNM_STYLE_BORDER_DASHED },
 
2096
                { "line_pattern_thick", GNM_STYLE_BORDER_THICK },
 
2097
 
 
2098
                { "line_pattern_thin", GNM_STYLE_BORDER_THIN },
 
2099
                { "line_pattern_double", GNM_STYLE_BORDER_DOUBLE },
2100
2100
 
2101
2101
                { NULL }
2102
2102
        };
2148
2148
        char const *name;
2149
2149
        gboolean has_back;
2150
2150
        GdkColor *default_border_color;
2151
 
        int default_border_style = STYLE_BORDER_THIN;
 
2151
        int default_border_style = GNM_STYLE_BORDER_THIN;
2152
2152
 
2153
2153
        GtkWidget *tmp, *dialog = glade_xml_get_widget (state->gui, "CellFormat");
2154
2154
        g_return_if_fail (dialog != NULL);
2193
2193
        /* Setup border line pattern buttons & select the 1st button */
2194
2194
        for (i = MSTYLE_BORDER_TOP; i < MSTYLE_BORDER_DIAGONAL; i++) {
2195
2195
                GnmBorder const *border = gnm_style_get_border (state->style, i);
2196
 
                if (!style_border_is_blank (border)) {
 
2196
                if (!gnm_style_border_is_blank (border)) {
2197
2197
                        default_border_color = &border->color->gdk_color;
2198
2198
                        default_border_style = border->line_type;
2199
2199
                        break;
2237
2237
                if (tmp != NULL) {
2238
2238
                        init_border_button (state, i, tmp,
2239
2239
                                            state->borders[i]);
2240
 
                        style_border_unref (state->borders[i]);
 
2240
                        gnm_style_border_unref (state->borders[i]);
2241
2241
                }
2242
2242
        }
2243
2243
 
2343
2343
                           gpointer user_data)
2344
2344
{
2345
2345
        FormatState *state = user_data;
2346
 
        GSList *merged = sheet_merge_get_overlap (sv->sheet, range);
 
2346
        GSList *merged = gnm_sheet_merge_get_overlap (sv->sheet, range);
2347
2347
        gboolean allow_multi =
2348
2348
                merged == NULL ||
2349
2349
                merged->next != NULL ||